Файловый менеджер - Редактировать - /home/jogoso94/public_html/static/img/logo/973.59596f60f1cf4d72.js.tar
�азад
home/jogoso94/public_html/jogos/mahjong/973.59596f60f1cf4d72.js 0000644 00000163136 15042716340 0017270 0 ustar 00 "use strict";(self.webpackChunkmah=self.webpackChunkmah||[]).push([[973],{7973:(Ut,T,u)=>{u.r(T),u.d(T,{EditorModule:()=>At});var _=u(6895),K=u(7390),t=u(4650),h=u(7827),f=u(2878);class C{constructor(){this.levels=[],this.init(2,2,1)}init(r,n,e){const o=new Array(e);for(let s=0;s<e;s++){o[s]=new Array(r);for(let a=0;a<r;a++){o[s][a]=new Array(n);for(let l=0;l<n;l++)o[s][a][l]=0}}this.levels=o}clear(){const r=this.levels;for(let n=0;n<r.length;n++)for(let e=0;e<r[n].length;e++)for(let o=0;o<r[n][e].length;o++)r[n][e][o]=0}inBounds(r,n,e){return r>=0&&n>=0&&e>=0&&r<this.levels.length&&n<this.levels[0].length&&e<this.levels[0][0].length}isTile(r,n,e){return this.levels[r][n][e]>0}isTilePosInvalid(r,n,e){return!this.levels[r][n+1]||this.levels[r][n].length-1===e||this.levels[r][n][e+1]>0||(this.levels[r][n-1]?this.levels[r][n-1][e+1]:0)>0||(this.levels[r][n-1]?this.levels[r][n-1][e-1]:0)>0||(this.levels[r][n+1]?this.levels[r][n+1][e]:0)>0||(this.levels[r][n+1]?this.levels[r][n+1][e-1]:0)>0||(this.levels[r][n+1]?this.levels[r][n+1][e-1]:0)>0||(this.levels[r][n+1]?this.levels[r][n+1][e+1]:0)>0}isTilePosBlocked(r,n,e){return this.levels[r][n][e-1]>0||!!this.levels[r][n-1]&&(this.levels[r][n-1][e]>0||this.levels[r][n-1][e-1]>0)}get(r,n,e){return this.levels[r][n][e]||0}setValue(r,n,e,o){this.levels[r][n][e]=o}applyMapping(r,n,e,o){const s=(0,f.O8)(r,n,e,o);this.init(s.x+1,s.y+1,s.z),r.forEach(a=>{this.setValue(a[0],a[1],a[2],1)})}}var g=u(1344),E=u(7692),m=u(9671);function L(i,r,n,e,o){return v.apply(this,arguments)}function v(){return(v=(0,m.Z)(function*(i,r,n,e,o){const s=r*n;if(o.length!==s*i)return Promise.reject(Error("Invalid Matrix Pattern length"));const l={name:e,cat:"Kyodai",mapping:[]};for(let c=0;c<i;c++){const p=o.slice(c*s,(c+1)*s);for(let d=0;d<r;d++)p.slice(d*n,(d+1)*n).split("").forEach((Dt,Nt)=>{"1"===Dt&&l.mapping.push([c,Nt,d])})}return l})).apply(this,arguments)}function j(i,r){return x.apply(this,arguments)}function x(){return(x=(0,m.Z)(function*(i,r){return L(5,20,34,i,r)})).apply(this,arguments)}function A(i,r){return O.apply(this,arguments)}function O(){return(O=(0,m.Z)(function*(i,r){const n=[];return i.forEach((e,o)=>{const s=Math.floor(o/r),a=o%r;e.split("").forEach((l,c)=>{"1"===l&&n.push([s,c,a])})}),n})).apply(this,arguments)}function H(i,r){return y.apply(this,arguments)}function y(){return(y=(0,m.Z)(function*(i,r){let n=i.replace(/\r\n/g,"\n").split("\n");const e=r.split(".");e.pop();const o=n.shift()||"",s={name:e.join(".").replace(/_/g," "),cat:"Kmahjongg",mapping:[]};if(["kmahjongg-layout-v1.0"].includes(o))return s.by="KDE Games team",s.mapping=yield A(n.filter(a=>!a.startsWith("#")),16),s;if(["kmahjongg-layout-v1.1"].includes(o)){const a=Number((n.find(p=>p.startsWith("h"))||"h16").split("").slice().join("")),l=(n.find(p=>p.startsWith("# name:"))||"").slice(7).trim();s.name=l||s.name;const c=(n.find(p=>p.startsWith("# by:"))||"").slice(5).trim();return s.by=c||s.by,n=n.filter(p=>!(p.startsWith("h")||p.startsWith("w")||p.startsWith("d")||p.startsWith("#"))),s.mapping=yield A(n,isNaN(a)?16:a),s}return Promise.reject(Error(`Unknown .layout format ${JSON.stringify((o||"").slice(0,50))}`))})).apply(this,arguments)}function G(i,r){return P.apply(this,arguments)}function P(){return(P=(0,m.Z)(function*(i,r){const n=i.replace(/\r\n/g,"\n").split("\n"),e=n[0]||"";if(["Kyodai 3.0","Kyodai 6.0"].includes(e)){const o=(n[1]||"").split("::"),s=o[0]||"",a=o[1],l=n[2]||"",c=yield j(s,l);return c.cat=a||c.cat,c}return Promise.reject(Error(`Unknown .lay format ${JSON.stringify((e||"").slice(0,50))}`))})).apply(this,arguments)}function D(i){const r={};(function Y(i){return i.sort((r,n)=>r[0]<n[0]?-1:r[0]>n[0]?1:r[1]<n[1]?-1:r[1]>n[1]?1:r[2]<n[2]?-1:r[2]>n[2]?1:0)})(i).forEach(e=>{r[e[0]]=r[e[0]]||{},r[e[0]][e[2]]=r[e[0]][e[2]]||[],r[e[0]][e[2]].push(e[1])});const n=[];for(const e of Object.keys(r)){const o=[];for(const s of Object.keys(r[e])){const l=[];let c={start:-1,current:-1,count:0};r[e][s].forEach(d=>{d!==c.current?(c={start:d,current:d+2,count:1},l.push(c)):(c.current+=2,c.count++)});const p=l.map(d=>1===d.count?d.start:[d.start,d.count]);1!==p.length||Array.isArray(p[0])?o.push([Number(s),p]):o.push([Number(s),p[0]])}n.push([Number(e),o])}return n}function N(i){const r=i.name.split(" by ");r.length>1&&(i.name=r[0].trim(),i.by=r[1].trim()),i.name=i.name.trim().split(" ").map(e=>e[0].toUpperCase()+e.slice(1)).join(" ").replace(/["']/g,""),i.by=i.by?i.by.trim().split(" ").map(e=>e[0].toUpperCase()+e.slice(1)).join(" ").replace(/["]/g,""):void 0;const n=b(i.mapping);return{id:(0,f.le)(n),name:i.name.trim(),cat:i.cat,by:i.by,map:D(n)}}function b(i){if(0===i.length)return[];let r=i[0][0],n=i[0][1],e=i[0][2];return i.forEach(o=>{r=Math.min(o[0],r),n=Math.min(o[1],n),e=Math.min(o[2],e)}),i.map(o=>[o[0]-(r||0),o[1]-(n||0),o[2]-(e||0)])}function $(i){return w.apply(this,arguments)}function w(){return(w=(0,m.Z)(function*(i){const r=new FileReader;return new Promise((n,e)=>{r.onload=()=>{n(r.result)},r.onerror=()=>{e(Error(`Reading File failed: ${r.error}`))},r.readAsBinaryString(i)})})).apply(this,arguments)}function Q(i){return Z.apply(this,arguments)}function Z(){return(Z=(0,m.Z)(function*(i){const r=yield $(i),n=(i.name.split(".").pop()||"").toLowerCase();let e;if("lay"===n)e=N(yield G(r,i.name));else{if("layout"!==n)return JSON.parse(r).boards;e=N(yield H(r,i.name))}return[e]})).apply(this,arguments)}var k=u(174),U=u(5050),J=u(8219);function z(i,r){if(1&i){const n=t.EpF();t.O4$(),t.TgZ(0,"rect",9),t.NdJ("click",function(o){const a=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.onClickDraw(o,a))}),t.qZA()}if(2&i){const n=r.$implicit;t.Tol(n.className),t.uIk("x",n.pos.x)("y",n.pos.y)}}function X(i,r){if(1&i){const n=t.EpF();t.O4$(),t.TgZ(0,"g",10),t.NdJ("mousedown",function(o){const a=t.CHM(n).$implicit,l=t.oxw();return t.KtG(l.onClickStone(o,a))}),t.TgZ(1,"g",11),t._UZ(2,"rect",12)(3,"rect",13)(4,"use",14),t.qZA()()}if(2&i){const n=r.$implicit;t.ekj("selected",n.source.selected)("hidden",n.source.picked)("hinted",n.source.hinted),t.uIk("transform",n.pos.translate)}}let W=(()=>{class i{constructor(){this.clickBoardEvent=new t.vpe,this.clickDrawEvent=new t.vpe,this.clickStoneEvent=new t.vpe,this.drawStones=[],this.drawCells=[],this.rotate=!1,this.translate="",this.viewport="0 0 1470 960",this.emptySource=new U.r(0,0,0,0,0)}ngOnInit(){this.level&&this.updateLevel(this.level)}drawClass(n,e,o){let s="";return this.matrix.inBounds(n,e,o)||(s="invalid"),(this.matrix.isTile(n,e,o)||this.matrix.isTilePosBlocked(n,e,o))&&(s="tile"),this.matrix.isTilePosInvalid(n,e,o)&&(s="blocked"),n>0&&(this.matrix.isTile(n-1,e,o)||this.matrix.isTilePosBlocked(n-1,e,o))&&(s+=" below"),s}trackByDrawStone(n,e){return`${e.source.groupnr}/${e.source.v}`}ngOnChanges(n){n.level&&this.updateLevel(n.level.currentValue)}onClickStone(n,e){this.clickStoneEvent.emit(e?.source),n.stopPropagation()}onClickBoard(n){this.clickBoardEvent.emit()}onClickDraw(n,e){this.clickDrawEvent.emit(e),n.stopPropagation()}calcDrawPos(n,e,o){const s={x:(g.zl.tileWidth+2)*e/2+4,y:(g.zl.tileHeight+2)*o/2+4,z:o+g.zl.mY*(e+g.zl.mX*n),translate:""};return s.translate=`translate(${s.x},${s.y})`,s}updateLevel(n){if(this.drawCells=[],this.drawStones=[],!n||!n.rows)return;const e=[];n.rows.forEach((o,s)=>{o.forEach((a,l)=>{const c={x:s,y:l,z:n.z,v:a,visible:!0,pos:this.calcDrawPos(n.z,s,l),className:this.drawClass(n.z,s,l),source:a>0?new U.r(n.z,s,l,a,0):this.emptySource};this.drawCells.push(c),c.v>0&&e.push(c)})}),this.drawStones=(0,J.N4)(e),this.viewport=(0,J.lK)(this.drawCells,1470,960,!1)}}return i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-editor-board"]],inputs:{imageSet:"imageSet",level:"level",matrix:"matrix",isBoard:"isBoard"},outputs:{clickBoardEvent:"clickBoardEvent",clickDrawEvent:"clickDrawEvent",clickStoneEvent:"clickStoneEvent"},features:[t.TTD],decls:13,vars:10,consts:[["xmlns","http://www.w3.org/2000/svg","preserveAspectRatio","xMidYMin meet",1,"board-svg",3,"mousedown"],["id","filter4198-8",2,"color-interpolation-filters","sRGB"],["in","SourceGraphic","stdDeviation","8"],["id","front","width","300","height","400","viewBox","0 0 300 400"],["d","m 151.73588,1025.0177 c -3.32683,-9.3138 -10.24843,-68.45389 5.31821,-90.62655 20.27717,-26.12032 219.43558,-16.45796 231.55506,-9.93184 11.07433,5.31702 -178.60366,0.0589 -204.85126,34.86646 -21.59349,30.0006 -26.50086,82.17843 -32.02201,65.69193 z","transform","rotate(180,229,666.5)",2,"fill","#000000","fill-opacity","0.15","fill-rule","evenodd","stroke","none","filter","url(#filter4198-8)"],["transform","translate(28,-614)","d","M -4.7687833,775.07096 C -9.6501835,741.99485 -16.84552,674.23676 -1.2788716,652.0641 18.998297,625.94378 233.50094,631.63117 263.31435,653.90999 276.21398,662.64856 70.349579,663.12124 47.099353,691.74479 24.390958,719.11242 0.65060847,818.18718 -4.7687833,775.07096 Z",2,"fill","#ffffff","fill-opacity","0.4","fill-rule","evenodd","stroke","none","filter","url(#filter4198-8)"],[1,"stage"],["stroke","black","stroke-width","1","class","draw","width","37.5px","height","50px",3,"class","click",4,"ngFor","ngForOf"],["class","draw",3,"selected","hidden","hinted","mousedown",4,"ngFor","ngForOf","ngForTrackBy"],["stroke","black","stroke-width","1","width","37.5px","height","50px",1,"draw",3,"click"],[1,"draw",3,"mousedown"],[1,"tile"],["x","3","y","3","width","75px","height","100px","rx","10","ry","10",1,"shadow"],["x","0","y","0","width","75","height","100","rx","10","ry","10",1,"stone"],[0,"xlink","href","#front","x","0","y","0","width","75","height","100"]],template:function(n,e){1&n&&(t.O4$(),t.TgZ(0,"svg",0),t.NdJ("mousedown",function(s){return e.onClickBoard(s)}),t.TgZ(1,"defs")(2,"filter",1),t._UZ(3,"feGaussianBlur",2),t.qZA(),t.TgZ(4,"svg",3),t._UZ(5,"path",4)(6,"path",5),t.qZA()(),t.TgZ(7,"style"),t._uU(8," g.tile {transform-origin: 50px 32.5px;opacity: 1;} g.selected g.tile {transform: scale(1.04);} g.selected g.tile rect.stone {stroke: black;fill: #F8EABB;} g.draw rect.shadow {fill: #191919;opacity: 0.6;stroke-width: 1;stroke: black;} g.draw rect.stone {fill: #FFF9E5;stroke-width: 1;stroke: black;} g.hidden {opacity: 0;} "),t.qZA(),t.TgZ(9,"g",6),t.YNc(10,z,1,4,"rect",7),t.qZA(),t.TgZ(11,"g",6),t.YNc(12,X,5,7,"g",8),t.qZA()()),2&n&&(t.ekj("rotate",e.rotate)("edit",e.isBoard),t.uIk("viewBox",e.viewport),t.xp6(9),t.uIk("transform",e.translate),t.xp6(1),t.Q6J("ngForOf",e.drawCells),t.xp6(1),t.uIk("transform",e.translate),t.xp6(1),t.Q6J("ngForOf",e.drawStones)("ngForTrackBy",e.trackByDrawStone))},dependencies:[_.sg],styles:["[_nghost-%COMP%]{flex:1}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%]{height:100%;width:100%;max-height:960px;background-color:#2b424f;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.stage[_ngcontent-%COMP%]{transition:opacity .5s}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] .draw[_ngcontent-%COMP%]{fill:#2b424f}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] .draw.tile[_ngcontent-%COMP%]{fill:#fff9e5}[_nghost-%COMP%] .board-svg.edit[_ngcontent-%COMP%] .draw[_ngcontent-%COMP%]{fill:transparent;cursor:pointer}[_nghost-%COMP%] .board-svg.edit[_ngcontent-%COMP%] .draw.invalid[_ngcontent-%COMP%]{fill:#000;cursor:default}[_nghost-%COMP%] .board-svg.edit[_ngcontent-%COMP%] .draw.below[_ngcontent-%COMP%]{stroke:#d2691e;stroke-width:1px}[_nghost-%COMP%] .board-svg.edit[_ngcontent-%COMP%] .draw.tile[_ngcontent-%COMP%], [_nghost-%COMP%] .board-svg.edit[_ngcontent-%COMP%] .draw.blocked[_ngcontent-%COMP%]{fill:#0c1a1e;cursor:default}"]}),i})();function R(i){return q([i])}function q(i){return JSON.stringify(function V(i){return{mah:"1.0",boards:i.map(n=>S(n))}}(i))}function S(i){const r=b(i.mapping);return{id:(0,f.le)(r),name:i.name,by:i.by?i.by:void 0,cat:i.category?i.category:void 0,map:D(r)}}function tt(i){const r=new C,n=(0,f.O8)(i.mapping,0,0,0);r.init(n.x+1,n.y+1,n.z),i.mapping.forEach(o=>{const s=o[0],a=o[1],l=o[2];r.setValue(s,a,l,1),r.setValue(s,a+1,l,2),r.setValue(s,a,l+1,4),r.setValue(s,a+1,l+1,3)});const e=[];return e.push("mahjongg-layout-v1.1"),e.push(`# name: ${i.name}`),e.push(`# by: ${i.by}`),e.push(`# category: ${i.category}`),e.push("# Board size in quarter tiles"),e.push(`w${n.x+1}`),e.push(`h${n.y+1}`),e.push("# Board depth"),e.push(`d${n.z}`),r.levels.forEach((o,s)=>{const a=`# Level ${s} `;e.push(`${a}${"-".repeat(Math.max(n.x-a.length,0))}`);for(let l=0;l<=n.y;l++){const c=[];for(let p=0;p<=n.x;p++)c.push(o[p][l]||".");e.push(c.join(""))}}),e.join("\n")}function ot(i){return`Kyodai 6.0\n${i.name}${i.by?` by ${i.by}`:""}${i.category?` :: ${i.category}`:""}\n${function et(i){const r=new C,s=function nt(i,r,n){const e=(0,f.O8)(i,0,0,0),o=Math.max(0,Math.floor((n-e.y)/2)),s=Math.max(0,Math.floor((r-e.x)/2));return i.map(a=>[a[0],a[1]+s,a[2]+o])}(i,34,20);r.applyMapping(s,5,34,20);const a=[];for(let l=0;l<5;l++)for(let c=0;c<20;c++)for(let p=0;p<34;p++)a.push(r.get(l,p,c).toString());return a.join("")}(i.mapping)}\n`}function B(i,r,n){const e=new Blob([r],{type:n}),o=document.createElement("a");o.href=window.URL.createObjectURL(e),o.download=i,o.click()}function rt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div",6)(1,"div",7)(2,"label"),t._uU(3,"Name"),t.qZA(),t.TgZ(4,"input",8),t.NdJ("input",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.layout.name=o.target.value)})("change",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())})("blur",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())}),t.qZA(),t.TgZ(5,"label"),t._uU(6,"By"),t.qZA(),t.TgZ(7,"input",8),t.NdJ("input",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.layout.by=o.target.value)})("change",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())})("blur",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())}),t.qZA(),t.TgZ(8,"label"),t._uU(9,"Category"),t.qZA(),t.TgZ(10,"input",8),t.NdJ("input",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.layout.category=o.target.value)})("change",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())})("blur",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.update())}),t.qZA()(),t.TgZ(11,"div",9),t._UZ(12,"app-layout-preview",10),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(4),t.Q6J("value",n.layout.name),t.xp6(3),t.Q6J("value",n.layout.by),t.xp6(3),t.Q6J("value",n.layout.category),t.xp6(2),t.Q6J("layout",n.layout)}}function st(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"li")(1,"input",11),t.NdJ("change",function(){const s=t.CHM(n).$implicit,a=t.oxw();return t.KtG(a.chooseFormat(s))}),t.qZA(),t.TgZ(2,"label",12),t._uU(3),t.qZA()()}if(2&i){const n=r.$implicit,e=t.oxw();t.xp6(1),t.Q6J("id","format_"+n.name)("value",n)("checked",e.format===n),t.xp6(1),t.Q6J("for","format_"+n.name),t.xp6(1),t.Oqu(n.name)}}let at=(()=>{class i{constructor(n){this.layoutService=n,this.savedEvent=new t.vpe,this.exportFormats=[{name:"Mah",ext:"mah",func:R,type:"text/json"},{name:"Kyodai",ext:"lay",func:ot,type:"text/lay"},{name:"Kmahjongg",ext:"layout",func:tt,type:"text/layout"}],this.format=this.exportFormats[0]}ngOnInit(){this.layout&&this.update()}ngOnChanges(n){n.layout&&this.update()}save(){const n=S(this.layout);this.layoutService.layouts.items.find(e=>!e.custom&&e.id===n.id)?alert("Similar (build-in) layout already in Game!"):(this.layoutService.layouts.items.find(e=>e.custom&&e.id===n.id)?(this.layoutService.removeCustomLayout([n.id]),this.layoutService.storeCustomBoards([n])):this.layoutService.storeCustomBoards([n]),this.savedEvent.emit())}chooseFormat(n){this.format=n,this.update()}download(){B(this.filename,this.output,this.format.type)}update(){this.layoutName=this.layout.name.toLocaleLowerCase().replace(/ /g,"_"),this.output=this.format.func(this.layout),this.filename=`${this.layoutName}.${this.format.ext}`}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(h.P))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-editor-export-component"]],inputs:{layout:"layout"},outputs:{savedEvent:"savedEvent"},features:[t.TTD],decls:18,vars:4,consts:[["class","section",4,"ngIf"],[1,"export"],[4,"ngFor","ngForOf"],[1,"export-preview"],[1,"buttons"],[1,"text-button",3,"click"],[1,"section"],[1,"inputs"],["type","text",3,"value","input","change","blur"],[1,"preview"],[1,"svg-board",3,"layout"],["type","radio","name","format",3,"id","value","checked","change"],[3,"for"]],template:function(n,e){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Save / Export"),t.qZA(),t.YNc(2,rt,13,4,"div",0),t.TgZ(3,"div",1)(4,"label"),t._uU(5,"Format"),t.qZA(),t.TgZ(6,"fieldset")(7,"ul"),t.YNc(8,st,4,5,"li",2),t.qZA()(),t.TgZ(9,"div",3)(10,"pre"),t._uU(11),t.qZA()(),t._UZ(12,"br"),t.TgZ(13,"div",4)(14,"button",5),t.NdJ("click",function(){return e.download()}),t._uU(15),t.qZA(),t.TgZ(16,"button",5),t.NdJ("click",function(){return e.save()}),t._uU(17,"Save in Browser Cache"),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",e.layout),t.xp6(6),t.Q6J("ngForOf",e.exportFormats),t.xp6(3),t.Oqu(e.output),t.xp6(4),t.hij("Download ",e.filename,""))},dependencies:[_.sg,_.O5,k.U],styles:["[_nghost-%COMP%]{color:#47b00a}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;padding-top:0;text-align:center}[_nghost-%COMP%] .preview[_ngcontent-%COMP%]{max-height:180px;min-width:100px;padding-left:10px}[_nghost-%COMP%] .inputs[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}[_nghost-%COMP%] .inputs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:4px;font-size:16px;margin-bottom:8px}@media only screen and (max-width: 400px){[_nghost-%COMP%] .preview[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .section[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .export[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex}[_nghost-%COMP%] .export[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{vertical-align:middle;cursor:pointer}[_nghost-%COMP%] .export[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .export[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-left:10px}[_nghost-%COMP%] .export[_ngcontent-%COMP%] .export-preview[_ngcontent-%COMP%]{margin-top:16px}[_nghost-%COMP%] .export[_ngcontent-%COMP%] .export-preview[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{white-space:pre-line;word-wrap:break-word;font-family:monospace;text-align:left;overflow:auto;min-height:180px;max-height:180px;font-size:.8em;line-height:1em;background-color:#000}[_nghost-%COMP%] .export[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:8px 16px}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%]{text-align:center;display:flex;flex-wrap:wrap}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1;background-color:#0000000d;background-image:none;border:1px solid #19262e;cursor:pointer;color:#47b00a}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:#348007;background-color:#0000001a;border:1px solid #3d5e70}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button.text-button[_ngcontent-%COMP%]{padding:10px 16px}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{color:#8d8d8d;cursor:default}"]}),i})();const ct=function(i){return{selected:i}},lt=function(i,r){return{z:i,rows:r,showStones:!0}};function pt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"li",6),t.NdJ("click",function(){const s=t.CHM(n).index,a=t.oxw(2);return t.KtG(a.selectLevel(s))}),t.TgZ(1,"div"),t._uU(2),t.qZA(),t.TgZ(3,"div",7)(4,"app-editor-board",8),t.NdJ("clickBoardEvent",function(){const s=t.CHM(n).index,a=t.oxw(2);return t.KtG(a.selectLevel(s))}),t.qZA()()()}if(2&i){const n=r.$implicit,e=r.index,o=t.oxw(2);t.Q6J("ngClass",t.VKq(4,ct,e===o.currentZ)),t.xp6(2),t.hij("Level ",e,""),t.xp6(2),t.Q6J("level",t.WLB(6,lt,e,n))("matrix",o.matrix)}}function dt(i,r){if(1&i&&(t.TgZ(0,"div",3)(1,"ul",4),t.YNc(2,pt,5,9,"li",5),t.qZA()()),2&i){const n=t.oxw();t.xp6(2),t.Q6J("ngForOf",n.matrix.levels)}}function ut(i,r){if(1&i&&(t.TgZ(0,"div",46),t.O4$(),t.TgZ(1,"svg",47)(2,"g",48),t._UZ(3,"path",49),t.qZA(),t.TgZ(4,"text",50),t._uU(5),t.qZA(),t.TgZ(6,"text",51),t._uU(7),t.qZA(),t.TgZ(8,"text",52),t._uU(9),t.qZA()()()),2&i){const n=t.oxw(2);t.xp6(5),t.AsE("x",n.stats.minX," \u2026 x",n.stats.maxX,""),t.xp6(2),t.AsE("z",n.stats.minZ," \u2026 z",n.stats.maxZ,""),t.xp6(2),t.AsE("y",n.stats.minY," \u2026 y",n.stats.maxY,"")}}function _t(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"button",53),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.solve())}),t._uU(1," Test Solvable "),t.qZA()}}function gt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"button",53),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.cancelSolve())}),t._uU(1," Cancel Solve "),t.qZA()}}function mt(i,r){if(1&i&&(t.TgZ(0,"div")(1,"div"),t._uU(2),t.qZA(),t.TgZ(3,"div"),t._uU(4,"Fail: "),t.TgZ(5,"span"),t._uU(6),t.qZA()()()),2&i){const n=t.oxw(2);t.xp6(2),t.hij("Win: ",n.solveStats.won,""),t.xp6(3),t.ekj("fail",n.solveStats.fail>0),t.xp6(1),t.Oqu(n.solveStats.fail)}}function ht(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13),t._uU(5),t.qZA(),t.TgZ(6,"div",14)(7,"span"),t._uU(8),t.qZA(),t.TgZ(9,"button",15),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerY(-1))}),t._UZ(10,"i",16),t.qZA(),t.TgZ(11,"button",17),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerY(1))}),t._UZ(12,"i",18),t.qZA(),t.TgZ(13,"button",19),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerX(-1))}),t._UZ(14,"i",20),t.qZA(),t.TgZ(15,"button",21),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerX(1))}),t._UZ(16,"i",22),t.qZA()()(),t.TgZ(17,"div",23)(18,"app-editor-board",24),t.NdJ("clickDrawEvent",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.onCellClick(o))})("clickStoneEvent",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.onStoneClick(o))}),t.qZA()(),t.TgZ(19,"div",12)(20,"div",14)(21,"button",25),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.newLayerBelow(o.currentZ))}),t._UZ(22,"i",26),t.qZA(),t.TgZ(23,"button",27),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerZ(-1,o.currentZ))}),t._UZ(24,"i",16),t.qZA(),t.TgZ(25,"button",28),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveLayerZ(1,o.currentZ))}),t._UZ(26,"i",18),t.qZA(),t.TgZ(27,"button",29),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.duplicateLayerZ(o.currentZ))}),t._UZ(28,"i",30),t.qZA(),t.TgZ(29,"button",31),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.clearLayerZ(o.currentZ))}),t._UZ(30,"i",32),t.qZA(),t.TgZ(31,"button",33),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.deleteLayerZ(o.currentZ))}),t._UZ(32,"i",34),t.qZA()()()(),t.TgZ(33,"div",35)(34,"div",12),t._UZ(35,"div",14),t.TgZ(36,"div",14)(37,"span"),t._uU(38),t.qZA(),t.TgZ(39,"button",36),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveY(-1))}),t._UZ(40,"i",16),t.qZA(),t.TgZ(41,"button",37),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveY(1))}),t._UZ(42,"i",18),t.qZA(),t.TgZ(43,"button",38),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveX(-1))}),t._UZ(44,"i",20),t.qZA(),t.TgZ(45,"button",39),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.moveX(1))}),t._UZ(46,"i",22),t.qZA()()(),t.TgZ(47,"div",40),t._UZ(48,"app-layout-preview",41),t.YNc(49,ut,10,6,"div",42),t.qZA(),t.TgZ(50,"div",43)(51,"div",14)(52,"div"),t.YNc(53,_t,2,0,"button",44),t.YNc(54,gt,2,0,"button",44),t.qZA()(),t.YNc(55,mt,7,4,"div",45),t.qZA()()()()}if(2&i){const n=t.oxw();t.xp6(5),t.hij("Level ",n.currentZ,""),t.xp6(3),t.hij("Tiles: ",n.stats.layerCount,""),t.xp6(10),t.Q6J("level",n.level)("isBoard",!0)("matrix",n.matrix),t.xp6(5),t.Q6J("disabled",0===n.currentZ),t.xp6(2),t.Q6J("disabled",n.currentZ===n.matrix.levels.length-1),t.xp6(12),t.ekj("fail",n.stats.countInvalid),t.xp6(1),t.hij("Tiles: ",n.stats.totalCount,""),t.xp6(10),t.Q6J("svg",n.svg),t.xp6(1),t.Q6J("ngIf",n.stats),t.xp6(4),t.Q6J("ngIf",!n.solveWorker),t.xp6(1),t.Q6J("ngIf",n.solveWorker),t.xp6(1),t.Q6J("ngIf",n.solveStats)}}function ft(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div",54),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.toggleSave())}),t.TgZ(1,"div",55),t.NdJ("click",function(o){return o.stopPropagation()}),t.TgZ(2,"span",56),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.toggleSave())}),t._UZ(3,"i",57),t.qZA(),t.TgZ(4,"app-editor-export-component",58),t.NdJ("savedEvent",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.toggleSave())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(4),t.Q6J("layout",n.layout)}}let F=(()=>{class i{constructor(n,e){this.worker=n,this.layoutService=e,this.currentZ=0,this.totalZ=1,this.totalY=g.zl.mY,this.totalX=g.zl.mX,this.matrix=new C,this.saveDialog=!1}ngOnDestroy(){this.cancelSolve()}getStats(n){const e={name:n.name,totalCount:n.mapping.length,layerCount:n.mapping.filter(o=>o[0]===this.currentZ).length,countInvalid:n.mapping.length>144||!!(n.mapping.length%2),minX:100,maxX:0,minY:100,maxY:0,minZ:100,maxZ:0,height:0,width:0,depth:0};return n.mapping.forEach(o=>{o[0]<e.minZ&&(e.minZ=o[0]),o[0]>e.maxZ&&(e.maxZ=o[0]),o[1]<e.minX&&(e.minX=o[1]),o[1]>e.maxX&&(e.maxX=o[1]),o[2]<e.minY&&(e.minY=o[2]),o[2]>e.maxY&&(e.maxY=o[2])}),e.width=e.maxX-e.minX,e.height=e.maxY-e.minY,e.depth=e.maxZ-e.minZ,e}ngOnInit(){this.layout&&this.refresh()}ngOnChanges(n){n.layout&&this.refresh()}onPosClick(n,e,o){this.matrix.isTilePosBlocked(n,e,o)||this.matrix.isTilePosInvalid(n,e,o)||(this.matrix.isTile(n,e,o)?this.layout.mapping=this.layout.mapping.filter(s=>s[0]!==n||s[1]!==e||s[2]!==o):this.layout.mapping.push([n,e,o]),this.refresh())}onCellClick(n){this.onPosClick(n.z,n.x,n.y)}onStoneClick(n){n&&this.onPosClick(n.z,n.x,n.y)}selectLevel(n){this.level={z:n,rows:this.matrix.levels[n],showTiles:!0},this.currentZ=n,this.refresh()}refresh(){this.matrix.applyMapping(this.layout.mapping,this.totalZ,this.totalX,this.totalY),this.stats=this.getStats(this.layout),this.level={z:this.currentZ,rows:this.matrix.levels[this.currentZ],showTiles:!0},this.svg=this.layoutService.generatePreview(b(this.layout.mapping)),this.layout.previewSVG=this.svg}moveX(n){this.stats.minX+n<0||this.stats.maxX+n>=g.zl.mX-1||(this.layout.mapping.forEach(e=>e[1]=e[1]+n),this.refresh())}moveY(n){this.stats.minY+n<0||this.stats.maxY+n>=g.zl.mY-1||(this.layout.mapping.forEach(e=>e[2]=e[2]+n),this.refresh())}moveLayerX(n){const e=this.layout.mapping.filter(a=>a[0]===this.currentZ);let o=e[0][1],s=e[0][1];e.forEach(a=>{o=Math.min(a[1],o),s=Math.max(a[1],s)}),!(o+n<0||s+n>=g.zl.mX-1)&&(e.forEach(a=>a[1]=a[1]+n),this.refresh())}moveLayerY(n){const e=this.layout.mapping.filter(a=>a[0]===this.currentZ);let o=e[0][2],s=e[0][2];e.forEach(a=>{o=Math.min(a[2],o),s=Math.max(a[2],s)}),!(o+n<0||s+n>=g.zl.mY-1)&&(e.forEach(a=>a[2]=a[2]+n),this.refresh())}duplicateLayerZ(n){const e=[];this.layout.mapping.forEach(o=>{o[0]>n?o[0]=o[0]+1:o[0]===n&&e.push(o)}),e.forEach(o=>{this.layout.mapping.push([n+1,o[1],o[2]])}),this.refresh()}clearLayerZ(n){this.layout.mapping=this.layout.mapping.filter(e=>e[0]!==n),this.refresh()}deleteLayerZ(n){this.layout.mapping=this.layout.mapping.filter(e=>e[0]!==n),this.layout.mapping.forEach(e=>{e[0]>n&&(e[0]=e[0]-1)}),this.totalZ=Math.max(this.totalZ-1,1),this.refresh()}newLayerBelow(n){this.totalZ+=1,this.layout.mapping.forEach(e=>{e[0]>n&&(e[0]=e[0]+1)}),this.refresh()}moveLayerZ(n,e){e+n<0||e+n>=this.matrix.levels.length||(this.layout.mapping.forEach(o=>{o[0]===e?o[0]=o[0]+n:o[0]===e+n&&(o[0]=e)}),e===this.currentZ&&(this.currentZ=this.currentZ+n),this.refresh())}toggleSave(){this.saveDialog=!this.saveDialog}cancelSolve(){this.solveWorker&&(this.solveWorker.terminate(),this.solveWorker=void 0)}solve(){if(this.solveWorker)return;const n={fail:0,won:0};this.solveWorker=this.worker.solve(this.layout.mapping,1e3,e=>{n.won=e[0],n.fail=e[1]},e=>{n.won=e[0],n.fail=e[1],this.solveWorker=void 0}),this.solveStats=n}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(E.L),t.Y36(h.P))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-editor-layout-component"]],inputs:{layout:"layout"},features:[t.TTD],decls:3,vars:3,consts:[["class","editor-matrix-list",4,"ngIf"],["class","editor-selected",4,"ngIf"],["class","overlay overlay-save",3,"click",4,"ngIf"],[1,"editor-matrix-list"],[1,"matrix-list"],[3,"ngClass","click",4,"ngFor","ngForOf"],[3,"ngClass","click"],[1,"matrix-level"],[3,"level","matrix","clickBoardEvent"],[1,"editor-selected"],[1,"matrix-edit"],[1,"matrix-edit-top"],[1,"buttonbar"],[1,"buttonbar-title"],[1,"buttons"],["title","Move tiles up",3,"click"],[1,"icon-editor-up-small"],["title","Move tiles down",3,"click"],[1,"icon-editor-down-small"],["title","Move tiles left",3,"click"],[1,"icon-editor-left-small"],["title","Move tiles right",3,"click"],[1,"icon-editor-right-small"],[1,"matrix-board"],[3,"level","isBoard","matrix","clickDrawEvent","clickStoneEvent"],["title","New Level below",3,"click"],[1,"icon-editor-list-add"],["title","Move Level down",3,"disabled","click"],["title","Move Level up",3,"disabled","click"],["title","Duplicate Level",3,"click"],[1,"icon-editor-docs"],["title","Clear Level",3,"click"],[1,"icon-editor-cancel-alt"],["title","Delete Level",3,"click"],[1,"icon-editor-trash"],[1,"matrix-edit-bottom"],["title","Move all tiles up",3,"click"],["title","Move all tiles down",3,"click"],["title","Move all tiles left",3,"click"],["title","Move all tiles right",3,"click"],[1,"matrix-preview"],[1,"svg-board",3,"svg"],["class","dimensions",4,"ngIf"],[1,"stats","stats-bottom"],["class","text-button",3,"click",4,"ngIf"],[4,"ngIf"],[1,"dimensions"],["xmlns","http://www.w3.org/2000/svg","height","100%","width","100%","x","0px","y","0px","viewBox","0 0 1600 1500"],["transform","translate(0, 300)"],["fill","#47b00a","d","M10,309.7c40.7-99.4,81.5-198.7,122.3-298c39.6,99.2,78.6,198.7,117.9,298c-31.6,0.1-63.2,0-94.8,0.1c0,167-0.1,334.1,0,501.1c148.5-103.4,296.4-207.8,444.8-311.4c-16.9-26.8-37-51.7-53.8-78.5c102.1-22.8,204.1-46,306.2-69C795.4,439.2,738,526.3,680.3,613.2c-17.6-25.2-35.1-50.4-52.9-75.4C480.9,640,334.5,742.4,188.5,845.4c167.8,0.3,335.6,0.1,503.4,0.1c0.1-32.5-0.1-64.9,0.1-97.3c99.4,40.7,198.7,81.5,298,122.3C890.8,910,791.3,949,691.9,988.3c-0.1-31.6,0-63.2-0.1-94.8c-193.7-0.1-387.4-0.1-581.1,0c-1.2,0-2.3-0.5-3.5-0.8c0.1-194.3,0.1-388.6,0-582.9C74.9,309.7,42.5,309.8,10,309.7L10,309.7z"],["x","100","y","1500","fill","#47b00a",2,"font","200px monospace"],["x","0","y","200","fill","#47b00a",2,"font","200px monospace"],["x","600","y","500","fill","#47b00a",2,"font","200px monospace"],[1,"text-button",3,"click"],[1,"overlay","overlay-save",3,"click"],[1,"overlay-popup",3,"click"],[1,"close",3,"click"],[1,"icon-cancel-circled2","pull-right"],[3,"layout","savedEvent"]],template:function(n,e){1&n&&(t.YNc(0,dt,3,1,"div",0),t.YNc(1,ht,56,15,"div",1),t.YNc(2,ft,5,1,"div",2)),2&n&&(t.Q6J("ngIf",e.layout),t.xp6(1),t.Q6J("ngIf",e.layout),t.xp6(1),t.Q6J("ngIf",e.saveDialog))},dependencies:[_.mk,_.sg,_.O5,k.U,W,at],styles:["[_nghost-%COMP%]{display:flex;flex:1;flex-direction:row;color:#47b00a;overflow:hidden}[_nghost-%COMP%] .save-button[_ngcontent-%COMP%]{position:fixed;right:50px;top:6px}[_nghost-%COMP%] .overlay-save[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{width:98%;height:98%;max-height:640px;max-width:640px;overflow-y:auto}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{padding-right:6px}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] .fail[_ngcontent-%COMP%]{color:#cc919f}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;background-image:none;color:#8ec271;border:1px solid var(--main-bg-color-dk);cursor:pointer}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--main-bg-color-lt);border:1px solid var(--main-bg-color-lt)}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button.text-button[_ngcontent-%COMP%]{padding:10px 16px}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{color:#8d8d8d;cursor:default}[_nghost-%COMP%] .buttonbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}[_nghost-%COMP%] .buttonbar[_ngcontent-%COMP%] .buttonbar-title[_ngcontent-%COMP%]{padding-left:12px}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%]{width:220px;max-height:100%;height:100%;padding-right:4px;border-right:1px solid #707070;overflow-y:auto}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:4px;max-height:100%}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] .matrix-level[_ngcontent-%COMP%]{display:flex;max-width:80%;margin:0 auto}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{text-align:center;cursor:pointer;border:1px solid #707070;margin-bottom:4px;display:flex;flex-direction:column;overflow:hidden}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{border-color:#f9f7ef}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] li.selected[_ngcontent-%COMP%]{border-color:#ff0}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-block;min-width:.8em}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:auto}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .editor-commands[_ngcontent-%COMP%]{border-bottom:1px solid #ececec;padding-bottom:10px}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .editor-commands[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{font-size:.9em;display:inline-block;vertical-align:top;margin-right:10px}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .editor-commands[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;text-align:center;max-height:100%;overflow:hidden}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-top[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-top[_ngcontent-%COMP%] .matrix-board[_ngcontent-%COMP%]{flex:1;display:flex;overflow:hidden}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%]{border-top:1px solid #707070;height:25%;display:flex;flex-direction:column;position:relative;min-height:120px}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .matrix-preview[_ngcontent-%COMP%]{position:relative;overflow:hidden}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .matrix-preview[_ngcontent-%COMP%] .dimensions[_ngcontent-%COMP%]{opacity:0;background-color:#000000b3;position:absolute;padding:8px;left:0;top:0;bottom:0;right:0}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .matrix-preview[_ngcontent-%COMP%]:hover .dimensions[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .stats[_ngcontent-%COMP%]{position:absolute;background-color:#000000b3;bottom:0;font-size:.9em;border-radius:6px;text-align:left;padding:10px;font-feature-settings:slashed-zero tabular-nums;font-variant-numeric:slashed-zero tabular-nums}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .stats-bottom[_ngcontent-%COMP%]{text-align:right;right:0}@media only screen and (max-width: 700px){[_nghost-%COMP%]{flex-direction:column}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%]{height:80px;width:100%;overflow-y:hidden;overflow-x:auto;margin-bottom:2px;border-right:none;border-bottom:1px solid #707070}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%]{white-space:nowrap;border-right:none;height:92%}[_nghost-%COMP%] .editor-matrix-list[_ngcontent-%COMP%] .matrix-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:100px;height:100%;display:inline-flex}}@media only screen and (min-width: 400px) and (max-height: 600px){[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%]{flex-direction:row}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-top[_ngcontent-%COMP%]{max-height:100%}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%]{height:100%;width:30%;border-top:none}[_nghost-%COMP%] .editor-selected[_ngcontent-%COMP%] .matrix-edit[_ngcontent-%COMP%] .matrix-edit-bottom[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block}}"]}),i})();function Ct(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(o){t.CHM(n);const s=t.oxw().$implicit,a=t.oxw();return t.KtG(a.removeCustomBoard(o,s))}),t._UZ(1,"i",10),t.qZA()}}function vt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.hij("Win: ",e.test[n.id].win,"")}}function xt(i,r){if(1&i&&(t.TgZ(0,"div",25),t._uU(1),t.qZA()),2&i){const n=t.oxw(2).$implicit,e=t.oxw();t.xp6(1),t.hij("Fail: ",e.test[n.id].fail,"")}}function Mt(i,r){if(1&i&&(t.TgZ(0,"div"),t.YNc(1,vt,2,1,"div",22),t.YNc(2,xt,2,1,"div",24),t.qZA()),2&i){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.test[n.id].win),t.xp6(1),t.Q6J("ngIf",e.test[n.id].fail)}}function Ot(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div",15),t.NdJ("click",function(){const s=t.CHM(n).$implicit,a=t.oxw();return t.KtG(a.editLayout(s))}),t.TgZ(1,"div",2),t._UZ(2,"app-layout-preview",16),t.qZA(),t.TgZ(3,"div",17),t._uU(4),t.qZA(),t.TgZ(5,"div",18),t._uU(6),t.qZA(),t.TgZ(7,"div",19),t._uU(8),t.qZA(),t.TgZ(9,"div",20),t._uU(10),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,Ct,2,0,"button",21),t.qZA(),t.TgZ(13,"div",11),t.YNc(14,Mt,3,2,"div",22),t.qZA()()}if(2&i){const n=r.$implicit,e=t.oxw();t.xp6(2),t.Q6J("layout",n),t.xp6(2),t.Oqu(n.name),t.xp6(2),t.Oqu(n.by),t.xp6(2),t.Oqu(n.category),t.xp6(2),t.Oqu(n.mapping.length),t.xp6(2),t.Q6J("ngIf",n.custom),t.xp6(2),t.Q6J("ngIf",e.test[n.id])}}let yt=(()=>{class i{constructor(n,e){this.layoutService=n,this.workerService=e,this.test={},this.sortColumn=1,this.sortDesc=!0,this.editEvent=new t.vpe,this.update()}ngOnChanges(n){n.inputLayouts&&this.update()}ngOnDestroy(){this.worker&&(this.worker.terminate(),this.worker=void 0)}editLayout(n){this.editEvent.emit(n)}clickSortBy(n,e){this.sortColumn===e&&(this.sortDesc=!this.sortDesc),this.sortBy(e)}update(){this.inputLayouts&&(this.layouts=this.inputLayouts.sort((n,e)=>n.name.localeCompare(e.name)),this.sortBy(this.sortColumn))}removeCustomBoard(n,e){n.stopPropagation(),this.layoutService.removeCustomLayout([e.id]),this.update()}removeCustomLayouts(n){n.stopPropagation(),this.layoutService.removeAllCustomLayouts(),this.update()}sortBy(n){this.sortColumn=n,this.layouts=this.layouts.sort((e,o)=>{let s;switch(n){case 1:s=e.name.localeCompare(o.name);break;case 2:s=(e.by||"").localeCompare(o.by||"");break;case 3:s=(e.category||"").localeCompare(o.category||"");break;case 4:s=e.mapping.length-o.mapping.length;break;default:s=0}return(this.sortDesc?1:-1)*s})}testLayouts(n){this.worker?this.worker.terminate():this.testNextLayout()}testNextLayout(){const n=this.layouts.find(e=>!this.test[e.id]);n&&(this.worker=this.workerService.solve(n.mapping,10,e=>{this.test[n.id]={win:e[0],fail:e[1]}},e=>{this.test[n.id]={win:e[0],fail:e[1]},this.testNextLayout(),this.worker=void 0}))}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(h.P),t.Y36(E.L))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-manager-component"]],inputs:{inputLayouts:"inputLayouts"},outputs:{editEvent:"editEvent"},features:[t.TTD],decls:25,vars:17,consts:[[1,"layout-table"],[1,"layout","layout-header"],[1,"col-image"],[1,"col-name","sortable",3,"click"],[1,"arrow"],[1,"col-by","sortable",3,"click"],[1,"col-cat","sortable",3,"click"],[1,"col-stats","sortable",3,"click"],[1,"col-clear"],["title","Remove all custom layouts",3,"click"],[1,"icon-trash-empty"],[1,"col-test"],["title","Test all layouts",3,"click"],[1,"icon-editor-ok"],["class","layout",3,"click",4,"ngFor","ngForOf"],[1,"layout",3,"click"],[1,"svg-board",3,"layout"],[1,"col-name"],[1,"col-by"],[1,"col-cat"],[1,"col-stats"],["title","Remove this layouts",3,"click",4,"ngIf"],[4,"ngIf"],["title","Remove this layouts",3,"click"],["class","fail",4,"ngIf"],[1,"fail"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3,"Preview"),t.qZA(),t.TgZ(4,"div",3),t.NdJ("click",function(s){return e.clickSortBy(s,1)}),t._uU(5,"Name "),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"div",5),t.NdJ("click",function(s){return e.clickSortBy(s,2)}),t._uU(8,"by "),t._UZ(9,"span",4),t.qZA(),t.TgZ(10,"div",6),t.NdJ("click",function(s){return e.clickSortBy(s,3)}),t._uU(11,"Category "),t._UZ(12,"span",4),t.qZA(),t.TgZ(13,"div",7),t.NdJ("click",function(s){return e.clickSortBy(s,4)}),t._uU(14,"# of Stones "),t._UZ(15,"span",4),t.qZA(),t.TgZ(16,"div",8),t._uU(17," Clear "),t.TgZ(18,"button",9),t.NdJ("click",function(s){return e.removeCustomLayouts(s)}),t._UZ(19,"i",10),t.qZA()(),t.TgZ(20,"div",11),t._uU(21,"Test "),t.TgZ(22,"button",12),t.NdJ("click",function(s){return e.testLayouts(s)}),t._UZ(23,"i",13),t.qZA()()(),t.YNc(24,Ot,15,7,"div",14),t.qZA()),2&n&&(t.xp6(4),t.ekj("sort-up",1===e.sortColumn&&e.sortDesc)("sort-down",1===e.sortColumn&&!e.sortDesc),t.xp6(3),t.ekj("sort-up",2===e.sortColumn&&e.sortDesc)("sort-down",2===e.sortColumn&&!e.sortDesc),t.xp6(3),t.ekj("sort-up",3===e.sortColumn&&e.sortDesc)("sort-down",3===e.sortColumn&&!e.sortDesc),t.xp6(3),t.ekj("sort-up",4===e.sortColumn&&e.sortDesc)("sort-down",4===e.sortColumn&&!e.sortDesc),t.xp6(11),t.Q6J("ngForOf",e.layouts))},dependencies:[_.sg,_.O5,k.U],styles:["[_nghost-%COMP%]{overflow-y:auto;flex:1;display:flex}[_nghost-%COMP%] .fail[_ngcontent-%COMP%]{color:#cc919f}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%]{display:table;color:#47b00a;width:100%}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%]{display:table-row;cursor:pointer}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%]:hover{background-color:#ffffff05}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle;padding:4px 15px;border-top:1px solid #345060;border-right:1px solid #345060}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #47b00a;display:none;margin-bottom:3px}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] > div.sortable[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] > div.sort-up[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{display:inline-block}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] > div.sort-down[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{display:inline-block;transform:rotate(180deg)}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] .col-image[_ngcontent-%COMP%]{width:80px;height:80px}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] .col-id[_ngcontent-%COMP%]{font-feature-settings:slashed-zero tabular-nums;font-variant-numeric:slashed-zero tabular-nums}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .col-stats[_ngcontent-%COMP%], [_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .col-clear[_ngcontent-%COMP%]{max-width:50px}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .col-test[_ngcontent-%COMP%]{max-width:80px}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout-header[_ngcontent-%COMP%]{background-color:#0000001a}[_nghost-%COMP%] .layout-table[_ngcontent-%COMP%] .layout-header[_ngcontent-%COMP%]:hover{background-color:#0000001a}[_nghost-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;background-image:none;color:#8ec271;border:1px solid var(--main-bg-color-dk);cursor:pointer;text-align:center}[_nghost-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--main-bg-color-lt);border:1px solid var(--main-bg-color-lt)}[_nghost-%COMP%] button.text-button[_ngcontent-%COMP%]{padding:10px 16px}[_nghost-%COMP%] button[disabled][_ngcontent-%COMP%]{color:#8d8d8d;cursor:default}"]}),i})(),I=(()=>{class i{constructor(){this.appDropZone=new t.vpe,this.appDropZoneOver=new t.vpe,this.preventBodyDrop=!0,this.active=!1}onDrop(n){n.preventDefault(),this.active=!1;const{dataTransfer:e}=n;if(e?.items){const o=[];for(let s=0;s<e.items.length;s++)if(e.items[s]&&"file"===e.items[s].kind){const a=e.items[s].getAsFile();null!=a&&o.push(a)}e.items.clear(),this.appDropZone.emit(o)}else if(e){const o=e?.files;e.clearData(),o&&this.appDropZone.emit(Array.from(o))}}onDragOver(n){n.stopPropagation(),n.preventDefault(),this.active||this.appDropZoneOver.emit(),this.active=!0}onDragLeave(n){this.active=!1}onBodyDragOver(n){this.preventBodyDrop&&(n.preventDefault(),n.stopPropagation())}onBodyDrop(n){this.preventBodyDrop&&n.preventDefault()}}return i.\u0275fac=function(n){return new(n||i)},i.\u0275dir=t.lG2({type:i,selectors:[["","appDropZone",""]],hostVars:2,hostBindings:function(n,e){1&n&&t.NdJ("drop",function(s){return e.onDrop(s)})("dragover",function(s){return e.onDragOver(s)})("dragleave",function(s){return e.onDragLeave(s)})("dragover",function(s){return e.onBodyDragOver(s)},!1,t.pYS)("drop",function(s){return e.onBodyDrop(s)},!1,t.pYS),2&n&&t.ekj("drop-zone-active",e.active)},inputs:{preventBodyDrop:"preventBodyDrop"},outputs:{appDropZone:"appDropZone",appDropZoneOver:"appDropZoneOver"}}),i})();function Pt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"a",9),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,s=t.oxw();return t.KtG(s.selectLayout(o.id))}),t._UZ(1,"i",10),t._uU(2),t.qZA()}if(2&i){const n=t.oxw().$implicit;t.xp6(2),t.hij(" ",n.msg,"")}}function bt(i,r){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.msg)}}function wt(i,r){if(1&i&&(t.TgZ(0,"p",6),t.YNc(1,Pt,3,1,"a",7),t.YNc(2,bt,2,1,"ng-container",8),t.qZA()),2&i){const n=r.$implicit;t.ekj("is-error",n.isError),t.xp6(1),t.Q6J("ngIf",n.id),t.xp6(1),t.Q6J("ngIf",!n.id)}}let Zt=(()=>{class i{constructor(n){this.layoutService=n,this.editEvent=new t.vpe,this.logs=[]}selectFiles(n){const o=n.currentTarget.files;o&&this.importFiles(Array.from(o))}importLayouts(n){var e=this;return(0,m.Z)(function*(){e.logs=[];const o=[];for(const s of n)try{(yield Q(s)).forEach(l=>{const c=e.layoutService.expandLayout(l,!0);e.layoutService.layouts.items.find(p=>p.id===c.id)||o.find(p=>p.layout.id===c.id)?(console.error(`Similar layout to "${c.name}" already available. Import rejected`),e.logs.push({msg:`Similar layout to "${c.name}" already available. Import rejected.`,isError:!0})):(o.push({layout:c,custom:{id:c.id,name:c.name,by:c.by,cat:c.category,map:l.map}}),e.logs.push({msg:`Imported: "${s.name}"`,id:c.id}))})}catch(a){console.error("Error importing",s,a),e.logs.push({msg:`ERROR importing "${s.name}". Invalid file.`,isError:!0})}o.length>0&&e.layoutService.storeCustomBoards(o.map(s=>s.custom))})()}selectLayout(n){const e=this.layoutService.layouts.items.find(o=>o.id===n);e&&this.editEvent.emit(e)}importFiles(n){this.importLayouts(n).catch(e=>{console.error(e)})}onDropFiles(n){this.importFiles(n)}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(h.P))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-import-component"]],outputs:{editEvent:"editEvent"},decls:14,vars:1,consts:[[1,"import-section",3,"appDropZone"],[1,"drop-zone"],[1,"title"],["name","file","type","file","multiple","",3,"change"],[1,"log-zone"],["class","layout",3,"is-error",4,"ngFor","ngForOf"],[1,"layout"],[3,"click",4,"ngIf"],[4,"ngIf"],[3,"click"],[1,"icon-editor-ok"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0),t.NdJ("appDropZone",function(s){return e.onDropFiles(s)}),t.TgZ(1,"div",1)(2,"div",2),t._uU(3,"Drag your files here"),t._UZ(4,"br"),t._uU(5," *.lay (Kyodai text format)"),t._UZ(6,"br"),t._uU(7," *.layout (kmahjongg text format)"),t._UZ(8,"br"),t._uU(9," *.mah (Mah json format)"),t._UZ(10,"br"),t.qZA(),t.TgZ(11,"input",3),t.NdJ("change",function(s){return e.selectFiles(s)}),t.qZA()(),t.TgZ(12,"div",4),t.YNc(13,wt,3,4,"p",5),t.qZA()()),2&n&&(t.xp6(13),t.Q6J("ngForOf",e.logs))},dependencies:[_.sg,_.O5,I],styles:["[_nghost-%COMP%]{flex:1;display:flex;color:#47b00a;width:100%}[_nghost-%COMP%] .import-section[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%}[_nghost-%COMP%] .import-section[_ngcontent-%COMP%] .drop-zone[_ngcontent-%COMP%]{padding:80px 30px;width:100%;max-width:800px;border:2px dashed #f5f1e4;border-radius:20px;text-align:center;position:relative}[_nghost-%COMP%] .import-section[_ngcontent-%COMP%] .log-zone[_ngcontent-%COMP%]{margin-top:20px;max-height:300px;width:100%;max-width:800px;color:#47b00a;overflow-y:auto}[_nghost-%COMP%] .import-section[_ngcontent-%COMP%] .log-zone[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .import-section[_ngcontent-%COMP%] .log-zone[_ngcontent-%COMP%] p.is-error[_ngcontent-%COMP%]{color:#f29c9c}[_nghost-%COMP%] .import-section.drop-zone-active[_ngcontent-%COMP%] .drop-zone[_ngcontent-%COMP%]{border:2px dashed #707070}"]}),i})();function kt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"div",10)(2,"ul")(3,"li"),t._uU(4,"Mah Editor: Import"),t.qZA()()(),t.TgZ(5,"div",11)(6,"app-import-component",12),t.NdJ("editEvent",function(o){t.CHM(n);const s=t.oxw();return t.KtG(s.editLayout(o))}),t.qZA()()()}}function Tt(i,r){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"div",4)(2,"ul")(3,"li"),t._uU(4),t.qZA(),t._UZ(5,"li",5),t.TgZ(6,"li")(7,"button",6),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.save())}),t._uU(8,"Save"),t.qZA()()()(),t.TgZ(9,"div",11),t._UZ(10,"app-editor-layout-component",13),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(4),t.hij("Mah Editor: ",null==n.layout?null:n.layout.name,""),t.xp6(6),t.Q6J("layout",n.layout)}}const Et=function(){return[]};let Lt=(()=>{class i{constructor(n){this.layoutService=n,this.mode="manager",this.closeEvent=new t.vpe}save(){this.layoutComponent&&this.layoutComponent.toggleSave()}close(){"manager"!==this.mode?(this.layout=void 0,this.mode="manager"):this.closeEvent.emit()}editLayout(n){this.mode="edit",this.layout={id:"",name:n.name,by:n.by||"",category:n.category||"Custom",mapping:n.mapping.map(e=>[e[0],e[1],e[2]])}}exportLayouts(){!function it(i){B("mah-layouts.mah",q(i),"text/json")}(this.layoutService.layouts.items)}newLayout(){this.editLayout({id:"",name:"New Layout",category:"Custom",by:"",mapping:[]})}onDropFiles(){}onDragFiles(){this.mode="import"}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(h.P))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-editor-component"]],viewQuery:function(n,e){if(1&n&&t.Gf(F,5),2&n){let o;t.iGM(o=t.CRH())&&(e.layoutComponent=o.first)}},outputs:{closeEvent:"closeEvent"},decls:22,vars:6,consts:[[1,"editor-content"],["title","Close",1,"close",3,"click"],[1,"icon-cancel-circled2","pull-right"],[1,"editor-manager"],[1,"editor-nav","buttons"],[1,"sep"],[3,"click"],[1,"editor-main",3,"appDropZone","appDropZoneOver"],[3,"inputLayouts","editEvent"],[4,"ngIf"],[1,"editor-nav"],[1,"editor-main"],[3,"editEvent"],[3,"layout"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"a",1),t.NdJ("click",function(){return e.close()}),t._UZ(2,"i",2),t.qZA(),t.TgZ(3,"div",3)(4,"div",4)(5,"ul")(6,"li"),t._uU(7,"Mah Editor"),t.qZA(),t._UZ(8,"li",5),t.TgZ(9,"li")(10,"button",6),t.NdJ("click",function(){return e.newLayout()}),t._uU(11,"New"),t.qZA()(),t.TgZ(12,"li")(13,"button",6),t.NdJ("click",function(){return e.mode="import"}),t._uU(14,"Import"),t.qZA()(),t.TgZ(15,"li")(16,"button",6),t.NdJ("click",function(){return e.exportLayouts()}),t._uU(17,"Export"),t.qZA()()()(),t.TgZ(18,"div",7),t.NdJ("appDropZone",function(){return e.onDropFiles()})("appDropZoneOver",function(){return e.onDragFiles()}),t.TgZ(19,"app-manager-component",8),t.NdJ("editEvent",function(s){return e.editLayout(s)}),t.qZA()()(),t.YNc(20,kt,7,0,"div",9),t.YNc(21,Tt,11,2,"div",9),t.qZA()),2&n&&(t.xp6(3),t.ekj("visible","manager"===e.mode),t.xp6(16),t.Q6J("inputLayouts",(null==e.layoutService.layouts?null:e.layoutService.layouts.items)||t.DdM(5,Et)),t.xp6(1),t.Q6J("ngIf","import"===e.mode),t.xp6(1),t.Q6J("ngIf","edit"===e.mode&&!!e.layout))},dependencies:[_.O5,F,yt,Zt,I],styles:["[_nghost-%COMP%]{position:absolute;left:0;right:0;top:0;bottom:0;background-color:#19262e;z-index:10001}[_nghost-%COMP%] a[_ngcontent-%COMP%]{color:#47b00a;cursor:pointer}[_nghost-%COMP%] a[_ngcontent-%COMP%]:hover{color:#ff0}[_nghost-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;right:10px;top:8px;cursor:pointer}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-manager[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-manager.visible[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-nav[_ngcontent-%COMP%]{padding:4px 8px 8px;border-bottom:1px solid #707070}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-nav[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0;margin:0 40px 0 0;list-style:none;display:flex}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-nav[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:#fff;font-size:1.3em;padding-left:8px}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-nav[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.sep[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-nav[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{color:#ff0;cursor:default}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%]{flex:1;display:flex;overflow:hidden}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{text-align:center;width:100%;max-width:800px}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:30px;padding:10px}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-selects[_ngcontent-%COMP%]{height:430px;max-width:800px;margin-top:20px;display:flex}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%]{border:1px solid #f5f1e4;border-radius:6px;text-align:left;width:50%;overflow-y:hidden;color:#47b00a;display:flex;flex-direction:column}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] .by[_ngcontent-%COMP%]{font-size:.7em}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border-bottom:1px solid #f5f1e4;padding:4px 8px;display:flex}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{flex:1;margin:0;padding:0;overflow-y:auto}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:#47b00a;padding:4px;border-bottom:1px solid #9f883b;cursor:pointer}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#ffffff0d}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:right}[_nghost-%COMP%] .editor-content[_ngcontent-%COMP%] .editor-main[_ngcontent-%COMP%] .editor-select[_ngcontent-%COMP%] .layout-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .svg-board[_ngcontent-%COMP%]{height:30px;width:40px;margin-right:6px;display:inline-block;vertical-align:middle}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;background-image:none;border:1px solid #19262e;cursor:pointer;font-size:1em;color:#8ec271;padding:2px 16px}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:#f9f7ef;border:1px solid #3d5e70}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{color:#8d8d8d;cursor:default}"]}),i})(),At=(()=>{class i{static getEditorComponentComponent(){return Lt}}return i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({providers:[],imports:[_.ez,K.I]}),i})()}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка