\r\n\r\n\r\n\r\n\r\n","import { render } from \"./MainInput.vue?vue&type=template&id=0feab27d&scoped=true\"\nimport script from \"./MainInput.vue?vue&type=script&lang=js\"\nexport * from \"./MainInput.vue?vue&type=script&lang=js\"\n\nimport \"./MainInput.vue?vue&type=style&index=0&id=0feab27d&scoped=true&lang=css\"\n\nimport exportComponent from \"F:\\\\NodeJS\\\\csgo_tool\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0feab27d\"]])\n\nexport default __exports__","\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n","import { render } from \"./SimpleRebindInput.vue?vue&type=template&id=45523de3&scoped=true\"\nimport script from \"./SimpleRebindInput.vue?vue&type=script&lang=js\"\nexport * from \"./SimpleRebindInput.vue?vue&type=script&lang=js\"\n\nimport \"./SimpleRebindInput.vue?vue&type=style&index=0&id=45523de3&scoped=true&lang=css\"\n\nimport exportComponent from \"F:\\\\NodeJS\\\\csgo_tool\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-45523de3\"]])\n\nexport default __exports__","\r\n
\r\n
{{ label }}
\r\n
{{description}}
\r\n
\r\n\r\n\r\n\r\n\r\n","import { render } from \"./SelectCard.vue?vue&type=template&id=0da95138&scoped=true\"\nimport script from \"./SelectCard.vue?vue&type=script&lang=js\"\nexport * from \"./SelectCard.vue?vue&type=script&lang=js\"\n\nimport \"./SelectCard.vue?vue&type=style&index=0&id=0da95138&scoped=true&lang=css\"\n\nimport exportComponent from \"F:\\\\NodeJS\\\\csgo_tool\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0da95138\"]])\n\nexport default __exports__","export default function(inputText, container=Array()) {\r\n\tconst lines = inputText.split(/\\n/g);\r\n\r\n\tfor (let i=0;i t.trim());\r\n\tconst newPos = Number(args[3].replace(\";setang\", \"\")) - 64;\r\n\targs[3] = newPos.toString() + \";setang\"\r\n\treturn args.join(\" \");\r\n}","import { render } from \"./RebinderView.vue?vue&type=template&id=5c57f50b&scoped=true\"\nimport script from \"./RebinderView.vue?vue&type=script&lang=js\"\nexport * from \"./RebinderView.vue?vue&type=script&lang=js\"\n\nimport \"./RebinderView.vue?vue&type=style&index=0&id=5c57f50b&scoped=true&lang=css\"\n\nimport exportComponent from \"F:\\\\NodeJS\\\\csgo_tool\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5c57f50b\"]])\n\nexport default __exports__","import IndexView from \"@/routes/IndexView\";\r\nimport RebinderView from \"@/routes/rebinder/RebinderView\";\r\n\r\nexport default [\r\n\t{ path: '/', component: IndexView },\r\n\t{ path: '/rebind', component: RebinderView },\r\n]","\n
\n\n\n\n\n \n
\n\n\n\n\n\n","import { render } from \"./App.vue?vue&type=template&id=19c755e4\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=19c755e4&lang=css\"\n\nimport exportComponent from \"F:\\\\NodeJS\\\\csgo_tool\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { createApp } from 'vue'\nimport {createRouter,createWebHashHistory} from \"vue-router\";\nimport routes from \"./routes\";\nimport App from './App.vue'\n\nconst router = createRouter({\n\t// 4. Provide the history implementation to use. We are using the hash history for simplicity here.\n\thistory: createWebHashHistory(),\n\troutes, // short for `routes: routes`\n});\n\ncreateApp(App)\n\t.use(router)\n\t.mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkcsgo_tool\"] = self[\"webpackChunkcsgo_tool\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(9766); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["_createElementVNode","_hoisted_1","_createElementBlock","_hoisted_2","name","__exports__","render","class","for","style","id","ref","rows","_hoisted_4","_hoisted_5","type","onInput","$options","accept","$data","_hoisted_6","_hoisted_7","_createVNode","_component_SelectCard","onClick","label","description","_component_MainInput","value","keybind","onOnInput","placeholder","required","alias","injection","_hoisted_11","_Fragment","_renderList","key","entry","_createBlock","_component_SimpleRebindInput","onRemove","command","newValue","inject","comment","_hoisted_14","_hoisted_16","_hoisted_17","$props","_toDisplayString","props","String","Boolean","default","undefined","data","currentValue","this","methods","input","event","$emit","target","deleteHighlight","_ctx","$event","onMouseenter","onMouseleave","Number","remove","inputText","container","Array","lines","split","i","length","startsWith","item","subtractY","replace","extractMsg","push","line","slice","join","string","args","map","t","trim","newPos","toString","components","SimpleRebindInput","MainInput","SelectCard","values","parser","counter","entries","Map","file","mounted","newLine","window","addEventListener","keyHandler","unmounted","removeEventListener","setValue","set","$nextTick","children","$refs","commands","querySelector","focus","removeEntry","entryId","delete","size","lineEmpty","generate","minified","get","strings","endsWith","output","textContent","e","code","ctrlKey","shiftKey","setFile","files","parseFile","parserId","reader","FileReader","newEntries","readAsText","onload","PositionParser","result","path","component","IndexView","RebinderView","_component_router_view","router","createRouter","history","createWebHashHistory","routes","createApp","App","use","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","deferred","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","call","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/js/app.d8dc030a.js b/dist/js/app.d8dc030a.js
new file mode 100644
index 0000000..13a8aab
--- /dev/null
+++ b/dist/js/app.d8dc030a.js
@@ -0,0 +1,2 @@
+(function(){"use strict";var e={1971:function(e,t,n){var i=n(9242),r=n(2483),o=n(3396),l=n(7139);const a=e=>((0,o.dD)("data-v-376fe9f2"),e=e(),(0,o.Cn)(),e),s={class:"container"},u={key:0,class:"error box"},c={class:"row"},d={class:"box"},h=a((()=>(0,o._)("label",{for:"data-source"},"File Source",-1))),p=a((()=>(0,o._)("p",{style:{margin:".5rem"}},"Upload a file to use use as datasource for parsing.",-1))),m={key:0},v=a((()=>(0,o._)("h3",null,"Select parser",-1))),g={class:"row close-row"},f={class:"row"},y={id:"commands-container"},w=a((()=>(0,o._)("div",{class:"row"},[(0,o._)("h3",null,"Console Command:"),(0,o._)("h3",null,"Optional: Custom Injection:"),(0,o._)("h3",null,"Optional: Comment:")],-1))),b={id:"commands",ref:"commands"},_={class:"new-line-container"},k=a((()=>(0,o._)("label",{for:"new-line",class:"hotkey-label"},"Shift+Enter",-1))),j={id:"output-container"},S=a((()=>(0,o._)("label",{for:"generate",class:"hotkey-label"},"CTRL+Enter",-1))),$=a((()=>(0,o._)("label",{for:"generate-mini",class:"hotkey-label"},"CTRL+SHIFT+Enter",-1))),C={id:"output",rows:"10",class:"new-line-container",ref:"output"};function x(e,t,n,r,a,x){const I=(0,o.up)("SelectCard"),O=(0,o.up)("MainInput"),q=(0,o.up)("SimpleRebindInput");return(0,o.wg)(),(0,o.iD)("main",s,[a.error.show?((0,o.wg)(),(0,o.iD)("section",u,[(0,o._)("h1",null,(0,l.zw)(a.error.title),1),(0,o._)("p",null,(0,l.zw)(a.error.text),1),(0,o._)("code",null,(0,l.zw)(a.error.error),1)])):(0,o.kq)("",!0),(0,o._)("section",c,[(0,o._)("div",d,[(0,o._)("div",null,[h,p,(0,o._)("input",{type:"file",name:"data-source",id:"data-source",onInput:t[0]||(t[0]=(...e)=>x.setFile&&x.setFile(...e)),accept:".log, .txt, .cfg"},null,32)]),a.file?((0,o.wg)(),(0,o.iD)("div",m,[v,(0,o._)("div",g,[(0,o.Wm)(I,{onClick:t[1]||(t[1]=(0,i.iM)((e=>x.parseFile("position")),["stop"])),label:"Position",id:"position",description:"Reads output of 'getpos' command + includes any team chatbox message if it's in the line below it."}),(0,o.Wm)(I,{onClick:t[2]||(t[2]=(0,i.iM)((e=>x.parseFile("rebinder")),["stop"])),label:"Rebinder Output",id:"rebinder",description:"Load an output from this tool into the tool (load saved loops)"})])])):(0,o.kq)("",!0)])]),(0,o._)("section",f,[(0,o.Wm)(O,{value:a.values.keybind,onOnInput:x.setValue,id:"keybind",label:"Keybind",placeholder:"x",description:"The key to press to activate toggle",required:!0},null,8,["value","onOnInput"]),(0,o.Wm)(O,{value:a.values.alias,onOnInput:x.setValue,id:"alias",label:"Alias",placeholder:"do-thing",description:"The name you want to use on the aliases, which get an auto-number appended at the end.",required:!0},null,8,["value","onOnInput"]),(0,o.Wm)(O,{value:a.values.injection,onOnInput:x.setValue,id:"injection",label:"Optional: Global injection",placeholder:'say_team "next position!"',description:'An identical string to add after each command, like say_team "next position!"'},null,8,["value","onOnInput"]),(0,o.Wm)(O,{value:a.values.backwards,onOnInput:x.setValue,id:"backwards",label:"Optional: Backwards Key",placeholder:"y",description:"Add another key to go to previous backwards in the loop as well"},null,8,["value","onOnInput"])]),(0,o._)("section",y,[w,(0,o._)("div",b,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(a.entries,(([e,t])=>((0,o.wg)(),(0,o.j4)(q,{key:e,id:t.id,onRemove:x.removeEntry,"cmd-placeholder":t.command.placeholder,"cmd-value":t.command.value,"onUpdate:cmdValue":e=>t.command.value=e,"inject-placeholder":t.inject.placeholder,"inject-value":t.inject.value,"onUpdate:injectValue":e=>t.inject.value=e,"comment-placeholder":t.comment.placeholder,"comment-value":t.comment.value,"onUpdate:commentValue":e=>t.comment.value=e},null,8,["id","onRemove","cmd-placeholder","cmd-value","onUpdate:cmdValue","inject-placeholder","inject-value","onUpdate:injectValue","comment-placeholder","comment-value","onUpdate:commentValue"])))),128))],512),(0,o._)("div",_,[(0,o._)("button",{id:"new-line",onClick:t[3]||(t[3]=(...e)=>x.newLine&&x.newLine(...e))},"+ Add Command"),k])]),(0,o._)("section",j,[(0,o._)("div",null,[(0,o._)("div",null,[(0,o._)("button",{id:"generate",onClick:t[4]||(t[4]=e=>x.generate(!1))},"Generate Paste"),S]),(0,o._)("div",null,[(0,o._)("button",{id:"generate-mini",onClick:t[5]||(t[5]=e=>x.generate(!0))},"Minify"),$])]),(0,o._)("textarea",C,null,512)])])}const I={class:"input-main"},O=["for"],q=["name","id","placeholder","required","value"];function V(e,t,n,i,r,a){return(0,o.wg)(),(0,o.iD)("div",I,[(0,o._)("label",{for:n.id},(0,l.zw)(n.label),9,O),(0,o._)("p",null,(0,l.zw)(n.description),1),(0,o._)("input",{type:"text",name:n.id,id:n.id,placeholder:n.placeholder,required:n.required,value:n.value,onInput:t[0]||(t[0]=(...e)=>a.input&&a.input(...e))},null,40,q)])}var M={name:"MainInput",props:{label:{type:String,required:!0},description:{type:String,required:!0},placeholder:{type:String,required:!0},id:{type:String,required:!0},required:{type:Boolean,default:!1},value:{type:[String,void 0]}},methods:{input(e){this.$emit("onInput",{key:this.id,value:e.target.value}),this.currentValue=e.target.value}}},A=n(89);const W=(0,A.Z)(M,[["render",V],["__scopeId","data-v-c2b43c8c"]]);var D=W;const H=["id"],T=["placeholder","value"],E=["placeholder","value"],F=["placeholder","value"];function R(e,t,n,i,r,a){return(0,o.wg)(),(0,o.iD)("div",{class:(0,l.C_)(["command-line",{delete:r.deleteHighlight}]),id:n.id},[(0,o._)("div",{class:(0,l.C_)({deleteHighlight:r.deleteHighlight})},[(0,o._)("input",{type:"text",class:"cmd-input focus",placeholder:n.cmdPlaceholder,value:n.cmdValue,onInput:t[0]||(t[0]=t=>e.$emit("update:cmd-value",t.target.value)),required:""},null,40,T)],2),(0,o._)("div",{class:(0,l.C_)({deleteHighlight:r.deleteHighlight})},[(0,o._)("input",{type:"text",class:"inject-input focus",placeholder:n.injectPlaceholder,value:n.injectValue,onInput:t[1]||(t[1]=t=>e.$emit("update:inject-value",t.target.value)),required:""},null,40,E)],2),(0,o._)("div",{class:(0,l.C_)({deleteHighlight:r.deleteHighlight})},[(0,o._)("input",{type:"text",class:"comment-input",placeholder:n.commentPlaceholder,value:n.commentValue,onInput:t[2]||(t[2]=t=>e.$emit("update:comment-value",t.target.value))},null,40,F)],2),(0,o._)("button",{class:"delete-command",onClick:t[3]||(t[3]=(...e)=>a.remove&&a.remove(...e)),onMouseenter:t[4]||(t[4]=e=>r.deleteHighlight=!0),onMouseleave:t[5]||(t[5]=e=>r.deleteHighlight=!1)},"Delete",32)],10,H)}var P={name:"SimpleRebindInput",props:{id:{type:[String,Number],required:!0},cmdPlaceholder:{type:String,required:!0},commentPlaceholder:{type:String,required:!0},injectPlaceholder:{type:String,required:!0},cmdValue:{type:String},commentValue:{type:String},injectValue:{type:String}},data(){return{deleteHighlight:!1}},methods:{remove(){return this.$emit("remove",this.id)}}};const z=(0,A.Z)(P,[["render",R],["__scopeId","data-v-45523de3"]]);var L=z;const K=["id"],U={key:0};function B(e,t,n,i,r,a){return(0,o.wg)(),(0,o.iD)("div",{class:"option",id:n.id},[(0,o._)("h4",null,(0,l.zw)(n.label),1),n.description?((0,o.wg)(),(0,o.iD)("p",U,(0,l.zw)(n.description),1)):(0,o.kq)("",!0)],8,K)}var N={name:"SelectCard",props:{id:{type:String,required:!0},label:{type:String,required:!0},description:{type:String}}};const X=(0,A.Z)(N,[["render",B],["__scopeId","data-v-0da95138"]]);var G=X;function Z(e,t=Array()){const n=e.split(/\n/g);for(let i=0;ie.trim())),n=Number(t[3].replace(";setang",""))-64;return t[3]=n.toString()+";setang",t.join(" ")}function Q(e){const t=ee(e)?te(e):ne(e),n=ie(t.shift()),i=Array();let r=re(t);const o=t[0].split(" ").slice(-3);o[0].endsWith(";bind")&&o[1]!==n.keybind&&(n.backwards=o[1].replace(/"/g,""),r=r.filter((e=>e!==`bind ${n.backwards}`&&e!==`bind ${n.keybind}`))),r.length&&(n.injection=r.join(";"));const l=t.map((e=>e.split(";").filter(Boolean).filter((e=>!r.includes(e))).length-n.backwards?1:2)).reduce(((e,t)=>e+t),0)/t.length;for(let a=0;a"Alias "+e))),n}function ne(e){return e.split("\n").filter(Boolean).filter((e=>!1===/^[\r\n]$/.test(e))).map((e=>e.replace(/[\r\n]/g,"")))}function ie(e){const t=e.split(" ");return{keybind:t[1].replace(/"/g,""),alias:t[2].replace(/[";]/g,"").slice(0,-1)}}function re(e){const t=e.filter((e=>!e.startsWith("// "))),n=t.map((e=>e.split(";").filter(Boolean))),i=Object.create(null);for(let o=0;o!n.includes(e))),o.command.value=l.slice(0,Math.ceil(i/2)).join(";"),o.inject.value=l.slice(Math.ceil(i/2)).join(";"),{skip:!!o.comment.value,entry:o}}var le={name:"RebinderView",components:{SimpleRebindInput:L,MainInput:D,SelectCard:G},data(){return{error:{show:!1,title:void 0,text:void 0,error:void 0},values:{keybind:void 0,alias:void 0,injection:void 0,parser:void 0,backwards:void 0},counter:0,entries:new Map,file:void 0}},mounted(){this.newLine(),window.addEventListener("keydown",this.keyHandler)},unmounted(){window.removeEventListener("keydown",this.keyHandler)},methods:{setValue(e){this.values[e.key]=e.value},newLine(){this.counter++;const e=Math.random().toString(16).slice(2);this.entries.set(e,{id:e,command:{placeholder:"cl_crosshair_drawoutline 1;",value:void 0},comment:{placeholder:"Do X thing",value:void 0},inject:{placeholder:"say_team 'Did X';",value:void 0}}),this.$nextTick((()=>{const e=this.$refs.commands.children;e[e.length-1].querySelector(".focus").focus()}))},removeEntry(e){if(this.entries.delete(e),!this.entries.size)return this.newLine()},lineEmpty(e){return!e?.command?.value&&!e?.inject?.value&&!e?.comment?.value},missingMandatory(){return this.lineEmpty(this.entries.values().next().value)?(this.error.title="No Input",this.error.text="There's no commands defined — write some into the fields below.",this.error.error=void 0,this.error.show=!0,!0):this.values.keybind?!this.values.alias&&(this.error.title="Missing Alias",this.error.text="You must define an alias for this script. Fill in the Alias field below.",this.error.error=void 0,this.error.show=!0,!0):(this.error.title="Missing Keybind",this.error.text="You must define a keybind. Fill in the Keybind field below.",this.error.error=void 0,this.error.show=!0,!0)},generate(e=!1){if(this.error.show=!1,!this.missingMandatory())try{const t=[`bind ${this.values.keybind} "${this.values.alias}0";${e?"":"\n"}`];let n=this.counter=0;for(const[,i]of this.entries){let r=i.command.value,o=i.inject.value;const l=i.comment.value;let a="";!e&&l&&(n&&(a="\n"),a+="// "+l.trim()+"\n"),r.endsWith('"')&&(r=r.slice(0,-1)),o&&!o.endsWith(";")&&(o+=";");let s=this.values.injection;s&&!s.endsWith(";")&&(s+=";"),n===this.entries.size-1?a+=`Alias "${this.values.alias}${n}" "${r};${o||""}${s||""}bind ${this.values.keybind} "${this.values.alias}0";${this.backwards(n,this.entries.size-1)}${e?"":"\n"}`:a+=`Alias "${this.values.alias}${n}" "${r};${o||""}${s||""}bind ${this.values.keybind} "${this.values.alias}${n+1}";${this.backwards(n,this.entries.size-1)}`,t.push(a),n++}this.$refs.output.textContent=t.join(e?"":"\n")}catch(t){this.error.title="Error Generating",this.error.text="An unknown error occurred when trying to generate the output.",this.error.error=t.toString(),this.error.show=!0}},backwards(e,t){return this.values.backwards?`bind ${this.values.backwards} "${this.values.alias}${e?e-1:t}"`:""},keyHandler(e){if("Enter"===e.code)return e.ctrlKey&&e.shiftKey?this.generate(!0):e.shiftKey?this.newLine():e.ctrlKey?this.generate():void 0},setFile(e){this.file=e.target.files[0]},parseFile(e){this.error.show=!1;const t=new FileReader;let n=Array();t.readAsText(this.file,"UTF-8"),t.onerror=e=>{this.error.title="Could Not Read",this.error.text="Something went wrong trying to read the file.",this.error.error=e.toString(),this.error.show=!0},t.onload=t=>{switch(e){case"position":try{const e=Z(t.target.result);n.push(...e.entries)}catch(i){this.error.title="Could Not Parse",this.error.text="Something went wrong trying to parse the file. Is the file a CS:GO Console output?",this.error.error=i.toString(),this.error.show=!0}break;case"rebinder":try{const e=Q(t.target.result);for(const t in e.values)this.setValue({key:t,value:e.values[t]});n.push(...e.entries)}catch(i){this.error.title="Could Not Parse",this.error.text="Something went wrong trying to parse the file. Is the file a CS:GO Rebind Tool output?",this.error.error=i.toString(),this.error.show=!0}break;default:return}this.lineEmpty(this.entries.values().next().value)&&(this.entries=new Map,this.counter=0),n.map((e=>{e.id=Math.random().toString(16).slice(2),this.counter++,this.entries.set(e.id,e)}))}}}};const ae=(0,A.Z)(le,[["render",x],["__scopeId","data-v-376fe9f2"]]);var se=ae,ue=[{path:"/",component:se}];function ce(e,t,n,i,r,l){const a=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(a)])}var de={name:"App",components:{}};const he=(0,A.Z)(de,[["render",ce]]);var pe=he;const me=(0,r.p7)({history:(0,r.r5)(),routes:ue});(0,i.ri)(pe).use(me).mount("#app")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.m=e,function(){var e=[];n.O=function(t,i,r,o){if(!i){var l=1/0;for(c=0;c=o)&&Object.keys(n.O).every((function(e){return n.O[e](i[s])}))?i.splice(s--,1):(a=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[i,r,o]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={143:0};n.O.j=function(t){return 0===e[t]};var t=function(t,i){var r,o,l=i[0],a=i[1],s=i[2],u=0;if(l.some((function(t){return 0!==e[t]}))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(s)var c=s(n)}for(t&&t(i);u\r\n \r\n\r\n \r\n
{{error.title}}
\r\n
{{error.text}}
\r\n {{error.error}}\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n
Upload a file to use use as datasource for parsing.