text: (function(t){function e(e){for(var n,s,a=e[0],c=e[1],l=e[2],u=0,h=[];u<a.length;u++)s=a[u],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&h.push(r[s][0]),r[s]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);d&&d(e);while(h.length)h.shift()();return o.push.apply(o,l||[]),i()}function i(){for(var t,e=0;e<o.length;e++){for(var i=o[e],n=!0,s=1;s<i.length;s++){var a=i[s];0!==r[a]&&(n=!1)}n&&(o.splice(e--,1),t=c(c.s=i[0]))}return t}var n={},s={1:0},r={1:0},o=[];function a(t){return c.p+"js/"+({}[t]||t)+"."+{2:"de4fe069",3:"7f599107",4:"68ea1943",5:"f8d723a9",6:"36b52fd9",7:"69b96e73",8:"ac6dbd34"}[t]+".js"}function c(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,c),i.l=!0,i.exports}c.e=function(t){var e=[],i={2:1,3:1};s[t]?e.push(s[t]):0!==s[t]&&i[t]&&e.push(s[t]=new Promise((function(e,i){for(var n="css/"+({}[t]||t)+"."+{2:"165fd6a7",3:"47e90d3a",4:"31d6cfe0",5:"31d6cfe0",6:"31d6cfe0",7:"31d6cfe0",8:"31d6cfe0"}[t]+".css",r=c.p+n,o=document.getElementsByTagName("link"),a=0;a<o.length;a++){var l=o[a],u=l.getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(u===n||u===r))return e()}var h=document.getElementsByTagName("style");for(a=0;a<h.length;a++){l=h[a],u=l.getAttribute("data-href");if(u===n||u===r)return e()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=e,d.onerror=function(e){var n=e&&e.target&&e.target.src||r,o=new Error("Loading CSS chunk "+t+" failed.\n("+n+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=n,delete s[t],d.parentNode.removeChild(d),i(o)},d.href=r;var p=document.getElementsByTagName("head")[0];p.appendChild(d)})).then((function(){s[t]=0})));var n=r[t];if(0!==n)if(n)e.push(n[2]);else{var o=new Promise((function(e,i){n=r[t]=[e,i]}));e.push(n[2]=o);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,c.nc&&u.setAttribute("nonce",c.nc),u.src=a(t);var h=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(d);var i=r[t];if(0!==i){if(i){var n=e&&("load"===e.type?"missing":e.type),s=e&&e.target&&e.target.src;h.message="Loading chunk "+t+" failed.\n("+n+": "+s+")",h.name="ChunkLoadError",h.type=n,h.request=s,i[1](h)}r[t]=void 0}};var d=setTimeout((function(){l({type:"timeout",target:u})}),12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(e)},c.m=t,c.c=n,c.d=function(t,e,i){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(c.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)c.d(i,n,function(e){return t[e]}.bind(null,n));return i},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="",c.oe=function(t){throw console.error(t),t};var l=window["webpackJsonp"]=window["webpackJsonp"]||[],u=l.push.bind(l);l.push=e,l=l.slice();for(var h=0;h<l.length;h++)e(l[h]);var d=u;o.push([0,0]),i()})({0:function(t,e,i){t.exports=i("2f39")},"0100":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("9523"),s=i.n(n),r=(i("ddb0"),i("4ecc"));class o{constructor(t,e={}){if(s()(this,"findPathVer",0),s()(this,"genNode",null),s()(this,"diagonalMove",0),s()(this,"nodes",new Map),new.target===o)throw new Error("基类不能实例化");if("function"!==typeof t)throw new Error("必须提供节点生成函数");this.genNode=t,this.diagonalMove=e.diagonalMove||0}reset(){this.nodes.clear(),this.findPathVer=0}getNode(t){let e=this.nodes.get(t);return void 0===e&&(e=this.genNode(t)||null,this.nodes.set(t,e)),e}getNodeAt(t,e){return this.getNode(r["a"].xyToId(t,e))}getNeighbors(t){const e=[];if(t.neighbors)for(const i of t.neighbors.keys())e.push(this.getNode(i));else{const{x:i,y:n,cost:s}=t;let r,o,a,c;if((r=this.getNodeAt(i,n-1))&&e.push(r),(o=this.getNodeAt(i-1,n))&&e.push(o),(a=this.getNodeAt(i+1,n))&&e.push(a),(c=this.getNodeAt(i,n+1))&&e.push(c),this.diagonalMove){let t,s,l,u;switch(this.diagonalMove){case 1:t=!r||!o,s=!r||!a,l=!o||!c,u=!a||!c;break;case 2:t=!r&&!o,s=!r&&!a,l=!o&&!c,u=!a&&!c;break}!t&&(t=this.getNodeAt(i-1,n-1))&&e.push(t),!s&&(s=this.getNodeAt(i+1,n-1))&&e.push(s),!l&&(l=this.getNodeAt(i-1,n+1))&&e.push(l),!u&&(u=this.getNodeAt(i+1,n+1))&&e.push(u)}const l=new Map;for(const t of e){const e=t.x===i||t.y===n?.5:Math.SQRT1_2;l.set(t.id,(s+t.cost)*e)}t.neighbors=l}return e}async findPath(t,e){throw++this.findPathVer,new Error("请重载findPath方法")}backtrace(t){const e=[t];while(null!=t.parentId){if(t=this.getNode(t.parentId),!t)break;e.push(t)}return e}}},"0146":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("91bf");class s extends n["a"]{async findPath(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.hypot(i,n);return this.cos=i/s,this.sin=n/s,super.findPath(t,e)}calcPriority(t){const{x:e,y:i}=this.targetNode,n=this.getNode(t.parentId),s=Math.abs((t.x-e)*this.sin-(t.y-i)*this.cos);return t.bias=(n.bias||0)+s,t.openVer!==this.findPathVer&&(t.biasHeurist=Math.hypot(t.x-e,t.y-i)),t.biasPriority=t.bias+t.biasHeurist,super.calcPriority(t)}comparePriority(t,e){return t.priority-e.priority||t.biasPriority-e.biasPriority||t.heurist-e.heurist||t.openIndex-e.openIndex}}},"0724":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("9523"),s=i.n(n);i("4e82");class r{constructor(t,e=!1){s()(this,"compare",null),s()(this,"heapSort",!1),s()(this,"nodes",[]),s()(this,"needSort",!1),t=t||((t,e)=>t-e),this.compare=t,this.heapSort=e,e||(this.compare=(e,i)=>-t(e,i))}get isEmpty(){return 0===this.nodes.length}push(t){this.nodes.push(t),this.heapSort?this.__sinkDown(this.nodes.length-1):this.needSort=!0}pop(){if(this.isEmpty)return;const{nodes:t}=this;if(this.heapSort){const e=t[0],i=t.pop();return t.length>0&&(t[0]=i,this.__bubbleUp(0)),e}return this.needSort&&(this.needSort=!1,t.sort(this.compare)),t.pop()}update(t){this.heapSort?this.__sinkDown(this.nodes.indexOf(t)):this.needSort=!0}clear(){this.nodes.length=0}__sinkDown(t){const{nodes:e,compare:i}=this,n=e[t];while(t>0){const s=(t+1>>1)-1,r=e[s];if(i(n,r)>=0)break;e[s]=n,e[t]=r,t=s}}__bubbleUp(t){const{nodes:e,compare:i}=this,n=e.length,s=e[t];while(1){let r=-1;const o=(t+1<<1)-1;if(o<n){const t=e[o];i(t,s)<0&&(r=o);const a=o+1;if(a<n){const n=e[a];i(n,r<0?s:t)<0&&(r=a)}}if(r<0)break;e[t]=e[r],e[r]=s,t=r}}}},"0bec":function(t,e,i){"use strict";i("dd90")},"1bdf":function(t,e,i){"use strict";i("af1b")},"2f39":function(t,e,i){"use strict";i.r(e);i("5319"),i("7d6e"),i("e54f"),i("985d"),i("31cd");var n=i("2b0e"),s=i("bf69"),r=i("42d2"),o=i("b05d"),a=i("436b"),c=i("2a19"),l=i("f508"),u=i("18d6"),h=i("b12a");n["a"].use(o["a"],{config:{},lang:s["a"],iconSet:r["a"],plugins:{Dialog:a["a"],Notify:c["a"],Loading:l["a"],LocalStorage:u["a"],AppFullscreen:h["a"]}});var d=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"q-app"}},[i("router-view")],1)},p=[],f=i("2877"),m={},g=Object(f["a"])(m,d,p,!1,null,null,null),b=g.exports,y=i("2f62"),v=(i("e01a"),i("1c16")),w=i("5cd2"),x=i("9224");const S={maximized:!1,darkTheme:!1,toolPanel:!0,operatePanel:!0,toolPanelFloat:!0,operatePanelFloat:!1,operatePanelFold:!1,operatePanelRect:{x:10,y:40,width:260,height:700},viewZoom:1,uiZoom:1},_=Object.keys(S);let P=!1;const C=()=>({appTitle:x.productName,appVer:x.version,appDesc:x.description,appAuthor:x.author,loading:!1,...S}),$={maxViewZoom(t){return 2},minViewZoom(t){return.05},maxUIZoom(t){return 2},minUIZoom(t){return.5}},k={...Object(w["h"])(["loading"]),...Object(w["h"])(_,Object(v["a"])(((t,e,i)=>{P&&Object(w["n"])("uiState",Object(w["k"])(_,"",i))}),1e3))},M={async loadUIState({commit:t}){const e=await Object(w["i"])("uiState")||{};_.forEach((i=>{i in e&&t(i,e[i])})),setTimeout((()=>{P=!0}),2e3)},async resetUIState({commit:t}){_.forEach((e=>{t(e,S[e])}))},async zoomView({getters:t,commit:e},i){i=Math.min(t.maxViewZoom,Math.max(t.minViewZoom,i)),e("viewZoom",i)},async zoomUI({getters:t,commit:e},i){i=Math.min(t.maxUIZoom,Math.max(t.minUIZoom,i)),e("uiZoom",i)}};var j={namespaced:!0,state:C,getters:$,mutations:k,actions:M};i("ddb0"),i("e9c4");const O=[{name:"所有文件",extensions:["*"]}],N=[{name:"JSON文件",extensions:["json"]},...O];var I=i("4ecc"),z=i("91bf"),F=i("f0ff"),T=i("9523"),q=i.n(T);class E extends z["a"]{constructor(t,e={}){super(t,e),q()(this,"heuristWeight",1),this.heuristWeight="heuristWeight"in e?e.heuristWeight:1e4}calcHeurist(t){return super.calcHeurist(t)*this.heuristWeight}}i("26e9");var V=i("0100");class R extends V["a"]{constructor(t,e={}){super(t,e),q()(this,"openNodes",[]),q()(this,"closeIndex",-1),q()(this,"openNotify",null),q()(this,"closeNotify",null),this.openNotify=e.openNotify||null,this.closeNotify=e.closeNotify||null}reset(t=!1){this.openNodes.length=0,this.closeIndex=-1,t||super.reset()}async findPath(t,e){this.reset(!0);const i=++this.findPathVer,{openNodes:n,openNotify:s}=this;if(t.reset(),t.openVer=i,n.push(t),s&&await s(t,1))return;const{closeNotify:r}=this;let o;while(o=n[++this.closeIndex]){if(r&&await r(o,0))return;if(o===e)return this.backtrace(o).reverse();for(const t of this.getNeighbors(o))if(t.openVer!==i&&(t.parentId=o.id,t.distance=o.distance+o.neighbors.get(t.id),t.openVer=i,n.push(t),s&&await s(t,1)))return}return null}}class A extends z["a"]{async findPath(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.hypot(i,n);return this.cos=i/s,this.sin=n/s,super.findPath(t,e)}calcPriority(t){const{x:e,y:i}=this.targetNode,n=this.getNode(t.parentId),s=Math.abs((t.x-e)*this.sin-(t.y-i)*this.cos);return t.bias=(n.bias||0)+s,t.openVer!==this.findPathVer&&(t.biasHeurist=Math.hypot(t.x-e,t.y-i)),t.biasPriority=t.bias+t.biasHeurist,super.calcPriority(t)}comparePriority(t,e){return t.priority-e.priority||t.biasPriority-e.biasPriority||t.heurist-e.heurist||t.openIndex-e.openIndex}}var D=i("0724");class Z extends F["a"]{constructor(t,e){super(t,e),q()(this,"endOpenNodes",null),q()(this,"side",1),q()(this,"oppoNode",null),this.endOpenNodes=new D["a"](this.comparePriority,this.openNodes.heapSort)}reset(t){this.endOpenNodes.clear(),super.reset(t)}async findPath(t,e){this.reset(!0);const i=++this.findPathVer;let n=0;const{openNodes:s,endOpenNodes:r,openNotify:o}=this;if(t.reset(),t.openVer=i,t.openSide=1,t.openIndex=++n,s.push(t),o&&await o(t,1))return;if(e.reset(),e.openVer=i,e.openSide=2,e.openIndex=++n,r.push(e),o&&await o(e,1))return;const{updateNotify:a,closeNotify:c}=this;let l,u=this.side=1,h=s,d=this.oppoNode=e;while(l=h.pop()){if(this.comparePriority(l,d)>0&&(u=this.side=3-u,h=1===u?s:r,d=l,l=this.oppoNode,this.oppoNode=d),l.closeVer===i?l.closeSide|=u:(l.closeVer=i,l.closeSide=u,l.closeInfo=null),c&&await c(l,0))return;if(3===l.closeSide)return this.backtrace(l).reverse();for(const t of this.getNeighbors(l)){const e=t.closeVer===i;if(e&&t.closeSide&u)continue;let s=t.openVer===i;if(s&&t.openSide!==u){if(!e)continue;t.closeInfo||(t.closeInfo={side:t.closeSide,parentId:t.parentId,distance:t.distance}),s=!1}const r=l.distance+l.neighbors.get(t.id);if(!(s&&t.distance<=r))if(t.parentId=l.id,t.distance=r,t.priority=this.calcPriority(t),t.openIndex=++n,s){if(h.update(t),a&&await a(t,2))return}else if(t.openVer=i,t.openSide=u,h.push(t),o&&await o(t,1))return}}return null}backtrace(t){const e=[t];let i=t;while(null!=i.parentId){const{side:t,parentId:n}=i.closeInfo||{};if(i=this.nodes.get(2===t?n:i.parentId),!i)break;e.push(i)}e.reverse(),e[0].distance=t.distance+t.closeInfo.distance,i=t;while(null!=i.parentId){const{side:t,parentId:n}=i.closeInfo||{};if(i=this.nodes.get(1===t?n:i.parentId),!i)break;e.push(i)}return e}}class X extends Z{constructor(t,e={}){super(t,e),q()(this,"heuristic",null),q()(this,"startNode",null),q()(this,"targetNode",null),this.heuristic="function"===typeof e.heuristic?e.heuristic:z["a"][e.heuristic]||z["a"].manhattan}async findPath(t,e){return this.startNode=t,this.targetNode=e,await super.findPath(t,e)}calcPriority(t){return t.openVer===this.findPathVer&&t.openSide===this.side||(t.heurist=this.calcHeurist(t)),1e-8*Math.round(1e8*(t.distance+t.heurist))}calcHeurist(t){const{x:e,y:i}=1===this.side?this.targetNode:this.startNode,n=Math.abs(t.x-e),s=Math.abs(t.y-i);return this.heuristic(n,s)}comparePriority(t,e){return t.priority-e.priority||(t.openSide===e.openSide?t.heurist-e.heurist:0)||t.openIndex-e.openIndex}}class B extends X{constructor(t,e={}){super(t,e),q()(this,"heuristWeight",1),this.heuristWeight="heuristWeight"in e?e.heuristWeight:1e4}calcHeurist(t){return super.calcHeurist(t)*this.heuristWeight}}var W=i("0146"),Y=i("e9e6");let H=null,L=0,G=0,Q=0,U=0,J=0;async function K(t,e){const{pathStates:i,pathDirty:n,showState:s,showDelay:r}=H.state,o=s&&"all"!==n?n||new Map:null,a=null==t.id?I["a"].xyToId(t.x,t.y):t.id;let c=i.get(a)||0;switch(e){case 0:U++,c=100+(c%100||1);break;case 1:G++,c=c%100||1;break;case 2:if(Q++,c%100>=99)return;c++;break}if(i.set(a,c),o&&(o.set(a,!0),o!==n&&H.commit("pathDirty",o)),s&&r>0&&(J+=r,J>=10)){if(await tt(Math.floor(J)))return!0;J%=1}while(H.state.findPaused)if(await tt())return!0}async function tt(t=10){const e=H.state.findPathId,i=H.getters.pathFinder;return await Object(w["r"])(t),e!==H.state.findPathId||i!==H.getters.pathFinder}const et=()=>({filePath:"",xGrids:100,yGrids:100,gridSize:20,gridStates:new Map,gridDirty:null,findPathId:0,findingPath:!1,pathStates:new Map,pathDirty:null,algorithm:"astar",heuristic:"manhattan",heuristWeight:1e4,bidirectional:!1,heapSort:!0,diagonalMove:0,showState:!0,showDelay:0,pointMode:0,startPos:null,endPos:null,autoFind:!0,findPaused:!1,brushMode:1,brushType:2,brushSize:5,brushSoft:0,brushState:200,brushStatesRefresh:1,brushPos:null,lockBrushDir:!1}),it={halfGridWidth(t){return t.xGrids*t.gridSize/2},halfGridHeight(t){return t.yGrids*t.gridSize/2},getGridXY(t){return(e,i)=>{const{xGrids:n,yGrids:s,gridSize:r}=t;return[Math.floor(e/r+n/2),Math.floor(i/r+s/2)]}},isSquareBrush(t){return 1===t.brushType||4===t.brushType},brushStates(t,e){if(!t.brushStatesRefresh)return;const{brushType:i,brushSize:n,brushSoft:s,brushState:r}=t,o=e.isSquareBrush,a=new Array(n**2);if(o&&0===s)a.fill(r);else{const t=(n-1)/2;for(let e=0,c=0;e<n;e++)for(let l=0;l<n;l++){let n,u=r;if(o)n=Math.max(Math.abs(l-t),Math.abs(e-t))/(t+.5);else if(n=Math.hypot(l-t,e-t)/(t+.5),n>1)u=0;else if(3===i){const t=(1-n)**2;Math.random()>=t&&(u=0)}if(u>0&&s>0){const t=(1-Math.log(s/50))**2;u=Math.round((Math.cos(Math.PI*n**t)+1)*(u/2)),u<1&&(u=1)}a[c++]=u}}return a},gridStats(t){const{xGrids:e,yGrids:i,gridStates:n,gridDirty:s}=t;if(s)return null;const r=e*i;let o=0,a=r,c=r;return n.forEach((t=>{t>100?(o++,a--,c--):t>0&&(a--,c+=Math.exp(t/20)-1)})),{blockCount:o,blockPercent:o/r*100,emptyCount:a,emptyPercent:a/r*100,totalCost:c,averageCost:c/(r-o)}},graphGrids(t){const{xGrids:e,yGrids:i,gridStates:n,gridDirty:s}=t;if(s)return null;const r=[];for(let o=0;o<e;o++){const t=r[o]=[];for(let e=0;e<i;e++){const i=n.get(I["a"].xyToId(o,e))||0;t[e]=i>100?0:Math.exp(i/20)}}return r},pathFinder(t,e){const{xGrids:i,yGrids:n,gridStates:s,gridDirty:r}=t;if(r)return null;const o=t=>{L++;const[e,r]=I["a"].idToXY(t);if(e<0||e>=i||r<0||r>=n)return;const o=s.get(t)||0;if(o>100)return;const a=Math.exp(o/20);return new I["a"](e,r,a)},{algorithm:a,bidirectional:c}=t;switch(a){case"astar":return c?new X(o,t):new z["a"](o,t);case"dijkstra":return c?new Z(o,t):new F["a"](o,t);case"bestfirst":return c?new B(o,t):new E(o,t);case"breadthfirst":return new R(o,t);case"centralastar":return new A(o,t);case"test":return new W["a"](o,t);case"js_astar":return{graph:new Y["a"](e.graphGrids,{diagonal:0!==t.diagonalMove}),heuristic:"octile"===t.heuristic?Y["b"].heuristics.diagonal:null,getNodeAt(t,e){const i=this.graph.grid[t];if(!i)return;const n=i[e];return n&&0!==n.weight?n:void 0},async findPath(t,e){const i=await Y["b"].search(this.graph,t,e,this);return i?(i.unshift(t),i.map((t=>({id:I["a"].xyToId(t.x,t.y),...t})))):null}}}return null}},nt={...Object(w["h"])(["filePath","xGrids","yGrids","gridSize","gridStates","gridDirty","findPathId","findingPath","pathStates","pathDirty","algorithm","heuristic","heuristWeight","bidirectional","heapSort","diagonalMove","showState","showDelay","pointMode","startPos","endPos","autoFind","findPaused","brushMode","brushType","brushSize","brushSoft","brushState","brushStatesRefresh","brushPos","lockBrushDir"])},st={async gridStatesToDataURL({state:t}){const{xGrids:e,yGrids:i,gridStates:n}=t,s=new ImageData(e,Math.ceil(i/3)),r=s.data;for(let c=r.length-1;c>0;c-=4)r[c]=255;for(const c of n.keys()){const t=n.get(c);if(!t)continue;const[i,s]=I["a"].idToXY(c);r[4*(i+Math.floor(s/3)*e)+s%3]=t}const o=document.createElement("canvas");o.width=s.width,o.height=s.height;const a=o.getContext("2d");return a.putImageData(s,0,0),o.toDataURL()},async dataURLToGridStates(t,e){return new Promise((t=>{const i=new Image;i.onload=()=>{const e=i.naturalWidth,n=i.naturalHeight,s=document.createElement("canvas");s.width=e,s.height=n;const r=s.getContext("2d");r.drawImage(i,0,0);const{data:o}=r.getImageData(0,0,e,n),a=new Map;for(let t=o.length-1;t>=0;t--){if(!o[t]||3===(3&t))continue;const i=t>>2,n=I["a"].xyToId(i%e,3*Math.floor(i/e)+(3&t));a.set(n,o[t])}t(a)},i.src=e}))},async loadGrids({state:t,commit:e,dispatch:i}){const{canceled:n=!0,filePaths:s}=await Object(w["e"])("showOpenDialog",{title:"打开网格数据文件",filters:N,defaultPath:t.filePath})||{};if(n)return;const r=s[0];let o;e("main/loading","正在加载，请稍候...",w["b"]),await Object(w["r"])(200);try{o=await Object(w["j"])(r),Object(w["c"])(null!=o,"无法加载文件！")}catch(u){return e("main/loading",!1,w["b"]),Object(w["q"])("读取网格数据失败！<br>"+u.message)}const[a,c]=o.size;let l;o.states instanceof Array?(l=new Map,o.states.forEach(((t,e)=>t&&l.set(I["a"].xyToId(e%a,Math.floor(e/a)),t)))):l=await i("dataURLToGridStates",o.states),e("xGrids",a),e("yGrids",c),await i("clearGrids",!0),e("gridStates",l),e("filePath",r),e("main/loading",!1,w["b"]),Object(w["m"])("加载完成")},async saveGrids({state:t,commit:e,dispatch:i}){const{canceled:n=!0,filePath:s}=await Object(w["e"])("showSaveDialog",{title:"保存网格数据为",filters:N,defaultPath:t.filePath})||{};if(n)return null;e("main/loading","正在保存，请稍候...",w["b"]),await Object(w["r"])(200);const r=JSON.stringify({size:[t.xGrids,t.yGrids],states:await i("gridStatesToDataURL")}),o=await Object(w["s"])("saveFile",s,r);if(!o)return e("main/loading",!1,w["b"]),Object(w["q"])("保存失败！");e("filePath",s),e("main/loading",!1,w["b"]),Object(w["m"])("保存成功")},async copyGrids({state:t,commit:e}){const{xGrids:i,yGrids:n,gridStates:s}=t,r=[i,n];e("main/loading","正在复制，请稍候...",w["b"]),await Object(w["r"])(200);const o=[];for(let a=0;a<n;a++)for(let t=0;t<i;t++)o.push(s.get(I["a"].xyToId(t,a))||0);Object(w["o"])({size:r,states:o}),e("main/loading",!1,w["b"]),Object(w["m"])("已复制到剪贴板")},async clearStates({state:t,commit:e},[i,n,s]){const r=t[i].size;if(s||r>t.xGrids*t.yGrids/100)e(i,new Map),e(n,"all");else if(r>0)if("all"===t[n])t[i].clear();else{const s=t[n]||new Map;for(const e of t[i].keys())s.set(e,!0);t[i].clear(),e(n,s)}},async clearGrids({dispatch:t},e){await t("clearStates",["gridStates","gridDirty",e]),await t("clearPath",e),await t("clearPoints",null)},async clearPath({state:t,commit:e,dispatch:i},n){await i("clearStates",["pathStates","pathDirty",n]),t.findingPath&&e("findPathId",t.findPathId+1)},async clearPoints({state:t,commit:e,dispatch:i},n=1){t.findingPath||(e("startPos",null),e("endPos",null),e("pointMode",n)),await i("clearPath")},async brushDraw({state:t,getters:e,commit:i,dispatch:n},s){const{brushMode:r}=t;if(!r)return;await n("clearPath");const{xGrids:o,yGrids:a,gridStates:c,gridDirty:l,brushSize:u}=t,h=[];if(t.brushType>3){const t=Math.ceil(o*a/u**2/100);for(let e=t;e>0;e--)h.push({x:Math.floor(Math.random()*o),y:Math.floor(Math.random()*a)})}else h.push(s||t.brushPos);const d=Math.floor(u/2),p="all"===l?null:l||new Map;h.forEach((({x:t,y:i})=>{e.brushStates.forEach(((e,n)=>{if(!e)return;const s=t-d+n%u;if(s<0||s>=o)return;const l=i-d+Math.floor(n/u);if(l<0||l>=a)return;const h=I["a"].xyToId(s,l),f=c.get(h)||0;let m=0;switch(r){case 1:m=Math.min(200,f+e);break;case 2:m=Math.max(0,f-e);break;case 3:m=Math.max(f,e);break}m!==f&&(c.set(h,m),p&&p.set(h,!0))}))})),p&&p!==l&&i("gridDirty",p),3===t.brushType&&i("brushStatesRefresh",t.brushStatesRefresh+1)},async findPath({state:t,getters:e,commit:i,dispatch:n},s=1){const{startPos:r,endPos:o}=t,a=e.pathFinder;const c=a.getNodeAt(r.x,r.y);if(!c)return Object(w["m"])("起点不可用","warn");const l=a.getNodeAt(o.x,o.y);if(!l)return Object(w["m"])("终点不可用","warn");await n("clearPath");while(t.findingPath)await Object(w["r"])(100);const u=t.findPathId+1;let h,d;if(i("findPathId",u),i("findingPath",!0),i("findPaused",!1),s>1){i("main/loading","正在处理... 请稍候",w["b"]),await Object(w["r"])(100),h=Date.now();let e=h;for(let n=1;n<=s;n++){if(d=await a.findPath(c,l),Date.now()-e<200)continue;const r=(n/s*100).toFixed(1);if(i("main/loading",`正在处理... ${r}%`,w["b"]),await Object(w["r"])(20),u!==t.findPathId)break;h+=20,e=Date.now()}i("main/loading",!1,w["b"])}else H={state:t,getters:e,commit:i},L=0,G=0,Q=0,U=0,J=0,a.openNotify=K,a.updateNotify=K,a.closeNotify=K,h=Date.now(),d=await a.findPath(c,l),a.openNotify=null,a.updateNotify=null,a.closeNotify=null;if(i("findingPath",!1),u===t.findPathId&&a===e.pathFinder){if(d){const{pathStates:e,pathDirty:n}=t,s="all"===n?null:n||new Map;d.forEach((t=>{e.set(t.id,200+(e.get(t.id)||1)%100),s&&s.set(t.id,!0)})),s&&s!==n&&i("pathDirty",s)}if(s>0){const t=d&&d.length-1;Object(w["m"])(`用时${Object(w["a"])((Date.now()-h)/1e3)}秒，${d?`成功找到路径，共${Object(w["a"])(t)}步，距离${Object(w["a"])((d[t].distance||d[t].g).toFixed(3))}`:"未找到路径"}${s>1?"":`，节点生成${Object(w["a"])(L)}次，开启${Object(w["a"])(G)}次，更新${Object(w["a"])(Q)}次，关闭${Object(w["a"])(U)}次`}`,"info",{timeout:6e4,closeBtn:!0})}}}};var rt={namespaced:!0,state:et,getters:it,mutations:nt,actions:st};n["a"].use(y["a"]);var ot=function(){const t=new y["a"].Store({modules:{main:j,edit:rt},plugins:[],strict:!1});return n["a"].store=t,Object.freeze(n["a"].store.state),t},at=i("8c4f");const ct=[{path:"/",component:()=>Promise.all([i.e(0),i.e(2)]).then(i.bind(null,"713b")),children:[{path:"",components:{default:()=>i.e(7).then(i.bind(null,"8b24")),title:()=>Promise.all([i.e(0),i.e(4)]).then(i.bind(null,"9bfb")),tool:()=>i.e(8).then(i.bind(null,"78e9")),operate:()=>Promise.all([i.e(0),i.e(3)]).then(i.bind(null,"c8a3"))},children:[{path:"",components:{grid:()=>i.e(6).then(i.bind(null,"d67e"))}}]}]},{path:"*",component:()=>i.e(5).then(i.bind(null,"e51e"))}];var lt=ct;n["a"].use(at["a"]);var ut=function(){const t=new at["a"]({scrollBehavior:()=>({x:0,y:0}),routes:lt,mode:"hash",base:""});return t},ht=async function(){const t="function"===typeof ot?await ot({Vue:n["a"]}):ot,e="function"===typeof ut?await ut({Vue:n["a"],store:t}):ut;t.$router=e;const i={router:e,store:t,render:t=>t(b),el:"#q-app"};return{app:i,store:t,router:e}};i("5db7"),i("73d9"),i("0481"),i("4069");const dt=["props","computed","inject"],pt=n["a"].config.optionMergeStrategies,ft=Object.assign({},pt);dt.forEach((t=>{pt[t]=function(e,i,n,s){const r=ft[t](e,i,n,s);for(const o in i){const e=i[o];switch(t){case"props":null===e.type&&delete r[o];break;case"computed":null===e&&delete r[o];break;case"inject":null===e.from&&delete r[o];break}}return r}}));const mt=/[^./\\]+(?=\.vue$)/;Object.assign(n["a"].prototype,{$log(...t){console.log(...t)},$getName(t){t||(t=this.$options);const e=t.name||t._componentTag;if(e)return e;if(t.__file){const e=t.__file.match(mt)[0];return e?`<${e}.vue>`:"<Unknown Component>"}return this.$parent?"<Anonymous Component>":"<Root>"},$toCamelCase(t){return t.replace(/-\w/g,(t=>t[1].toUpperCase()))},$toKebabCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())).replace(/^-/,"")},$forceSet(t,e){this[t]=e,t===((this.$options.model||{}).prop||"value")?this.$emit((this.$options.model||{}).event||"input",e):this.$emit("update:"+t,e)},$getSlot(t,e,i){const n=this.$scopedSlots[t],s=null==n?e||[]:n();return null==i?s:i.concat(s)},$injectSlot(t,e,i,n=!1){const s={id:e,nodes:i},r=this.$scopedSlots[t];if(r&&r.__origSlot){let t;i instanceof Function?(t=r.__injectSwap,n=!1):t=n?r.__injectBefore:r.__injectAfter;const o=t.findIndex((t=>t.id===e));if(o<0){if(null==i)return;n?t.unshift(s):t.push(s)}else null==i?t.splice(o,1):t[o]=s}else{if(null==i)return;const e=t=>{const i=[e.__injectBefore.flatMap((t=>t.nodes||[])),e.__origSlot&&e.__origSlot(t)||[],e.__injectAfter.flatMap((t=>t.nodes||[]))];return e.__injectSwap.reduce(((t,e)=>e.nodes(t)||[]),i.flat())};e.__origSlot=r,e.__injectBefore=[],e.__injectAfter=[],e.__injectSwap=[],i instanceof Function?e.__injectSwap.push(s):n?e.__injectBefore.push(s):e.__injectAfter.push(s),this.$scopedSlots[t]=e}}});var gt=i("9404"),bt=i("8562"),yt=i("342e"),vt={name:"MyDrawer",extends:gt["a"],mixins:[Object(yt["a"])("width","realWidth")],components:{"my-drawer-resizer":bt["a"].extend({methods:{__pan(t){bt["a"].options.methods.__pan.call(this,t),this.__maxValue=1/0}}})},props:{limits:bt["a"].options.props.limits,resizerClass:[Array,String,Object],resizerStyle:{type:[Array,String,Object],default:"width: 0px"}},computed:{size(){return this.isMini?this.miniWidth:this.realWidth}},render(t){return this.$injectSlot("default","splitter",(e=>[t("div",{staticClass:"fit no-scroll"},[t("my-drawer-resizer",{staticClass:"q-drawer__resizer fit",props:{value:this.realWidth,limits:this.limits,unit:"px",reverse:"right"===this.side,emitImmediately:!0,separatorClass:this.resizerClass,separatorStyle:this.resizerStyle},on:{input:t=>{this.realWidth=t}},scopedSlots:{["right"===this.side?"after":"before"]:()=>e,separator:()=>this.$getSlot("resizer")}})])])),gt["a"].options.render.call(this,t)}},wt=i("4983"),xt={extends:wt["a"],props:{barStyle:{type:Object,default:()=>({right:"1px",borderRadius:"6px",backgroundColor:"#027be3",width:"6px",opacity:.2})},thumbStyle:{type:Object,default:()=>({right:"1px",borderRadius:"6px",backgroundColor:"#027be3",width:"6px",opacity:.7})}}},St=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("q-menu",t._g(t._b({ref:"menu",attrs:{"content-class":"custom-menu"}},"q-menu",t.$attrs,!1),t.$listeners),[i("q-list",{staticClass:"_list",attrs:{dense:""}},[t._l(t.items,(function(e,n){return[e?i("q-item",{key:n,attrs:{clickable:"",disable:t.getItemProp(e,"disable")},on:{click:function(i){e.handler&&(t.$refs.menu.hide()||e.handler())}}},[t.items.find((function(t){return t&&t.icon}))?i("q-item-section",{staticClass:"_icon",attrs:{avatar:""}},[e&&e.icon?i("q-icon",{attrs:{name:t.getItemProp(e,"icon"),size:"xs"}}):t._e()],1):t._e(),i("q-item-section",[t._v(t._s(t.getItemProp(e,"label")))]),e.shortcut?i("q-item-section",{attrs:{side:""}},[t._v(t._s(t.getItemProp(e,"shortcut")))]):t._e()],1):i("q-separator",{key:"sep-"+n})]}))],2)],1)},_t=[],Pt=i("4d7f"),Ct=i.n(Pt),$t={inheritAttrs:!1,props:{items:{type:Array,required:!0},keyScope:{type:String,default:"all"}},watch:{items:{handler(t,e){e&&this.unbindShortcuts(e),this.bindShortcuts(t)},immediate:!0}},methods:{...Object(w["f"])("menu",["show","hide","toggle","focus","updatePosition"]),bindShortcuts(t){t.forEach((t=>{if(!t||!t.shortcut)return;const e=this.getItemProp(t,"shortcut").toLowerCase(),i=this.getItemProp(t,"keyScope")||this.keyScope;Ct()(e,i,(()=>(t.handler&&!this.getItemProp(t,"disable")&&(this.$refs.menu.hide(),t.handler()),!1)))}))},unbindShortcuts(t){t.forEach((t=>{if(!t||!t.shortcut)return;const e=this.getItemProp(t,"shortcut").toLowerCase(),i=this.getItemProp(t,"keyScope")||this.keyScope;Ct.a.unbind(e,i)}))},getItemProp(t,e){return t[e]instanceof Function?t[e]():t[e]}},beforeDestroy(){this.unbindShortcuts(this.items)}},kt=$t,Mt=(i("30f9"),i("0bec"),i("4e73")),jt=i("1c1c"),Ot=i("66e5"),Nt=i("4074"),It=i("0016"),zt=i("eb85"),Ft=i("eebe"),Tt=i.n(Ft),qt=Object(f["a"])(kt,St,_t,!1,null,"c172647c",null),Et=qt.exports;Tt()(qt,"components",{QMenu:Mt["a"],QList:jt["a"],QItem:Ot["a"],QItemSection:Nt["a"],QIcon:It["a"],QSeparator:zt["a"]});var Vt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"absolute-full column no-wrap no-scroll",on:{click:t.bringToFront}},[t.title?i("q-bar",{staticClass:"_bar q-pr-none sticky-top",class:t.$q.dark.isActive?"":"bg-grey-3 text-primary",attrs:{dense:""}},[t.dialog&&t.dialog.movable?i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:t.dialog.dragMove,expression:"dialog.dragMove",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_mover absolute-full",on:{mousedown:t.bringToFront,dblclick:function(e){t.canFold?t.toggleFold():t.canFloat&&t.toggleFloat()}}}):t._e(),i("div",{staticClass:"q-space ellipsis",on:{dblclick:function(e){t.dialog&&t.canFold?t.toggleFold():t.canFloat&&t.toggleFloat()}}},[t._v(t._s(t.title))]),t.dialog&&t.dialog.resizable&&!t.isFold?i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dialog.dragResize(e,0,-1)},expression:"e => dialog.dragResize(e, 0, -1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer absolute-top"}):t._e(),t.dialog&&t.canFold?i("q-btn",{attrs:{flat:"",dense:""},on:{click:t.toggleFold}},[i("q-icon",{attrs:{name:t.isFold?"expand_more":"expand_less",size:"xs"}}),i("q-tooltip",[t._v(t._s(t.isFold?"展开面板":"收拢面板"))])],1):t._e(),t.canFloat?i("q-btn",{attrs:{flat:"",dense:""},on:{click:t.toggleFloat}},[i("q-icon",{attrs:{name:t.isFloat?"south_west":"north_east",size:"xs"}}),i("q-tooltip",[t._v(t._s(t.isFloat?"嵌入侧栏":"面板浮动"))])],1):t._e(),t.state?i("q-btn",{attrs:{flat:"",dense:""},on:{click:t.hide}},[i("q-icon",{attrs:{name:"close",size:"xs"}})],1):t._e()],1):t.dialog&&t.dialog.movable?i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:t.dialog.dragMove,expression:"dialog.dragMove",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"absolute-full",on:{mousedown:t.bringToFront}}):t._e(),t.dialog&&t.isFold?t._e():[t.tabs?[i("q-tabs",{attrs:{"inline-label":"","no-caps":"","content-class":t.$q.dark.isActive?"bg-grey-8":"bg-primary text-white",breakpoint:"0",align:"left","active-color":"primary","active-bg-color":"white","indicator-color":"white"},model:{value:t.curTab,callback:function(e){t.curTab=e},expression:"curTab"}},t._l(t.tabs,(function(e){return i("q-tab",t._b({key:e.name,staticClass:"q-px-xs",staticStyle:{height:"28px","min-height":"0px"}},"q-tab",e,!1))})),1),t.tabs?i("q-tab-panels",{staticClass:"q-space",attrs:{"keep-alive":""},model:{value:t.curTab,callback:function(e){t.curTab=e},expression:"curTab"}},t._l(t.tabs,(function(e){return i("q-tab-panel",{key:e.name,staticClass:"q-pa-none",attrs:{name:e.name}},[t._t(e.name),t._t("default")],2)})),1):t._e()]:i("div",{staticClass:"absolute-full",class:t.title?"_panel":t.dialog&&t.dialog.movable?"no-pointer-events":""},[t._t("default")],2)]],2)},Rt=[],At={data:()=>({tab:""}),props:{title:String,state:String,canFloat:{type:Boolean,default:!0},canFold:{type:Boolean,default:!0},tabs:Array,tabState:String},inject:{dialog:{from:"dialog",default:null}},computed:{isFloat(){return this.$store.state.main[this.state]&&this.$store.state.main[this.state+"Float"]},isFold(){return this.$store.state.main[this.state+"Fold"]},floatRect(){return this.$store.state.main[this.state+"Rect"]},curTab:{get(){return this.tabState?this.$store.state.main[this.tabState]:this.tabs?this.tab||this.tabs[0].name:""},set(t){this.tabState?this.$store.commit("main/"+this.tabState,t):this.tab=t}}},watch:{isFloat(t){!t&&this.dialog&&this.dialog.hide()},isFold:{handler(t){this.dialog&&(this.dialog.curHeight=t?22:this.floatRect.height)},immediate:!0},floatRect(t){this.__floatRect=t,this.dialog&&(this.dialog.curX=t.x,this.dialog.curY=t.y,this.dialog.curWidth=t.width,this.dialog.curHeight=this.isFold?22:t.height)},"dialog.curX"(t){this.updateFloatRect("x",t)},"dialog.curY"(t){this.updateFloatRect("y",t)},"dialog.curWidth"(t){this.updateFloatRect("width",t)},"dialog.curHeight"(t){this.isFold||this.updateFloatRect("height",t)}},methods:{bringToFront(){this.dialog&&this.dialog.$bringToFront()},hide(){this.$store.commit("main/"+this.state,!1)},toggleFloat(){this.$store.commit("main/"+this.state+"Float",!this.isFloat)},toggleFold(){this.$store.commit("main/"+this.state+"Fold",!this.isFold)},updateFloatRect(t,e){if(!this.state)return;const i=this.__floatRect||this.floatRect;i[t]!==e&&(this.__floatRect={...i,[t]:e},this.recordFloatRect())},recordFloatRect:Object(v["a"])((function(){this.$store.commit("main/"+this.state+"Rect",this.__floatRect)}),100)}},Dt=At,Zt=(i("a214"),i("d847")),Xt=i("2c91"),Bt=i("9c40"),Wt=i("05c0"),Yt=i("429b"),Ht=i("7460"),Lt=i("adad"),Gt=i("823b"),Qt=i("75c3"),Ut=Object(f["a"])(Dt,Vt,Rt,!1,null,"4a241945",null),Jt=Ut.exports;Tt()(Ut,"components",{QBar:Zt["a"],QSpace:Xt["a"],QBtn:Bt["a"],QIcon:It["a"],QTooltip:Wt["a"],QTabs:Yt["a"],QTab:Ht["a"],QTabPanels:Lt["a"],QTabPanel:Gt["a"]}),Tt()(Ut,"directives",{TouchPan:Qt["a"]});var Kt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"column no-wrap"},[i("q-virtual-scroll",{ref:"scroller",staticClass:"q-space",attrs:{flat:"",bordered:"",type:"table",separator:"cell",items:t.filteredItems},scopedSlots:t._u([{key:"before",fn:function(){return[i("thead",{staticClass:"sticky-thead narrow"},[i("tr",{class:t.$q.dark.isActive?"bg-blue-grey-7":"bg-grey-3 text-primary"},[i("th",{staticStyle:{width:"1px"},on:{click:function(e){return t.onClickHead()}}},[t._v("#")]),t._l(t.columns,(function(e){return i("th",{key:e.name||e.label,staticClass:"sticky",class:e.headClass||e.class,style:e.headStyle||e.style,on:{click:function(i){return t.onClickHead(e)}}},[t._v("\n            "+t._s(e.label)+"\n          ")])}))],2)])]},proxy:!0},{key:"default",fn:function(e){var n=e.item,s=e.index;return[i("tr",{key:s,staticClass:"narrow",style:t.getItemStyle(n)},[i("td",{staticClass:"text-right text-primary",class:t.$q.dark.isActive?"bg-blue-grey-10":"bg-blue-1",staticStyle:{width:"1px"},on:{click:function(e){return t.onClickItem(n,null,s)},dblclick:function(e){return t.onDblClickItem(n,null,s)}}},[t._v("\n          "+t._s(s+1)+"\n        ")]),t._l(t.columns,(function(e){return i("td",{key:s+"-"+(e.name||e.label),staticClass:"text-select",class:e.class,style:e.style,on:{click:function(i){return t.onClickItem(n,e,s)},dblclick:function(i){return t.onDblClickItem(n,e,s)}}},[e.type&&"text"!==e.type?t._e():[t._v("\n            "+t._s(t.getItemField(n,s,e.field))+"\n          ")],"html"===e.type?i("div",{domProps:{innerHTML:t._s(t.getItemField(n,s,e.field))}}):i(e.type,t._b({tag:"component"},"component",Object.assign({},t.getItemField(n,s,e.field)),!1))],2)}))],2)]}}])}),t.filterFn?i("q-input",{staticClass:"q-mt-xs narrow",attrs:{dense:"",outlined:"",clearable:"",placeholder:"请输入筛选词",debounce:100},scopedSlots:t._u([{key:"prepend",fn:function(){return[i("q-icon",{attrs:{name:"search"}},[t.filterPresets.length?i("q-menu",{attrs:{"no-focus":"","auto-close":"",anchor:"top left",self:"bottom left",offset:[10,5]},model:{value:t.filterMenu,callback:function(e){t.filterMenu=e},expression:"filterMenu"}},[i("q-list",{attrs:{dense:""}},t._l(t.filterPresets,(function(e,n){return i("q-item",{key:n,attrs:{clickable:""},on:{click:function(i){t.filterWord=e.text||e}}},[i("q-item-section",[t._v(t._s(e.label||e.text||e))])],1)})),1)],1):t._e()],1)]},proxy:!0}],null,!1,1440583189),model:{value:t.filterWord,callback:function(e){t.filterWord=e},expression:"filterWord"}}):t._e()],1)},te=[],ee=(i("4e82"),{data:()=>({filterWord:"",filterMenu:!1}),props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},filterFn:Function,filterPresets:{type:Array,default:()=>[]},sort:[String,Array,Function],itemStyleFn:{type:Function},selectedItem:{},compareJson:Boolean},computed:{filteredItems(){let t=this.items;return t=this.filterWord&&this.filterFn?t.filter(((t,e)=>this.filterFn(this.filterWord,t,e))):t.slice(),this.sort&&(this.sort instanceof Function?t.sort(this.sort):this.sort instanceof Array?t.sortBy(...this.sort):t.sortBy(this.sort)),Object.freeze(t)},selectedJson(){return JSON.stringify(this.selectedItem)}},methods:{getItemField(t,e,i){return i instanceof Function?i(t,e):t[i]},getItemStyle(t){if(this.itemStyleFn){const e=this.itemStyleFn(t);if(null!=e)return e}return this.isSelected(t)?"background-color: #8f43 !important":""},isSelected(t){return this.selectedItem instanceof Function?this.selectedItem(t):this.selectedItem instanceof Array?null!=this.selectedItem.find((e=>e.info===t)):t===this.selectedItem||!(!this.compareJson||JSON.stringify(t)!==this.selectedJson)},scrollToSelected:Object(v["a"])((function(){if(!this.selectedItem)return;const t=this.filteredItems.findIndex((t=>this.isSelected(t)));t<0||this.$refs.scroller.scrollTo(t,"center")}),10),onClickHead(t){this.$emit("click-head",t)},onClickItem(t,e,i){this.$emit("select",t,e,i)},onDblClickItem(t,e,i){this.$emit("use",t,e,i)}},mounted(){this.scrollToSelected()},activated(){this.$refs.scroller.refresh(),this.scrollToSelected()}}),ie=ee,ne=i("a12b"),se=i("27f9"),re=Object(f["a"])(ie,Kt,te,!1,null,null,null),oe=re.exports;Tt()(re,"components",{QVirtualScroll:ne["a"],QSpace:Xt["a"],QInput:se["a"],QIcon:It["a"],QMenu:Mt["a"],QList:jt["a"],QItem:Ot["a"],QItemSection:Nt["a"]});var ae=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{on:{mousedown:function(e){return e.preventDefault(),t.onMouseDown.apply(null,arguments)},mousewheel:function(e){return e.preventDefault(),t.onMouseWheel.apply(null,arguments)},touchstart:function(e){return e.preventDefault(),t.onTouchStart.apply(null,arguments)}}},[i("q-resize-observer",{attrs:{debounce:"0"},on:{resize:t.updateViewSize}}),i("div",{staticClass:"absolute",style:t.contentStyle},[t._t("default")],2)],1)},ce=[];const le={capture:!0},ue={passive:!0,capture:!0};var he={mixins:[Object(yt["a"])("x","viewX"),Object(yt["a"])("y","viewY"),Object(yt["a"])("zoom","viewZoom")],data:()=>({viewWidth:100,viewHeight:100,dragState:null}),props:{x:{type:Number,default:0},y:{type:Number,default:0},zoom:{type:Number,default:1},minX:{type:Number,default:-1/0},maxX:{type:Number,default:1/0},minY:{type:Number,default:-1/0},maxY:{type:Number,default:1/0},minZoom:{type:Number,default:.01},maxZoom:{type:Number,default:10},wheelZoomRate:{type:Number,default:1.1},threshold:{type:Number,default:3},interactive:{type:Boolean,default:!0}},computed:{...Object(y["e"])("main",["uiZoom"]),contentStyle(){return{left:this.viewWidth/2-this.viewX*this.viewZoom+"px",top:this.viewHeight/2-this.viewY*this.viewZoom+"px",transform:this.$makeTransform(this.viewZoom)}}},watch:{x:"refreshViewX",y:"refreshViewY",zoom:"refreshViewZoom",minX:"refreshViewX",maxX:"refreshViewX",minY:"refreshViewY",maxY:"refreshViewY",minZoom:"refreshViewZoom",maxZoom:"refreshViewZoom",viewWidth:"emitResize",viewHeight:"emitResize",viewZoom:"emitResize",viewX:"emitMove",viewY:"emitMove"},methods:{updateViewSize(t){this.viewWidth=t.width,this.viewHeight=t.height},updateViewCenter(t,e){this.__ignoreRangeLimit?(this.viewX=Number(t),this.viewY=Number(e)):(this.viewX=Math.max(this.minX,Math.min(this.maxX,Number(t))),this.viewY=Math.max(this.minY,Math.min(this.maxY,Number(e))))},updateViewZoom(t,e,i,n){n||(n=this.viewZoom),this.viewZoom=Number(t),this.refreshViewZoom();const s=null==e?0:e-this.viewX,r=null==i?0:i-this.viewY,o=1-n/this.viewZoom;o&&(s||r)&&this.updateViewCenter(this.viewX+s*o,this.viewY+r*o)},refreshViewX(){this.viewX=Math.max(this.minX,Math.min(this.maxX,this.viewX))},refreshViewY(){this.viewY=Math.max(this.minY,Math.min(this.maxY,this.viewY))},refreshViewZoom(){this.viewZoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.viewZoom))},overThreshold(t,e){return Math.abs(t)>this.threshold||Math.abs(e)>this.threshold},pageToViewXY(t,e){const i=this.$el.getBoundingClientRect(),n=(t/this.uiZoom-i.x-this.viewWidth/2)/this.viewZoom,s=(e/this.uiZoom-i.y-this.viewHeight/2)/this.viewZoom;return[this.viewX+n,this.viewY+s]},checkTouchChange(t){const e=this.dragState.ids;let i=0;for(let n=0;n<t.changedTouches.length;n++){const s=t.changedTouches[n],r=e.indexOf(s.identifier);r<0||(i|=1<<r)}return i},getTouchPageXY(t,e){const i=this.dragState,n=i.ids[e];if(null!=n)for(let s=0;s<t.touches.length;s++){const e=t.touches[s];if(e.identifier===n)return[e.pageX,e.pageY]}return 0===e?[i.x,i.y]:[i.x2,i.y2]},onMouseDown(t){if(!this.interactive)return;if(0!==t.button)return;if(this.dragState)return;this.dragState={x:t.pageX,y:t.pageY};const e=t=>{t.preventDefault(),this.onMouseMove(t)},i=t=>{const n=this.dragState;this.onMouseUp(t)&&(this.dragState=null,document.removeEventListener("mousemove",e,le),document.removeEventListener("mouseup",i,ue),null==n.initX?this.$emit("click",...this.pageToViewXY(n.x,n.y)):this.$emit("stop-drag"))};document.addEventListener("mousemove",e,le),document.addEventListener("mouseup",i,ue)},onMouseMove(t){const e=this.dragState,i=t.pageX-e.x,n=t.pageY-e.y;if(null==e.initX){if(!this.overThreshold(i,n))return;e.initX=this.viewX,e.initY=this.viewY,this.$emit("start-drag")}const s=1/this.uiZoom/this.viewZoom;this.updateViewCenter(e.initX-i*s,e.initY-n*s),this.$emit("dragging",this.viewX-e.initX,this.viewY-e.initY,1)},onMouseUp(t){return!0},onMouseWheel(t){if(!this.interactive)return;const e=t.deltaY*([1,40,800][t.deltaMode]||1)/40,i=this.wheelZoomRate**-e,[n,s]=this.pageToViewXY(t.pageX,t.pageY);this.updateViewZoom(this.viewZoom*i,n,s)},onTouchStart(t){if(!this.interactive)return;if(this.dragState&&!this.dragState.ids)return;const e=!this.dragState;if(e){const e=t.touches[0];this.dragState={x:e.pageX,y:e.pageY,ids:[e.identifier]}}const i=this.dragState;if(1===i.ids.length)for(let n=0;n<t.changedTouches.length;n++){const e=t.changedTouches[n];if(i.ids.includes(e.identifier))continue;i.ids.push(e.identifier),i.x2=e.pageX,i.y2=e.pageY;const[s,r]=this.getTouchPageXY(t,0);i.x=s,i.y=r,null!=i.initX&&(i.initX=this.viewX,i.initY=this.viewY);const[o,a]=this.pageToViewXY((s+i.x2)/2,(r+i.y2)/2);i.zoomX=o,i.zoomY=a,i.zoomSize=Math.hypot(i.x2-s,i.y2-r);break}if(e){const t=t=>{t.preventDefault(),this.onTouchMove(t)},e=i=>{const n=this.dragState;this.onTouchEnd(i)&&(this.dragState=null,document.removeEventListener("touchmove",t,le),document.removeEventListener("touchend",e,ue),document.removeEventListener("touchcancel",e,ue),null==n.initX?this.$emit("click",...this.pageToViewXY(n.x,n.y)):this.$emit("stop-drag"))};document.addEventListener("touchmove",t,le),document.addEventListener("touchend",e,ue),document.addEventListener("touchcancel",e,ue)}},onTouchMove(t){if(!this.checkTouchChange(t))return;const e=this.dragState,i=e.ids.length>1,[n,s]=this.getTouchPageXY(t,0),[r,o]=this.getTouchPageXY(t,1),a=n-e.x,c=s-e.y,l=r-e.x2,u=o-e.y2;if(null==e.initX){if(!this.overThreshold(a,c)&&(!i||!this.overThreshold(l,u)))return;e.initX=this.viewX,e.initY=this.viewY,i&&(e.initZoom=this.viewZoom),this.$emit("start-drag")}else i&&null==e.initZoom&&(this.overThreshold(a,c)||this.overThreshold(l,u))&&(e.initZoom=this.viewZoom);const h=1/this.uiZoom/this.viewZoom;if(i)if(null==e.initZoom)this.updateViewCenter(e.initX-(a+l)/2*h,e.initY-(c+u)/2*h);else{this.__ignoreRangeLimit=!0;const t=1/this.uiZoom/e.initZoom,i=Math.hypot(r-n,o-s)/e.zoomSize;this.updateViewCenter(e.initX-(a+l)/2*t,e.initY-(c+u)/2*t),this.updateViewZoom(e.initZoom*i,e.zoomX,e.zoomY,e.initZoom),delete this.__ignoreRangeLimit,this.refreshViewX(),this.refreshViewY()}else this.updateViewCenter(e.initX-a*h,e.initY-c*h);this.$emit("dragging",this.viewX-e.initX,this.viewY-e.initY,null==e.initZoom?1:this.viewZoom/e.initZoom)},onTouchEnd(t){const e=this.checkTouchChange(t);if(!e)return;const i=this.dragState;if(i.ids.length<2||3===e)return!0;const[n,s]=this.getTouchPageXY(t,2-e);this.dragState={x:n,y:s,ids:[i.ids[2-e]],...null!=i.initX?{initX:this.viewX,initY:this.viewY}:{}}},emitResize(){this.$emit("resize",this.viewWidth/this.viewZoom,this.viewHeight/this.viewZoom)},emitMove(){this.$emit("move",this.viewX,this.viewY)}}},de=he,pe=i("3980"),fe=Object(f["a"])(de,ae,ce,!1,null,null,null),me=fe.exports;Tt()(fe,"components",{QResizeObserver:pe["a"]});var ge=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"column q-gutter-y-sm"},[t.form instanceof Array?[t._l(t.form,(function(e,n){return[t.isHiddenField("$"+n)?t._e():[e?i("div",{key:n,staticClass:"row",class:e.$class||t.rowClass,style:e.$style||t.rowStyle},[t._l(e,(function(e,n){return["$class"===n||"$style"===n||t.isHiddenField(n)?t._e():i(t.getInput(e.t||t.inputParams.t),t._g(t._b({key:n,ref:n,refInFor:!0,tag:"component",attrs:{value:t.value[n],"auto-save":t.autoSave},on:{input:function(i){return t.onInput(e,n,i)}}},"component",t.getCombineParams(e),!1),t.itemListeners))]}))],2):i("q-separator",t._b({key:n},"q-separator",t.separatorParams,!1))]]}))]:[t._l(t.form,(function(e,n){return[t.isHiddenField(n)?t._e():[e?i(t.getInput(e.t||t.inputParams.t),t._g(t._b({key:n,ref:n,refInFor:!0,tag:"component",attrs:{value:t.value[n],"auto-save":t.autoSave},on:{input:function(i){return t.onInput(e,n,i)}}},"component",t.getCombineParams(e),!1),t.itemListeners)):i("q-separator",t._b({key:n},"q-separator",t.separatorParams,!1))]]}))]],2)},be=[],ye={props:{form:{type:[Object,Array],required:!0},value:{type:Object,default:()=>({})},inputParams:{type:Object,default:()=>({})},hiddenFields:[Array,Object],autoSave:Boolean,rowClass:{type:[String,Array,Object],default:"q-gutter-x-md"},rowStyle:[String,Array,Object],separatorParams:{type:Object,default:()=>({})}},computed:{itemListeners(){return{...this.$listeners,input:()=>{}}},hasError(){return Object.keys(this.$refs).findIndex((t=>this.getField(t).hasError))>=0}},methods:{getInput(t){return Ke[t]||t||Ke.default},getField(t){return this.$refs[t][0]},getCombineParams(t){const e=t.dynamicParams?t.dynamicParams():null;return{...this.inputParams,...t,...e,inputParams:{...this.inputParams,...t.inputParams}}},isHiddenField(t){return!!this.hiddenFields&&(this.hiddenFields instanceof Array?this.hiddenFields.includes(t):!!this.hiddenFields[t])},adjustNested(t,e,i){return t?{field:e+"."+i.field,value:i.value}:{field:e,value:i}},onInput(t,e,i){const n=ti.includes(t.t||this.inputParams.t);if(this.autoSave&&!n){const t=this.value;t[e]=i}const s=this.adjustNested(n,e,i);t.onInput?t.onInput(i,this.getField(e)):this.inputParams.onInput&&this.inputParams.onInput(s,this),this.$emit("input",s)}}},ve=ye,we=Object(f["a"])(ve,ge,be,!1,null,null,null),xe=we.exports;Tt()(we,"components",{QSeparator:zt["a"]});var Se=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("q-btn",t._g(t._b({ref:"btn",attrs:{label:t.computedLabel,icon:t.computedIcon},on:{click:t.onClick}},"q-btn",t.$attrs,!1),t.$listeners),[t.tips?i("CommonTips",{attrs:{anchor:"top middle",self:"bottom middle",tips:t.tips}}):t._e()],1)},_e=[],Pe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("q-tooltip",t._g(t._b({},"q-tooltip",t.params,!1),t.$listeners),["multiline"===t.type?[t._l(t.tips,(function(e,n){return[n>0?i("br",{key:-n}):t._e(),"html"===t.getType(e)?i("span",{key:n,domProps:{innerHTML:t._s(t.getContent(e))}}):"markdown"===t.getType(e)?i("q-markdown",{key:n,attrs:{src:t.getContent(e)}}):[t._v(t._s(e))]]}))]:"html"===t.type?i("span",{domProps:{innerHTML:t._s(t.getContent(t.tips))}}):"markdown"===t.type?i("q-markdown",{attrs:{src:t.getContent(t.tips)}}):[t._v(t._s(t.tips))]],2)},Ce=[],$e={props:{tips:{type:[String,Array],required:!0}},computed:{params(){return{maxWidth:"400px",anchor:"top left",self:"top right",...this.$attrs}},type(){return this.tips instanceof Array?"multiline":this.getType(this.tips)}},methods:{getType(t){return t.match(/^html\s/)?"html":t.match(/^md\s/)?"markdown":"str"},getContent(t){switch(this.getType(t)){case"html":return t.replace(/^html\s+/,"");case"markdown":return t.replace(/^md\s+/,"")}return t}}},ke=$e,Me=Object(f["a"])(ke,Pe,Ce,!1,null,null,null),je=Me.exports;Tt()(Me,"components",{QTooltip:Wt["a"]});var Oe={components:{CommonTips:je},inheritAttrs:!1,props:{value:{},label:[String,Function],icon:[String,Function],tips:[String,Array],shortcut:String,keyScope:{type:String,default:"all"}},computed:{computedLabel(){return this.label instanceof Function?String(this.label(this.value)):this.label},computedIcon(){return this.icon instanceof Function?String(this.icon(this.value)):this.icon}},watch:{shortcut:{handler(t,e){this.$nextTick((()=>{this.unbindShortcut(e,this.keyScope),this.bindShortcut(t,this.keyScope)}))},immediate:!0},keyScope:{handler(t,e){this.$nextTick((()=>{this.unbindShortcut(this.shortcut,e),this.bindShortcut(this.shortcut,t)}))},immediate:!0}},methods:{...Object(w["f"])("btn",["click"]),bindShortcut(t,e){t&&Ct()(t.toLowerCase(),e,(()=>(this.$refs.btn.disable||this.$emit("input",this.value),!1)))},unbindShortcut(t,e){t&&Ct.a.unbind(t.toLowerCase(),e)},onClick(){this.$emit("input",this.value)}},beforeDestroy(){this.unbindShortcut(this.shortcut,this.keyScope)}},Ne=Oe,Ie=Object(f["a"])(Ne,Se,_e,!1,null,null,null),ze=Ie.exports;Tt()(Ie,"components",{QBtn:Bt["a"]});var Fe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"row items-center narrow"},[t.label?i("label",{staticClass:"q-mr-sm",class:t.labelClass,style:t.combineLabelStyle},[t._v("\n    "+t._s(t.label)+"\n    "),t.tips?i("CommonTips",{attrs:{tips:t.tips}}):t._e()],1):t._e(),i(t.component,t._g(t._b({ref:"ctrl",tag:"component",class:t.ctrlClass,style:t.combineCtrlStyle},"component",t.combineParams,!1),t.$listeners)),t._t("default")],2)},Te=[],qe={components:{CommonTips:je},inheritAttrs:!1,props:{label:String,labelClass:[String,Array,Object],labelStyle:Object,labelWidth:Number,tips:[String,Array],component:{required:!0},ctrlClass:[String,Array,Object],ctrlStyle:Object,ctrlParams:Object,width:Number,maxWidth:Number},computed:{combineLabelStyle(){return this.labelWidth?{width:this.labelWidth+"px",...this.labelStyle}:this.labelStyle},combineCtrlStyle(){const t={...this.ctrlStyle};return null!=this.width&&(t.width=this.width+"px"),null!=this.maxWidth&&(t.maxWidth=this.maxWidth+"px"),t},combineParams(){return{...this.$attrs,...this.ctrlParams}}}},Ee=qe,Ve=Object(f["a"])(Ee,Fe,Te,!1,null,null,null),Re=Ve.exports,Ae=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"row items-center narrow"},[t.label?i("label",{staticClass:"q-mr-sm",class:t.labelClass,style:t.combineLabelStyle},[t._v("\n    "+t._s(t.label)+"\n    "),t.tips?i("CommonTips",{attrs:{tips:t.tips}}):t._e()],1):t._e(),i("q-input",t._g(t._b({ref:"input",class:t.qInputClass,style:t.combineInputStyle,attrs:{dense:"",placeholder:t.$attrs.placeholder||t.defVal,value:t.editValue},on:{input:t.onInput,blur:t.onEnter},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter.apply(null,arguments)}}},"q-input",t.$attrs,!1),t.inputListeners)),t._t("default")],2)},De=[],Ze={components:{CommonTips:je},inheritAttrs:!1,data:t=>({editValue:t.format(t.value)}),props:{label:String,labelClass:[String,Array,Object],labelStyle:Object,labelWidth:Number,tips:[String,Array],qInputClass:[String,Array,Object],qInputStyle:Object,width:{type:Number,default:100},maxWidth:Number,value:{required:!0},defVal:{},formatter:Function,normalizer:Function,validator:Function,immediate:Boolean},computed:{...Object(w["g"])("input",["focused","hasRules","hasError"]),combineLabelStyle(){return this.labelWidth?{width:this.labelWidth+"px",...this.labelStyle}:this.labelStyle},combineInputStyle(){const t={width:this.width+"px",...this.qInputStyle};return null!=this.maxWidth&&(t.maxWidth=this.maxWidth+"px"),t},inputListeners(){return{...this.$listeners,input:()=>{}}}},watch:{value(t){this.editValue=this.format(t)},editValue(t){this.immediate?(this.validator&&(t=this.validator(t)),this.updateValue(t,!0)):this.forceRefresh()}},methods:{...Object(w["f"])("input",["blur","focus","resetValidation","select","validate"]),format(t){return(this.formatter||String)(t)},updateValue(t,e){this.updateEditValue(this.format(t),e),t!==this.value&&this.$emit("input",t)},updateEditValue(t,e){t===this.editValue?e&&this.forceRefresh():this.editValue=t},forceRefresh(){const t=document.activeElement,e=t&&this.$refs.input.$refs.input===t;if(e){const t=this.$refs.input.$refs.input.selectionStart,e=this.$refs.input.$refs.input.value.length;this.$refs.input.blur(),this.$refs.input.focus(),setTimeout((()=>{const i=Math.max(0,t+this.$refs.input.$refs.input.value.length-e);this.$refs.input.$refs.input.setSelectionRange(i,i)}))}},onInput(t){this.normalizer&&(t=this.normalizer(t)),this.updateEditValue(t,!0)},onEnter(){let t=this.editValue;this.immediate?t=this.value:this.validator&&(t=this.validator(t)),void 0===this.defVal||null!=t&&""!==t||(t=this.defVal),this.updateValue(t)}}},Xe=Ze,Be=Object(f["a"])(Xe,Ae,De,!1,null,null,null),We=Be.exports;Tt()(Be,"components",{QInput:se["a"]});var Ye=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("CommonInput",t._g(t._b({ref:"input",attrs:{defVal:t.defVal,formatter:t.format,normalizer:t.normalize,validator:t.validate}},"CommonInput",t.$attrs,!1),t.$listeners))},He=[];i("498a");const Le=/^-?([1-9]\d*|0+)?(\.\d*)?$/;var Ge={inheritAttrs:!1,props:{precision:{type:Number,default:0},decimal:Boolean,percent:Boolean,minVal:{type:Number,default:-1/0},maxVal:{type:Number,default:1/0},defVal:{type:Number,default:0},formatter:Function,normalizer:Function,validator:Function},computed:{...Object(w["g"])("input",["focused","hasRules","hasError"])},methods:{...Object(w["f"])("input",["blur","focus","resetValidation","select","validate"]),format(t){return this.percent&&null!=t&&(t*=100),t=null==t?"":t.toFixed(Math.max(0,this.precision)),t&&!this.decimal&&(t=String(+t)),this.formatter?this.formatter(t):t},normalize(t){return"string"!==typeof t?t="":(t=t.trim(),(!Le.test(t)||this.minVal>=0&&t.includes("-")||this.precision<=0&&t.includes("."))&&(t=this.$refs.input.editValue)),this.normalizer?this.normalizer(t):t},validate(t){if(t=null==t||""===t?null:Number(t),Number.isNaN(t)&&(t=null),null!=t){const e=this.percent?100:1;t=Math.max(this.minVal*e,Math.min(this.maxVal*e,t));const i=10**this.precision;t=Math.round(t*i)/i/e}return this.validator?this.validator(t):t}}},Qe=Ge,Ue=Object(f["a"])(Qe,Ye,He,!1,null,null,null),Je=Ue.exports;const Ke={form:xe,btn:ze,ctrl:Re,num:Je,default:We},ti=["form","list","array"];var ei=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"q-space text-center ellipsis"},[t._v(t._s(t.editHint))])},ii=[],ni={computed:{...Object(y["e"])("edit",["xGrids","yGrids","gridStates","pathStates"]),...Object(y["e"])("edit",["brushMode","brushType","brushSize","brushSoft","brushState","brushPos"]),editHint(){const t=[];if(t.push(`⬜ ${this.xGrids} * ${this.yGrids}`),t.push(`🖌️ [${this.brushMode||0}-${this.brushType}] ${this.brushSize} * ${this.brushSoft} * ${this.brushState}`),this.brushPos){const{x:e,y:i}=this.brushPos,n=I["a"].xyToId(e,i);t.push(`🖱️ ${e}, ${i}`);let s=this.gridStates.get(n)||0;const r=s>100?"∞":Math.exp(s/20).toFixed(2);t.push(`🅱️ ${s} = ${r}`),s=this.pathStates.get(n),s&&t.push(`🔀 ${s>200?"路":s>100?"关":"开"}${s%100>1?" +"+(s%100-1):""}`)}return t.join("　")}}},si=ni,ri=Object(f["a"])(si,ei,ii,!1,null,null,null),oi=ri.exports;Tt()(ri,"components",{QSpace:Xt["a"]});var ai=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("canvas",{staticStyle:{"image-rendering":"pixelated"}})},ci=[],li=i("b94e"),ui={computed:{...Object(y["e"])("edit",["brushSize"]),...Object(y["c"])("edit",["brushStates"])},watch:{brushStates:"refreshPattern"},methods:{refreshPattern(){if(!this.$el)return;const t=this.brushSize,e=new ImageData(t,t),i=e.data;this.brushStates.forEach(((t,e)=>{t&&Object(li["i"])(i,4*e,...Object(li["g"])(t))})),this.$el.width=t,this.$el.height=t;const n=this.$el.getContext("2d");n.putImageData(e,0,0)}},mounted(){this.refreshPattern()}},hi=ui,di=Object(f["a"])(hi,ai,ci,!1,null,null,null),pi=di.exports,fi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.visible?i("div",{staticClass:"absolute no-pointer-events",style:t.cursorStyle},[i("BrushPattern",{ref:"pattern",staticClass:"absolute",style:t.patternStyle})],1):t._e()},mi=[],gi={inject:["page"],computed:{...Object(y["e"])("edit",["gridSize","pointMode","brushMode","brushSize","brushPos"]),visible(){return!this.pointMode&&!!this.brushMode&&!!this.brushPos&&!this.page.isDragging&&!this.page.brushDown},cursorStyle(){if(this.brushPos)return{left:this.brushPos.x*this.gridSize+"px",top:this.brushPos.y*this.gridSize+"px",opacity:.8}},patternStyle(){const t=-Math.floor(this.brushSize/2)*this.gridSize,e=this.brushSize*this.gridSize;return{left:t+"px",top:t+"px",width:e+"px",height:e+"px"}}}},bi=gi,yi=Object(f["a"])(bi,fi,mi,!1,null,null,null),vi=yi.exports,wi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("svg",{staticClass:"absolute no-pointer-events",style:t.pointStyle,attrs:{width:t.size,height:t.size}},t._l(+t.stacks,(function(e){return i("circle",{key:e,attrs:{cx:t.radius+t.thick,cy:t.radius+t.thick,r:t.radius*e/t.stacks,stroke:t.color,"stroke-width":t.thick,fill:"#0000",opacity:t.animate?0:1-(e-1)/t.stacks}},[t.animate?[i("animate",{attrs:{attributeName:"r",attributeType:"XML",from:"in"===t.animate?t.radius:0,to:"in"===t.animate?0:t.radius,dur:t.duration+"s",begin:t.duration*((e-1)/t.stacks)+"s",repeatCount:"indefinite"}}),i("animate",{attrs:{attributeName:"opacity",attributeType:"XML",from:"in"===t.animate?0:1,to:"in"===t.animate?1:0,dur:t.duration+"s",begin:t.duration*((e-1)/t.stacks)+"s",repeatCount:"indefinite"}})]:t._e()],2)})),0)},xi=[],Si={props:{x:{type:Number,default:0},y:{type:Number,default:0},radius:{type:Number,default:10},color:{type:String,default:"#f00"},thick:{type:Number,default:1},stacks:{type:[Number,String],default:1},animate:{type:String,default:""},duration:{type:[Number,String],default:1}},computed:{...Object(y["e"])("main",["viewZoom"]),...Object(y["e"])("edit",["gridSize"]),size(){return 2*(this.radius+this.thick)},pointStyle(){return{left:(this.x+.5)*this.gridSize+"px",top:(this.y+.5)*this.gridSize+"px",transform:this.$makeTransform(this.viewZoom**-.5,0,[.5,.5])}}}},_i=Si,Pi=Object(f["a"])(_i,wi,xi,!1,null,null,null),Ci=Pi.exports,$i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"absolute"},[t.startPos?i("PointPos",t._b({attrs:{radius:t.pointRadius,color:"#09f",thick:t.pointThick,stacks:"3",animate:"out",duration:"2"}},"PointPos",t.startPos,!1)):t._e(),t.endPos?i("PointPos",t._b({attrs:{radius:t.pointRadius,color:"#f22",thick:t.pointThick,stacks:"3",animate:"in",duration:"2"}},"PointPos",t.endPos,!1)):t._e()],1)},ki=[],Mi={computed:{...Object(y["e"])("edit",["gridSize","startPos","endPos"]),pointRadius(){return 20*this.gridSize**.2},pointThick(){return this.pointRadius/6}}},ji=Mi,Oi=Object(f["a"])(ji,$i,ki,!1,null,null,null),Ni=Oi.exports;const Ii={MyDrawer:vt,CustomScroller:xt,CustomMenu:Et,FloatPanel:Jt,FilterableList:oe,ZoomView:me,CommonForm:xe,CommonBtn:ze,CommonCtrl:Re,CommonInput:We,NumInput:Je,EditHint:oi,BrushPattern:pi,BrushCursor:vi,PointPos:Ci,MarkLayer:Ni};Object.keys(Ii).forEach((t=>{n["a"].component(Ii[t].name||t,Ii[t])}));const zi="";async function Fi(){const{app:t,store:e,router:i}=await ht();let s=!1;const r=t=>{s=!0;const e=Object(t)===t?i.resolve(t).route.fullPath:t;window.location.href=e},o=window.location.href.replace(window.location.origin,""),a=[void 0,void 0,w["default"]];for(let l=0;!1===s&&l<a.length;l++)if("function"===typeof a[l])try{await a[l]({app:t,router:i,store:e,Vue:n["a"],ssrContext:null,redirect:r,urlPath:o,publicPath:zi})}catch(c){return c&&c.url?void(window.location.href=c.url):void console.error("[Quasar] boot error:",c)}!0!==s&&new n["a"](t)}Fi()},"30f9":function(t,e,i){"use strict";i("b7fa0")},"31cd":function(t,e,i){},"342e":function(t,e,i){"use strict";function n(t,e,i){return e=e||"_"+t,i=i||"update:"+t,{data:i=>({[e]:i[t]}),watch:{[t]:function(t){this[e]=t},[e]:function(t){this.$emit(i,t)}}}}i.d(e,"a",(function(){return n}))},"4ecc":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("9523"),s=i.n(n);i("ddb0");const r=["neighbors","neighborsCache","pathCache"];class o{constructor(t=0,e=0,i=1){s()(this,"distance",0),s()(this,"priority",0),this.x=t,this.y=e,this.id=o.xyToId(t,e),this.cost=i}ref(){const t=this.node||this,e={node:t};return Object.setPrototypeOf(e,t),r.forEach((i=>Object.defineProperty(e,i,{get:()=>t[i],set:e=>t[i]=e}))),e}reset(){this.parentId=null,this.distance=0,this.priority=0}cachePath(t,e,i){this.pathCache||(this.pathCache=new Map);const n=this.pathCache.get(t);if(void 0!==n){if(null==i)return;if(n&&n[1]<i+1e-8)return}this.pathCache.set(t,null==i?null:[e,i])}getCachePathDistance(t=this.parentId){const e=this.pathCache&&this.pathCache.get(t);return e&&e[1]}getCachePathLastId(t=this.parentId){const e=this.pathCache&&this.pathCache.get(t);return e?e[0]:t}cacheNeighbors(t,e){this.neighborsCache||(this.neighborsCache=new Map),this.neighborsCache.set(t,e)}getCacheNeighbors(t){return this.neighborsCache&&this.neighborsCache.get(t)}static xyToId(t,e){return t|e<<16}static idToXY(t){return[65535&t,t>>16]}}},"5cd2":function(t,e,i){"use strict";i.d(e,"j",(function(){return L})),i.d(e,"c",(function(){return ot})),i.d(e,"r",(function(){return at})),i.d(e,"b",(function(){return dt})),i.d(e,"l",(function(){return pt})),i.d(e,"h",(function(){return ft})),i.d(e,"g",(function(){return mt})),i.d(e,"f",(function(){return gt})),i.d(e,"k",(function(){return yt})),i.d(e,"a",(function(){return xt})),i.d(e,"m",(function(){return St})),i.d(e,"q",(function(){return _t})),i.d(e,"p",(function(){return Ct})),i.d(e,"e",(function(){return qt})),i.d(e,"s",(function(){return Et})),i.d(e,"i",(function(){return At})),i.d(e,"n",(function(){return Dt})),i.d(e,"o",(function(){return Yt}));i("ddb0"),i("c1f9"),i("4e82"),i("5319"),i("e9c4"),i("2b3d"),i("9861");var n=i("2b0e"),s=i("2f62"),r=i("bc3a"),o=i.n(r),a=i("11ec"),c=i("709d"),l=i("2a19"),u=i("436b"),h=i("18d6"),d=i("b12a"),p=i("cdde"),f=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("q-dialog",t._g(t._b({ref:"dialog",style:t.dialogStyle,attrs:{maximized:t.realMaximized},on:{"before-show":t.bindKeys,"before-hide":t.unbindKeys}},"q-dialog",t.dialogParams,!1),t.$listeners),[i("q-card",{ref:"frame",staticClass:"absolute column no-wrap overflow-hidden",class:t.cardClass,style:t.realCardStyle},[null!=t.title?i("q-bar",{staticClass:"relative-position q-pr-none overflow-hidden",class:t.$q.dark.isActive?"":"bg-grey-3 text-primary",style:t.titleStyle},[t.movable&&!t.realMaximized?i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:t.dragMove,expression:"dragMove",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_mover absolute-full"}):t._e(),i("div",{staticClass:"q-space ellipsis",domProps:{innerHTML:t._s(t.title)}}),t.maximizeBtn?i("q-btn",{staticClass:"q-pa-xs",attrs:{flat:"",dense:""},on:{click:function(e){t.realMaximized=!t.realMaximized}}},[i("q-icon",{attrs:{name:t.realMaximized?"filter_none":"crop_square",size:"xs"}})],1):t._e(),t.closeBtn?i("q-btn",{staticClass:"q-pa-xs",attrs:{flat:"",dense:""},on:{click:t.hide}},[i("q-icon",{attrs:{name:"close",size:"xs"}})],1):t._e()],1):t._e(),i("div",{staticClass:"q-space relative-position"},[null===t.title&&t.movable&&!t.realMaximized?i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:t.dragMove,expression:"dragMove",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_mover absolute-full"}):t._e(),t._t("default",(function(){return["string"===typeof t.content?i("div",t._b({domProps:{innerHTML:t._s(t.content)}},"div",t.contentParams,!1)):i(t.content,t._b({ref:"content",tag:"component",on:{close:t.hide}},"component",t.contentParams,!1))]}))],2),t.okBtn||t.yesBtn||t.noBtn||t.cancelBtn?[i("q-separator"),i("q-card-actions",{staticClass:"q-px-md",attrs:{align:"right"}},[i("CommonForm",{attrs:{form:t.actionForm,"input-params":{t:"btn",class:t.$q.dark.isActive?"bg-grey-9":"bg-grey-2 text-primary",style:"min-width: 90px",flat:!0}}})],1)]:t._e(),t.resizable&&!t.realMaximized?[i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,0,-1)},expression:"e => dragResize(e, 0, -1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-tb absolute-top"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,0,1)},expression:"e => dragResize(e, 0, 1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-tb absolute-bottom"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,-1,0)},expression:"e => dragResize(e, -1, 0)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-lr absolute-left"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,1,0)},expression:"e => dragResize(e, 1, 0)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-lr absolute-right"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,-1,-1)},expression:"e => dragResize(e, -1, -1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-tlbr absolute-top-left"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,1,-1)},expression:"e => dragResize(e, 1, -1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-trbl absolute-top-right"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,-1,1)},expression:"e => dragResize(e, -1, 1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-trbl absolute-bottom-left"}),i("div",{directives:[{name:"touch-pan",rawName:"v-touch-pan.mouse.prevent.preserveCursor",value:function(e){return t.dragResize(e,1,1)},expression:"e => dragResize(e, 1, 1)",modifiers:{mouse:!0,prevent:!0,preserveCursor:!0}}],staticClass:"_resizer-tlbr absolute-bottom-right"})]:t._e()],2)],1)},m=[],g=i("4d7f"),b=i.n(g),y=i("24e8"),v=i("342e"),w={mixins:[Object(v["a"])("maximized","realMaximized"),Object(v["a"])("x","curX"),Object(v["a"])("y","curY"),Object(v["a"])("width","curWidth"),Object(v["a"])("height","curHeight")],props:{...y["a"].options.props,model:Boolean,x:Number,y:Number,width:Number,height:Number,cardClass:[String,Array,Object],cardStyle:Object,titleStyle:[String,Array,Object],title:String,closeBtn:{type:Boolean,default:!0},maximizeBtn:{type:Boolean,default:!1},okBtn:{type:[Boolean,String],default:!0},yesBtn:{type:[Boolean,String],default:!1},noBtn:{type:[Boolean,String],default:!1},cancelBtn:{type:[Boolean,String],default:!0},movable:{type:Boolean,default:!0},resizable:Boolean,minWidth:{type:Number,default:200},minHeight:{type:Number,default:50},maxWidth:Number,maxHeight:Number,content:{required:!0},contentParams:{type:Object,default:()=>({})}},computed:{$store:()=>n["a"].store,...Object(s["e"])("main",["uiZoom"]),dialogStyle(){return{zoom:1/this.uiZoom,zIndex:this.model?6e3:5999}},dialogParams(){const t={};return Object.keys(y["a"].options.props).forEach((e=>{t[e]=this[e]})),t},realCardStyle(){const t={...this.cardStyle,zoom:this.uiZoom};return this.realMaximized?(t.maxWidth=100/this.uiZoom+"vw !important",t.maxHeight=100/this.uiZoom+"vh !important"):(null!=this.curX&&(t.left=Math.max(0,Math.min(this.getClientWidth()-(this.curWidth||this.minWidth),this.curX))+"px"),null!=this.curY&&(t.top=Math.max(0,Math.min(this.getClientHeight()-(this.curHeight||this.minHeight),this.curY))+"px"),null!=this.curWidth&&(t.width=Math.min(this.getClientWidth(),this.curWidth)+"px"),null!=this.curHeight&&(t.height=Math.min(this.getClientHeight(),this.curHeight)+"px")),t},actionForm(){const t={};return this.okBtn&&(t.ok={label:"string"===typeof this.okBtn?this.okBtn:"确定",onInput:()=>this.ok()}),this.yesBtn&&(t.yes={label:"string"===typeof this.yesBtn?this.yesBtn:"是",onInput:()=>this.answer(!0)}),this.noBtn&&(t.no={label:"string"===typeof this.noBtn?this.noBtn:"否",onInput:()=>this.answer(!1)}),this.cancelBtn&&(t.cancel={label:"string"===typeof this.cancelBtn?this.cancelBtn:"取消",onInput:()=>this.hide()}),[t]}},provide(){return{dialog:this}},methods:{...gt("dialog",["show","hide","toggle","focus","shake"]),getClientWidth(){return document.documentElement.clientWidth/this.uiZoom},getClientHeight(){return document.documentElement.clientHeight/this.uiZoom},ok(){const t=this.$refs.content;if(t&&t.onOk instanceof Function){const e=t.onOk();if(!1===e)return}this.$emit("ok",t),this.hide()},answer(t){this.$emit("ok",t),this.hide()},dragDeal(t,e,i){document.documentElement.style.cursor=t.isFinal?"":e,t.isFirst&&(this.__initialRect=this.$refs.frame.$el.getBoundingClientRect()),i(),t.isFinal&&delete this.__initialRect},dragMove(t,e="move"){this.dragDeal(t,e,(()=>{const e=this.getClientWidth()-this.__initialRect.width;this.curX=Math.round(Math.max(0,Math.min(e,this.__initialRect.x+t.offset.x/this.uiZoom)));const i=this.getClientHeight()-this.__initialRect.height;this.curY=Math.round(Math.max(0,Math.min(i,this.__initialRect.y+t.offset.y/this.uiZoom)))}))},dragResize(t,e=1,i=1){const n=(e?(i?e===i?"s":"n":"")+"e":"s")+"-resize";this.dragDeal(t,n,(()=>{if(e){const i=Math.min(this.maxWidth||1/0,this.getClientWidth());if(this.curWidth=Math.round(Math.max(this.minWidth,Math.min(i,this.__initialRect.width+t.offset.x*e/this.uiZoom))),e<0&&(!this.cardStyle||!this.cardStyle.right||null!=this.curX)){const e=this.getClientWidth()-this.curWidth;this.curX=Math.round(Math.max(0,Math.min(e,this.__initialRect.x+t.offset.x/this.uiZoom)))}}if(i){const e=Math.min(this.maxHeight||1/0,this.getClientHeight());if(this.curHeight=Math.round(Math.max(this.minHeight,Math.min(e,this.__initialRect.height+t.offset.y*i/this.uiZoom))),i<0&&(!this.cardStyle||!this.cardStyle.bottom||null!=this.curY)){const e=this.getClientHeight()-this.curHeight;this.curY=Math.round(Math.max(0,Math.min(e,this.__initialRect.y+t.offset.y/this.uiZoom)))}}}))},bindKeys(){!this.__newScope&&this.model&&(this.__oldScope=b.a.getScope(),this.__newScope="dialog"+Math.random(),b.a.setScope(this.__newScope),(this.closeBtn||this.cancelBtn)&&b()("esc",this.__newScope,(t=>{t.stopPropagation();const e=this.$refs.content;if(e&&e.onCancel instanceof Function){const t=e.onCancel();if(!1===t)return}this.hide()})),this.okBtn&&b()("enter",this.__newScope,(t=>{t.stopPropagation(),this.ok()})))},unbindKeys(){this.__newScope&&(b.a.unbind("esc",this.__newScope),b.a.unbind("enter",this.__newScope),b.a.setScope(this.__oldScope),delete this.__oldScope,delete this.__newScope)}}},x=w,S=(i("1bdf"),i("2877")),_=i("f09f"),P=i("d847"),C=i("2c91"),$=i("9c40"),k=i("0016"),M=i("eb85"),j=i("4b7e"),O=i("75c3"),N=i("eebe"),I=i.n(N),z=Object(S["a"])(x,f,m,!1,null,"ad2f2a00",null),F=z.exports;I()(z,"components",{QDialog:y["a"],QCard:_["a"],QBar:P["a"],QSpace:C["a"],QBtn:$["a"],QIcon:k["a"],QSeparator:M["a"],QCardActions:j["a"]}),I()(z,"directives",{TouchPan:O["a"]});var T=i("9224");const q=Array.prototype;function E(t,e=0){return t<e&&([t,e]=[e,t]),e+Math.floor((t-e+1)*Math.random())}function V(t){return"object"===typeof t&&null!==t}function R(t){if(!V(t))return!0;for(const e in t)if(void 0!==e)return!1;return!0}function A(t){return Object(a["a"])(!0,{},{obj:t}).obj}function D(t,e){const i={},n={};return Object.keys(t).forEach((n=>{n in e||(i[n]=t[n])})),Object.keys(e).forEach((i=>{i in t||(n[i]=e[i])})),[i,n]}function Z(t,e,i,n){if(t<e)for(let s=t;s<=e;s++)i(s,n);else for(let s=t;s>=e;s--)i(s,n);return n}function X(t,e,i){return Object.fromEntries(Object.keys(t).map((n=>[i?i(n,t):n,e?e(t[n],n,t):t[n]])))}function B(t,e="id",i){const n={},s=arguments.length>2,r=i instanceof Function;return t.forEach(((t,o)=>{const a=null!=e?t[e]:t;s&&(t=r?i(t,o):i),n[a]=t})),n}function W(t,e="id",i=!1){return t.sort(((t,n)=>{const s=t[e],r=n[e];return s>r?i?-1:1:s<r?i?1:-1:0}))}function Y(t){return t.map(((t,e)=>e))}function H(t){return t.replace(/^(https?):\/\//,"/$1/")}async function L(t){const e=H(t);let i;if(e!==t){const e=await o.a.get(t);i=e.data}else i=await Et("loadFile",t);return"object"===typeof i?i:JSON.parse(i)}function G(t){const e=Math.floor(t/60),i=t%60;return`${e}:${i<10?0:""}${i}`}n["a"].prototype.$randint=E,n["a"].prototype.$isObject=V,n["a"].prototype.$isEmpty=R,n["a"].prototype.$clone=A,n["a"].prototype.$compareObjects=D,n["a"].prototype.$iter=Z,n["a"].prototype.$mapObject=X,Object.defineProperty(q,"toMap",{value:function(){return B(this,...arguments)}}),Object.defineProperty(q,"sortBy",{value:function(){return W(this,...arguments)}}),Object.defineProperty(q,"indices",{value:function(){return Y(this)}}),n["a"].prototype.$proxyUrl=H,n["a"].prototype.$loadJson=L,n["a"].prototype.$formatTime=G;const Q=/^[a-zA-Z_]\w*$/;function U(t){switch(typeof t){case"string":case"number":case"boolean":return JSON.stringify(t);case"object":return null===t?"nil":(t=t instanceof Array?t.map(U):Object.keys(t).map((e=>{const i=Q.test(e)?e:"["+JSON.stringify(e)+"]";return i+"="+U(t[e])})),"{"+t.join(",")+"}");default:return"nil"}}n["a"].prototype.$formatLua=U;const J=/"|'|,|\s/;function K(t,e){const i=t.map((t=>{let i=e?e.map((e=>t[e])):Object.values(t);return i=i.map((t=>null==t?"":(t=String(t),t.match(J)?JSON.stringify(t):t))),i.join(",")}));return i.join("\n")}function tt(t){const e=document.createElement("div");return void 0===e.textContent?e.innerText=t:e.textContent=t,e.innerHTML}function et(t){const e=document.createElement("div");return e.innerHTML=t,void 0===e.textContent?e.innerText:e.textContent}function it(t=1,e=0,i=[0,0]){const n=[];return(i[0]||i[1])&&n.push(`translate(${-100*i[0]}%, ${-100*i[1]}%)`),1!==t&&n.push(`scale(${t})`),e&&n.push(`rotate(${-e}deg)`),n.join(" ")}function nt(t){const e=t.parentElement;e&&t!==e.lastElementChild&&(e.removeChild(t),e.appendChild(t))}function st(){document.activeElement&&document.activeElement.blur()}function rt(t=""){document.documentElement.style.cursor=t}function ot(t,e="未知错误"){if(!t)throw e instanceof Error?e:Error(e)}function at(t=0){return new Promise((e=>{setTimeout(e,t)}))}n["a"].prototype.$formatCsv=K,n["a"].prototype.$htmlEncode=tt,n["a"].prototype.$htmlDecode=et,n["a"].prototype.$makeTransform=it,n["a"].prototype.$bringToFront=function(){nt(this.$el)},n["a"].prototype.$clearFocus=st,n["a"].prototype.$setCursor=rt,n["a"].prototype.$assert=ot,n["a"].prototype.$sleep=at;const ct=String((()=>{const t=Object.getPrototypeOf((async()=>{})).constructor;self.onmessage=async function(e){try{const[i,n,s]=e.data;self.notify=(...t)=>n&&postMessage(["notify",t]);const r=await t(i)(...s);postMessage(["return",r])}catch(i){postMessage(["throw",i])}},postMessage(["ready"])})),lt=ct.substring(ct.indexOf("{")+1,ct.lastIndexOf("}")),ut=URL.createObjectURL(new Blob([lt],{type:"text/javascript"}));function ht(t,e,...i){return new Promise(((n,s)=>{function r(t){const r=new Worker(ut);r.onmessage=async o=>{const[a,c]=o.data;switch(a){case"ready":return r.postMessage([t,!!e,i]);case"return":return r.terminate(),n(c);case"throw":return r.terminate(),s(c);case"notify":{if(!e)return;let t=e(...c);if(t instanceof Promise&&(t=await t()),!t)return;return r.terminate(),n()}}}}t instanceof Promise?t.then((t=>ht(t.default,e,...i))).then(n).catch(s):"function"===typeof t?(t=String(t),r(t.substring(t.indexOf("{")+1,t.lastIndexOf("}")))):r(String(t))}))}n["a"].prototype.$workerRun=ht;const dt={root:!0};function pt(t,e,i){const n=Object(s["e"])(t,e),r=Object(s["d"])(t,e),o={};return Object.keys(n).forEach((t=>{let e;e=i?function(e){r[t].call(this,e),i instanceof Function?i.call(this,t,e):this[i](t,e)}:r[t],o[t]={get:n[t],set:e}})),o}function ft(t,e){const i={};return t.forEach((t=>{i[t]=function(i,n){n!==i[t]&&(i[t]=n,e&&e(t,n,i))}})),i}function mt(t,e,i="",n=!1){const s={};return e.forEach((e=>{s[i+e]=function(){return this.$refs[t][e]},n&&(s[i+e]={get:s[i+e],set:function(i){this.$refs[t][e]=i}})})),s}function gt(t,e,i=""){const n={};return e.forEach((e=>{n[i+e]=function(...i){return this.$refs[t][e](...i)}})),n}function bt(t,...e){"object"===typeof t&&e.forEach((e=>{n["a"].util.defineReactive(t,e)}))}function yt(t,e="",i=this,n=null){const s={};return t.forEach((t=>{s[e+t]=n?n(i[t],t):i[t]})),s}function vt(t,e,i="",n=this,s=null){t.forEach((t=>{n[t]=s?s(e[i+t],t):e[i+t]}))}function wt(t,e){const i=e.split(".");for(let n=0;n<i.length&&void 0!==t;n++)t=t[i[n]];return t}function xt(t,e="red"){return e.startsWith("#")?` <b style="color:${e}">${t}</b> `:` <b class="text-${e}">${t}</b> `}function St(t,e="info",i={}){return l["a"].create({type:e,message:t,...i})}function _t(t,e="提示",i={}){return Ct(t,e,!0,{cancelBtn:!1,contentParams:{class:"q-pa-lg",style:"min-width: 300px"},...i})}async function Pt(t,e="询问"){return new Promise((i=>{_t(t,e,{okBtn:!1,yesBtn:!0,noBtn:!0}).onOk((t=>{i(t)})).onCancel((()=>{i(null)}))}))}function Ct(t,e=null,i=!0,n={}){return u["a"].create({title:e,component:F,content:t,model:i,seamless:!i,persistent:!i,noEscDismiss:!0,noBackdropDismiss:!0,...n})}function $t(t,e,i,n){if(!t.__tweenCancel||!t.__tweenCancel())if(n={from:t.$el||t,onToggle:e,...n},i){const i=n.onEnd;n.onEnd=n=>{delete t.__tweenCancel,"from"===n&&e(!0),i&&i(n)},t.__tweenCancel=Object(c["a"])(n)}else Object(c["a"])(n)}n["a"].prototype.$reactive=bt,n["a"].prototype.$mapProps=yt,n["a"].prototype.$syncProps=vt,n["a"].prototype.$getNested=wt,n["a"].prototype.$notify=St,l["a"].registerType("info",{position:"bottom",html:!0,icon:"info",color:"grey-1",textColor:"primary",timeout:2e3}),l["a"].registerType("warn",{position:"bottom",html:!0,icon:"warning",color:"red-8",textColor:"white",timeout:3e3}),n["a"].prototype.$showMsg=_t,n["a"].prototype.$showAsk=Pt,n["a"].prototype.$showDlg=Ct,n["a"].prototype.$tween=$t;const kt=null;function Mt(t,e,i,...n){if(!kt){function e(e){return"post"!==t||e instanceof Promise?e:new Promise((t=>t(e)))}switch(i){case"quit":return e(jt("exit"));case"exit":return e(window.close());case"maximize":return e(d["a"].request());case"unmaximize":return e(d["a"].exit());case"showOpenDialog":return e({canceled:!1,filePaths:["FindPathGrids-1"]});case"showSaveDialog":return e({canceled:!1,filePath:"FindPathGrids-1"});case"loadFile":return["FindPathGrids-1"].includes(n[0])?e(h["a"].getItem(...n)):e(o.a.get(...n).then((t=>t.data)));case"saveFile":if(!["FindPathGrids-1"].includes(n[0]))break;return h["a"].set(...n),e(!0)}return _t("网页模式下不支持此功能"),e()}switch(t){case"call":return kt.ipcRenderer.send("call",e,i,...n);case"get":return kt.ipcRenderer.sendSync("call",e,i,...n);case"post":return kt.ipcRenderer.invoke("call",e,i,...n)}}function jt(t,...e){Mt("call","app",t,...e)}function Ot(t,...e){return Mt("get","app",t,...e)}async function Nt(t,...e){return await Mt("post","app",t,...e)}function It(t,...e){Mt("call","win",t,...e)}function zt(t,...e){return Mt("get","win",t,...e)}async function Ft(t,...e){return await Mt("post","win",t,...e)}function Tt(t,...e){Mt("call","dlg",t,...e)}async function qt(t,...e){return await Mt("post","dlg",t,...e)}async function Et(t,...e){return await Mt("post","util",t,...e)}kt&&kt.ipcRenderer.on("win-event",((t,e)=>{switch(e){case"maximize":case"unmaximize":return n["a"].store.commit("main/maximized","maximize"===e);case"before-quit":return jt("exit")}})),n["a"].prototype.$appCall=jt,n["a"].prototype.$appGet=Ot,n["a"].prototype.$appPost=Nt,n["a"].prototype.$winCall=It,n["a"].prototype.$winGet=zt,n["a"].prototype.$winPost=Ft,n["a"].prototype.$dlgCall=Tt,n["a"].prototype.$dlgPost=qt,n["a"].prototype.$utilPost=Et;const Vt=`../${T.name}.json`;let Rt=null;async function At(t){if(kt){if(null==Rt)try{Rt=await L(Vt),ot(Rt&&"object"===typeof Rt)}catch(e){Rt={}}return t?Rt[t]:Rt}if(h["a"].has(T.name+"."+t))return h["a"].getItem(T.name+"."+t);try{return await L(t+".json")}catch(e){return null}}async function Dt(t,e,i){kt?(await At(),i?Object(a["a"])(!0,t?Rt[t]:Rt,e||{}):t?Rt[t]=e:Rt=e||{},await Et("saveFile",Vt,JSON.stringify(Rt,null,2))):h["a"].set(T.name+"."+t,e)}async function Zt(){kt?(Rt={},await Et("saveFile",Vt,JSON.stringify(Rt))):h["a"].clear()}function Xt(t){if(kt){const e=kt.clipboard.readText()||"";return!t||t.test(e)?e:""}return""}async function Bt(t){t=String(t),kt&&kt.clipboard.writeText(t),await Object(p["a"])(t)}function Wt(t,e){const i=Xt(t?new RegExp(`^{"${t}":`):null);if(i){if(e)return i;try{return JSON.parse(i)[t]}catch(n){}}return null}async function Yt(t,e){e&&(t={[e]:t}),await Bt(JSON.stringify(t))}n["a"].prototype.$loadConfig=At,n["a"].prototype.$saveConfig=Dt,n["a"].prototype.$clearConfig=Zt,n["a"].prototype.$getClipboardText=Xt,n["a"].prototype.$setClipboardText=Bt,n["a"].prototype.$getClipboardJson=Wt,n["a"].prototype.$setClipboardJson=Yt},"6e1e":function(t,e,i){},"91bf":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("9523"),s=i.n(n),r=i("f0ff");const o=Math.SQRT2-1;class a extends r["a"]{constructor(t,e={}){super(t,e),s()(this,"heuristic",null),s()(this,"targetNode",null),this.heuristic="function"===typeof e.heuristic?e.heuristic:a[e.heuristic]||a.manhattan}static manhattan(t,e){return t+e}static euclidean(t,e){return Math.hypot(t,e)}static octile(t,e){return t>e?t+e*o:e+t*o}static chebyshev(t,e){return Math.max(t,e)}async findPath(t,e){return this.targetNode=e,await super.findPath(t,e)}calcPriority(t){return t.openVer!==this.findPathVer&&(t.heurist=this.calcHeurist(t)),1e-8*Math.round(1e8*(t.distance+t.heurist))}calcHeurist(t){const{x:e,y:i}=this.targetNode,n=Math.abs(t.x-e),s=Math.abs(t.y-i);return this.heuristic(n,s)}comparePriority(t,e){return t.priority-e.priority||t.heurist-e.heurist||t.openIndex-e.openIndex}}},9224:function(t){t.exports=JSON.parse('{"name":"findpath","version":"0.6.1","productName":"Find Path Demo","description":"寻路算法演示 - Path Finding Algorithm Demo","author":"fictiony <fictiony@qq.com>","private":true,"scripts":{"lint":"eslint --ext .js,.vue ./","dev":"quasar dev","build":"quasar build","dev electron":"quasar dev -m electron","build electron":"quasar build -m electron"},"dependencies":{"@quasar/extras":"^1.0.0","axios":"^0.21.1","core-js":"^3.6.5","keymaster":"^1.6.2","quasar":"^1.15.10","three-stats":"^1.0.1"},"devDependencies":{"@quasar/app":"^2.0.0","@quasar/quasar-ui-qmarkdown":"^1.4.1","babel-eslint":"^10.0.1","devtron":"^1.4.0","electron":"^9.0.0","electron-builder":"^22.4.0","electron-debug":"^3.0.1","electron-devtools-installer":"^3.0.0","eslint":"^7.21.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^11.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-vue":"^7.7.0","eslint-webpack-plugin":"^2.4.0","strip-ansi":"=3.0.1"},"browserslist":["last 10 Chrome versions","last 10 Firefox versions","last 4 Edge versions","last 7 Safari versions","last 8 Android versions","last 8 ChromeAndroid versions","last 8 FirefoxAndroid versions","last 10 iOS versions","last 5 Opera versions"],"engines":{"node":">= 10.18.1","npm":">= 6.13.4","yarn":">= 1.21.1"}}')},a214:function(t,e,i){"use strict";i("6e1e")},af1b:function(t,e,i){},b7fa0:function(t,e,i){},b94e:function(t,e,i){"use strict";i.d(e,"a",(function(){return u})),i.d(e,"e",(function(){return h})),i.d(e,"d",(function(){return d})),i.d(e,"f",(function(){return p})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return m})),i.d(e,"g",(function(){return g})),i.d(e,"h",(function(){return b})),i.d(e,"i",(function(){return y}));i("ddb0");var n=i("2b0e");let s;const r=[150,100,0,30],o=[150,30,60,230],a=[100,250,100,200],c=[50,210,210,200],l=[30,120,190,250],u=Object.freeze([{value:"astar",label:"A*寻路",tips:"目前最流行的启发式广度搜索寻路算法\n<br>从起点开始依次检测周围节点并加入开启列表，然后每次从开启列表中取出优先级（按启发函数进行评估）最高的点继续展开，直到展开到终点为止\n<br>优先级的计算公式为：f = g + h\n<br>其中，f表示优先级，g表示已经过的路径长度，h表示启发值"},{value:"dijkstra",label:"最短路径寻路",tips:"又称Dijkstra算法，可以看做是A*算法忽略启发值（即h=0）后的简化版本，是在A*算法出现前的经典算法"},{value:"bestfirst",label:"最近优先寻路",tips:"A*寻路算法的变种，区别只是提升了启发函数值在优先级计算中的权重（即：f = g + h * w），但可能会导致最终得到的不是最优解"},{value:"breadthfirst",label:"广度优先寻路",tips:"节点展开顺序不依赖路径长度排序，仅取决于自身开启的顺序，因此最终得到的通常不是最优解\n<br>注：仅用于参考对比，实际环境中很少用到"},{value:"centralastar",label:"中心线A*寻路",tips:"在A*基础上增加了对节点展开顺序的优化，以修正A*返回的最优路径虽然在距离上最短，但在形状上却不符合人思维的问题"},{value:"js_astar",label:"第三方A*寻路",tips:"目前Github上star数最高的JS版A*算法代码\n<br>参考地址：https://github.com/bgrins/javascript-astar\n<br>启发函数不支持欧几里德距离和切比雪夫距离（改用曼哈顿距离）\n<br>对角移动不支持无阻挡可走和非全阻挡可走（改用始终可走）\n<br>注：代码经过少量调整，以便支持异步演示功能"},{value:"test",label:"测试寻路",tips:"个人研究测试中的寻路算法"}]),h=Object.freeze([{value:"manhattan",label:"曼哈顿距离",tips:"启发值为当前点离终点的横纵向距离和，适用于只能上下左右移动的情况"},{value:"euclidean",label:"欧几里德距离",tips:"启发值为当前点离终点的直线距离"},{value:"octile",label:"八分角距离",tips:"启发值为当前点离终点的斜45°折线距离，适用于能对角线（即八方向）移动的情况"},{value:"chebyshev",label:"切比雪夫距离",tips:"启发值为当前点离终点的横纵向距离中的较大值"}]),d=Object.freeze([{value:0,label:"不可走"},{value:1,label:"无阻挡可走"},{value:2,label:"非全阻挡可走"},{value:3,label:"始终可走"}]),p=Object.freeze([{value:1,name:"起点",icon:"logout",shortcut:"Q"},{value:2,name:"终点",icon:"login",shortcut:"Z"}]),f=Object.freeze([{value:1,name:"叠加",icon:"radio_button_checked",shortcut:"A"},{value:2,name:"扣除",icon:"radio_button_unchecked",shortcut:"D"},{value:3,name:"合并",icon:"edit",shortcut:"C"},{value:4,name:"清除",icon:"cleaning_services",shortcut:"E"}]),m=Object.freeze([{value:1,name:"方形",icon:"border_all"},{value:2,name:"圆形",icon:"circle"},{value:3,name:"随机杂点",icon:"blur_on"},{value:4,name:"随机散布(方形)",icon:"apps"},{value:5,name:"随机散布(圆形)",icon:"grain"}]);function g(t){if(t>100)return o;if(t>0){const[e,i,n,s]=r;return[e,i,n,s+2*t]}return[0,0,0,0]}function b(t){if(t>200)return l;if(s=s||n["a"].store.state.edit,s.showState){if(t>100){const[e,i,n,s]=c,r=10*Math.min(20,t-100);return[e,i-r,n-r,s]}if(t>0){const[e,i,n,s]=a,r=10*Math.min(20,t);return[e,i-r,n,s]}}return[0,0,0,0]}function y(t,e,i,n,s,r=255){t[e]=i,t[e+1]=n,t[e+2]=s,t[e+3]=r}},dd90:function(t,e,i){},e9e6:function(t,e,i){"use strict";function n(t){let e=t;const i=[];while(e.parent)i.unshift(e),e=e.parent;return i}function s(){return new c((function(t){return t.f}))}i.d(e,"b",(function(){return r})),i.d(e,"a",(function(){return o}));const r={search:async function(t,e,i,o){t.cleanDirty(),o=o||{};const a=o.heuristic||r.heuristics.manhattan,c=o.closest||!1,l=r.openHeap=s(),{openNotify:u,updateNotify:h,closeNotify:d}=o;let p=e;e.h=a(e,i),t.markDirty(e),l.push(e);while(l.size()>0){const e=l.pop();if(e===i)return n(e);if(e.closed=!0,d&&await d(e,0))return;const s=t.neighbors(e);for(let n=0,r=s.length;n<r;++n){const r=s[n];if(r.closed||r.isWall())continue;const o=e.g+r.getCost(e),d=r.visited;if(!d||o<r.g)if(r.visited=!0,r.parent=e,r.h=r.h||a(r,i),r.g=o,r.f=r.g+r.h,t.markDirty(r),c&&(r.h<p.h||r.h===p.h&&r.g<p.g)&&(p=r),d){if(l.rescoreElement(r),h&&await h(r,2))return}else if(l.push(r),u&&await u(r,1))return}}return c?n(p):null},heuristics:{manhattan:function(t,e){const i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return i+n},diagonal:function(t,e){const i=1,n=Math.SQRT2,s=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return i*(s+r)+(n-2*i)*Math.min(s,r)}},cleanNode:function(t){t.f=0,t.g=0,t.h=0,t.visited=!1,t.closed=!1,t.parent=null}};function o(t,e){e=e||{},this.nodes=[],this.diagonal=!!e.diagonal,this.grid=[];for(let i=0;i<t.length;i++){this.grid[i]=[];for(let e=0,n=t[i];e<n.length;e++){const t=new a(i,e,n[e]);this.grid[i][e]=t,this.nodes.push(t)}}this.init()}function a(t,e,i){this.x=t,this.y=e,this.weight=i}function c(t){this.content=[],this.scoreFunction=t}o.prototype.init=function(){this.dirtyNodes=[];for(let t=0;t<this.nodes.length;t++)r.cleanNode(this.nodes[t])},o.prototype.cleanDirty=function(){for(let t=0;t<this.dirtyNodes.length;t++)r.cleanNode(this.dirtyNodes[t]);this.dirtyNodes=[]},o.prototype.markDirty=function(t){this.dirtyNodes.push(t)},o.prototype.neighbors=function(t){const e=[],i=t.x,n=t.y,s=this.grid;return s[i-1]&&s[i-1][n]&&e.push(s[i-1][n]),s[i+1]&&s[i+1][n]&&e.push(s[i+1][n]),s[i]&&s[i][n-1]&&e.push(s[i][n-1]),s[i]&&s[i][n+1]&&e.push(s[i][n+1]),this.diagonal&&(s[i-1]&&s[i-1][n-1]&&e.push(s[i-1][n-1]),s[i+1]&&s[i+1][n-1]&&e.push(s[i+1][n-1]),s[i-1]&&s[i-1][n+1]&&e.push(s[i-1][n+1]),s[i+1]&&s[i+1][n+1]&&e.push(s[i+1][n+1])),e},o.prototype.toString=function(){const t=[],e=this.grid;for(let i=0;i<e.length;i++){const n=[],s=e[i];for(let t=0;t<s.length;t++)n.push(s[t].weight);t.push(n.join(" "))}return t.join("\n")},a.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},a.prototype.getCost=function(t){return t&&t.x!==this.x&&t.y!==this.y?this.weight*Math.SQRT2:this.weight},a.prototype.isWall=function(){return 0===this.weight},c.prototype={push:function(t){this.content.push(t),this.sinkDown(this.content.length-1)},pop:function(){const t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.bubbleUp(0)),t},size:function(){return this.content.length},rescoreElement:function(t){this.sinkDown(this.content.indexOf(t))},sinkDown:function(t){const e=this.content[t];while(t>0){const i=(t+1>>1)-1,n=this.content[i];if(!(this.scoreFunction(e)<this.scoreFunction(n)))break;this.content[i]=e,this.content[t]=n,t=i}},bubbleUp:function(t){const e=this.content.length,i=this.content[t],n=this.scoreFunction(i);while(1){const s=t+1<<1,r=s-1;let o,a=null;if(r<e){const t=this.content[r];o=this.scoreFunction(t),o<n&&(a=r)}if(s<e){const t=this.content[s],e=this.scoreFunction(t);e<(null===a?n:o)&&(a=s)}if(null===a)break;this.content[t]=this.content[a],this.content[a]=i,t=a}}}},f0ff:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("9523"),s=i.n(n),r=(i("26e9"),i("ddb0"),i("0100")),o=i("0724");class a extends r["a"]{constructor(t,e={}){super(t,e),s()(this,"openNodes",null),s()(this,"openNotify",null),s()(this,"updateNotify",null),s()(this,"closeNotify",null);const i=!("heapSort"in e)||e.heapSort;this.openNodes=new o["a"](this.comparePriority,i),this.openNotify=e.openNotify||null,this.updateNotify=e.updateNotify||null,this.closeNotify=e.closeNotify||null}reset(t=!1){this.openNodes.clear(),t||super.reset()}async findPath(t,e){this.reset(!0);const i=++this.findPathVer;let n=0;const{openNodes:s,openNotify:r}=this;if(t.reset(),t.openVer=i,t.openIndex=++n,s.push(t),r&&await r(t,1))return;const{updateNotify:o,closeNotify:a}=this;let c;while(c=s.pop()){if(c.closeVer=i,a&&await a(c,0))return;if(c===e)return this.backtrace(c).reverse();for(const t of this.getNeighbors(c)){if(t.closeVer===i)continue;const e=t.openVer===i,a=c.distance+c.neighbors.get(t.id);if(!(e&&t.distance<=a))if(t.parentId=c.id,t.distance=a,t.priority=this.calcPriority(t),t.openIndex=++n,e){if(s.update(t),o&&await o(t,2))return}else if(t.openVer=i,s.push(t),r&&await r(t,1))return}}return null}calcPriority(t){return t.distance}comparePriority(t,e){return t.priority-e.priority||t.openIndex-e.openIndex}}}});