Spaces:
Running
Running
File size: 174,759 Bytes
21cd101 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{156:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(5),s=n(4),a=n(12),i=n(6),r=n(9),l=n(15);function b(e){Object(c.e)(e,"svelte-vgthxo",'.container.svelte-vgthxo.svelte-vgthxo{background:transparent;color:#555;width:100%;box-sizing:border-box;border:3px dashed currentColor;transition:.2s border-color, .2s color;border-radius:20px;min-height:90px;font:inherit;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden;position:relative;cursor:pointer;padding:4px}[theme="dark"] .container.svelte-vgthxo.svelte-vgthxo{color:#aaa}.dropping.svelte-vgthxo.svelte-vgthxo,.container.svelte-vgthxo.svelte-vgthxo:focus-visible,.container.svelte-vgthxo.svelte-vgthxo:active{color:rgb(79, 123, 211)}[theme="dark"] .dropping.svelte-vgthxo.svelte-vgthxo,[theme="dark"] .container.svelte-vgthxo.svelte-vgthxo:focus-visible,[theme="dark"] .container.svelte-vgthxo.svelte-vgthxo:active{color:rgb(178, 195, 228)}.placeholder.svelte-vgthxo.svelte-vgthxo{font-size:1.5em}.selected.svelte-vgthxo.svelte-vgthxo{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.selected.svelte-vgthxo>.svelte-vgthxo:not(:last-child){margin-right:12px}')}function d(e,t,n){const c=e.slice();return c[10]=t[n],c}function O(e){let t,n,o=e[4]("fileInput.select")+"";return{c(){t=Object(c.v)("div"),n=Object(c.Y)(o),Object(c.g)(t,"class","placeholder svelte-vgthxo")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){16&t&&o!==(o=e[4]("fileInput.select")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}function p(e){let t,n,o,s,a,i,r,l,b,O=e[4]("fileInput.selected").replace("{file}",e[0].name)+"",p=e[4]("fileInput.clear")+"",u=e[1],g=[];for(let t=0;t<u.length;t+=1)g[t]=j(d(e,u,t));return{c(){t=Object(c.v)("div");for(let e=0;e<g.length;e+=1)g[e].c();n=Object(c.U)(),o=Object(c.v)("div"),s=Object(c.Y)(O),a=Object(c.U)(),i=Object(c.v)("button"),r=Object(c.Y)(p),Object(c.g)(o,"class","svelte-vgthxo"),Object(c.g)(i,"class","svelte-vgthxo"),Object(c.g)(t,"class","selected svelte-vgthxo")},m(d,O){Object(c.E)(d,t,O);for(let e=0;e<g.length;e+=1)g[e]&&g[e].m(t,null);Object(c.d)(t,n),Object(c.d)(t,o),Object(c.d)(o,s),Object(c.d)(t,a),Object(c.d)(t,i),Object(c.d)(i,r),l||(b=Object(c.G)(i,"click",e[5]),l=!0)},p(e,o){if(6&o){let c;for(u=e[1],c=0;c<u.length;c+=1){const s=d(e,u,c);g[c]?g[c].p(s,o):(g[c]=j(s),g[c].c(),g[c].m(t,n))}for(;c<g.length;c+=1)g[c].d(1);g.length=u.length}17&o&&O!==(O=e[4]("fileInput.selected").replace("{file}",e[0].name)+"")&&Object(c.Q)(s,O),16&o&&p!==(p=e[4]("fileInput.clear")+"")&&Object(c.Q)(r,p)},d(e){e&&Object(c.u)(t),Object(c.t)(g,e),l=!1,b()}}}function j(e){let t,n,o,s;return{c(){t=Object(c.v)("img"),Object(c.W)(t.src,n=e[2])||Object(c.g)(t,"src",n),Object(c.g)(t,"width",o=e[10][0]),Object(c.g)(t,"height",s=e[10][1]),Object(c.g)(t,"class","svelte-vgthxo")},m(e,n){Object(c.E)(e,t,n)},p(e,a){4&a&&!Object(c.W)(t.src,n=e[2])&&Object(c.g)(t,"src",n),2&a&&o!==(o=e[10][0])&&Object(c.g)(t,"width",o),2&a&&s!==(s=e[10][1])&&Object(c.g)(t,"height",s)},d(e){e&&Object(c.u)(t)}}}function u(e){let t,n,o;function s(e,t){return e[0]?p:O}let a=s(e),i=a(e);return{c(){t=Object(c.v)("button"),i.c(),Object(c.g)(t,"class","container svelte-vgthxo"),Object(c.bb)(t,"dropping",e[3])},m(s,a){Object(c.E)(s,t,a),i.m(t,null),n||(o=Object(c.G)(t,"click",e[6]),n=!0)},p(e,n){a===(a=s(e))&&i?i.p(e,n):(i.d(1),i=a(e),i&&(i.c(),i.m(t,null))),8&n&&Object(c.bb)(t,"dropping",e[3])},d(e){e&&Object(c.u)(t),i.d(),n=!1,o()}}}function g(e){let t,n,o;function s(t){e[8](t)}let a={$$slots:{default:[u]},$$scope:{ctx:e}};return void 0!==e[3]&&(a.dropping=e[3]),t=new l.a({props:a}),c.i.push((()=>Object(c.h)(t,"dropping",s))),t.$on("drop",e[7]),{c(){Object(c.o)(t.$$.fragment)},m(e,n){Object(c.H)(t,e,n),o=!0},p(e,[o]){const s={};8223&o&&(s.$$scope={dirty:o,ctx:e}),!n&&8&o&&(n=!0,s.dropping=e[3],Object(c.b)((()=>n=!1))),t.$set(s)},i(e){o||(Object(c.cb)(t.$$.fragment,e),o=!0)},o(e){Object(c.db)(t.$$.fragment,e),o=!1},d(e){Object(c.s)(t,e)}}}function h(e,t,n){let o;Object(c.l)(e,s.a,(e=>n(4,o=e)));const a=[".png",".jpg",".jpeg",".bmp",".svg",".ico",".gif"];let i,r,{file:l}=t,{previewSizes:b}=t;return e.$$set=e=>{"file"in e&&n(0,l=e.file),"previewSizes"in e&&n(1,b=e.previewSizes)},e.$$.update=()=>{5&e.$$.dirty&&(l?(r&&URL.revokeObjectURL(r),n(2,r=URL.createObjectURL(l))):r&&(URL.revokeObjectURL(r),n(2,r=null)))},[l,b,r,i,o,e=>{e.stopPropagation(),n(0,l=null)},()=>{const e=document.createElement("input");e.type="file",e.accept=a.join(","),e.addEventListener("change",(e=>{const t=e.target.files;t.length?n(0,l=t[0]):n(0,l=null)})),document.body.appendChild(e),e.click(),e.remove()},({detail:e})=>{const t=e.files[0];a.some((e=>t.name.endsWith(e)))&&n(0,l=t)},function(e){i=e,n(3,i)}]}class m extends c.a{constructor(e){super(),Object(c.C)(this,e,h,g,c.M,{file:0,previewSizes:1},b)}}var v=m;function f(e){Object(c.e)(e,"svelte-1vgg5z0","textarea.svelte-1vgg5z0{box-sizing:border-box;width:100%;min-width:100%;height:100px}")}function y(e){let t,n,o,s;return{c(){t=Object(c.v)("textarea"),t.value=n=e[0].join("\n"),Object(c.g)(t,"class","svelte-1vgg5z0")},m(n,a){Object(c.E)(n,t,a),o||(s=Object(c.G)(t,"change",e[1]),o=!0)},p(e,[c]){1&c&&n!==(n=e[0].join("\n"))&&(t.value=n)},i:c.I,o:c.I,d(e){e&&Object(c.u)(t),o=!1,s()}}}function w(e,t,n){let{extensions:c}=t;return e.$$set=e=>{"extensions"in e&&n(0,c=e.extensions)},[c,e=>{n(0,c=e.target.value.split("\n").filter((e=>e)))}]}class $ extends c.a{constructor(e){super(),Object(c.C)(this,e,w,y,c.M,{extensions:0},f)}}var x=$;function k(e){Object(c.e)(e,"svelte-fiwpjx","a.svelte-fiwpjx{text-decoration:none}a.svelte-fiwpjx:hover{text-decoration:underline}")}function E(e){let t,n,o;return{c(){t=Object(c.v)("a"),n=Object(c.Y)("(?)"),Object(c.g)(t,"href",e[1]),Object(c.g)(t,"title",o=e[0]("options.learnMore")),Object(c.g)(t,"target","_blank"),Object(c.g)(t,"rel","noopener noreferrer"),Object(c.g)(t,"class","svelte-fiwpjx")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,[n]){1&n&&o!==(o=e[0]("options.learnMore"))&&Object(c.g)(t,"title",o)},i:c.I,o:c.I,d(e){e&&Object(c.u)(t)}}}function S(e,t,n){let o;Object(c.l)(e,s.a,(e=>n(0,o=e)));let{slug:a}=t,{href:i}=t;const r=a?`https://docs.turbowarp.org/${a}`:i;return e.$$set=e=>{"slug"in e&&n(2,a=e.slug),"href"in e&&n(3,i=e.href)},[o,r,a,i]}class z extends c.a{constructor(e){super(),Object(c.C)(this,e,S,E,c.M,{slug:2,href:3},k)}}var _=z;function U(e){let t,n,o;return{c(){t=Object(c.v)("input"),Object(c.g)(t,"type","color")},m(s,a){Object(c.E)(s,t,a),Object(c.R)(t,e[0]),n||(o=Object(c.G)(t,"input",e[1]),n=!0)},p(e,[n]){1&n&&Object(c.R)(t,e[0])},i:c.I,o:c.I,d(e){e&&Object(c.u)(t),n=!1,o()}}}function C(e,t,n){let{value:c}=t;return e.$$set=e=>{"value"in e&&n(0,c=e.value)},[c,function(){c=this.value,n(0,c)}]}class I extends c.a{constructor(e){super(),Object(c.C)(this,e,C,U,c.M,{value:0})}}var R=I,q=n(19);var T=async e=>{if("object"==typeof crypto&&crypto.subtle&&crypto.subtle.digest){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}const t=new(0,(await Promise.all([n.e(0),n.e(6)]).then(n.t.bind(null,154,7))).default);return t.update(new Uint8Array(e)),t.digest("hex")};var A=e=>e.replace(/["'<>&]/g,(e=>{switch(e){case'"':return""";case"'":return"'";case"<":return"<";case">":return">";case"&":return"&"}}));const N=e=>[`https://packagerdata.turbowarp.org/${e}`,`https://blobs.turbowarp.xyz/${e}`],L=e=>`scaffolding/${e}`;var P={"nwjs-win64":{src:N("nwjs-v0.68.1-win-x64.zip"),sha256:"82527d29f060bad7ec041f7c0536b1376f8bad5e5584adf7e3cf7205755a106c",estimatedSize:119821598},"nwjs-win32":{src:N("nwjs-v0.68.1-win-ia32.zip"),sha256:"7dd3104c2726082a8acd8973af2b2b223bc97960b722ec141b9bf07d84a0281b",estimatedSize:112613344},"nwjs-mac":{src:N("nwjs-v0.68.1-osx-x64.zip"),sha256:"4b1356302738a45f7ee212f6ecb997eb5d31403bfc45a7dd58429c968a1f581a",estimatedSize:119091132},"nwjs-linux-x64":{src:N("nwjs-v0.68.1-linux-x64.zip"),sha256:"5f597add1a2b6f13592117cc955111cea8211c13b21165e29c6616f385df5b94",estimatedSize:135854818},"electron-win32":{src:N("electron-v22.3.27-win32-ia32.zip"),sha256:"47bd498e5513529c5e141394fc9fd610cba1dcdea9e6dbb165edf929cbfd9af2",estimatedSize:90856612},"electron-win64":{src:N("electron-v22.3.27-win32-x64.zip"),sha256:"1a02c0f7af9664696f790dcce05948f0458a2f4f2d48c685f911d2eb99a4c9da",estimatedSize:96605498},"electron-win-arm":{src:N("electron-v22.3.27-win32-arm64.zip"),sha256:"0e4ad218018c0881ef4de363107a94dd2ced40367a0e18ca7d0dde1f40da0531",estimatedSize:94065344},"electron-mac":{src:N("electron-v22.3.27-macos-universal.zip"),sha256:"598b35f9030fe30f81b4041be048cd0374f675bd1bc0f172c26cf2808e80a3d9",estimatedSize:160882083},"electron-linux64":{src:N("electron-v22.3.27-linux-x64.zip"),sha256:"631d8eb08098c48ce2b29421e74c69ac0312b1e42f445d8a805414ba1242bf3a",estimatedSize:93426892},"electron-linux-arm32":{src:N("electron-v22.3.27-linux-armv7l.zip"),sha256:"9f8372606e5ede83cf1c73a3d8ff07047e4e3ef614aa89a76cd497dc06cf119d",estimatedSize:82722572},"electron-linux-arm64":{src:N("electron-v22.3.27-linux-arm64.zip"),sha256:"60279395a5ce4eaf3c08f1e717771b203830902d3fe3a7c311bc37deb1a0e15e",estimatedSize:93932512},"webview-mac":{src:N("WebView-macos-5.zip"),sha256:"b5636571cd9be2aae2f6dac1ab090fdf829c8fdfe91f462cc2feb2d324705f9f",estimatedSize:3425601},"steamworks.js":{src:N("steamworks.js-0.3.2.zip"),sha256:"fd8bc80a97cd880d71113dfc5f81b124b6e212335393db73e3df168c5c546fbc",estimatedSize:3279554},scaffolding:{src:L("scaffolding-full.js"),estimatedSize:4564032,useBuildId:!0},"scaffolding-min":{src:L("scaffolding-min.js"),estimatedSize:2530463,useBuildId:!0},addons:{src:L("addons.js"),estimatedSize:19931,useBuildId:!0}},B=n(11),Y=n(14);const M=e=>new Promise(((t,n)=>{e.toBlob((e=>{e?t(e):n(new Error("Could not read <canvas> as blob"))}))}));var H=async e=>{const{Icns:t,Buffer:c}=await Promise.all([n.e(0),n.e(2)]).then(n.bind(null,155)),o=new Blob([e],{type:"image/png"}),s=URL.createObjectURL(o),a=await(i=s,new Promise(((e,t)=>{const n=new Image;n.onload=()=>e(n),n.onerror=()=>t(new Error(`Could not load image: ${i}`)),n.src=i})));var i;const r=[{type:"ic04",size:16},{type:"ic07",size:128},{type:"ic08",size:256},{type:"ic09",size:512},{type:"ic10",size:1024},{type:"ic11",size:32},{type:"ic12",size:64},{type:"ic13",size:256},{type:"ic14",size:512}].filter((e=>16===e.size||a.width>=e.size&&a.height>=e.size)),l=document.createElement("canvas"),b=l.getContext("2d");if(!b)throw new Error("cannot get canvas rendering context");const d=new t.Icns;for(const e of r){const n=e.size;l.width=n,l.height=n,b.drawImage(a,0,0,n,n);const o=await M(l),s=await Object(Y.a)(o),i=await t.IcnsImage.fromPNG(c.from(s),e.type);d.append(i)}return d.data};const W="5d7dd676348dd3aeff5976898cb41e20871e3cee6db54f6574e1fb66c0deae1a",Q=e=>60===(e+=42)?40:62===e?41:e,F=e=>{const t=e.length;let n;if(t%4!=0){const c=new Uint8Array(4*Math.ceil(t/4));for(let n=0;n<t;n++)c[n]=e[n];n=new DataView(c.buffer)}else n=new DataView(e.buffer,e.byteOffset,e.byteLength);const c=new Uint8Array(5*Math.ceil(t/4));let o=0;for(let e=0;e<n.byteLength;e+=4){let t=n.getUint32(e,!0);c[o++]=Q(t%85),t=Math.floor(t/85),c[o++]=Q(t%85),t=Math.floor(t/85),c[o++]=Q(t%85),t=Math.floor(t/85),c[o++]=Q(t%85),t=Math.floor(t/85),c[o++]=Q(t%85)}return(new TextDecoder).decode(c)},D=e=>{if("dict"===e.tagName){const t={};for(const n of e.children)"key"===n.tagName&&(t[n.textContent]=D(n.nextElementSibling));return t}return"array"===e.tagName?Array.from(e.children).map(D):"string"===e.tagName?e.textContent:"true"===e.tagName||"false"!==e.tagName&&(console.warn("unknown plist xml",e),null)},V=(e,t)=>{if(Array.isArray(t)){const n=e.createElement("array");for(const c of t)n.appendChild(V(e,c));return n}if("object"==typeof t){const n=e.createElement("dict");for(const[c,o]of Object.entries(t)){const t=e.createElement("key");t.textContent=c;const s=V(e,o);n.appendChild(t),n.appendChild(s)}return n}if("string"==typeof t){const n=e.createElement("string");return n.textContent=t,n}if("boolean"==typeof t){return e.createElement(t.toString())}return console.warn("unknown plist value",t),V(e,`${t}`)};var G=n(1),J=n(3);const Z=e=>{const t=(e=>{const t=parseInt(e.substring(1),16);return{red:t>>16&255,green:t>>8&255,blue:255&t}})(e),n=(e=>{const t=e.red/255,n=e.green/255,c=e.blue/255,o=Math.min(Math.min(t,n),c),s=Math.max(Math.max(t,n),c);let a=0,i=0;o!==s&&(a=60*((t===o?3:n===o?5:1)-(t===o?n-c:n===o?c-t:t-n)/(s-o))%360,i=(s-o)/s);return{hue:a,saturation:i,value:s}})(t);n.value-=.1;return(e=>{const t=e=>e.toString(16).padStart(2,"0");return`#${t(e.red)}${t(e.green)}${t(e.blue)}`})((e=>{let t=e.hue%360;t<0&&(t+=360);const n=Math.max(0,Math.min(e.saturation,1)),c=Math.max(0,Math.min(e.value,1)),o=Math.floor(t/60),s=t/60-o,a=c*(1-n),i=c*(1-n*s),r=c*(1-n*(1-s));let l,b,d;switch(o){default:case 0:l=c,b=r,d=a;break;case 1:l=i,b=c,d=a;break;case 2:l=a,b=c,d=r;break;case 3:l=a,b=i,d=c;break;case 4:l=r,b=a,d=c;break;case 5:l=c,b=a,d=i}return{red:Math.floor(255*l),green:Math.floor(255*b),blue:Math.floor(255*d)}})(n))};let K=null;const X=(e,t)=>{for(const n of t)e.push(n)},ee=e=>{if("string"==typeof e)return[(new TextEncoder).encode(e)];if("number"==typeof e||"boolean"==typeof e||null==e)return[(new TextEncoder).encode(String(e))];if(Array.isArray(e)){const t=[];for(const n of e)X(t,ee(n));return t}throw new Error(`Unknown value in encodeComponent: ${e}`)};var te=(e,...t)=>{const n=[];for(let c=0;c<e.length-1;c++)X(n,ee(e[c])),X(n,ee(t[c]));X(n,ee(e[e.length-1]));let c=0;for(let e=0;e<n.length;e++)c+=n[e].byteLength;const o=new Uint8Array(c);for(let e=0,t=0;e<n.length;e++)o.set(n[e],t),t+=n[e].byteLength;return o};const ne=.75,ce=async()=>(await Promise.all([n.e(0),n.e(3)]).then(n.t.bind(null,153,7))).default,oe=(e,t,n)=>{e.files[t]=n},se={title:G.APP_NAME,homepage:G.WEBSITE,license:G.COPYRIGHT_NOTICE},ae={title:"Scratch",homepage:"https://scratch.mit.edu/",license:'Copyright (c) 2016, Massachusetts Institute of Technology\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'},ie={title:"Electron",homepage:"https://www.electronjs.org/",license:'Copyright (c) Electron contributors\nCopyright (c) 2013-2020 GitHub Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n"Software"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.'},re=`/*!\nParts of this script are from the ${G.APP_NAME} <${G.WEBSITE}>, licensed as follows:\n${se.license}\n\nParts of this script are from Scratch <https://scratch.mit.edu/>, licensed as follows:\n${ae.license}\n*/\n`,le=e=>`<style>body { font-family: sans-serif; }</style>${`<h2>The following entries were added by the ${G.APP_NAME}</h2>`}${e.map((({title:e,license:t,homepage:n},c)=>`\n<div class="product">\n<span class="title">${A(e)}</span>\n<span class="homepage"><a href="${A(n)}">homepage</a></span>\n<input type="checkbox" hidden id="p4-${c}">\n<label class="show" for="p4-${c}" tabindex="0"></label>\n<div class="licence">\n<pre>${A(t)}</pre>\n</div>\n</div>\n`)).join("\n")}`,be="CFBundleIdentifier",de="CFBundleName",Oe="CFBundleDisplayName",pe="CFBundleExecutable",je="CFBundleVersion",ue="CFBundleShortVersionString",ge="LSApplicationCategoryType",he=e=>`When you try to double click on the app to run it, you will probably see this warning:\n"${e.app.packageName} cannot be opened because the developer cannot be verified."\nThis is normal. Press cancel.\n\nTo run the app:\n1) Control+click on the app file (${e.app.packageName} in the same folder as this document) and select "Open".\n2) If a warning appears, select "Open" if it's an option.\n3) If a warning appears but "Open" isn't an option, press "Cancel" and repeat from step 1.\n The open button will appear the second time the warning appears.\n\nAfter completing these steps, the app should run without any further warnings.\n\nFeel free to drag the app into your Applications folder.\n`,me=e=>{const t=["/","\\",":","*","?","<",">","|"];if(t.some((t=>e.includes(t))))throw new Error(`Invalid package name: ${e}. It must not use the characters: ${t.join(" ")}`)};class ve extends q.b{constructor(){super(),this.project=null,this.options=ve.DEFAULT_OPTIONS(),this.aborted=!1,this.used=!1}abort(){this.aborted||(this.aborted=!0,this.dispatchEvent(new Event("abort")))}ensureNotAborted(){if(this.aborted)throw new Error("Aborted")}async fetchLargeAsset(e,t){this.ensureNotAborted();const n=P[e];if(!n)throw new Error(`Invalid asset: ${e}`);if("undefined"!=typeof __ASSETS__&&__ASSETS__[n.src])return __ASSETS__[n.src];const c=t=>this.dispatchEvent(new q.a("large-asset-fetch",{detail:{asset:e,progress:t}}));let o;c(0);let s=!1;try{const e=await K.getCachedAsset(n);e&&(o=e,s=!0,c(.5))}catch(e){console.warn(e)}if(!o){let e=n.src;n.useBuildId&&(e+=`?${W}`),o=await Object(B.a)({url:e,type:t,estimatedSize:n.estimatedSize,progressCallback:e=>{c(e)},abortTarget:this})}if(n.useBuildId&&(a=W,(i=o).endsWith("=^..^=")&&!i.endsWith(`${a} =^..^=`)))throw new J.d("Build ID does not match.");var a,i;if(n.sha256){const t=await T(o);if(t!==n.sha256)throw new Error(`Hash mismatch for ${e}, found ${t} but expected ${n.sha256}`)}if(!s)try{await K.cacheAsset(n,o)}catch(e){console.warn(e)}return c(1),o}getAddonOptions(){return{...this.options.chunks,specialCloudBehaviors:this.options.cloudVariables.specialCloudBehaviors,unsafeCloudBehaviors:this.options.cloudVariables.unsafeCloudBehaviors,pause:this.options.controls.pause.enabled}}async loadResources(){const e=[re];this.project.analysis.usesMusic?e.push(await this.fetchLargeAsset("scaffolding","text")):e.push(await this.fetchLargeAsset("scaffolding-min","text")),Object.values(this.getAddonOptions()).some((e=>e))&&e.push(await this.fetchLargeAsset("addons","text")),this.script=e.join("\n").replace(/<\/script>/g,"</scri'+'pt>")}computeWindowSize(){let e=this.options.stageWidth,t=this.options.stageHeight;return(this.options.controls.greenFlag.enabled||this.options.controls.stopAll.enabled||this.options.controls.pause.enabled)&&(t+=48),{width:e,height:t}}getPlistPropertiesForPrimaryExecutable(){return{[be]:`org.turbowarp.packager.userland.${this.options.app.packageName}`,[de]:this.options.app.windowTitle,[Oe]:this.options.app.windowTitle,[pe]:this.options.app.packageName,[je]:this.options.app.version,[ue]:this.options.app.version,[ge]:"public.app-category.games"}}async updatePlist(e,t,n){const c=(e=>{const t=(new DOMParser).parseFromString(e,"text/xml").children[0].children[0];return D(t)})(await e.file(t).async("string"));Object.assign(c,n),e.file(t,(e=>{const t=document.implementation.createDocument(null,"plist"),n=t.documentElement;return n.setAttribute("version","1.0"),n.appendChild(V(t,e)),`<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n${(new XMLSerializer).serializeToString(t)}`})(c))}async addNwJS(e){const t=this.options.app.packageName;me(t);const n=await this.fetchLargeAsset(this.options.target,"arraybuffer"),c=await(await ce()).loadAsync(n),o=this.options.target.startsWith("nwjs-win"),s="nwjs-mac"===this.options.target,a=this.options.target.startsWith("nwjs-linux"),i=Object.keys(c.files)[0].split("/")[0],r=new(await ce());for(const e of Object.keys(c.files)){const n=c.files[e];let l=e.replace(i,t);o?l=l.replace("nw.exe",`${t}.exe`):s?l=l.replace("nwjs.app",`${t}.app`):a&&(l=l.replace(/nw$/,t)),oe(r,l,n)}const l="icon.png",b=await K.getAppIcon(this.options.app.icon),d={name:t,main:"main.js",version:this.options.app.version,window:{width:this.computeWindowSize().width,height:this.computeWindowSize().height,icon:l}};let O;if(o)O=`${t}/`;else if(s){r.file(`${t}/How to run ${t}.txt`,he(this.options));const e=await H(b);r.file(`${t}/${t}.app/Contents/Resources/app.icns`,e),O=`${t}/${t}.app/Contents/Resources/app.nw/`}else if(a){const e=`#!/bin/bash\ncd "$(dirname "$0")"\n./${t}`;r.file(`${t}/start.sh`,e,{unixPermissions:33261}),O=`${t}/`}for(const t of Object.keys(e.files))oe(r,O+t,e.files[t]);r.file(O+l,b),r.file(O+"package.json",JSON.stringify(d,null,4)),r.file(O+"main.js","\n const start = () => nw.Window.open('index.html', {\n position: 'center',\n new_instance: true\n });\n nw.App.on('open', start);\n start();");const p=`${t}/credits.html`,j=await r.file(p).async("string");return r.file(p,j+le([se,ae])),r}async addElectron(e){const t=this.options.app.packageName;me(t);const n=await this.fetchLargeAsset(this.options.target,"arraybuffer"),c=await(await ce()).loadAsync(n),o=this.options.target.includes("win"),s=this.options.target.includes("mac"),a=this.options.target.includes("linux"),i=new(await ce());for(const e of Object.keys(c.files)){const n=c.files[e];let r;r=s?e:`${t}/${e}`,o?r=r.replace("electron.exe",`${t}.exe`):s?(r=r.replace("Electron.app",`${t}.app`),r=r.replace(/Electron$/,t)):a&&(r=r.replace(/electron$/,t)),oe(i,r,n)}const r=s?"":`${t}/`,l=await i.file(`${r}LICENSES.chromium.html`).async("string");i.file(`${r}licenses.html`,l+le([se,ae,ie])),i.remove(`${r}LICENSE.txt`),i.remove(`${r}LICENSES.chromium.html`),i.remove(`${r}LICENSE`),i.remove(`${r}version`),i.remove(`${r}resources/default_app.asar`);const b=s?`${r}${t}.app/Contents/`:r,d=s?`${b}Resources/app/`:`${b}resources/app/`,O="electron-main.js",p="electron-preload.js",j="icon.png",u=await K.getAppIcon(this.options.app.icon);i.file(`${d}${j}`,u);const g={name:t,main:O,version:this.options.app.version};i.file(`${d}package.json`,JSON.stringify(g,null,4));let h=`'use strict';\nconst {app, BrowserWindow, Menu, shell, screen, dialog, ipcMain} = require('electron');\nconst path = require('path');\n\nconst isWindows = process.platform === 'win32';\nconst isMac = process.platform === 'darwin';\nconst isLinux = process.platform === 'linux';\n\nif (isMac) {\n Menu.setApplicationMenu(Menu.buildFromTemplate([\n { role: 'appMenu' },\n { role: 'fileMenu' },\n { role: 'editMenu' },\n { role: 'windowMenu' },\n { role: 'help' }\n ]));\n} else {\n Menu.setApplicationMenu(null);\n}\n\nconst resourcesURL = Object.assign(new URL('file://'), {\n pathname: path.join(__dirname, '/')\n}).href;\nconst defaultProjectURL = new URL('./index.html', resourcesURL).href;\n\nconst createWindow = (windowOptions) => {\n const options = {\n title: ${JSON.stringify(this.options.app.windowTitle)},\n icon: path.resolve(__dirname, ${JSON.stringify(j)}),\n useContentSize: true,\n webPreferences: {\n sandbox: true,\n contextIsolation: true,\n nodeIntegration: false,\n preload: path.resolve(__dirname, ${JSON.stringify(p)}),\n },\n frame: ${"frameless"!==this.options.app.windowControls},\n show: true,\n width: ${this.options.stageWidth},\n height: ${this.options.stageHeight},\n ...windowOptions,\n };\n\n const activeScreen = screen.getDisplayNearestPoint(screen.getCursorScreenPoint());\n const bounds = activeScreen.workArea;\n options.x = bounds.x + ((bounds.width - options.width) / 2);\n options.y = bounds.y + ((bounds.height - options.height) / 2);\n\n const window = new BrowserWindow(options);\n return window;\n};\n\nconst createProjectWindow = (url) => {\n const windowMode = ${JSON.stringify(this.options.app.windowMode)};\n const options = {\n show: false,\n backgroundColor: ${JSON.stringify(this.options.appearance.background)},\n width: ${this.computeWindowSize().width},\n height: ${this.computeWindowSize().height},\n minWidth: 50,\n minHeight: 50,\n };\n // fullscreen === false disables fullscreen on macOS so only set this property when it's true\n if (windowMode === 'fullscreen') {\n options.fullscreen = true;\n }\n const window = createWindow(options);\n if (windowMode === 'maximize') {\n window.maximize();\n }\n window.loadURL(url);\n window.show();\n};\n\nconst createDataWindow = (dataURI) => {\n const window = createWindow({});\n window.loadURL(dataURI);\n};\n\nconst isResourceURL = (url) => {\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.protocol === 'file:' && parsedUrl.href.startsWith(resourcesURL);\n } catch (e) {\n // ignore\n }\n return false;\n};\n\nconst SAFE_PROTOCOLS = [\n 'https:',\n 'http:',\n 'mailto:',\n];\n\nconst isSafeOpenExternal = (url) => {\n try {\n const parsedUrl = new URL(url);\n return SAFE_PROTOCOLS.includes(parsedUrl.protocol);\n } catch (e) {\n // ignore\n }\n return false;\n};\n\nconst isDataURL = (url) => {\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.protocol === 'data:';\n } catch (e) {\n // ignore\n }\n return false;\n};\n\nconst openLink = (url) => {\n if (isDataURL(url)) {\n createDataWindow(url);\n } else if (isResourceURL(url)) {\n createProjectWindow(url);\n } else if (isSafeOpenExternal(url)) {\n shell.openExternal(url);\n }\n};\n\nconst createProcessCrashMessage = (details) => {\n let message = details.type ? details.type + ' child process' : 'Renderer process';\n message += ' crashed: ' + details.reason + ' (' + details.exitCode + ')\\n\\n';\n if (process.arch === 'ia32') {\n message += 'Usually this means the project was too big for the 32-bit Electron environment or your computer is out of memory. Ask the creator to use the 64-bit environment instead.';\n } else {\n message += 'Usually this means your computer is out of memory.';\n }\n return message;\n};\n\napp.on('render-process-gone', (event, webContents, details) => {\n const window = BrowserWindow.fromWebContents(webContents);\n dialog.showMessageBoxSync(window, {\n type: 'error',\n title: 'Error',\n message: createProcessCrashMessage(details)\n });\n});\n\napp.on('child-process-gone', (event, details) => {\n dialog.showMessageBoxSync({\n type: 'error',\n title: 'Error',\n message: createProcessCrashMessage(details)\n });\n});\n\napp.on('web-contents-created', (event, contents) => {\n contents.setWindowOpenHandler((details) => {\n setImmediate(() => {\n openLink(details.url);\n });\n return {action: 'deny'};\n });\n contents.on('will-navigate', (e, url) => {\n if (!isResourceURL(url)) {\n e.preventDefault();\n openLink(url);\n }\n });\n contents.on('before-input-event', (e, input) => {\n const window = BrowserWindow.fromWebContents(contents);\n if (!window || input.type !== "keyDown") return;\n if (input.key === 'F11' || (input.key === 'Enter' && input.alt)) {\n window.setFullScreen(!window.isFullScreen());\n } else if (input.key === 'Escape') {\n const behavior = ${JSON.stringify(this.options.app.escapeBehavior)};\n if (window.isFullScreen() && (behavior === 'unfullscreen-only' || behavior === 'unfullscreen-or-exit')) {\n window.setFullScreen(false);\n } else if (behavior === 'unfullscreen-or-exit' || behavior === 'exit-only') {\n window.close();\n }\n }\n });\n});\n\napp.on('session-created', (session) => {\n session.webRequest.onBeforeRequest({\n urls: ["file://*"]\n }, (details, callback) => {\n callback({\n cancel: !details.url.startsWith(resourcesURL)\n });\n });\n});\n\napp.on('window-all-closed', () => {\n app.quit();\n});\n\napp.whenReady().then(() => {\n createProjectWindow(defaultProjectURL);\n});\n`,m="'use strict';\nconst {contextBridge, ipcRenderer} = require('electron');\n";if(this.project.analysis.usesSteamworks&&["electron-win64","electron-linux64","electron-mac"].includes(this.options.target)){h+=`\n const enableSteamworks = () => {\n const APP_ID = +${JSON.stringify(this.options.steamworks.appId)};\n const steamworks = require('./steamworks.js/');\n\n const client = steamworks.init(APP_ID);\n\n const async = (event, callback) => ipcMain.handle(event, (e, ...args) => {\n return callback(...args);\n });\n const sync = (event, callback) => ipcMain.on(event, (e, ...args) => {\n e.returnValue = callback(...args);\n });\n\n async('Steamworks.achievement.activate', (achievement) => client.achievement.activate(achievement));\n async('Steamworks.achievement.clear', (achievement) => client.achievement.clear(achievement));\n sync('Steamworks.achievement.isActivated', (achievement) => client.achievement.isActivated(achievement));\n sync('Steamworks.apps.isDlcInstalled', (dlc) => client.apps.isDlcInstalled(dlc));\n sync('Steamworks.localplayer.getName', () => client.localplayer.getName());\n sync('Steamworks.localplayer.getLevel', () => client.localplayer.getLevel());\n sync('Steamworks.localplayer.getIpCountry', () => client.localplayer.getIpCountry());\n sync('Steamworks.localplayer.getSteamId', () => client.localplayer.getSteamId());\n async('Steamworks.overlay.activateToWebPage', (url) => client.overlay.activateToWebPage(url));\n\n steamworks.electronEnableSteamOverlay();\n sync('Steamworks.ok', () => true);\n };\n\n try {\n enableSteamworks();\n } catch (e) {\n console.error(e);\n ipcMain.on('Steamworks.ok', (e) => {\n e.returnValue = false;\n });\n app.whenReady().then(() => {\n const ON_ERROR = ${JSON.stringify(this.options.steamworks.onError)};\n const window = BrowserWindow.getAllWindows()[0];\n if (ON_ERROR === 'warning') {\n dialog.showMessageBox(window, {\n type: 'error',\n message: 'Error initializing Steamworks: ' + e,\n });\n } else if (ON_ERROR === 'error') {\n dialog.showMessageBoxSync(window, {\n type: 'error',\n message: 'Error initializing Steamworks: ' + e,\n });\n app.quit();\n }\n });\n }`,m+="\n const enableSteamworks = () => {\n const sync = (event) => (...args) => ipcRenderer.sendSync(event, ...args);\n const async = (event) => (...args) => ipcRenderer.invoke(event, ...args);\n\n contextBridge.exposeInMainWorld('Steamworks', {\n ok: sync('Steamworks.ok'),\n achievement: {\n activate: async('Steamworks.achievement.activate'),\n clear: async('Steamworks.achievement.clear'),\n isActivated: sync('Steamworks.achievement.isActivated'),\n },\n apps: {\n isDlcInstalled: sync('Steamworks.apps.isDlcInstalled'),\n },\n leaderboard: {\n uploadScore: async('Steamworks.leaderboard.uploadScore'),\n },\n localplayer: {\n getName: sync('Steamworks.localplayer.getName'),\n getLevel: sync('Steamworks.localplayer.getLevel'),\n getIpCountry: sync('Steamworks.localplayer.getIpCountry'),\n getSteamId: sync('Steamworks.localplayer.getSteamId'),\n },\n overlay: {\n activateToWebPage: async('Steamworks.overlay.activateToWebPage'),\n },\n });\n };\n enableSteamworks();";const e=await this.fetchLargeAsset("steamworks.js","arraybuffer"),t=await(await ce()).loadAsync(e);for(const[e,n]of Object.entries(t.files)){const t=e.replace(/^package\//,"steamworks.js/");oe(i,`${d}${t}`,n)}}i.file(`${d}${O}`,h),i.file(`${d}${p}`,m);for(const[t,n]of Object.entries(e.files))oe(i,`${d}${t}`,n);if(o){const e=["1) Extract the whole zip",`2) Open "${t}.exe" to start the app.`,'Open "licenses.html" for information regarding open source software used by the app.'].join("\n\n");i.file(`${r}README.txt`,e)}else if(s){i.file(`How to run ${this.options.app.packageName}.txt`,he(this.options));const e=this.getPlistPropertiesForPrimaryExecutable();await this.updatePlist(i,`${b}Info.plist`,e);const t=["Electron Helper","Electron Helper (GPU)","Electron Helper (Renderer)","Electron Helper (Plugin)"];for(const n of t)await this.updatePlist(i,`${b}Frameworks/${n}.app/Contents/Info.plist`,{[be]:`${e[be]}.helper`,[Oe]:n.replace("Electron",this.options.app.packageName),[je]:this.options.app.version,[ue]:this.options.app.version});const n=await H(u);i.file(`${b}Resources/electron.icns`,n)}else if(a){const e=`#!/bin/bash\ncd "$(dirname "$0")"\n./${t}`;i.file(`${r}start.sh`,e,{unixPermissions:33261})}return i}async addWebViewMac(e){me(this.options.app.packageName);const t=await this.fetchLargeAsset(this.options.target,"arraybuffer"),n=await(await ce()).loadAsync(t),c=`${this.options.app.packageName}.app`,o=`${c}/Contents/`,s=`${c}/Contents/Resources/`,a=new(await ce());for(const[e,t]of Object.entries(n.files)){const n=e.replace("WebView.app",c).replace(/WebView$/,this.options.app.packageName);oe(a,n,t)}for(const[t,n]of Object.entries(e.files))oe(a,`${s}${t}`,n);const i=await K.getAppIcon(this.options.app.icon),r=await H(i);a.file(`${s}AppIcon.icns`,r),a.remove(`${s}Assets.car`);const l=parseInt(this.options.appearance.background.substr(1),16),b={title:this.options.app.windowTitle,background:[l>>16&255,l>>8&255,255&l,1],width:this.computeWindowSize().width,height:this.computeWindowSize().height};return a.file(`${s}application_config.json`,JSON.stringify(b)),await this.updatePlist(a,`${o}Info.plist`,this.getPlistPropertiesForPrimaryExecutable()),a.file(`How to run ${this.options.app.packageName}.txt`,he(this.options)),a}makeWebSocketProvider(){const e="wss://clouddata.turbowarp.org"===this.options.cloudVariables.cloudHost?["wss://clouddata.turbowarp.org","wss://clouddata.turbowarp.xyz"]:this.options.cloudVariables.cloudHost;return`new Scaffolding.Cloud.WebSocketProvider(${JSON.stringify(e)}, ${JSON.stringify(this.options.projectId)})`}makeLocalStorageProvider(){return`new Scaffolding.Cloud.LocalStorageProvider(${JSON.stringify(`cloudvariables:${this.options.projectId}`)})`}makeCustomProvider(){const e=this.options.cloudVariables.custom;let t="{const providers = {};\n";for(const n of new Set(Object.values(e)))"ws"===n?t+=`providers.ws = ${this.makeWebSocketProvider()};\n`:"local"===n&&(t+=`providers.local = ${this.makeLocalStorageProvider()};\n`);t+="for (const provider of Object.values(providers)) scaffolding.addCloudProvider(provider);\n";for(const n of Object.keys(e)){const c=e[n];t+=`scaffolding.addCloudProviderOverride(${JSON.stringify(n)}, providers[${JSON.stringify(c)}] || null);\n`}return t+="}",t}generateFilename(e){return`${this.options.app.windowTitle}.${e}`}async generateGetProjectData(){const e=[];let t,n,c="",o=!1;if("html"===this.options.target){o="blob"!==this.project.type,t=ne,n=.98;const s=new Uint8Array(this.project.arrayBuffer);e.push(`\n <script>\n const getBase85DecodeValue = (code) => {\n if (code === 0x28) code = 0x3c;\n if (code === 0x29) code = 0x3e;\n return code - 0x2a;\n };\n const base85decode = (str, outBuffer, outOffset) => {\n const view = new DataView(outBuffer, outOffset, Math.floor(str.length / 5 * 4));\n for (let i = 0, j = 0; i < str.length; i += 5, j += 4) {\n view.setUint32(j, (\n getBase85DecodeValue(str.charCodeAt(i + 4)) * 85 * 85 * 85 * 85 +\n getBase85DecodeValue(str.charCodeAt(i + 3)) * 85 * 85 * 85 +\n getBase85DecodeValue(str.charCodeAt(i + 2)) * 85 * 85 +\n getBase85DecodeValue(str.charCodeAt(i + 1)) * 85 +\n getBase85DecodeValue(str.charCodeAt(i))\n ), true);\n }\n };\n let projectDecodeBuffer = new ArrayBuffer(${4*Math.ceil(s.length/4)});\n let projectDecodeIndex = 0;\n const decodeChunk = (size) => {\n try {\n if (document.currentScript.tagName.toUpperCase() !== 'SCRIPT') throw new Error('document.currentScript is not a script');\n base85decode(document.currentScript.getAttribute("data"), projectDecodeBuffer, projectDecodeIndex);\n document.currentScript.remove();\n projectDecodeIndex += size;\n setProgress(interpolate(0.1, 0.75, projectDecodeIndex / ${s.length}));\n } catch (e) {\n handleError(e);\n }\n };\n <\/script>`);const a=65536;for(let t=0;t<s.length;t+=a){const n=s.subarray(t,t+a),c=F(n);e.push(`<script data="${c}">decodeChunk(${n.length})<\/script>\n`)}c=`() => {\n const buffer = projectDecodeBuffer;\n projectDecodeBuffer = null; // Allow GC\n return Promise.resolve(new Uint8Array(buffer, 0, ${s.length}));\n }`}else{let e;"blob"===this.project.type||"zip-one-asset"===this.options.target?(o="blob"!==this.project.type,e="./project.zip",t=ne,n=.98):(e="./assets/project.json",t=.2,n=.98),c=`() => new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.onload = () => {\n resolve(xhr.response);\n };\n xhr.onerror = () => {\n if (location.protocol === 'file:') {\n reject(new Error('Zip environment must be used from a website, not from a file URL.'));\n } else {\n reject(new Error('Request to load project data failed.'));\n }\n };\n xhr.onprogress = (e) => {\n if (e.lengthComputable) {\n setProgress(interpolate(0.1, ${t}, e.loaded / e.total));\n }\n };\n xhr.responseType = 'arraybuffer';\n xhr.open('GET', ${JSON.stringify(e)});\n xhr.send();\n })`}return e.push(`\n <script>\n const getProjectData = (function() {\n const storage = scaffolding.storage;\n storage.onprogress = (total, loaded) => {\n setProgress(interpolate(${t}, ${n}, loaded / total));\n };\n ${o?`\n let zip;\n // Allow zip to be GC'd after project loads\n vm.runtime.on('PROJECT_LOADED', () => (zip = null));\n const findFileInZip = (path) => zip.file(path) || zip.file(new RegExp("^([^/]*/)?" + path + "$"))[0];\n storage.addHelper({\n load: (assetType, assetId, dataFormat) => {\n if (!zip) {\n throw new Error('Zip is not loaded or has been closed');\n }\n const path = assetId + '.' + dataFormat;\n const file = findFileInZip(path);\n if (!file) {\n throw new Error('Asset is not in zip: ' + path)\n }\n return file\n .async('uint8array')\n .then((data) => storage.createAsset(assetType, dataFormat, data, assetId));\n }\n });\n return () => (${c})().then(async (data) => {\n zip = await Scaffolding.JSZip.loadAsync(data);\n const file = findFileInZip('project.json');\n if (!file) {\n throw new Error('project.json is not in zip');\n }\n return file.async('arraybuffer');\n });`:`\n storage.addWebStore(\n [\n storage.AssetType.ImageVector,\n storage.AssetType.ImageBitmap,\n storage.AssetType.Sound,\n storage.AssetType.Font\n ].filter(i => i),\n (asset) => new URL('./assets/' + asset.assetId + '.' + asset.dataFormat, location).href\n );\n return ${c};`}\n })();\n <\/script>`),e}async generateFavicon(){if(null===this.options.app.icon)return"";return`<link rel="icon" href="${await K.readAsURL(this.options.app.icon,"app icon")}">`}async generateCursor(){if("custom"!==this.options.cursor.type)return this.options.cursor.type;if(!this.options.cursor.custom)return"auto";return`url(${await K.readAsURL(this.options.cursor.custom,"custom cursor")}) ${this.options.cursor.center.x} ${this.options.cursor.center.y}, auto`}async generateExtensionURLs(){const e=e=>this.dispatchEvent(new q.a("fetch-extensions",{detail:{progress:e}})),t=e=>{if(!this.options.bakeExtensions)return!1;try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}},n=this.options.extensions,c=n.filter((e=>!t(e))),o=n.filter((e=>t(e))),s=[...c];if(0!==o.length){for(let t=0;t<o.length;t++){e(t/o.length);const n=o[t];try{const e=`(function(Scratch) { ${await K.fetchExtensionScript(n)} })(Scratch);`,t=`data:text/javascript;,${encodeURIComponent(e)}`;s.push(t)}catch(e){console.warn("Could not bake extension",n,e),s.push(n)}}e(1)}return s}async package(){if(!K)throw new Error("Missing adapter");if(this.used)throw new Error("Packager was already used");this.used=!0,this.ensureNotAborted(),await this.loadResources(),this.ensureNotAborted();const e=te`<!DOCTYPE html>
<!-- Created with ${G.WEBSITE} -->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- We only include this to explicitly loosen the CSP of various packager environments. It does not provide any security. -->
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: blob:">
<title>${A(this.options.app.windowTitle)}</title>
<style>
body {
color: ${this.options.appearance.foreground};
font-family: sans-serif;
overflow: hidden;
margin: 0;
padding: 0;
}
:root, body.is-fullscreen {
background-color: ${this.options.appearance.background};
}
[hidden] {
display: none !important;
}
h1 {
font-weight: normal;
}
a {
color: inherit;
text-decoration: underline;
cursor: pointer;
}
#app, #loading, #error, #launch {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
cursor: default;
user-select: none;
-webkit-user-select: none;
background-color: ${this.options.appearance.background};
}
#launch {
background-color: rgba(0, 0, 0, 0.7);
cursor: pointer;
}
.green-flag {
width: 80px;
height: 80px;
padding: 16px;
border-radius: 100%;
background: rgba(255, 255, 255, 0.75);
border: 3px solid hsla(0, 100%, 100%, 1);
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
#loading {
${this.options.loadingScreen.image&&"stretch"===this.options.loadingScreen.imageMode?`background-image: url(${await K.readAsURL(this.options.loadingScreen.image,"stretched loading screen")});\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;`:""}
}
.progress-bar-outer {
border: 1px solid currentColor;
height: 10px;
width: 200px;
max-width: 200px;
}
.progress-bar-inner {
height: 100%;
width: 0;
background-color: currentColor;
}
.loading-text, noscript {
font-weight: normal;
font-size: 36px;
margin: 0 0 16px;
}
.loading-image {
margin: 0 0 16px;
}
#error-message, #error-stack {
font-family: monospace;
max-width: 600px;
white-space: pre-wrap;
user-select: text;
-webkit-user-select: text;
}
#error-stack {
text-align: left;
max-height: 200px;
overflow: auto;
}
.control-button {
width: 2rem;
height: 2rem;
padding: 0.375rem;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
user-select: none;
-webkit-user-select: none;
cursor: pointer;
border: 0;
border-radius: 4px;
}
.control-button-highlight:hover {
background: ${this.options.appearance.accent}26;
}
.control-button-highlight.active {
background: ${this.options.appearance.accent}59;
}
.fullscreen-button {
background: white;
}
.standalone-fullscreen-button {
position: absolute;
top: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 0 0 0 4px;
padding: 4px;
cursor: pointer;
}
.sc-canvas {
cursor: ${await this.generateCursor()};
}
.sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color {
background-color: ${this.options.monitors.variableColor};
}
.sc-monitor-row-value-outer {
background-color: ${this.options.monitors.listColor};
}
.sc-monitor-row-value-editing .sc-monitor-row-value-outer {
background-color: ${Z(this.options.monitors.listColor)};
}
${this.options.custom.css}
</style>
<meta name="theme-color" content="${this.options.appearance.background}">
${await this.generateFavicon()}
</head>
<body>
<div id="app"></div>
<div id="launch" class="screen" hidden title="Click to start">
<div class="green-flag">
<svg viewBox="0 0 16.63 17.5" width="42" height="44">
<defs><style>.cls-1,.cls-2{fill:#4cbf56;stroke:#45993d;stroke-linecap:round;stroke-linejoin:round;}.cls-2{stroke-width:1.5px;}</style></defs>
<path class="cls-1" d="M.75,2A6.44,6.44,0,0,1,8.44,2h0a6.44,6.44,0,0,0,7.69,0V12.4a6.44,6.44,0,0,1-7.69,0h0a6.44,6.44,0,0,0-7.69,0"/>
<line class="cls-2" x1="0.75" y1="16.75" x2="0.75" y2="0.75"/>
</svg>
</div>
</div>
<div id="loading" class="screen">
<noscript>Enable JavaScript</noscript>
${this.options.loadingScreen.text?`<h1 class="loading-text">${A(this.options.loadingScreen.text)}</h1>`:""}
${this.options.loadingScreen.image&&"normal"===this.options.loadingScreen.imageMode?`<div class="loading-image"><img src="${await K.readAsURL(this.options.loadingScreen.image,"loading-screen")}"></div>`:""}
${this.options.loadingScreen.progressBar?'<div class="progress-bar-outer"><div class="progress-bar-inner" id="loading-inner"></div></div>':""}
</div>
<div id="error" class="screen" hidden>
<h1>Error</h1>
<details>
<summary id="error-message"></summary>
<p id="error-stack"></p>
</details>
</div>
${"html"===this.options.target?`<script>${this.script}<\/script>`:'<script src="script.js"><\/script>'}
<script>${t=`\n const appElement = document.getElementById('app');\n const launchScreen = document.getElementById('launch');\n const loadingScreen = document.getElementById('loading');\n const loadingInner = document.getElementById('loading-inner');\n const errorScreen = document.getElementById('error');\n const errorScreenMessage = document.getElementById('error-message');\n const errorScreenStack = document.getElementById('error-stack');\n\n const handleError = (error) => {\n console.error(error);\n if (!errorScreen.hidden) return;\n errorScreen.hidden = false;\n errorScreenMessage.textContent = '' + error;\n let debug = error && error.stack || 'no stack';\n debug += '\\nUser agent: ' + navigator.userAgent;\n errorScreenStack.textContent = debug;\n };\n const setProgress = (progress) => {\n if (loadingInner) loadingInner.style.width = progress * 100 + '%';\n };\n const interpolate = (a, b, t) => a + t * (b - a);\n\n try {\n setProgress(0.1);\n\n const scaffolding = new Scaffolding.Scaffolding();\n scaffolding.width = ${this.options.stageWidth};\n scaffolding.height = ${this.options.stageHeight};\n scaffolding.resizeMode = ${JSON.stringify(this.options.resizeMode)};\n scaffolding.editableLists = ${this.options.monitors.editableLists};\n scaffolding.usePackagedRuntime = ${this.options.packagedRuntime};\n scaffolding.setup();\n scaffolding.appendTo(appElement);\n\n const vm = scaffolding.vm;\n window.scaffolding = scaffolding;\n window.vm = scaffolding.vm;\n window.Scratch = {\n vm,\n renderer: vm.renderer,\n audioEngine: vm.runtime.audioEngine,\n bitmapAdapter: vm.runtime.v2BitmapAdapter,\n videoProvider: vm.runtime.ioDevices.video.provider\n };\n\n scaffolding.setUsername(${JSON.stringify(this.options.username)}.replace(/#/g, () => Math.floor(Math.random() * 10)));\n scaffolding.setAccentColor(${JSON.stringify(this.options.appearance.accent)});\n\n try {\n ${"ws"===this.options.cloudVariables.mode?`scaffolding.addCloudProvider(${this.makeWebSocketProvider()})`:"local"===this.options.cloudVariables.mode?`scaffolding.addCloudProvider(${this.makeLocalStorageProvider()})`:"custom"===this.options.cloudVariables.mode?this.makeCustomProvider():""};\n } catch (error) {\n console.error(error);\n }\n\n ${this.options.controls.greenFlag.enabled?'\n const greenFlagButton = document.createElement(\'img\');\n greenFlagButton.src = \'data:image/svg+xml,\' + encodeURIComponent(\'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.63 17.5"><path d="M.75 2a6.44 6.44 0 017.69 0h0a6.44 6.44 0 007.69 0v10.4a6.44 6.44 0 01-7.69 0h0a6.44 6.44 0 00-7.69 0" fill="#4cbf56" stroke="#45993d" stroke-linecap="round" stroke-linejoin="round"/><path stroke-width="1.5" fill="#4cbf56" stroke="#45993d" stroke-linecap="round" stroke-linejoin="round" d="M.75 16.75v-16"/></svg>\');\n greenFlagButton.className = \'control-button control-button-highlight green-flag-button\';\n greenFlagButton.draggable = false;\n greenFlagButton.addEventListener(\'click\', () => {\n scaffolding.greenFlag();\n });\n scaffolding.addEventListener(\'PROJECT_RUN_START\', () => {\n greenFlagButton.classList.add(\'active\');\n });\n scaffolding.addEventListener(\'PROJECT_RUN_STOP\', () => {\n greenFlagButton.classList.remove(\'active\');\n });\n scaffolding.addControlButton({\n element: greenFlagButton,\n where: \'top-left\'\n });':""}\n\n ${this.options.controls.pause.enabled?'\n const pauseButton = document.createElement(\'img\');\n pauseButton.className = \'control-button control-button-highlight pause-button\';\n pauseButton.draggable = false;\n let isPaused = false;\n pauseButton.addEventListener(\'click\', () => {\n vm.setPaused(!isPaused);\n });\n const updatePause = (_isPaused) => {\n isPaused = _isPaused;\n if (isPaused) {\n pauseButton.src = \'data:image/svg+xml,\' + encodeURIComponent(\'<svg width="16" height="16" viewBox="0 0 4.2333332 4.2333335" xmlns="http://www.w3.org/2000/svg"><path d="m3.95163484 2.02835365-1.66643921.9621191-1.66643913.96211911V.10411543l1.66643922.9621191z" fill="#ffae00"/></svg>\');\n } else {\n pauseButton.src = \'data:image/svg+xml,\' + encodeURIComponent(\'<svg width="16" height="16" viewBox="0 0 4.2333332 4.2333335" xmlns="http://www.w3.org/2000/svg"><g fill="#ffae00"><path d="M.389.19239126h1.2631972v3.8485508H.389zM2.5810001.19239126h1.2631972v3.8485508H2.5810001z"/></g></svg>\');\n }\n }\n vm.on(\'P4_PAUSE\', updatePause);\n updatePause();\n scaffolding.addControlButton({\n element: pauseButton,\n where: \'top-left\'\n });':""}\n\n ${this.options.controls.stopAll.enabled?'\n const stopAllButton = document.createElement(\'img\');\n stopAllButton.src = \'data:image/svg+xml,\' + encodeURIComponent(\'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="#ec5959" stroke="#b84848" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M4.3.5h5.4l3.8 3.8v5.4l-3.8 3.8H4.3L.5 9.7V4.3z"/></svg>\');\n stopAllButton.className = \'control-button control-button-highlight stop-all-button\';\n stopAllButton.draggable = false;\n stopAllButton.addEventListener(\'click\', () => {\n scaffolding.stopAll();\n });\n scaffolding.addControlButton({\n element: stopAllButton,\n where: \'top-left\'\n });':""}\n\n ${this.options.controls.fullscreen.enabled?`\n if (document.fullscreenEnabled || document.webkitFullscreenEnabled) {\n let isFullScreen = !!(document.fullscreenElement || document.webkitFullscreenElement);\n const fullscreenButton = document.createElement('img');\n fullscreenButton.draggable = false;\n fullscreenButton.className = 'control-button fullscreen-button';\n fullscreenButton.addEventListener('click', () => {\n if (isFullScreen) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n } else {\n if (document.body.requestFullscreen) {\n document.body.requestFullscreen();\n } else if (document.body.webkitRequestFullscreen) {\n document.body.webkitRequestFullscreen();\n }\n }\n });\n const otherControlsExist = ${this.options.controls.greenFlag.enabled||this.options.controls.stopAll.enabled};\n const fillColor = otherControlsExist ? '#575E75' : '${this.options.appearance.foreground}';\n const updateFullScreen = () => {\n isFullScreen = !!(document.fullscreenElement || document.webkitFullscreenElement);\n document.body.classList.toggle('is-fullscreen', isFullScreen);\n if (isFullScreen) {\n fullscreenButton.src = 'data:image/svg+xml,' + encodeURIComponent('<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="' + fillColor + '" fill-rule="evenodd"><path d="M12.662 3.65l.89.891 3.133-2.374a.815.815 0 011.15.165.819.819 0 010 .986L15.467 6.46l.867.871c.25.25.072.664-.269.664L12.388 8A.397.397 0 0112 7.611V3.92c0-.341.418-.514.662-.27M7.338 16.35l-.89-.89-3.133 2.374a.817.817 0 01-1.15-.166.819.819 0 010-.985l2.37-3.143-.87-.871a.387.387 0 01.27-.664L7.612 12a.397.397 0 01.388.389v3.692a.387.387 0 01-.662.27M7.338 3.65l-.89.891-3.133-2.374a.815.815 0 00-1.15.165.819.819 0 000 .986l2.37 3.142-.87.871a.387.387 0 00.27.664L7.612 8A.397.397 0 008 7.611V3.92a.387.387 0 00-.662-.27M12.662 16.35l.89-.89 3.133 2.374a.817.817 0 001.15-.166.819.819 0 000-.985l-2.368-3.143.867-.871a.387.387 0 00-.269-.664L12.388 12a.397.397 0 00-.388.389v3.692c0 .342.418.514.662.27"/></g></svg>');\n } else {\n fullscreenButton.src = 'data:image/svg+xml,' + encodeURIComponent('<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="' + fillColor + '" fill-rule="evenodd"><path d="M16.338 7.35l-.89-.891-3.133 2.374a.815.815 0 01-1.15-.165.819.819 0 010-.986l2.368-3.142-.867-.871a.387.387 0 01.269-.664L16.612 3a.397.397 0 01.388.389V7.08a.387.387 0 01-.662.27M3.662 12.65l.89.89 3.133-2.374a.817.817 0 011.15.166.819.819 0 010 .985l-2.37 3.143.87.871c.248.25.071.664-.27.664L3.388 17A.397.397 0 013 16.611V12.92c0-.342.418-.514.662-.27M3.662 7.35l.89-.891 3.133 2.374a.815.815 0 001.15-.165.819.819 0 000-.986L6.465 4.54l.87-.871a.387.387 0 00-.27-.664L3.388 3A.397.397 0 003 3.389V7.08c0 .341.418.514.662.27M16.338 12.65l-.89.89-3.133-2.374a.817.817 0 00-1.15.166.819.819 0 000 .985l2.368 3.143-.867.871a.387.387 0 00.269.664l3.677.005a.397.397 0 00.388-.389V12.92a.387.387 0 00-.662-.27"/></g></svg>');\n }\n };\n updateFullScreen();\n document.addEventListener('fullscreenchange', updateFullScreen);\n document.addEventListener('webkitfullscreenchange', updateFullScreen);\n if (otherControlsExist) {\n fullscreenButton.className = 'control-button fullscreen-button';\n scaffolding.addControlButton({\n element: fullscreenButton,\n where: 'top-right'\n });\n } else {\n fullscreenButton.className = 'standalone-fullscreen-button';\n document.body.appendChild(fullscreenButton);\n }\n }`:""}\n\n vm.setTurboMode(${this.options.turbo});\n if (vm.setInterpolation) vm.setInterpolation(${this.options.interpolation});\n if (vm.setFramerate) vm.setFramerate(${this.options.framerate});\n if (vm.renderer.setUseHighQualityRender) vm.renderer.setUseHighQualityRender(${this.options.highQualityPen});\n if (vm.setRuntimeOptions) vm.setRuntimeOptions({\n fencing: ${this.options.fencing},\n miscLimits: ${this.options.miscLimits},\n maxClones: ${this.options.maxClones},\n });\n if (vm.setCompilerOptions) vm.setCompilerOptions({\n enabled: ${this.options.compiler.enabled},\n warpTimer: ${this.options.compiler.warpTimer}\n });\n if (vm.renderer.setMaxTextureDimension) vm.renderer.setMaxTextureDimension(${this.options.maxTextureDimension});\n\n // enforcePrivacy threat model only makes sense in the editor\n if (vm.runtime.setEnforcePrivacy) vm.runtime.setEnforcePrivacy(false);\n\n if (typeof ScaffoldingAddons !== 'undefined') {\n ScaffoldingAddons.run(scaffolding, ${JSON.stringify(this.getAddonOptions())});\n }\n\n scaffolding.setExtensionSecurityManager({\n getSandboxMode: () => 'unsandboxed',\n canLoadExtensionFromProject: () => true\n });\n for (const extension of ${JSON.stringify(await this.generateExtensionURLs())}) {\n vm.extensionManager.loadExtensionURL(extension);\n }\n\n ${this.options.closeWhenStopped?"\n vm.runtime.on('PROJECT_RUN_STOP', () => {\n if (!vm.isPaused || !vm.isPaused()) {\n window.close();\n }\n });":""}\n\n ${this.options.target.startsWith("nwjs-")?"\n if (typeof nw !== 'undefined') {\n const win = nw.Window.get();\n win.on('new-win-policy', (frame, url, policy) => {\n policy.ignore();\n nw.Shell.openExternal(url);\n });\n win.on('navigation', (frame, url, policy) => {\n policy.ignore();\n nw.Shell.openExternal(url);\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && document.fullscreenElement) {\n document.exitFullscreen();\n }\n });\n }":""}\n } catch (e) {\n handleError(e);\n }\n `,t.split("\n").filter(((e,t,n)=>0===t||t===n.length-1||0!==e.trim().length||0!==n[t-1].trim().length)).join("\n")}</script>
${this.options.custom.js?`<script>\n try {\n ${this.options.custom.js}\n } catch (e) {\n handleError(e);\n }\n <\/script>`:""}
${await this.generateGetProjectData()}
<script>
const run = async () => {
const projectData = await getProjectData();
await scaffolding.loadProject(projectData);
setProgress(1);
loadingScreen.hidden = true;
if (${this.options.autoplay}) {
scaffolding.start();
} else {
launchScreen.hidden = false;
launchScreen.addEventListener('click', () => {
launchScreen.hidden = true;
scaffolding.start();
});
launchScreen.focus();
}
};
run().catch(handleError);
</script>
</body>
</html>
`;var t;if(this.ensureNotAborted(),"html"!==this.options.target){let t;if("sb3"===this.project.type&&"zip-one-asset"!==this.options.target){t=await(await ce()).loadAsync(this.project.arrayBuffer);for(const e of Object.keys(t.files))t.files[`assets/${e}`]=t.files[e],delete t.files[e]}else t=new(await ce()),t.file("project.zip",this.project.arrayBuffer);return t.file("index.html",e),t.file("script.js",this.script),this.options.target.startsWith("nwjs-")?t=await this.addNwJS(t):this.options.target.startsWith("electron-")?t=await this.addElectron(t):"webview-mac"===this.options.target&&(t=await this.addWebViewMac(t)),this.ensureNotAborted(),{data:await t.generateAsync({type:"uint8array",compression:"DEFLATE",platform:"UNIX"},(e=>{this.dispatchEvent(new q.a("zip-progress",{detail:{progress:e.percent/100}}))})),type:"application/zip",filename:this.generateFilename("zip")}}return{data:e,type:"text/html",filename:this.generateFilename("html")}}}ve.getDefaultPackageNameFromFileName=e=>(e=(e=(e=(e=e.split(".")[0]).replace(/[^\-a-z ]/gi,"")).trim()).replace(/ /g,"-")).toLowerCase()||"packaged-project",ve.getWindowTitleFromFileName=e=>{const t=e.split(".");return t.length>1&&t.pop(),(e=t.join(".").trim())||"Packaged Project"},ve.usesUnsafeOptions=e=>{const t=ve.DEFAULT_OPTIONS(),n=e=>[e.custom,e.extensions,e.cloudVariables.unsafeCloudBehaviors];return JSON.stringify(n(t))!==JSON.stringify(n(e))},ve.DEFAULT_OPTIONS=()=>({turbo:!1,interpolation:!1,framerate:30,highQualityPen:!1,maxClones:300,fencing:!0,miscLimits:!0,stageWidth:480,stageHeight:360,resizeMode:"preserve-ratio",autoplay:!1,username:"player####",closeWhenStopped:!1,projectId:"",custom:{css:"",js:""},appearance:{background:"#000000",foreground:"#ffffff",accent:G.ACCENT_COLOR},loadingScreen:{progressBar:!0,text:"",imageMode:"normal",image:null},controls:{greenFlag:{enabled:!1},stopAll:{enabled:!1},fullscreen:{enabled:!1},pause:{enabled:!1}},monitors:{editableLists:!1,variableColor:"#ff8c1a",listColor:"#fc662c"},compiler:{enabled:!0,warpTimer:!1},packagedRuntime:!0,target:"html",app:{icon:null,packageName:ve.getDefaultPackageNameFromFileName(""),windowTitle:ve.getWindowTitleFromFileName(""),windowMode:"window",version:"1.0.0",escapeBehavior:"unfullscreen-only",windowControls:"default"},chunks:{gamepad:!1,pointerlock:!1},cloudVariables:{mode:"ws",cloudHost:"wss://clouddata.turbowarp.org",custom:{},specialCloudBehaviors:!1,unsafeCloudBehaviors:!1},cursor:{type:"auto",custom:null,center:{x:0,y:0}},steamworks:{appId:"480",onError:"warning"},extensions:[],bakeExtensions:!0,maxTextureDimension:2048});var fe=ve;var ye=(e,t)=>{const n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),n.remove()},we=n(7);function $e(e){Object(c.e)(e,"svelte-1u9hge",".alternative.svelte-1u9hge{font-size:smaller}")}function xe(e){let t,n,o,s,a,i=e[4]("downloads.useWorkaround")+"";return{c(){t=Object(c.v)("p"),n=Object(c.v)("button"),o=Object(c.Y)(i),n.disabled=e[3],Object(c.g)(t,"class","alternative svelte-1u9hge")},m(i,r){Object(c.E)(i,t,r),Object(c.d)(t,n),Object(c.d)(n,o),s||(a=Object(c.G)(n,"click",e[5]),s=!0)},p(e,t){16&t&&i!==(i=e[4]("downloads.useWorkaround")+"")&&Object(c.Q)(o,i),8&t&&(n.disabled=e[3])},d(e){e&&Object(c.u)(t),s=!1,a()}}}function ke(e){let t,n,o,s,a,i=e[4]("downloads.link").replace("{size}",`${(e[2].size/1e3/1e3).toFixed(2)}MB`).replace("{filename}",e[0])+"",r=we.a&&e[0].endsWith(".html"),l=r&&xe(e);return{c(){t=Object(c.v)("div"),n=Object(c.v)("p"),o=Object(c.v)("a"),s=Object(c.Y)(i),a=Object(c.U)(),l&&l.c(),Object(c.g)(o,"href",e[1]),Object(c.g)(o,"download",e[0])},m(e,i){Object(c.E)(e,t,i),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(o,s),Object(c.d)(t,a),l&&l.m(t,null)},p(e,n){21&n&&i!==(i=e[4]("downloads.link").replace("{size}",`${(e[2].size/1e3/1e3).toFixed(2)}MB`).replace("{filename}",e[0])+"")&&Object(c.Q)(s,i),2&n&&Object(c.g)(o,"href",e[1]),1&n&&Object(c.g)(o,"download",e[0]),1&n&&(r=we.a&&e[0].endsWith(".html")),r?l?l.p(e,n):(l=xe(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},d(e){e&&Object(c.u)(t),l&&l.d()}}}function Ee(e){let t,n;return t=new i.a({props:{center:!0,$$slots:{default:[ke]},$$scope:{ctx:e}}}),{c(){Object(c.o)(t.$$.fragment)},m(e,o){Object(c.H)(t,e,o),n=!0},p(e,[n]){const c={};95&n&&(c.$$scope={dirty:n,ctx:e}),t.$set(c)},i(e){n||(Object(c.cb)(t.$$.fragment,e),n=!0)},o(e){Object(c.db)(t.$$.fragment,e),n=!1},d(e){Object(c.s)(t,e)}}}function Se(e,t,n){let o;Object(c.l)(e,s.a,(e=>n(4,o=e)));let a,{name:i}=t,{url:r}=t,{blob:l}=t;return e.$$set=e=>{"name"in e&&n(0,i=e.name),"url"in e&&n(1,r=e.url),"blob"in e&&n(2,l=e.blob)},[i,r,l,a,o,async()=>{n(3,a=!0);try{const e=new(await ce());e.file(i,l);const t=await e.generateAsync({type:"blob",compression:"DEFLATE"}),n=i.replace(/\.html$/,".zip"),c=URL.createObjectURL(t);ye(n,c),URL.revokeObjectURL(c)}catch(e){console.error(e)}n(3,a=!1)}]}class ze extends c.a{constructor(e){super(),Object(c.C)(this,e,Se,Ee,c.M,{name:0,url:1,blob:2},$e)}}var _e=ze,Ue=n(10),Ce=n(8);const Ie=[];class Re{constructor(e,t,n){this.name=e,this.version=t,this.storeName=n,this.db=null,this.dbPromise=null,Ie.push(this)}open(){if(this.db)return this.db;if(this.dbPromise)return this.dbPromise;if("undefined"==typeof indexedDB)throw new Error("indexedDB is not supported");return this.dbPromise=(()=>{if(navigator.userAgentData||!/Safari\//.test(navigator.userAgent)||/Chrom(e|ium)\//.test(navigator.userAgent)||!indexedDB.databases)return Promise.resolve();let e;return new Promise((t=>{const n=()=>indexedDB.databases().finally(t);e=setInterval(n,100),n()})).finally((()=>clearInterval(e)))})().then((()=>new Promise(((e,t)=>{const n=indexedDB.open(this.name,this.version);n.onupgradeneeded=e=>{e.target.result.createObjectStore(this.storeName,{keyPath:"id"})},n.onsuccess=t=>{const n=t.target.result;e(n)},n.onerror=e=>{t(new Error(`IDB Error ${e.target.error}`))}})))).then((e=>(this.dbPromise=null,this.db=e,e))).catch((e=>{throw this.dbPromise=null,e})),this.dbPromise}close(){this.db&&(this.db.close(),this.db=null),this.dbPromise&&(this.dbPromise.then((e=>{e.close()})),this.dbPromise=null)}async createTransaction(e){const t=await this.open(),n=t.transaction(this.storeName,e),c=n.objectStore(this.storeName);return{db:t,transaction:n,store:c}}async deleteEverything(){const{transaction:e,store:t}=await this.createTransaction("readwrite");return new Promise(((n,c)=>{Re.setTransactionErrorHandler(e,c);t.clear().onsuccess=()=>{n()}}))}}Re.setTransactionErrorHandler=(e,t)=>{e.onerror=()=>{t(new Error(`Transaction error: ${e.error}`))},e.onabort=()=>{t(new Error(`Transaction aborted: ${e.error}`))}};window.addEventListener("pagehide",(()=>{for(const e of Ie)e.close()}));var qe=Re;const Te=new qe("p4-local-settings",1,"blobs"),Ae=(e,t,n)=>{const c=new Blob([e],{type:t});return c.name=n,c},Ne=async e=>{const{transaction:t,store:n}=await Te.createTransaction("readonly");return new Promise(((c,o)=>{qe.setTransactionErrorHandler(t,o);n.get(e).onsuccess=e=>{const t=e.target.result;if(t){const e=t.data;e instanceof Blob?c((async e=>{const t=await Object(Y.a)(e);return Ae(t,e.type,e.name)})(e)):c(Ae(e,t.type,t.name))}else c(null)}}))};var Le=e=>{let t=!1;const n=Object(Ce.b)(null,(()=>{const c=n.subscribe((n=>{t&&(async(e,t)=>{const n=t?await Object(Y.a)(t):null,{transaction:c,store:o}=await Te.createTransaction("readwrite");return new Promise(((s,a)=>{qe.setTransactionErrorHandler(c,a),(t?o.put({id:e,data:n,type:t.type,name:t.name}):o.delete(e)).onsuccess=()=>{s()}}))})(e,n).catch((e=>{console.warn(e)}))}));return c}));return Ne(e).then((e=>{t=!0,e&&n.set(e)})),n},Pe=n(2);const Be=we.c?"*":location.origin,Ye=new WeakMap;window.addEventListener("message",(e=>{if("*"!==Be&&e.origin!==location.origin)return;const t=e.data;if(t&&"hello"===t.preview){const t=e.source,n=Ye.get(t);n&&t.postMessage({blob:n},Be)}}));var Me=class{constructor(){const e=`<!DOCTYPE html>\n<html>\n<head>\n <title>${A(s.a.translate("preview.loading"))}</title>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">\n <style>\n body {\n background: black;\n color: white;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n }\n .preview-message {\n background: inherit;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n .preview-progress-outer {\n width: 200px;\n height: 10px;\n border: 1px solid white;\n }\n .preview-progress-inner {\n height: 100%;\n width: 0;\n background: white;\n }\n [hidden] {\n display: none;\n }\n </style>\n</head>\n<body>\n <div class="preview-message">\n <noscript>Enable JavaScript</noscript>\n <div class="preview-progress-outer"><div class="preview-progress-inner"></div></div>\n </div>\n <div class="preview-message preview-error" hidden>\n <div class="preview-error-message"></div>\n <div>Go back to the original tab and try again</div>\n </div>\n <script>\n (function() {\n const origin = ${JSON.stringify(Be)};\n const err = (message) => {\n document.querySelector(".preview-error").hidden = false;\n document.querySelector(".preview-error-message").textContent = "Error: " + message;\n };\n if (!window.opener) {\n err("Can't communicate with main page.");\n return;\n }\n let hasRun = false;\n const progressBar = document.querySelector(".preview-progress-inner");\n const progressText = document.querySelector(".preview-progress-text");\n window.addEventListener("message", (e) => {\n if (origin !== "*" && e.origin !== location.origin) return;\n if (hasRun) return;\n if (e.data.blob) {\n hasRun = true;\n const fr = new FileReader();\n fr.onload = () => {\n document.open();\n document.write(fr.result);\n document.close(); // fixes poor performance in firefox\n };\n fr.onerror = () => {\n err("Something went wrong reading the file: " + fr.error);\n };\n fr.readAsText(e.data.blob);\n }\n if (typeof e.data.progress === "number") {\n progressBar.style.width = (e.data.progress * 100) + "%";\n }\n });\n window.opener.postMessage({\n preview: "hello"\n }, origin);\n })();\n <\/script>\n</body>\n</html>\n`;if(!(we.c&&we.b)&&"undefined"==typeof IsDesktop){const t=URL.createObjectURL(new Blob([e],{type:"text/html"}))+"#do-not-share-this-link-it-will-not-work-for-others";this.window=window.open(t)}else this.window=window.open("about:blank"),this.window&&this.window.document.write(e);if(!this.window)throw new Error("Cannot open popup")}setContent(e){Ye.set(this.window,e),this.window.postMessage({blob:e},Be)}setProgress(e,t){this.window.postMessage({progress:e,text:t},Be)}close(){this.window.close()}};const He=e=>{if(e instanceof Blob)return e;if(Array.isArray(e)){const t=[];for(const n of e)t.push(He(n));return t}if(e&&"object"==typeof e){const t={};for(const n of Object.keys(e))t[n]=He(e[n]);return t}return e};var We=He;const Qe=new qe("p4-large-assets",1,"assets"),Fe=e=>e.sha256?e.sha256:`${W}-${JSON.stringify(e.src)}`;(async()=>{const{transaction:e,store:t}=await Qe.createTransaction("readwrite");new Promise(((n,c)=>{qe.setTransactionErrorHandler(e,c);t.getAllKeys().onsuccess=async e=>{const c=e.target.result,o=Object.values(P).map(Fe),s=c.filter((e=>!o.includes(e)));for(const e of s)await new Promise((n=>{t.delete(e).onsuccess=()=>{n()}}));n()}}))})();var De,Ve=async e=>{const{transaction:t,store:n}=await Qe.createTransaction("readonly");return new Promise(((c,o)=>{qe.setTransactionErrorHandler(t,o);const s=Fe(e);n.get(s).onsuccess=e=>{const t=e.target.result;c(t?t.data:null)}}))},Ge=async(e,t)=>{const{transaction:n,store:c}=await Qe.createTransaction("readwrite");return new Promise(((o,s)=>{qe.setTransactionErrorHandler(n,s);const a=Fe(e);c.put({id:a,data:t}).onsuccess=()=>{o()}}))},Je=n.p+"assets/default-icon.290e09e569a1cab8e61ba93b0d23863f.png";De=new class{getCachedAsset(e){return Ve(e)}async cacheAsset(e,t){await Ge(e,t)}getAppIcon(e){return e?"image/png"===e.type?Object(Y.a)(e):new Promise(((t,n)=>{const c=URL.createObjectURL(e),o=new Image;o.onload=()=>{o.onload=null,o.onerror=null;const e=document.createElement("canvas"),s=e.getContext("2d");s?(e.width=o.width,e.height=o.height,s.drawImage(o,0,0),e.toBlob((e=>{URL.revokeObjectURL(c),t(Object(Y.a)(e))}))):n(new Error("Cannot get rendering context for icon conversion"))},o.onerror=()=>{o.onload=null,o.onerror=null,n(new Error("Cannot load icon"))},o.src=c})):Object(B.a)({url:Je,type:"arraybuffer"})}readAsURL(e,t){return Object(Y.c)(e).catch((e=>{throw new Error(`${t}: ${e}`)}))}fetchExtensionScript(e){return Object(B.a)({type:"text",url:e})}},K=De;var Ze=fe,Ke=n(18);const Xe=e=>{let t="";const n=new Uint8Array(e);for(let e=0;e<n.byteLength;e++)t+=String.fromCharCode(n[e]);return btoa(t)},et=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer},tt="__isBlob",nt=e=>null!==e&&"object"==typeof e,ct=async e=>{if(Array.isArray(e))return e;const t={};for(const n of Object.keys(e)){if(n===tt)throw new Error(`Can't serialize special key: ${tt}`);const c=e[n];if(c instanceof Blob){const e=await Object(Y.a)(c);t[n]={[tt]:!0,type:c.type,name:c.name||"",data:Xe(e)}}else nt(c)?t[n]=await ct(c):t[n]=c}return t},ot=e=>{if(Array.isArray(e))return e;const t={};for(const n of Object.keys(e)){const c=e[n];if(nt(c))if(c[tt]){const e=new Blob([et(c.data)],{type:c.type});e.name=c.name,t[n]=e}else t[n]=ot(c);else t[n]=c}return t};var st=n(16);function at(e){Object(c.e)(e,"svelte-bq9yyz",'.option.svelte-bq9yyz{display:block;margin:4px 0}.group.svelte-bq9yyz{margin:12px 0}p.svelte-bq9yyz{margin:8px 0}.group.svelte-bq9yyz:last-child,.option.svelte-bq9yyz:last-child,p.svelte-bq9yyz:last-child{margin-bottom:0}textarea.svelte-bq9yyz{box-sizing:border-box;width:100%;min-width:100%;height:150px}input[type="text"].svelte-bq9yyz{width:200px}input[type="text"].shorter.svelte-bq9yyz{width:150px}input[type="number"].svelte-bq9yyz{width:50px}input.svelte-bq9yyz:invalid,.version.svelte-bq9yyz:placeholder-shown{outline:2px solid red}.warning.svelte-bq9yyz{font-weight:bold;background:yellow;color:black;padding:10px;border-radius:10px}.buttons.svelte-bq9yyz{display:flex}.button.svelte-bq9yyz{margin-right:4px}.side-buttons.svelte-bq9yyz{display:flex;margin-left:auto}')}function it(e,t,n){const c=e.slice();return c[118]=t[n],c[119]=t,c[120]=n,c}function rt(e){let t,n,o=e[8]("options.customUsernameWarning")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(o),Object(c.g)(t,"class","warning svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.customUsernameWarning")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}function lt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,U,C,I,R,q,T,A,N,L,P,B,Y,M,H,W,Q,F,D,V,G,J,Z,K,X,ee,te,ne,ce,oe,se,ae,ie,re,le,be,de,Oe,pe,je,ue,ge,he,me,ve,fe,ye,we,$e,xe,ke,Ee,Se,ze,_e,Ue,Ce,Ie,Re,qe,Te,Ae,Ne,Le,Pe,Be,Ye,Me,He,We,Qe,Fe,De,Ve,Ge,Je,Ze,Ke,Xe,et=e[8]("options.runtimeOptions")+"",tt=e[8]("options.turbo")+"",nt=e[8]("options.framerate")+"",ct=e[8]("options.interpolation")+"",ot=e[8]("options.highQualityPen")+"",st=e[8]("options.infiniteClones")+"",at=e[8]("options.removeFencing")+"",it=e[8]("options.removeMiscLimits")+"",lt=e[8]("options.username")+"",bt=e[8]("options.closeWhenStopped")+"",dt=e[8]("options.stage")+"",Ot=e[8]("options.stageSize")+"",pt=e[8]("options.preserveRatio")+"",jt=e[8]("options.stretch")+"",ut=e[8]("options.dynamicResize")+"",gt=e[11]&&function(e){let t,n,o=e[8]("options.storedWarning")+"";return{c(){t=Object(c.v)("div"),n=Object(c.Y)(o),Object(c.g)(t,"class","group svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.storedWarning")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}(e);m=new _({props:{slug:"custom-fps"}}),E=new _({props:{slug:"interpolation"}}),T=new _({props:{slug:"high-quality-pen"}}),W=new _({props:{slug:"infinite-clones"}}),X=new _({props:{slug:"remove-fencing"}}),re=new _({props:{slug:"remove-misc-limits"}});let ht=e[1].username!==e[6].username&&0!==e[9].length&&rt(e);return Ce=new _({props:{slug:"custom-stage-size"}}),Ge=new _({props:{slug:"packager/dynamic-stage-resize"}}),Ze=Object(c.D)(e[39][3]),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(et),s=Object(c.U)(),gt&>.c(),a=Object(c.U)(),i=Object(c.v)("label"),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.Y)(tt),d=Object(c.U)(),O=Object(c.v)("div"),p=Object(c.v)("label"),j=Object(c.Y)(nt),u=Object(c.U)(),g=Object(c.v)("input"),h=Object(c.U)(),Object(c.o)(m.$$.fragment),v=Object(c.U)(),f=Object(c.v)("div"),y=Object(c.v)("label"),w=Object(c.v)("input"),$=Object(c.U)(),x=Object(c.Y)(ct),k=Object(c.U)(),Object(c.o)(E.$$.fragment),S=Object(c.U)(),z=Object(c.v)("div"),U=Object(c.v)("label"),C=Object(c.v)("input"),I=Object(c.U)(),R=Object(c.Y)(ot),q=Object(c.U)(),Object(c.o)(T.$$.fragment),A=Object(c.U)(),N=Object(c.v)("div"),L=Object(c.v)("label"),P=Object(c.v)("input"),Y=Object(c.U)(),M=Object(c.Y)(st),H=Object(c.U)(),Object(c.o)(W.$$.fragment),Q=Object(c.U)(),F=Object(c.v)("div"),D=Object(c.v)("label"),V=Object(c.v)("input"),J=Object(c.U)(),Z=Object(c.Y)(at),K=Object(c.U)(),Object(c.o)(X.$$.fragment),ee=Object(c.U)(),te=Object(c.v)("div"),ne=Object(c.v)("label"),ce=Object(c.v)("input"),se=Object(c.U)(),ae=Object(c.Y)(it),ie=Object(c.U)(),Object(c.o)(re.$$.fragment),le=Object(c.U)(),be=Object(c.v)("label"),de=Object(c.Y)(lt),Oe=Object(c.U)(),pe=Object(c.v)("input"),je=Object(c.U)(),ht&&ht.c(),ue=Object(c.U)(),ge=Object(c.v)("label"),he=Object(c.v)("input"),me=Object(c.U)(),ve=Object(c.Y)(bt),fe=Object(c.U)(),ye=Object(c.v)("h3"),we=Object(c.Y)(dt),$e=Object(c.U)(),xe=Object(c.v)("label"),ke=Object(c.Y)(Ot),Ee=Object(c.U)(),Se=Object(c.v)("input"),ze=Object(c.Y)("\n ×\n "),_e=Object(c.v)("input"),Ue=Object(c.U)(),Object(c.o)(Ce.$$.fragment),Ie=Object(c.U)(),Re=Object(c.v)("div"),qe=Object(c.v)("label"),Te=Object(c.v)("input"),Ae=Object(c.U)(),Ne=Object(c.Y)(pt),Le=Object(c.U)(),Pe=Object(c.v)("label"),Be=Object(c.v)("input"),Ye=Object(c.U)(),Me=Object(c.Y)(jt),He=Object(c.U)(),We=Object(c.v)("label"),Qe=Object(c.v)("input"),Fe=Object(c.U)(),De=Object(c.Y)(ut),Ve=Object(c.U)(),Object(c.o)(Ge.$$.fragment),Object(c.g)(r,"type","checkbox"),Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(i,"class","option svelte-bq9yyz"),Object(c.g)(g,"type","number"),Object(c.g)(g,"min","0"),Object(c.g)(g,"max","240"),Object(c.g)(g,"class","svelte-bq9yyz"),Object(c.g)(O,"class","option svelte-bq9yyz"),Object(c.g)(w,"type","checkbox"),Object(c.g)(w,"class","svelte-bq9yyz"),Object(c.g)(f,"class","option svelte-bq9yyz"),Object(c.g)(C,"type","checkbox"),Object(c.g)(C,"class","svelte-bq9yyz"),Object(c.g)(z,"class","option svelte-bq9yyz"),Object(c.g)(P,"type","checkbox"),P.checked=B=e[1].maxClones===Kt,Object(c.g)(P,"class","svelte-bq9yyz"),Object(c.g)(N,"class","option svelte-bq9yyz"),Object(c.g)(V,"type","checkbox"),V.checked=G=!e[1].fencing,Object(c.g)(V,"class","svelte-bq9yyz"),Object(c.g)(F,"class","option svelte-bq9yyz"),Object(c.g)(ce,"type","checkbox"),ce.checked=oe=!e[1].miscLimits,Object(c.g)(ce,"class","svelte-bq9yyz"),Object(c.g)(te,"class","option svelte-bq9yyz"),Object(c.g)(pe,"type","text"),Object(c.g)(pe,"class","shorter svelte-bq9yyz"),Object(c.g)(be,"class","option svelte-bq9yyz"),Object(c.g)(he,"type","checkbox"),Object(c.g)(he,"class","svelte-bq9yyz"),Object(c.g)(ge,"class","option svelte-bq9yyz"),Object(c.g)(Se,"type","number"),Object(c.g)(Se,"min","1"),Object(c.g)(Se,"max","4096"),Object(c.g)(Se,"step","1"),Object(c.g)(Se,"class","svelte-bq9yyz"),Object(c.g)(_e,"type","number"),Object(c.g)(_e,"min","1"),Object(c.g)(_e,"max","4096"),Object(c.g)(_e,"step","1"),Object(c.g)(_e,"class","svelte-bq9yyz"),Object(c.g)(xe,"class","option svelte-bq9yyz"),Object(c.g)(Te,"type","radio"),Object(c.g)(Te,"name","resize-mode"),Te.__value="preserve-ratio",Te.value=Te.__value,Object(c.g)(Te,"class","svelte-bq9yyz"),Object(c.g)(qe,"class","option svelte-bq9yyz"),Object(c.g)(Be,"type","radio"),Object(c.g)(Be,"name","resize-mode"),Be.__value="stretch",Be.value=Be.__value,Object(c.g)(Be,"class","svelte-bq9yyz"),Object(c.g)(Pe,"class","option svelte-bq9yyz"),Object(c.g)(Qe,"type","radio"),Object(c.g)(Qe,"name","resize-mode"),Qe.__value="dynamic-resize",Qe.value=Qe.__value,Object(c.g)(Qe,"class","svelte-bq9yyz"),Object(c.g)(We,"class","option svelte-bq9yyz"),Object(c.g)(Re,"class","group svelte-bq9yyz"),Ze.p(Te,Be,Qe)},m(_,B){Object(c.E)(_,t,B),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),gt&>.m(t,null),Object(c.d)(t,a),Object(c.d)(t,i),Object(c.d)(i,r),r.checked=e[1].turbo,Object(c.d)(i,l),Object(c.d)(i,b),Object(c.d)(t,d),Object(c.d)(t,O),Object(c.d)(O,p),Object(c.d)(p,j),Object(c.d)(p,u),Object(c.d)(p,g),Object(c.R)(g,e[1].framerate),Object(c.d)(O,h),Object(c.H)(m,O,null),Object(c.d)(t,v),Object(c.d)(t,f),Object(c.d)(f,y),Object(c.d)(y,w),w.checked=e[1].interpolation,Object(c.d)(y,$),Object(c.d)(y,x),Object(c.d)(f,k),Object(c.H)(E,f,null),Object(c.d)(t,S),Object(c.d)(t,z),Object(c.d)(z,U),Object(c.d)(U,C),C.checked=e[1].highQualityPen,Object(c.d)(U,I),Object(c.d)(U,R),Object(c.d)(z,q),Object(c.H)(T,z,null),Object(c.d)(t,A),Object(c.d)(t,N),Object(c.d)(N,L),Object(c.d)(L,P),Object(c.d)(L,Y),Object(c.d)(L,M),Object(c.d)(N,H),Object(c.H)(W,N,null),Object(c.d)(t,Q),Object(c.d)(t,F),Object(c.d)(F,D),Object(c.d)(D,V),Object(c.d)(D,J),Object(c.d)(D,Z),Object(c.d)(F,K),Object(c.H)(X,F,null),Object(c.d)(t,ee),Object(c.d)(t,te),Object(c.d)(te,ne),Object(c.d)(ne,ce),Object(c.d)(ne,se),Object(c.d)(ne,ae),Object(c.d)(te,ie),Object(c.H)(re,te,null),Object(c.d)(t,le),Object(c.d)(t,be),Object(c.d)(be,de),Object(c.d)(be,Oe),Object(c.d)(be,pe),Object(c.R)(pe,e[1].username),Object(c.d)(t,je),ht&&ht.m(t,null),Object(c.d)(t,ue),Object(c.d)(t,ge),Object(c.d)(ge,he),he.checked=e[1].closeWhenStopped,Object(c.d)(ge,me),Object(c.d)(ge,ve),Object(c.d)(t,fe),Object(c.d)(t,ye),Object(c.d)(ye,we),Object(c.d)(t,$e),Object(c.d)(t,xe),Object(c.d)(xe,ke),Object(c.d)(xe,Ee),Object(c.d)(xe,Se),Object(c.R)(Se,e[1].stageWidth),Object(c.d)(xe,ze),Object(c.d)(xe,_e),Object(c.R)(_e,e[1].stageHeight),Object(c.d)(xe,Ue),Object(c.H)(Ce,xe,null),Object(c.d)(t,Ie),Object(c.d)(t,Re),Object(c.d)(Re,qe),Object(c.d)(qe,Te),Te.checked=Te.__value===e[1].resizeMode,Object(c.d)(qe,Ae),Object(c.d)(qe,Ne),Object(c.d)(Re,Le),Object(c.d)(Re,Pe),Object(c.d)(Pe,Be),Be.checked=Be.__value===e[1].resizeMode,Object(c.d)(Pe,Ye),Object(c.d)(Pe,Me),Object(c.d)(Re,He),Object(c.d)(Re,We),Object(c.d)(We,Qe),Qe.checked=Qe.__value===e[1].resizeMode,Object(c.d)(We,Fe),Object(c.d)(We,De),Object(c.d)(We,Ve),Object(c.H)(Ge,We,null),Je=!0,Ke||(Xe=[Object(c.G)(r,"change",e[27]),Object(c.G)(g,"input",e[28]),Object(c.G)(w,"change",e[29]),Object(c.G)(C,"change",e[30]),Object(c.G)(P,"change",e[31]),Object(c.G)(V,"change",e[32]),Object(c.G)(ce,"change",e[33]),Object(c.G)(pe,"input",e[34]),Object(c.G)(he,"change",e[35]),Object(c.G)(Se,"input",e[36]),Object(c.G)(_e,"input",e[37]),Object(c.G)(Te,"change",e[38]),Object(c.G)(Be,"change",e[40]),Object(c.G)(Qe,"change",e[41])],Ke=!0)},p(e,n){(!Je||256&n[0])&&et!==(et=e[8]("options.runtimeOptions")+"")&&Object(c.Q)(o,et),e[11]&>.p(e,n),2&n[0]&&(r.checked=e[1].turbo),(!Je||256&n[0])&&tt!==(tt=e[8]("options.turbo")+"")&&Object(c.Q)(b,tt),(!Je||256&n[0])&&nt!==(nt=e[8]("options.framerate")+"")&&Object(c.Q)(j,nt),2&n[0]&&Object(c.ab)(g.value)!==e[1].framerate&&Object(c.R)(g,e[1].framerate),2&n[0]&&(w.checked=e[1].interpolation),(!Je||256&n[0])&&ct!==(ct=e[8]("options.interpolation")+"")&&Object(c.Q)(x,ct),2&n[0]&&(C.checked=e[1].highQualityPen),(!Je||256&n[0])&&ot!==(ot=e[8]("options.highQualityPen")+"")&&Object(c.Q)(R,ot),(!Je||2&n[0]&&B!==(B=e[1].maxClones===Kt))&&(P.checked=B),(!Je||256&n[0])&&st!==(st=e[8]("options.infiniteClones")+"")&&Object(c.Q)(M,st),(!Je||2&n[0]&&G!==(G=!e[1].fencing))&&(V.checked=G),(!Je||256&n[0])&&at!==(at=e[8]("options.removeFencing")+"")&&Object(c.Q)(Z,at),(!Je||2&n[0]&&oe!==(oe=!e[1].miscLimits))&&(ce.checked=oe),(!Je||256&n[0])&&it!==(it=e[8]("options.removeMiscLimits")+"")&&Object(c.Q)(ae,it),(!Je||256&n[0])&<!==(lt=e[8]("options.username")+"")&&Object(c.Q)(de,lt),2&n[0]&&pe.value!==e[1].username&&Object(c.R)(pe,e[1].username),e[1].username!==e[6].username&&0!==e[9].length?ht?ht.p(e,n):(ht=rt(e),ht.c(),ht.m(t,ue)):ht&&(ht.d(1),ht=null),2&n[0]&&(he.checked=e[1].closeWhenStopped),(!Je||256&n[0])&&bt!==(bt=e[8]("options.closeWhenStopped")+"")&&Object(c.Q)(ve,bt),(!Je||256&n[0])&&dt!==(dt=e[8]("options.stage")+"")&&Object(c.Q)(we,dt),(!Je||256&n[0])&&Ot!==(Ot=e[8]("options.stageSize")+"")&&Object(c.Q)(ke,Ot),2&n[0]&&Object(c.ab)(Se.value)!==e[1].stageWidth&&Object(c.R)(Se,e[1].stageWidth),2&n[0]&&Object(c.ab)(_e.value)!==e[1].stageHeight&&Object(c.R)(_e,e[1].stageHeight),2&n[0]&&(Te.checked=Te.__value===e[1].resizeMode),(!Je||256&n[0])&&pt!==(pt=e[8]("options.preserveRatio")+"")&&Object(c.Q)(Ne,pt),2&n[0]&&(Be.checked=Be.__value===e[1].resizeMode),(!Je||256&n[0])&&jt!==(jt=e[8]("options.stretch")+"")&&Object(c.Q)(Me,jt),2&n[0]&&(Qe.checked=Qe.__value===e[1].resizeMode),(!Je||256&n[0])&&ut!==(ut=e[8]("options.dynamicResize")+"")&&Object(c.Q)(De,ut)},i(e){Je||(Object(c.cb)(m.$$.fragment,e),Object(c.cb)(E.$$.fragment,e),Object(c.cb)(T.$$.fragment,e),Object(c.cb)(W.$$.fragment,e),Object(c.cb)(X.$$.fragment,e),Object(c.cb)(re.$$.fragment,e),Object(c.cb)(Ce.$$.fragment,e),Object(c.cb)(Ge.$$.fragment,e),Je=!0)},o(e){Object(c.db)(m.$$.fragment,e),Object(c.db)(E.$$.fragment,e),Object(c.db)(T.$$.fragment,e),Object(c.db)(W.$$.fragment,e),Object(c.db)(X.$$.fragment,e),Object(c.db)(re.$$.fragment,e),Object(c.db)(Ce.$$.fragment,e),Object(c.db)(Ge.$$.fragment,e),Je=!1},d(e){e&&Object(c.u)(t),gt&>.d(),Object(c.s)(m),Object(c.s)(E),Object(c.s)(T),Object(c.s)(W),Object(c.s)(X),Object(c.s)(re),ht&&ht.d(),Object(c.s)(Ce),Object(c.s)(Ge),Ze.r(),Ke=!1,Object(c.L)(Xe)}}}function bt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j=e[8]("options.sizeNormal")+"",u=e[8]("options.sizeStretch")+"";return d=Object(c.D)(e[39][2]),{c(){t=Object(c.v)("label"),n=Object(c.v)("input"),o=Object(c.U)(),s=Object(c.Y)(j),a=Object(c.U)(),i=Object(c.v)("label"),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.Y)(u),Object(c.g)(n,"type","radio"),Object(c.g)(n,"name","loading-screen-mode"),n.__value="normal",n.value=n.__value,Object(c.g)(n,"class","svelte-bq9yyz"),Object(c.g)(t,"class","option svelte-bq9yyz"),Object(c.g)(r,"type","radio"),Object(c.g)(r,"name","loading-screen-mode"),r.__value="stretch",r.value=r.__value,Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(i,"class","option svelte-bq9yyz"),d.p(n,r)},m(d,j){Object(c.E)(d,t,j),Object(c.d)(t,n),n.checked=n.__value===e[1].loadingScreen.imageMode,Object(c.d)(t,o),Object(c.d)(t,s),Object(c.E)(d,a,j),Object(c.E)(d,i,j),Object(c.d)(i,r),r.checked=r.__value===e[1].loadingScreen.imageMode,Object(c.d)(i,l),Object(c.d)(i,b),O||(p=[Object(c.G)(n,"change",e[48]),Object(c.G)(r,"change",e[49])],O=!0)},p(e,t){2&t[0]&&(n.checked=n.__value===e[1].loadingScreen.imageMode),256&t[0]&&j!==(j=e[8]("options.sizeNormal")+"")&&Object(c.Q)(s,j),2&t[0]&&(r.checked=r.__value===e[1].loadingScreen.imageMode),256&t[0]&&u!==(u=e[8]("options.sizeStretch")+"")&&Object(c.Q)(b,u)},d(e){e&&Object(c.u)(t),e&&Object(c.u)(a),e&&Object(c.u)(i),d.r(),O=!1,Object(c.L)(p)}}}function dt(e){let t,n=e[8]("options.autoplayHint")+"";return{c(){t=Object(c.Y)(n)},m(e,n){Object(c.E)(e,t,n)},p(e,o){256&o[0]&&n!==(n=e[8]("options.autoplayHint")+"")&&Object(c.Q)(t,n)},d(e){e&&Object(c.u)(t)}}}function Ot(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,f,y,w,$,x,k,E,S,z,_,U,C,I,q,T,A,N,L,P,B,Y,M,H,W,Q,F,D,V,G,J,Z,K,X,ee,te,ne,ce,oe,se,ae,ie,re,le,be,de,Oe,pe,je,ue,ge,he,me,ve,fe,ye,we,$e,xe,ke,Ee,Se,ze,_e,Ue,Ce,Ie,Re,qe,Te,Ae,Ne,Le,Pe,Be,Ye,Me,He,We,Qe,Fe,De,Ve,Ge,Je,Ze,Ke,Xe,et,tt,nt,ct,ot,st,at,it,rt=e[8]("options.playerOptions")+"",lt=e[8]("options.pageTitle")+"",Ot=e[8]("options.icon")+"",pt=e[8]("options.loadingScreen")+"",jt=e[8]("options.showProgressBar")+"",ut=e[8]("options.loadingScreenText")+"",gt=e[8]("options.loadingScreenImage")+"",ht=e[8]("options.controls")+"",mt=e[8]("options.autoplay")+"",vt=e[8]("options.showFlag")+"",ft=e[8]("options.showStop")+"",yt=e[8]("options.showPause")+"",wt=e[8]("options.showFullscreen")+"",$t=e[8]("options.controlsHelp")+"",xt=e[8]("options.colors")+"",kt=e[8]("options.backgroundColor")+"",Et=e[8]("options.foregroundColor")+"",St=e[8]("options.accentColor")+"",zt=e[8]("options.monitors")+"",_t=e[8]("options.editableLists")+"",Ut=e[8]("options.variableColor")+"",Ct=e[8]("options.listColor")+"";function It(t){e[44](t)}let Rt={previewSizes:[[64,64],[32,32],[16,16]]};function qt(t){e[47](t)}void 0!==e[4]&&(Rt.file=e[4]),j=new v({props:Rt}),c.i.push((()=>Object(c.h)(j,"file",It)));let Tt={previewSizes:[["",""]]};void 0!==e[2]&&(Tt.file=e[2]),A=new v({props:Tt}),c.i.push((()=>Object(c.h)(A,"file",qt)));let At=e[2]&&bt(e),Nt=e[1].autoplay&&dt(e);function Lt(t){e[55](t)}let Pt={};function Bt(t){e[56](t)}void 0!==e[1].appearance.background&&(Pt.value=e[1].appearance.background),$e=new R({props:Pt}),c.i.push((()=>Object(c.h)($e,"value",Lt)));let Yt={};function Mt(t){e[57](t)}void 0!==e[1].appearance.foreground&&(Yt.value=e[1].appearance.foreground),_e=new R({props:Yt}),c.i.push((()=>Object(c.h)(_e,"value",Bt)));let Ht={};function Wt(t){e[59](t)}void 0!==e[1].appearance.accent&&(Ht.value=e[1].appearance.accent),Te=new R({props:Ht}),c.i.push((()=>Object(c.h)(Te,"value",Mt)));let Qt={};function Ft(t){e[60](t)}void 0!==e[1].monitors.variableColor&&(Qt.value=e[1].monitors.variableColor),Ge=new R({props:Qt}),c.i.push((()=>Object(c.h)(Ge,"value",Wt)));let Dt={};return void 0!==e[1].monitors.listColor&&(Dt.value=e[1].monitors.listColor),tt=new R({props:Dt}),c.i.push((()=>Object(c.h)(tt,"value",Ft))),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(rt),s=Object(c.U)(),a=Object(c.v)("label"),i=Object(c.Y)(lt),r=Object(c.U)(),l=Object(c.v)("input"),b=Object(c.U)(),d=Object(c.v)("div"),O=Object(c.Y)(Ot),p=Object(c.U)(),Object(c.o)(j.$$.fragment),g=Object(c.U)(),h=Object(c.v)("h3"),m=Object(c.Y)(pt),f=Object(c.U)(),y=Object(c.v)("label"),w=Object(c.v)("input"),$=Object(c.U)(),x=Object(c.Y)(jt),k=Object(c.U)(),E=Object(c.v)("label"),S=Object(c.Y)(ut),z=Object(c.U)(),_=Object(c.v)("input"),C=Object(c.U)(),I=Object(c.v)("div"),q=Object(c.Y)(gt),T=Object(c.U)(),Object(c.o)(A.$$.fragment),L=Object(c.U)(),At&&At.c(),P=Object(c.U)(),B=Object(c.v)("h3"),Y=Object(c.Y)(ht),M=Object(c.U)(),H=Object(c.v)("div"),W=Object(c.v)("label"),Q=Object(c.v)("input"),F=Object(c.U)(),D=Object(c.Y)(mt),V=Object(c.U)(),Nt&&Nt.c(),G=Object(c.U)(),J=Object(c.v)("label"),Z=Object(c.v)("input"),K=Object(c.U)(),X=Object(c.Y)(vt),ee=Object(c.U)(),te=Object(c.v)("label"),ne=Object(c.v)("input"),ce=Object(c.U)(),oe=Object(c.Y)(ft),se=Object(c.U)(),ae=Object(c.v)("label"),ie=Object(c.v)("input"),re=Object(c.U)(),le=Object(c.Y)(yt),be=Object(c.U)(),de=Object(c.v)("label"),Oe=Object(c.v)("input"),pe=Object(c.U)(),je=Object(c.Y)(wt),ue=Object(c.U)(),ge=Object(c.v)("p"),he=Object(c.Y)($t),me=Object(c.U)(),ve=Object(c.v)("h3"),fe=Object(c.Y)(xt),ye=Object(c.U)(),we=Object(c.v)("label"),Object(c.o)($e.$$.fragment),ke=Object(c.U)(),Ee=Object(c.Y)(kt),Se=Object(c.U)(),ze=Object(c.v)("label"),Object(c.o)(_e.$$.fragment),Ce=Object(c.U)(),Ie=Object(c.Y)(Et),Re=Object(c.U)(),qe=Object(c.v)("label"),Object(c.o)(Te.$$.fragment),Ne=Object(c.U)(),Le=Object(c.Y)(St),Pe=Object(c.U)(),Be=Object(c.v)("h3"),Ye=Object(c.Y)(zt),Me=Object(c.U)(),He=Object(c.v)("label"),We=Object(c.v)("input"),Qe=Object(c.U)(),Fe=Object(c.Y)(_t),De=Object(c.U)(),Ve=Object(c.v)("label"),Object(c.o)(Ge.$$.fragment),Ze=Object(c.U)(),Ke=Object(c.Y)(Ut),Xe=Object(c.U)(),et=Object(c.v)("label"),Object(c.o)(tt.$$.fragment),ct=Object(c.U)(),ot=Object(c.Y)(Ct),Object(c.g)(l,"type","text"),Object(c.g)(l,"class","svelte-bq9yyz"),Object(c.g)(a,"class","option svelte-bq9yyz"),Object(c.g)(d,"class","option svelte-bq9yyz"),Object(c.g)(w,"type","checkbox"),Object(c.g)(w,"class","svelte-bq9yyz"),Object(c.g)(y,"class","option svelte-bq9yyz"),Object(c.g)(_,"type","text"),Object(c.g)(_,"placeholder",U=e[8]("options.loadingScreenTextPlaceholder")),Object(c.g)(_,"class","svelte-bq9yyz"),Object(c.g)(E,"class","option svelte-bq9yyz"),Object(c.g)(I,"class","option svelte-bq9yyz"),Object(c.g)(Q,"type","checkbox"),Object(c.g)(Q,"class","svelte-bq9yyz"),Object(c.g)(W,"class","option svelte-bq9yyz"),Object(c.g)(H,"class","group svelte-bq9yyz"),Object(c.g)(Z,"type","checkbox"),Object(c.g)(Z,"class","svelte-bq9yyz"),Object(c.g)(J,"class","option svelte-bq9yyz"),Object(c.g)(ne,"type","checkbox"),Object(c.g)(ne,"class","svelte-bq9yyz"),Object(c.g)(te,"class","option svelte-bq9yyz"),Object(c.g)(ie,"type","checkbox"),Object(c.g)(ie,"class","svelte-bq9yyz"),Object(c.g)(ae,"class","option svelte-bq9yyz"),Object(c.g)(Oe,"type","checkbox"),Object(c.g)(Oe,"class","svelte-bq9yyz"),Object(c.g)(de,"class","option svelte-bq9yyz"),Object(c.g)(ge,"class","svelte-bq9yyz"),Object(c.g)(we,"class","option svelte-bq9yyz"),Object(c.g)(ze,"class","option svelte-bq9yyz"),Object(c.g)(qe,"class","option svelte-bq9yyz"),Object(c.g)(We,"type","checkbox"),Object(c.g)(We,"class","svelte-bq9yyz"),Object(c.g)(He,"class","option svelte-bq9yyz"),Object(c.g)(Ve,"class","option svelte-bq9yyz"),Object(c.g)(et,"class","option svelte-bq9yyz")},m(u,v){Object(c.E)(u,t,v),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.d)(a,i),Object(c.d)(a,r),Object(c.d)(a,l),Object(c.R)(l,e[1].app.windowTitle),Object(c.d)(t,b),Object(c.d)(t,d),Object(c.d)(d,O),Object(c.d)(d,p),Object(c.H)(j,d,null),Object(c.d)(t,g),Object(c.d)(t,h),Object(c.d)(h,m),Object(c.d)(t,f),Object(c.d)(t,y),Object(c.d)(y,w),w.checked=e[1].loadingScreen.progressBar,Object(c.d)(y,$),Object(c.d)(y,x),Object(c.d)(t,k),Object(c.d)(t,E),Object(c.d)(E,S),Object(c.d)(E,z),Object(c.d)(E,_),Object(c.R)(_,e[1].loadingScreen.text),Object(c.d)(t,C),Object(c.d)(t,I),Object(c.d)(I,q),Object(c.d)(I,T),Object(c.H)(A,I,null),Object(c.d)(t,L),At&&At.m(t,null),Object(c.d)(t,P),Object(c.d)(t,B),Object(c.d)(B,Y),Object(c.d)(t,M),Object(c.d)(t,H),Object(c.d)(H,W),Object(c.d)(W,Q),Q.checked=e[1].autoplay,Object(c.d)(W,F),Object(c.d)(W,D),Object(c.d)(H,V),Nt&&Nt.m(H,null),Object(c.d)(t,G),Object(c.d)(t,J),Object(c.d)(J,Z),Z.checked=e[1].controls.greenFlag.enabled,Object(c.d)(J,K),Object(c.d)(J,X),Object(c.d)(t,ee),Object(c.d)(t,te),Object(c.d)(te,ne),ne.checked=e[1].controls.stopAll.enabled,Object(c.d)(te,ce),Object(c.d)(te,oe),Object(c.d)(t,se),Object(c.d)(t,ae),Object(c.d)(ae,ie),ie.checked=e[1].controls.pause.enabled,Object(c.d)(ae,re),Object(c.d)(ae,le),Object(c.d)(t,be),Object(c.d)(t,de),Object(c.d)(de,Oe),Oe.checked=e[1].controls.fullscreen.enabled,Object(c.d)(de,pe),Object(c.d)(de,je),Object(c.d)(t,ue),Object(c.d)(t,ge),Object(c.d)(ge,he),Object(c.d)(t,me),Object(c.d)(t,ve),Object(c.d)(ve,fe),Object(c.d)(t,ye),Object(c.d)(t,we),Object(c.H)($e,we,null),Object(c.d)(we,ke),Object(c.d)(we,Ee),Object(c.d)(t,Se),Object(c.d)(t,ze),Object(c.H)(_e,ze,null),Object(c.d)(ze,Ce),Object(c.d)(ze,Ie),Object(c.d)(t,Re),Object(c.d)(t,qe),Object(c.H)(Te,qe,null),Object(c.d)(qe,Ne),Object(c.d)(qe,Le),Object(c.d)(t,Pe),Object(c.d)(t,Be),Object(c.d)(Be,Ye),Object(c.d)(t,Me),Object(c.d)(t,He),Object(c.d)(He,We),We.checked=e[1].monitors.editableLists,Object(c.d)(He,Qe),Object(c.d)(He,Fe),Object(c.d)(t,De),Object(c.d)(t,Ve),Object(c.H)(Ge,Ve,null),Object(c.d)(Ve,Ze),Object(c.d)(Ve,Ke),Object(c.d)(t,Xe),Object(c.d)(t,et),Object(c.H)(tt,et,null),Object(c.d)(et,ct),Object(c.d)(et,ot),st=!0,at||(it=[Object(c.G)(l,"input",e[43]),Object(c.G)(w,"change",e[45]),Object(c.G)(_,"input",e[46]),Object(c.G)(Q,"change",e[50]),Object(c.G)(Z,"change",e[51]),Object(c.G)(ne,"change",e[52]),Object(c.G)(ie,"change",e[53]),Object(c.G)(Oe,"change",e[54]),Object(c.G)(We,"change",e[58])],at=!0)},p(e,n){(!st||256&n[0])&&rt!==(rt=e[8]("options.playerOptions")+"")&&Object(c.Q)(o,rt),(!st||256&n[0])&<!==(lt=e[8]("options.pageTitle")+"")&&Object(c.Q)(i,lt),2&n[0]&&l.value!==e[1].app.windowTitle&&Object(c.R)(l,e[1].app.windowTitle),(!st||256&n[0])&&Ot!==(Ot=e[8]("options.icon")+"")&&Object(c.Q)(O,Ot);const s={};!u&&16&n[0]&&(u=!0,s.file=e[4],Object(c.b)((()=>u=!1))),j.$set(s),(!st||256&n[0])&&pt!==(pt=e[8]("options.loadingScreen")+"")&&Object(c.Q)(m,pt),2&n[0]&&(w.checked=e[1].loadingScreen.progressBar),(!st||256&n[0])&&jt!==(jt=e[8]("options.showProgressBar")+"")&&Object(c.Q)(x,jt),(!st||256&n[0])&&ut!==(ut=e[8]("options.loadingScreenText")+"")&&Object(c.Q)(S,ut),(!st||256&n[0]&&U!==(U=e[8]("options.loadingScreenTextPlaceholder")))&&Object(c.g)(_,"placeholder",U),2&n[0]&&_.value!==e[1].loadingScreen.text&&Object(c.R)(_,e[1].loadingScreen.text),(!st||256&n[0])&>!==(gt=e[8]("options.loadingScreenImage")+"")&&Object(c.Q)(q,gt);const a={};!N&&4&n[0]&&(N=!0,a.file=e[2],Object(c.b)((()=>N=!1))),A.$set(a),e[2]?At?At.p(e,n):(At=bt(e),At.c(),At.m(t,P)):At&&(At.d(1),At=null),(!st||256&n[0])&&ht!==(ht=e[8]("options.controls")+"")&&Object(c.Q)(Y,ht),2&n[0]&&(Q.checked=e[1].autoplay),(!st||256&n[0])&&mt!==(mt=e[8]("options.autoplay")+"")&&Object(c.Q)(D,mt),e[1].autoplay?Nt?Nt.p(e,n):(Nt=dt(e),Nt.c(),Nt.m(H,null)):Nt&&(Nt.d(1),Nt=null),2&n[0]&&(Z.checked=e[1].controls.greenFlag.enabled),(!st||256&n[0])&&vt!==(vt=e[8]("options.showFlag")+"")&&Object(c.Q)(X,vt),2&n[0]&&(ne.checked=e[1].controls.stopAll.enabled),(!st||256&n[0])&&ft!==(ft=e[8]("options.showStop")+"")&&Object(c.Q)(oe,ft),2&n[0]&&(ie.checked=e[1].controls.pause.enabled),(!st||256&n[0])&&yt!==(yt=e[8]("options.showPause")+"")&&Object(c.Q)(le,yt),2&n[0]&&(Oe.checked=e[1].controls.fullscreen.enabled),(!st||256&n[0])&&wt!==(wt=e[8]("options.showFullscreen")+"")&&Object(c.Q)(je,wt),(!st||256&n[0])&&$t!==($t=e[8]("options.controlsHelp")+"")&&Object(c.Q)(he,$t),(!st||256&n[0])&&xt!==(xt=e[8]("options.colors")+"")&&Object(c.Q)(fe,xt);const r={};!xe&&2&n[0]&&(xe=!0,r.value=e[1].appearance.background,Object(c.b)((()=>xe=!1))),$e.$set(r),(!st||256&n[0])&&kt!==(kt=e[8]("options.backgroundColor")+"")&&Object(c.Q)(Ee,kt);const b={};!Ue&&2&n[0]&&(Ue=!0,b.value=e[1].appearance.foreground,Object(c.b)((()=>Ue=!1))),_e.$set(b),(!st||256&n[0])&&Et!==(Et=e[8]("options.foregroundColor")+"")&&Object(c.Q)(Ie,Et);const d={};!Ae&&2&n[0]&&(Ae=!0,d.value=e[1].appearance.accent,Object(c.b)((()=>Ae=!1))),Te.$set(d),(!st||256&n[0])&&St!==(St=e[8]("options.accentColor")+"")&&Object(c.Q)(Le,St),(!st||256&n[0])&&zt!==(zt=e[8]("options.monitors")+"")&&Object(c.Q)(Ye,zt),2&n[0]&&(We.checked=e[1].monitors.editableLists),(!st||256&n[0])&&_t!==(_t=e[8]("options.editableLists")+"")&&Object(c.Q)(Fe,_t);const p={};!Je&&2&n[0]&&(Je=!0,p.value=e[1].monitors.variableColor,Object(c.b)((()=>Je=!1))),Ge.$set(p),(!st||256&n[0])&&Ut!==(Ut=e[8]("options.variableColor")+"")&&Object(c.Q)(Ke,Ut);const g={};!nt&&2&n[0]&&(nt=!0,g.value=e[1].monitors.listColor,Object(c.b)((()=>nt=!1))),tt.$set(g),(!st||256&n[0])&&Ct!==(Ct=e[8]("options.listColor")+"")&&Object(c.Q)(ot,Ct)},i(e){st||(Object(c.cb)(j.$$.fragment,e),Object(c.cb)(A.$$.fragment,e),Object(c.cb)($e.$$.fragment,e),Object(c.cb)(_e.$$.fragment,e),Object(c.cb)(Te.$$.fragment,e),Object(c.cb)(Ge.$$.fragment,e),Object(c.cb)(tt.$$.fragment,e),st=!0)},o(e){Object(c.db)(j.$$.fragment,e),Object(c.db)(A.$$.fragment,e),Object(c.db)($e.$$.fragment,e),Object(c.db)(_e.$$.fragment,e),Object(c.db)(Te.$$.fragment,e),Object(c.db)(Ge.$$.fragment,e),Object(c.db)(tt.$$.fragment,e),st=!1},d(e){e&&Object(c.u)(t),Object(c.s)(j),Object(c.s)(A),At&&At.d(),Nt&&Nt.d(),Object(c.s)($e),Object(c.s)(_e),Object(c.s)(Te),Object(c.s)(Ge),Object(c.s)(tt),at=!1,Object(c.L)(it)}}}function pt(e){let t,n,o,s,i,r,l,b,d,O,p,j,u,g,h,m,f,y,w,$,x,k=e[8]("options.cursorHelp")+"",E=e[8]("options.cursorCenter")+"",S=e[8]("options.automaticallyCenter")+"";function z(t){e[65](t)}let _={previewSizes:[[32,32],[16,16]]};return void 0!==e[3]&&(_.file=e[3]),n=new v({props:_}),c.i.push((()=>Object(c.h)(n,"file",z))),{c(){t=Object(c.v)("div"),Object(c.o)(n.$$.fragment),s=Object(c.U)(),i=Object(c.v)("p"),r=Object(c.Y)(k),l=Object(c.U)(),b=Object(c.v)("label"),d=Object(c.Y)(E),O=Object(c.Y)("\n \n X: "),p=Object(c.v)("input"),j=Object(c.Y)("\n Y: "),u=Object(c.v)("input"),g=Object(c.U)(),h=Object(c.v)("button"),m=Object(c.Y)(S),Object(c.g)(i,"class","svelte-bq9yyz"),Object(c.g)(p,"type","number"),Object(c.g)(p,"min","0"),Object(c.g)(p,"class","svelte-bq9yyz"),Object(c.g)(u,"type","number"),Object(c.g)(u,"min","0"),Object(c.g)(u,"class","svelte-bq9yyz"),h.disabled=f=!e[3],Object(c.g)(b,"class","option svelte-bq9yyz"),Object(c.g)(t,"class","option svelte-bq9yyz")},m(o,a){Object(c.E)(o,t,a),Object(c.H)(n,t,null),Object(c.d)(t,s),Object(c.d)(t,i),Object(c.d)(i,r),Object(c.d)(t,l),Object(c.d)(t,b),Object(c.d)(b,d),Object(c.d)(b,O),Object(c.d)(b,p),Object(c.R)(p,e[1].cursor.center.x),Object(c.d)(b,j),Object(c.d)(b,u),Object(c.R)(u,e[1].cursor.center.y),Object(c.d)(b,g),Object(c.d)(b,h),Object(c.d)(h,m),w=!0,$||(x=[Object(c.G)(p,"input",e[66]),Object(c.G)(u,"input",e[67]),Object(c.G)(h,"click",e[17])],$=!0)},p(e,t){const s={};!o&&8&t[0]&&(o=!0,s.file=e[3],Object(c.b)((()=>o=!1))),n.$set(s),(!w||256&t[0])&&k!==(k=e[8]("options.cursorHelp")+"")&&Object(c.Q)(r,k),(!w||256&t[0])&&E!==(E=e[8]("options.cursorCenter")+"")&&Object(c.Q)(d,E),2&t[0]&&Object(c.ab)(p.value)!==e[1].cursor.center.x&&Object(c.R)(p,e[1].cursor.center.x),2&t[0]&&Object(c.ab)(u.value)!==e[1].cursor.center.y&&Object(c.R)(u,e[1].cursor.center.y),(!w||256&t[0])&&S!==(S=e[8]("options.automaticallyCenter")+"")&&Object(c.Q)(m,S),(!w||8&t[0]&&f!==(f=!e[3]))&&(h.disabled=f)},i(e){w||(Object(c.cb)(n.$$.fragment,e),y||Object(c.c)((()=>{y=Object(c.p)(t,a.b,{}),y.start()})),w=!0)},o(e){Object(c.db)(n.$$.fragment,e),w=!1},d(e){e&&Object(c.u)(t),Object(c.s)(n),$=!1,Object(c.L)(x)}}}function jt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,_,U,C,I,R,q,T,A,N,L,P,B,Y,M,H,W=e[8]("options.interaction")+"",Q=e[8]("options.normalCursor")+"",F=e[8]("options.noCursor")+"",D=e[8]("options.customCursor")+"",V=e[8]("options.pointerlock")+"",G=e[8]("options.pointerlockHelp")+"",J=e[8]("options.gamepad")+"",Z=e[8]("options.gamepadHelp")+"",K="custom"===e[1].cursor.type&&pt(e);return Y=Object(c.D)(e[39][1]),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(W),s=Object(c.U)(),a=Object(c.v)("div"),i=Object(c.v)("label"),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.Y)(Q),d=Object(c.U)(),O=Object(c.v)("label"),p=Object(c.v)("input"),j=Object(c.U)(),u=Object(c.Y)(F),g=Object(c.U)(),h=Object(c.v)("label"),m=Object(c.v)("input"),v=Object(c.U)(),f=Object(c.Y)(D),y=Object(c.U)(),K&&K.c(),w=Object(c.U)(),$=Object(c.v)("div"),x=Object(c.v)("label"),k=Object(c.v)("input"),E=Object(c.U)(),S=Object(c.Y)(V),z=Object(c.U)(),_=Object(c.v)("a"),U=Object(c.Y)(G),C=Object(c.U)(),I=Object(c.v)("div"),R=Object(c.v)("label"),q=Object(c.v)("input"),T=Object(c.U)(),A=Object(c.Y)(J),N=Object(c.U)(),L=Object(c.v)("a"),P=Object(c.Y)(Z),Object(c.g)(r,"type","radio"),Object(c.g)(r,"name","cursor-type"),r.__value="auto",r.value=r.__value,Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(i,"class","option svelte-bq9yyz"),Object(c.g)(p,"type","radio"),Object(c.g)(p,"name","cursor-type"),p.__value="none",p.value=p.__value,Object(c.g)(p,"class","svelte-bq9yyz"),Object(c.g)(O,"class","option svelte-bq9yyz"),Object(c.g)(m,"type","radio"),Object(c.g)(m,"name","cursor-type"),m.__value="custom",m.value=m.__value,Object(c.g)(m,"class","svelte-bq9yyz"),Object(c.g)(h,"class","option svelte-bq9yyz"),Object(c.g)(a,"class","group svelte-bq9yyz"),Object(c.g)(k,"type","checkbox"),Object(c.g)(k,"class","svelte-bq9yyz"),Object(c.g)(x,"class","option svelte-bq9yyz"),Object(c.g)(_,"href","https://experiments.turbowarp.org/pointerlock/"),Object(c.g)(_,"target","_blank"),Object(c.g)(_,"rel","noopener noreferrer"),Object(c.g)($,"class","group svelte-bq9yyz"),Object(c.g)(q,"type","checkbox"),Object(c.g)(q,"class","svelte-bq9yyz"),Object(c.g)(R,"class","option svelte-bq9yyz"),Object(c.g)(L,"href","https://turbowarp.org/addons#gamepad"),Object(c.g)(L,"target","_blank"),Object(c.g)(L,"rel","noopener noreferrer"),Object(c.g)(I,"class","group svelte-bq9yyz"),Y.p(r,p,m)},m(Y,W){Object(c.E)(Y,t,W),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.d)(a,i),Object(c.d)(i,r),r.checked=r.__value===e[1].cursor.type,Object(c.d)(i,l),Object(c.d)(i,b),Object(c.d)(a,d),Object(c.d)(a,O),Object(c.d)(O,p),p.checked=p.__value===e[1].cursor.type,Object(c.d)(O,j),Object(c.d)(O,u),Object(c.d)(a,g),Object(c.d)(a,h),Object(c.d)(h,m),m.checked=m.__value===e[1].cursor.type,Object(c.d)(h,v),Object(c.d)(h,f),Object(c.d)(t,y),K&&K.m(t,null),Object(c.d)(t,w),Object(c.d)(t,$),Object(c.d)($,x),Object(c.d)(x,k),k.checked=e[1].chunks.pointerlock,Object(c.d)(x,E),Object(c.d)(x,S),Object(c.d)($,z),Object(c.d)($,_),Object(c.d)(_,U),Object(c.d)(t,C),Object(c.d)(t,I),Object(c.d)(I,R),Object(c.d)(R,q),q.checked=e[1].chunks.gamepad,Object(c.d)(R,T),Object(c.d)(R,A),Object(c.d)(I,N),Object(c.d)(I,L),Object(c.d)(L,P),B=!0,M||(H=[Object(c.G)(r,"change",e[62]),Object(c.G)(p,"change",e[63]),Object(c.G)(m,"change",e[64]),Object(c.G)(k,"change",e[68]),Object(c.G)(q,"change",e[69])],M=!0)},p(e,n){(!B||256&n[0])&&W!==(W=e[8]("options.interaction")+"")&&Object(c.Q)(o,W),2&n[0]&&(r.checked=r.__value===e[1].cursor.type),(!B||256&n[0])&&Q!==(Q=e[8]("options.normalCursor")+"")&&Object(c.Q)(b,Q),2&n[0]&&(p.checked=p.__value===e[1].cursor.type),(!B||256&n[0])&&F!==(F=e[8]("options.noCursor")+"")&&Object(c.Q)(u,F),2&n[0]&&(m.checked=m.__value===e[1].cursor.type),(!B||256&n[0])&&D!==(D=e[8]("options.customCursor")+"")&&Object(c.Q)(f,D),"custom"===e[1].cursor.type?K?(K.p(e,n),2&n[0]&&Object(c.cb)(K,1)):(K=pt(e),K.c(),Object(c.cb)(K,1),K.m(t,w)):K&&(Object(c.z)(),Object(c.db)(K,1,1,(()=>{K=null})),Object(c.k)()),2&n[0]&&(k.checked=e[1].chunks.pointerlock),(!B||256&n[0])&&V!==(V=e[8]("options.pointerlock")+"")&&Object(c.Q)(S,V),(!B||256&n[0])&&G!==(G=e[8]("options.pointerlockHelp")+"")&&Object(c.Q)(U,G),2&n[0]&&(q.checked=e[1].chunks.gamepad),(!B||256&n[0])&&J!==(J=e[8]("options.gamepad")+"")&&Object(c.Q)(A,J),(!B||256&n[0])&&Z!==(Z=e[8]("options.gamepadHelp")+"")&&Object(c.Q)(P,Z)},i(e){B||(Object(c.cb)(K),B=!0)},o(e){Object(c.db)(K),B=!1},d(e){e&&Object(c.u)(t),K&&K.d(),Y.r(),M=!1,Object(c.L)(H)}}}function ut(e){let t,n,o=e[8]("options.noCloudVariables")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(o),Object(c.g)(t,"class","svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.noCloudVariables")+"")&&Object(c.Q)(n,o)},i:c.I,o:c.I,d(e){e&&Object(c.u)(t)}}}function gt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,U,C,I,R,q,T,A,N,L,P,B,Y,M,H,W,Q,F,D,V,G,J,Z,K=e[8]("options.mode")+"",X=e[8]("options.cloudVariables-ws")+"",ee=e[8]("options.cloudVariables-local")+"",te=e[8]("options.cloudVariables-ignore")+"",ne=e[8]("options.cloudVariables-custom")+"",ce=e[8]("options.cloudVariables-ws-help")+"",oe=e[8]("options.cloudVariables-local-help")+"",se=e[8]("options.cloudVariables-ignore-help")+"",ae=e[8]("options.cloudVariables-custom-help")+"",ie=e[8]("options.specialCloudBehaviors")+"",re=e[8]("options.unsafeCloudBehaviors")+"",le=e[8]("options.implicitCloudHint").replace("{cloud}","☁")+"",be="custom"===e[1].cloudVariables.mode&&ht(e),de=("ws"===e[1].cloudVariables.mode||"custom"===e[1].cloudVariables.mode)&&vt(e);A=new _({props:{slug:"packager/special-cloud-behaviors"}}),W=new _({props:{slug:"packager/special-cloud-behaviors#eval"}});let Oe=e[1].cloudVariables.unsafeCloudBehaviors&&ft(e);return{c(){t=Object(c.v)("label"),n=Object(c.Y)(K),o=Object(c.U)(),s=Object(c.v)("select"),a=Object(c.v)("option"),i=Object(c.Y)(X),r=Object(c.v)("option"),l=Object(c.Y)(ee),b=Object(c.v)("option"),d=Object(c.Y)(te),O=Object(c.v)("option"),p=Object(c.Y)(ne),j=Object(c.U)(),be&&be.c(),u=Object(c.U)(),de&&de.c(),g=Object(c.U)(),h=Object(c.v)("p"),m=Object(c.Y)(ce),v=Object(c.U)(),f=Object(c.v)("p"),y=Object(c.Y)(oe),w=Object(c.U)(),$=Object(c.v)("p"),x=Object(c.Y)(se),k=Object(c.U)(),E=Object(c.v)("p"),S=Object(c.Y)(ae),z=Object(c.U)(),U=Object(c.v)("div"),C=Object(c.v)("label"),I=Object(c.v)("input"),R=Object(c.U)(),q=Object(c.Y)(ie),T=Object(c.U)(),Object(c.o)(A.$$.fragment),N=Object(c.U)(),L=Object(c.v)("div"),P=Object(c.v)("label"),B=Object(c.v)("input"),Y=Object(c.U)(),M=Object(c.Y)(re),H=Object(c.U)(),Object(c.o)(W.$$.fragment),Q=Object(c.U)(),Oe&&Oe.c(),F=Object(c.U)(),D=Object(c.v)("p"),V=Object(c.Y)(le),a.__value="ws",a.value=a.__value,r.__value="local",r.value=r.__value,b.__value="",b.value=b.__value,O.__value="custom",O.value=O.__value,void 0===e[1].cloudVariables.mode&&Object(c.c)((()=>e[71].call(s))),Object(c.g)(t,"class","option svelte-bq9yyz"),Object(c.g)(h,"class","svelte-bq9yyz"),Object(c.g)(f,"class","svelte-bq9yyz"),Object(c.g)($,"class","svelte-bq9yyz"),Object(c.g)(E,"class","svelte-bq9yyz"),Object(c.g)(I,"type","checkbox"),Object(c.g)(I,"class","svelte-bq9yyz"),Object(c.g)(U,"class","option svelte-bq9yyz"),Object(c.g)(B,"type","checkbox"),Object(c.g)(B,"class","svelte-bq9yyz"),Object(c.g)(L,"class","option svelte-bq9yyz"),Object(c.g)(D,"class","svelte-bq9yyz")},m(_,K){Object(c.E)(_,t,K),Object(c.d)(t,n),Object(c.d)(t,o),Object(c.d)(t,s),Object(c.d)(s,a),Object(c.d)(a,i),Object(c.d)(s,r),Object(c.d)(r,l),Object(c.d)(s,b),Object(c.d)(b,d),Object(c.d)(s,O),Object(c.d)(O,p),Object(c.N)(s,e[1].cloudVariables.mode,!0),Object(c.E)(_,j,K),be&&be.m(_,K),Object(c.E)(_,u,K),de&&de.m(_,K),Object(c.E)(_,g,K),Object(c.E)(_,h,K),Object(c.d)(h,m),Object(c.E)(_,v,K),Object(c.E)(_,f,K),Object(c.d)(f,y),Object(c.E)(_,w,K),Object(c.E)(_,$,K),Object(c.d)($,x),Object(c.E)(_,k,K),Object(c.E)(_,E,K),Object(c.d)(E,S),Object(c.E)(_,z,K),Object(c.E)(_,U,K),Object(c.d)(U,C),Object(c.d)(C,I),I.checked=e[1].cloudVariables.specialCloudBehaviors,Object(c.d)(C,R),Object(c.d)(C,q),Object(c.d)(U,T),Object(c.H)(A,U,null),Object(c.E)(_,N,K),Object(c.E)(_,L,K),Object(c.d)(L,P),Object(c.d)(P,B),B.checked=e[1].cloudVariables.unsafeCloudBehaviors,Object(c.d)(P,Y),Object(c.d)(P,M),Object(c.d)(L,H),Object(c.H)(W,L,null),Object(c.E)(_,Q,K),Oe&&Oe.m(_,K),Object(c.E)(_,F,K),Object(c.E)(_,D,K),Object(c.d)(D,V),G=!0,J||(Z=[Object(c.G)(s,"change",e[71]),Object(c.G)(I,"change",e[74]),Object(c.G)(B,"change",e[75])],J=!0)},p(e,t){(!G||256&t[0])&&K!==(K=e[8]("options.mode")+"")&&Object(c.Q)(n,K),(!G||256&t[0])&&X!==(X=e[8]("options.cloudVariables-ws")+"")&&Object(c.Q)(i,X),(!G||256&t[0])&&ee!==(ee=e[8]("options.cloudVariables-local")+"")&&Object(c.Q)(l,ee),(!G||256&t[0])&&te!==(te=e[8]("options.cloudVariables-ignore")+"")&&Object(c.Q)(d,te),(!G||256&t[0])&&ne!==(ne=e[8]("options.cloudVariables-custom")+"")&&Object(c.Q)(p,ne),2&t[0]&&Object(c.N)(s,e[1].cloudVariables.mode),"custom"===e[1].cloudVariables.mode?be?(be.p(e,t),2&t[0]&&Object(c.cb)(be,1)):(be=ht(e),be.c(),Object(c.cb)(be,1),be.m(u.parentNode,u)):be&&(Object(c.z)(),Object(c.db)(be,1,1,(()=>{be=null})),Object(c.k)()),"ws"===e[1].cloudVariables.mode||"custom"===e[1].cloudVariables.mode?de?(de.p(e,t),2&t[0]&&Object(c.cb)(de,1)):(de=vt(e),de.c(),Object(c.cb)(de,1),de.m(g.parentNode,g)):de&&(Object(c.z)(),Object(c.db)(de,1,1,(()=>{de=null})),Object(c.k)()),(!G||256&t[0])&&ce!==(ce=e[8]("options.cloudVariables-ws-help")+"")&&Object(c.Q)(m,ce),(!G||256&t[0])&&oe!==(oe=e[8]("options.cloudVariables-local-help")+"")&&Object(c.Q)(y,oe),(!G||256&t[0])&&se!==(se=e[8]("options.cloudVariables-ignore-help")+"")&&Object(c.Q)(x,se),(!G||256&t[0])&&ae!==(ae=e[8]("options.cloudVariables-custom-help")+"")&&Object(c.Q)(S,ae),2&t[0]&&(I.checked=e[1].cloudVariables.specialCloudBehaviors),(!G||256&t[0])&&ie!==(ie=e[8]("options.specialCloudBehaviors")+"")&&Object(c.Q)(q,ie),2&t[0]&&(B.checked=e[1].cloudVariables.unsafeCloudBehaviors),(!G||256&t[0])&&re!==(re=e[8]("options.unsafeCloudBehaviors")+"")&&Object(c.Q)(M,re),e[1].cloudVariables.unsafeCloudBehaviors?Oe?Oe.p(e,t):(Oe=ft(e),Oe.c(),Oe.m(F.parentNode,F)):Oe&&(Oe.d(1),Oe=null),(!G||256&t[0])&&le!==(le=e[8]("options.implicitCloudHint").replace("{cloud}","☁")+"")&&Object(c.Q)(V,le)},i(e){G||(Object(c.cb)(be),Object(c.cb)(de),Object(c.cb)(A.$$.fragment,e),Object(c.cb)(W.$$.fragment,e),G=!0)},o(e){Object(c.db)(be),Object(c.db)(de),Object(c.db)(A.$$.fragment,e),Object(c.db)(W.$$.fragment,e),G=!1},d(e){e&&Object(c.u)(t),e&&Object(c.u)(j),be&&be.d(e),e&&Object(c.u)(u),de&&de.d(e),e&&Object(c.u)(g),e&&Object(c.u)(h),e&&Object(c.u)(v),e&&Object(c.u)(f),e&&Object(c.u)(w),e&&Object(c.u)($),e&&Object(c.u)(k),e&&Object(c.u)(E),e&&Object(c.u)(z),e&&Object(c.u)(U),Object(c.s)(A),e&&Object(c.u)(N),e&&Object(c.u)(L),Object(c.s)(W),e&&Object(c.u)(Q),Oe&&Oe.d(e),e&&Object(c.u)(F),e&&Object(c.u)(D),J=!1,Object(c.L)(Z)}}}function ht(e){let t,n,o,s=e[9],i=[];for(let t=0;t<s.length;t+=1)i[t]=mt(it(e,s,t));return{c(){t=Object(c.v)("div");for(let e=0;e<i.length;e+=1)i[e].c()},m(e,n){Object(c.E)(e,t,n);for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,null);o=!0},p(e,n){if(770&n[0]){let c;for(s=e[9],c=0;c<s.length;c+=1){const o=it(e,s,c);i[c]?i[c].p(o,n):(i[c]=mt(o),i[c].c(),i[c].m(t,null))}for(;c<i.length;c+=1)i[c].d(1);i.length=s.length}},i(e){o||(e&&Object(c.c)((()=>{o&&(n||(n=Object(c.n)(t,a.a,{},!0)),n.run(1))})),o=!0)},o(e){e&&(n||(n=Object(c.n)(t,a.a,{},!1)),n.run(0)),o=!1},d(e){e&&Object(c.u)(t),Object(c.t)(i,e),e&&n&&n.end()}}}function mt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u=e[8]("options.cloudVariables-ws")+"",g=e[8]("options.cloudVariables-local")+"",h=e[8]("options.cloudVariables-ignore")+"",m=e[118]+"";function v(){e[72].call(n,e[118])}return{c(){t=Object(c.v)("label"),n=Object(c.v)("select"),o=Object(c.v)("option"),s=Object(c.Y)(u),a=Object(c.v)("option"),i=Object(c.Y)(g),r=Object(c.v)("option"),l=Object(c.Y)(h),b=Object(c.U)(),d=Object(c.Y)(m),O=Object(c.U)(),o.__value="ws",o.value=o.__value,a.__value="local",a.value=a.__value,r.__value="",r.value=r.__value,void 0===e[1].cloudVariables.custom[e[118]]&&Object(c.c)(v),Object(c.g)(t,"class","option svelte-bq9yyz")},m(u,g){Object(c.E)(u,t,g),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(o,s),Object(c.d)(n,a),Object(c.d)(a,i),Object(c.d)(n,r),Object(c.d)(r,l),Object(c.N)(n,e[1].cloudVariables.custom[e[118]],!0),Object(c.d)(t,b),Object(c.d)(t,d),Object(c.d)(t,O),p||(j=Object(c.G)(n,"change",v),p=!0)},p(t,o){e=t,256&o[0]&&u!==(u=e[8]("options.cloudVariables-ws")+"")&&Object(c.Q)(s,u),256&o[0]&&g!==(g=e[8]("options.cloudVariables-local")+"")&&Object(c.Q)(i,g),256&o[0]&&h!==(h=e[8]("options.cloudVariables-ignore")+"")&&Object(c.Q)(l,h),514&o[0]&&Object(c.N)(n,e[1].cloudVariables.custom[e[118]])},d(e){e&&Object(c.u)(t),p=!1,j()}}}function vt(e){let t,n,o,s,i,r,l,b,d,O=e[8]("options.cloudVariablesHost")+"";return{c(){t=Object(c.v)("div"),n=Object(c.v)("label"),o=Object(c.Y)(O),s=Object(c.U)(),i=Object(c.v)("input"),Object(c.g)(i,"type","text"),Object(c.g)(i,"pattern","wss?:.*"),Object(c.g)(i,"class","svelte-bq9yyz"),Object(c.g)(n,"class","option svelte-bq9yyz")},m(a,r){Object(c.E)(a,t,r),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(n,s),Object(c.d)(n,i),Object(c.R)(i,e[1].cloudVariables.cloudHost),l=!0,b||(d=Object(c.G)(i,"input",e[73]),b=!0)},p(e,t){(!l||256&t[0])&&O!==(O=e[8]("options.cloudVariablesHost")+"")&&Object(c.Q)(o,O),2&t[0]&&i.value!==e[1].cloudVariables.cloudHost&&Object(c.R)(i,e[1].cloudVariables.cloudHost)},i(e){l||(e&&Object(c.c)((()=>{l&&(r||(r=Object(c.n)(t,a.a,{},!0)),r.run(1))})),l=!0)},o(e){e&&(r||(r=Object(c.n)(t,a.a,{},!1)),r.run(0)),l=!1},d(e){e&&Object(c.u)(t),e&&r&&r.end(),b=!1,d()}}}function ft(e){let t,n,o=e[8]("options.unsafeCloudBehaviorsWarning")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(o),Object(c.g)(t,"class","warning svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.unsafeCloudBehaviorsWarning")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}function yt(e){let t,n,o,s,a,i,r,l=e[8]("options.cloudVariables")+"";const b=[gt,ut],d=[];return a=function(e){return e[9].length>0?0:1}(e),i=d[a]=b[a](e),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(l),s=Object(c.U)(),i.c()},m(e,i){Object(c.E)(e,t,i),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),d[a].m(t,null),r=!0},p(e,t){(!r||256&t[0])&&l!==(l=e[8]("options.cloudVariables")+"")&&Object(c.Q)(o,l),i.p(e,t)},i(e){r||(Object(c.cb)(i),r=!0)},o(e){Object(c.db)(i),r=!1},d(e){e&&Object(c.u)(t),d[a].d()}}}function wt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,k,E,S,z,U,C,I,R,q,T,A,N,L,P,B,Y,M,H,W,Q,F,D,V,G,J,Z,K,X,ee,te,ne,ce,oe,se,ae,ie,re,le,be,de,Oe,pe,je,ue,ge,he,me,ve,fe,ye=e[8]("options.advancedOptions")+"",we=e[8]("options.advancedSummary")+"",$e=e[8]("options.enableCompiler")+"",xe=e[8]("options.warpTimer")+"",ke=e[8]("options.customExtensions")+"",Ee=e[8]("options.customExtensionsSecurity")+"",Se=e[8]("options.bakeExtensions")+"",ze=e[8]("options.customCSS")+"",_e=e[8]("options.customJS")+"",Ue=e[8]("options.projectId")+"",Ce=e[8]("options.projectIdHelp")+"",Ie=e[8]("options.packagedRuntime")+"",Re=e[8]("options.maxTextureDimension")+"";function qe(t){e[79](t)}g=new _({props:{slug:"disable-compiler"}}),k=new _({props:{slug:"warp-timer"}}),C=new _({props:{slug:"development/custom-extensions"}});let Te={};return void 0!==e[1].extensions&&(Te.extensions=e[1].extensions),R=new x({props:Te}),c.i.push((()=>Object(c.h)(R,"extensions",qe))),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(ye),s=Object(c.U)(),a=Object(c.v)("details"),i=Object(c.v)("summary"),r=Object(c.Y)(we),l=Object(c.U)(),b=Object(c.v)("div"),d=Object(c.v)("label"),O=Object(c.v)("input"),p=Object(c.U)(),j=Object(c.Y)($e),u=Object(c.U)(),Object(c.o)(g.$$.fragment),h=Object(c.U)(),m=Object(c.v)("div"),v=Object(c.v)("label"),f=Object(c.v)("input"),y=Object(c.U)(),w=Object(c.Y)(xe),$=Object(c.U)(),Object(c.o)(k.$$.fragment),E=Object(c.U)(),S=Object(c.v)("label"),z=Object(c.Y)(ke),U=Object(c.U)(),Object(c.o)(C.$$.fragment),I=Object(c.U)(),Object(c.o)(R.$$.fragment),T=Object(c.U)(),A=Object(c.v)("p"),N=Object(c.Y)(Ee),L=Object(c.U)(),P=Object(c.v)("label"),B=Object(c.v)("input"),Y=Object(c.U)(),M=Object(c.Y)(Se),H=Object(c.U)(),W=Object(c.v)("label"),Q=Object(c.Y)(ze),F=Object(c.U)(),D=Object(c.v)("textarea"),V=Object(c.U)(),G=Object(c.v)("label"),J=Object(c.Y)(_e),Z=Object(c.U)(),K=Object(c.v)("textarea"),X=Object(c.U)(),ee=Object(c.v)("label"),te=Object(c.Y)(Ue),ne=Object(c.U)(),ce=Object(c.v)("input"),oe=Object(c.U)(),se=Object(c.v)("p"),ae=Object(c.Y)(Ce),ie=Object(c.U)(),re=Object(c.v)("label"),le=Object(c.v)("input"),be=Object(c.U)(),de=Object(c.Y)(Ie),Oe=Object(c.U)(),pe=Object(c.v)("label"),je=Object(c.v)("input"),ge=Object(c.U)(),he=Object(c.Y)(Re),Object(c.g)(O,"type","checkbox"),Object(c.g)(O,"class","svelte-bq9yyz"),Object(c.g)(b,"class","option svelte-bq9yyz"),Object(c.g)(f,"type","checkbox"),Object(c.g)(f,"class","svelte-bq9yyz"),Object(c.g)(m,"class","option svelte-bq9yyz"),Object(c.g)(A,"class","warning svelte-bq9yyz"),Object(c.g)(S,"class","option svelte-bq9yyz"),Object(c.g)(B,"type","checkbox"),Object(c.g)(B,"class","svelte-bq9yyz"),Object(c.g)(P,"class","option svelte-bq9yyz"),Object(c.g)(D,"class","svelte-bq9yyz"),Object(c.g)(W,"class","option svelte-bq9yyz"),Object(c.g)(K,"class","svelte-bq9yyz"),Object(c.g)(G,"class","option svelte-bq9yyz"),Object(c.g)(ce,"type","text"),Object(c.g)(ce,"class","svelte-bq9yyz"),Object(c.g)(ee,"class","option svelte-bq9yyz"),Object(c.g)(se,"class","svelte-bq9yyz"),Object(c.g)(le,"type","checkbox"),Object(c.g)(le,"class","svelte-bq9yyz"),Object(c.g)(re,"class","option svelte-bq9yyz"),Object(c.g)(je,"type","checkbox"),je.checked=ue=e[1].maxTextureDimension!==e[6].maxTextureDimension,Object(c.g)(je,"class","svelte-bq9yyz"),Object(c.g)(pe,"class","option svelte-bq9yyz"),a.open=e[16]},m(x,_){Object(c.E)(x,t,_),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.d)(a,i),Object(c.d)(i,r),Object(c.d)(a,l),Object(c.d)(a,b),Object(c.d)(b,d),Object(c.d)(d,O),O.checked=e[1].compiler.enabled,Object(c.d)(d,p),Object(c.d)(d,j),Object(c.d)(b,u),Object(c.H)(g,b,null),Object(c.d)(a,h),Object(c.d)(a,m),Object(c.d)(m,v),Object(c.d)(v,f),f.checked=e[1].compiler.warpTimer,Object(c.d)(v,y),Object(c.d)(v,w),Object(c.d)(m,$),Object(c.H)(k,m,null),Object(c.d)(a,E),Object(c.d)(a,S),Object(c.d)(S,z),Object(c.d)(S,U),Object(c.H)(C,S,null),Object(c.d)(S,I),Object(c.H)(R,S,null),Object(c.d)(S,T),Object(c.d)(S,A),Object(c.d)(A,N),Object(c.d)(a,L),Object(c.d)(a,P),Object(c.d)(P,B),B.checked=e[1].bakeExtensions,Object(c.d)(P,Y),Object(c.d)(P,M),Object(c.d)(a,H),Object(c.d)(a,W),Object(c.d)(W,Q),Object(c.d)(W,F),Object(c.d)(W,D),Object(c.R)(D,e[1].custom.css),Object(c.d)(a,V),Object(c.d)(a,G),Object(c.d)(G,J),Object(c.d)(G,Z),Object(c.d)(G,K),Object(c.R)(K,e[1].custom.js),Object(c.d)(a,X),Object(c.d)(a,ee),Object(c.d)(ee,te),Object(c.d)(ee,ne),Object(c.d)(ee,ce),Object(c.R)(ce,e[1].projectId),Object(c.d)(a,oe),Object(c.d)(a,se),Object(c.d)(se,ae),Object(c.d)(a,ie),Object(c.d)(a,re),Object(c.d)(re,le),le.checked=e[1].packagedRuntime,Object(c.d)(re,be),Object(c.d)(re,de),Object(c.d)(a,Oe),Object(c.d)(a,pe),Object(c.d)(pe,je),Object(c.d)(pe,ge),Object(c.d)(pe,he),me=!0,ve||(fe=[Object(c.G)(O,"change",e[77]),Object(c.G)(f,"change",e[78]),Object(c.G)(B,"change",e[80]),Object(c.G)(D,"input",e[81]),Object(c.G)(K,"input",e[82]),Object(c.G)(ce,"input",e[83]),Object(c.G)(le,"change",e[84]),Object(c.G)(je,"change",e[85])],ve=!0)},p(e,t){(!me||256&t[0])&&ye!==(ye=e[8]("options.advancedOptions")+"")&&Object(c.Q)(o,ye),(!me||256&t[0])&&we!==(we=e[8]("options.advancedSummary")+"")&&Object(c.Q)(r,we),2&t[0]&&(O.checked=e[1].compiler.enabled),(!me||256&t[0])&&$e!==($e=e[8]("options.enableCompiler")+"")&&Object(c.Q)(j,$e),2&t[0]&&(f.checked=e[1].compiler.warpTimer),(!me||256&t[0])&&xe!==(xe=e[8]("options.warpTimer")+"")&&Object(c.Q)(w,xe),(!me||256&t[0])&&ke!==(ke=e[8]("options.customExtensions")+"")&&Object(c.Q)(z,ke);const n={};!q&&2&t[0]&&(q=!0,n.extensions=e[1].extensions,Object(c.b)((()=>q=!1))),R.$set(n),(!me||256&t[0])&&Ee!==(Ee=e[8]("options.customExtensionsSecurity")+"")&&Object(c.Q)(N,Ee),2&t[0]&&(B.checked=e[1].bakeExtensions),(!me||256&t[0])&&Se!==(Se=e[8]("options.bakeExtensions")+"")&&Object(c.Q)(M,Se),(!me||256&t[0])&&ze!==(ze=e[8]("options.customCSS")+"")&&Object(c.Q)(Q,ze),2&t[0]&&Object(c.R)(D,e[1].custom.css),(!me||256&t[0])&&_e!==(_e=e[8]("options.customJS")+"")&&Object(c.Q)(J,_e),2&t[0]&&Object(c.R)(K,e[1].custom.js),(!me||256&t[0])&&Ue!==(Ue=e[8]("options.projectId")+"")&&Object(c.Q)(te,Ue),2&t[0]&&ce.value!==e[1].projectId&&Object(c.R)(ce,e[1].projectId),(!me||256&t[0])&&Ce!==(Ce=e[8]("options.projectIdHelp")+"")&&Object(c.Q)(ae,Ce),2&t[0]&&(le.checked=e[1].packagedRuntime),(!me||256&t[0])&&Ie!==(Ie=e[8]("options.packagedRuntime")+"")&&Object(c.Q)(de,Ie),(!me||66&t[0]&&ue!==(ue=e[1].maxTextureDimension!==e[6].maxTextureDimension))&&(je.checked=ue),(!me||256&t[0])&&Re!==(Re=e[8]("options.maxTextureDimension")+"")&&Object(c.Q)(he,Re)},i(e){me||(Object(c.cb)(g.$$.fragment,e),Object(c.cb)(k.$$.fragment,e),Object(c.cb)(C.$$.fragment,e),Object(c.cb)(R.$$.fragment,e),me=!0)},o(e){Object(c.db)(g.$$.fragment,e),Object(c.db)(k.$$.fragment,e),Object(c.db)(C.$$.fragment,e),Object(c.db)(R.$$.fragment,e),me=!1},d(e){e&&Object(c.u)(t),Object(c.s)(g),Object(c.s)(k),Object(c.s)(C),Object(c.s)(R),ve=!1,Object(c.L)(fe)}}}function $t(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,_,U,C,I,R,q,T,A,N,L,P,B,Y,M,H,W,Q,F,D,V,G,J,Z,K,X,ee,te,ne,ce,oe,se,ae,ie,re,le,be,de,Oe,pe,je,ue,ge,he,me,ve,fe,ye,we,$e,xe,ke,Ee,Se,ze,_e,Ue,Ce,Ie,Re,qe,Te,Ae,Ne,Le,Pe,Be,Ye=e[8]("options.environment")+"",Me=e[8]("options.html")+"",He=e[8]("options.zip")+"",We=e[8]("options.application-win32").replace("{type}","Electron")+"",Qe=e[8]("options.application-mac").replace("{type}","WKWebView")+"",Fe=e[8]("options.application-linux64").replace("{type}","Electron")+"",De=e[8]("options.otherEnvironments")+"",Ve=e[8]("options.otherEnvironmentsHelp")+"",Ge=e[8]("options.zip-one-asset")+"",Je=e[8]("options.application-win64").replace("{type}","Electron")+"",Ze=e[8]("options.application-win-arm").replace("{type}","Electron")+"",Ke=e[8]("options.application-mac").replace("{type}","Electron")+"",Xe=e[8]("options.application-linux-arm32").replace("{type}","Electron")+"",et=e[8]("options.application-linux-arm64").replace("{type}","Electron")+"",tt=e[8]("options.application-win32").replace("{type}","NW.js")+"",nt=e[8]("options.application-win64").replace("{type}","NW.js")+"",ct=e[8]("options.application-mac").replace("{type}","NW.js")+"",ot=e[8]("options.application-linux64").replace("{type}","NW.js")+"";return Le=Object(c.D)(e[39][0]),{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),o=Object(c.Y)(Ye),s=Object(c.U)(),a=Object(c.v)("div"),i=Object(c.v)("label"),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.Y)(Me),d=Object(c.U)(),O=Object(c.v)("label"),p=Object(c.v)("input"),j=Object(c.U)(),u=Object(c.Y)(He),g=Object(c.U)(),h=Object(c.v)("div"),m=Object(c.v)("label"),v=Object(c.v)("input"),f=Object(c.U)(),y=Object(c.Y)(We),w=Object(c.U)(),$=Object(c.v)("label"),x=Object(c.v)("input"),k=Object(c.U)(),E=Object(c.Y)(Qe),S=Object(c.U)(),z=Object(c.v)("label"),_=Object(c.v)("input"),U=Object(c.U)(),C=Object(c.Y)(Fe),I=Object(c.U)(),R=Object(c.v)("details"),q=Object(c.v)("summary"),T=Object(c.Y)(De),A=Object(c.U)(),N=Object(c.v)("p"),L=Object(c.Y)(Ve),P=Object(c.U)(),B=Object(c.v)("div"),Y=Object(c.v)("label"),M=Object(c.v)("input"),H=Object(c.U)(),W=Object(c.Y)(Ge),Q=Object(c.U)(),F=Object(c.v)("div"),D=Object(c.v)("label"),V=Object(c.v)("input"),G=Object(c.U)(),J=Object(c.Y)(Je),Z=Object(c.U)(),K=Object(c.v)("label"),X=Object(c.v)("input"),ee=Object(c.U)(),te=Object(c.Y)(Ze),ne=Object(c.U)(),ce=Object(c.v)("label"),oe=Object(c.v)("input"),se=Object(c.U)(),ae=Object(c.Y)(Ke),ie=Object(c.U)(),re=Object(c.v)("label"),le=Object(c.v)("input"),be=Object(c.U)(),de=Object(c.Y)(Xe),Oe=Object(c.U)(),pe=Object(c.v)("label"),je=Object(c.v)("input"),ue=Object(c.U)(),ge=Object(c.Y)(et),he=Object(c.U)(),me=Object(c.v)("div"),ve=Object(c.v)("label"),fe=Object(c.v)("input"),ye=Object(c.U)(),we=Object(c.Y)(tt),$e=Object(c.U)(),xe=Object(c.v)("label"),ke=Object(c.v)("input"),Ee=Object(c.U)(),Se=Object(c.Y)(nt),ze=Object(c.U)(),_e=Object(c.v)("label"),Ue=Object(c.v)("input"),Ce=Object(c.U)(),Ie=Object(c.Y)(ct),Re=Object(c.U)(),qe=Object(c.v)("label"),Te=Object(c.v)("input"),Ae=Object(c.U)(),Ne=Object(c.Y)(ot),Object(c.g)(r,"type","radio"),Object(c.g)(r,"name","environment"),r.__value="html",r.value=r.__value,Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(i,"class","option svelte-bq9yyz"),Object(c.g)(p,"type","radio"),Object(c.g)(p,"name","environment"),p.__value="zip",p.value=p.__value,Object(c.g)(p,"class","svelte-bq9yyz"),Object(c.g)(O,"class","option svelte-bq9yyz"),Object(c.g)(a,"class","group svelte-bq9yyz"),Object(c.g)(v,"type","radio"),Object(c.g)(v,"name","environment"),v.__value="electron-win32",v.value=v.__value,Object(c.g)(v,"class","svelte-bq9yyz"),Object(c.g)(m,"class","option svelte-bq9yyz"),Object(c.g)(x,"type","radio"),Object(c.g)(x,"name","environment"),x.__value="webview-mac",x.value=x.__value,Object(c.g)(x,"class","svelte-bq9yyz"),Object(c.g)($,"class","option svelte-bq9yyz"),Object(c.g)(_,"type","radio"),Object(c.g)(_,"name","environment"),_.__value="electron-linux64",_.value=_.__value,Object(c.g)(_,"class","svelte-bq9yyz"),Object(c.g)(z,"class","option svelte-bq9yyz"),Object(c.g)(h,"class","group svelte-bq9yyz"),Object(c.g)(N,"class","svelte-bq9yyz"),Object(c.g)(M,"type","radio"),Object(c.g)(M,"name","environment"),M.__value="zip-one-asset",M.value=M.__value,Object(c.g)(M,"class","svelte-bq9yyz"),Object(c.g)(Y,"class","option svelte-bq9yyz"),Object(c.g)(B,"class","group svelte-bq9yyz"),Object(c.g)(V,"type","radio"),Object(c.g)(V,"name","environment"),V.__value="electron-win64",V.value=V.__value,Object(c.g)(V,"class","svelte-bq9yyz"),Object(c.g)(D,"class","option svelte-bq9yyz"),Object(c.g)(X,"type","radio"),Object(c.g)(X,"name","environment"),X.__value="electron-win-arm",X.value=X.__value,Object(c.g)(X,"class","svelte-bq9yyz"),Object(c.g)(K,"class","option svelte-bq9yyz"),Object(c.g)(oe,"type","radio"),Object(c.g)(oe,"name","environment"),oe.__value="electron-mac",oe.value=oe.__value,Object(c.g)(oe,"class","svelte-bq9yyz"),Object(c.g)(ce,"class","option svelte-bq9yyz"),Object(c.g)(le,"type","radio"),Object(c.g)(le,"name","environment"),le.__value="electron-linux-arm32",le.value=le.__value,Object(c.g)(le,"class","svelte-bq9yyz"),Object(c.g)(re,"class","option svelte-bq9yyz"),Object(c.g)(je,"type","radio"),Object(c.g)(je,"name","environment"),je.__value="electron-linux-arm64",je.value=je.__value,Object(c.g)(je,"class","svelte-bq9yyz"),Object(c.g)(pe,"class","option svelte-bq9yyz"),Object(c.g)(F,"class","group svelte-bq9yyz"),Object(c.g)(fe,"type","radio"),Object(c.g)(fe,"name","environment"),fe.__value="nwjs-win32",fe.value=fe.__value,Object(c.g)(fe,"class","svelte-bq9yyz"),Object(c.g)(ve,"class","option svelte-bq9yyz"),Object(c.g)(ke,"type","radio"),Object(c.g)(ke,"name","environment"),ke.__value="nwjs-win64",ke.value=ke.__value,Object(c.g)(ke,"class","svelte-bq9yyz"),Object(c.g)(xe,"class","option svelte-bq9yyz"),Object(c.g)(Ue,"type","radio"),Object(c.g)(Ue,"name","environment"),Ue.__value="nwjs-mac",Ue.value=Ue.__value,Object(c.g)(Ue,"class","svelte-bq9yyz"),Object(c.g)(_e,"class","option svelte-bq9yyz"),Object(c.g)(Te,"type","radio"),Object(c.g)(Te,"name","environment"),Te.__value="nwjs-linux-x64",Te.value=Te.__value,Object(c.g)(Te,"class","svelte-bq9yyz"),Object(c.g)(qe,"class","option svelte-bq9yyz"),Object(c.g)(me,"class","group svelte-bq9yyz"),R.open=e[15],Le.p(r,p,v,x,_,M,V,X,oe,le,je,fe,ke,Ue,Te)},m(Le,Ye){Object(c.E)(Le,t,Ye),Object(c.d)(t,n),Object(c.d)(n,o),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.d)(a,i),Object(c.d)(i,r),r.checked=r.__value===e[1].target,Object(c.d)(i,l),Object(c.d)(i,b),Object(c.d)(a,d),Object(c.d)(a,O),Object(c.d)(O,p),p.checked=p.__value===e[1].target,Object(c.d)(O,j),Object(c.d)(O,u),Object(c.d)(t,g),Object(c.d)(t,h),Object(c.d)(h,m),Object(c.d)(m,v),v.checked=v.__value===e[1].target,Object(c.d)(m,f),Object(c.d)(m,y),Object(c.d)(h,w),Object(c.d)(h,$),Object(c.d)($,x),x.checked=x.__value===e[1].target,Object(c.d)($,k),Object(c.d)($,E),Object(c.d)(h,S),Object(c.d)(h,z),Object(c.d)(z,_),_.checked=_.__value===e[1].target,Object(c.d)(z,U),Object(c.d)(z,C),Object(c.d)(t,I),Object(c.d)(t,R),Object(c.d)(R,q),Object(c.d)(q,T),Object(c.d)(R,A),Object(c.d)(R,N),Object(c.d)(N,L),Object(c.d)(R,P),Object(c.d)(R,B),Object(c.d)(B,Y),Object(c.d)(Y,M),M.checked=M.__value===e[1].target,Object(c.d)(Y,H),Object(c.d)(Y,W),Object(c.d)(R,Q),Object(c.d)(R,F),Object(c.d)(F,D),Object(c.d)(D,V),V.checked=V.__value===e[1].target,Object(c.d)(D,G),Object(c.d)(D,J),Object(c.d)(F,Z),Object(c.d)(F,K),Object(c.d)(K,X),X.checked=X.__value===e[1].target,Object(c.d)(K,ee),Object(c.d)(K,te),Object(c.d)(F,ne),Object(c.d)(F,ce),Object(c.d)(ce,oe),oe.checked=oe.__value===e[1].target,Object(c.d)(ce,se),Object(c.d)(ce,ae),Object(c.d)(F,ie),Object(c.d)(F,re),Object(c.d)(re,le),le.checked=le.__value===e[1].target,Object(c.d)(re,be),Object(c.d)(re,de),Object(c.d)(F,Oe),Object(c.d)(F,pe),Object(c.d)(pe,je),je.checked=je.__value===e[1].target,Object(c.d)(pe,ue),Object(c.d)(pe,ge),Object(c.d)(R,he),Object(c.d)(R,me),Object(c.d)(me,ve),Object(c.d)(ve,fe),fe.checked=fe.__value===e[1].target,Object(c.d)(ve,ye),Object(c.d)(ve,we),Object(c.d)(me,$e),Object(c.d)(me,xe),Object(c.d)(xe,ke),ke.checked=ke.__value===e[1].target,Object(c.d)(xe,Ee),Object(c.d)(xe,Se),Object(c.d)(me,ze),Object(c.d)(me,_e),Object(c.d)(_e,Ue),Ue.checked=Ue.__value===e[1].target,Object(c.d)(_e,Ce),Object(c.d)(_e,Ie),Object(c.d)(me,Re),Object(c.d)(me,qe),Object(c.d)(qe,Te),Te.checked=Te.__value===e[1].target,Object(c.d)(qe,Ae),Object(c.d)(qe,Ne),Pe||(Be=[Object(c.G)(r,"change",e[87]),Object(c.G)(p,"change",e[88]),Object(c.G)(v,"change",e[89]),Object(c.G)(x,"change",e[90]),Object(c.G)(_,"change",e[91]),Object(c.G)(M,"change",e[92]),Object(c.G)(V,"change",e[93]),Object(c.G)(X,"change",e[94]),Object(c.G)(oe,"change",e[95]),Object(c.G)(le,"change",e[96]),Object(c.G)(je,"change",e[97]),Object(c.G)(fe,"change",e[98]),Object(c.G)(ke,"change",e[99]),Object(c.G)(Ue,"change",e[100]),Object(c.G)(Te,"change",e[101])],Pe=!0)},p(e,t){256&t[0]&&Ye!==(Ye=e[8]("options.environment")+"")&&Object(c.Q)(o,Ye),2&t[0]&&(r.checked=r.__value===e[1].target),256&t[0]&&Me!==(Me=e[8]("options.html")+"")&&Object(c.Q)(b,Me),2&t[0]&&(p.checked=p.__value===e[1].target),256&t[0]&&He!==(He=e[8]("options.zip")+"")&&Object(c.Q)(u,He),2&t[0]&&(v.checked=v.__value===e[1].target),256&t[0]&&We!==(We=e[8]("options.application-win32").replace("{type}","Electron")+"")&&Object(c.Q)(y,We),2&t[0]&&(x.checked=x.__value===e[1].target),256&t[0]&&Qe!==(Qe=e[8]("options.application-mac").replace("{type}","WKWebView")+"")&&Object(c.Q)(E,Qe),2&t[0]&&(_.checked=_.__value===e[1].target),256&t[0]&&Fe!==(Fe=e[8]("options.application-linux64").replace("{type}","Electron")+"")&&Object(c.Q)(C,Fe),256&t[0]&&De!==(De=e[8]("options.otherEnvironments")+"")&&Object(c.Q)(T,De),256&t[0]&&Ve!==(Ve=e[8]("options.otherEnvironmentsHelp")+"")&&Object(c.Q)(L,Ve),2&t[0]&&(M.checked=M.__value===e[1].target),256&t[0]&&Ge!==(Ge=e[8]("options.zip-one-asset")+"")&&Object(c.Q)(W,Ge),2&t[0]&&(V.checked=V.__value===e[1].target),256&t[0]&&Je!==(Je=e[8]("options.application-win64").replace("{type}","Electron")+"")&&Object(c.Q)(J,Je),2&t[0]&&(X.checked=X.__value===e[1].target),256&t[0]&&Ze!==(Ze=e[8]("options.application-win-arm").replace("{type}","Electron")+"")&&Object(c.Q)(te,Ze),2&t[0]&&(oe.checked=oe.__value===e[1].target),256&t[0]&&Ke!==(Ke=e[8]("options.application-mac").replace("{type}","Electron")+"")&&Object(c.Q)(ae,Ke),2&t[0]&&(le.checked=le.__value===e[1].target),256&t[0]&&Xe!==(Xe=e[8]("options.application-linux-arm32").replace("{type}","Electron")+"")&&Object(c.Q)(de,Xe),2&t[0]&&(je.checked=je.__value===e[1].target),256&t[0]&&et!==(et=e[8]("options.application-linux-arm64").replace("{type}","Electron")+"")&&Object(c.Q)(ge,et),2&t[0]&&(fe.checked=fe.__value===e[1].target),256&t[0]&&tt!==(tt=e[8]("options.application-win32").replace("{type}","NW.js")+"")&&Object(c.Q)(we,tt),2&t[0]&&(ke.checked=ke.__value===e[1].target),256&t[0]&&nt!==(nt=e[8]("options.application-win64").replace("{type}","NW.js")+"")&&Object(c.Q)(Se,nt),2&t[0]&&(Ue.checked=Ue.__value===e[1].target),256&t[0]&&ct!==(ct=e[8]("options.application-mac").replace("{type}","NW.js")+"")&&Object(c.Q)(Ie,ct),2&t[0]&&(Te.checked=Te.__value===e[1].target),256&t[0]&&ot!==(ot=e[8]("options.application-linux64").replace("{type}","NW.js")+"")&&Object(c.Q)(Ne,ot)},d(e){e&&Object(c.u)(t),Le.r(),Pe=!1,Object(c.L)(Be)}}}function xt(e){let t,n,o,s;return n=new i.a({props:{accent:"#FF661A",reset:e[1].target.startsWith("zip")?null:e[108],$$slots:{default:[Pt]},$$scope:{ctx:e}}}),{c(){t=Object(c.v)("div"),Object(c.o)(n.$$.fragment)},m(e,o){Object(c.E)(e,t,o),Object(c.H)(n,t,null),s=!0},p(e,t){const c={};2&t[0]&&(c.reset=e[1].target.startsWith("zip")?null:e[108]),258&t[0]|268435456&t[3]&&(c.$$scope={dirty:t,ctx:e}),n.$set(c)},i(e){s||(Object(c.cb)(n.$$.fragment,e),e&&(o||Object(c.c)((()=>{o=Object(c.p)(t,a.a,{}),o.start()}))),s=!0)},o(e){Object(c.db)(n.$$.fragment,e),s=!1},d(e){e&&Object(c.u)(t),Object(c.s)(n)}}}function kt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,_,U,C,I,R,q=e[8]("options.applicationSettings")+"",T=e[8]("options.packageName")+"",A=e[8]("options.packageNameHelp")+"",N=e[8]("options.version")+"",L=e[8]("options.versionHelp")+"",P=e[1].target.includes("electron"),B=P&&St(e);function Y(e,t){return 2&t[0]&&(x=null),2&t[0]&&(k=null),2&t[0]&&(E=null),null==x&&(x=!!e[1].target.includes("win")),x?Ut:(null==k&&(k=!!e[1].target.includes("mac")),k?_t:(null==E&&(E=!!e[1].target.includes("linux")),E?zt:void 0))}let M=Y(e,[-1,-1,-1,-1]),H=M&&M(e);function W(e,t){return 2&t[0]&&(z=null),2&t[0]&&(_=null),2&t[0]&&(U=null),null==z&&(z=!!e[1].target.includes("electron")),z?Rt:(null==_&&(_=!!e[1].target.includes("nwjs")),_?It:(null==U&&(U=!!e[1].target.includes("webview-mac")),U?Ct:void 0))}let Q=W(e,[-1,-1,-1,-1]),F=Q&&Q(e);return{c(){t=Object(c.v)("h2"),n=Object(c.Y)(q),o=Object(c.U)(),s=Object(c.v)("label"),a=Object(c.Y)(T),i=Object(c.U)(),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.v)("p"),d=Object(c.Y)(A),O=Object(c.U)(),p=Object(c.v)("label"),j=Object(c.Y)(N),u=Object(c.U)(),g=Object(c.v)("input"),h=Object(c.U)(),m=Object(c.v)("p"),v=Object(c.Y)(L),f=Object(c.U)(),B&&B.c(),y=Object(c.U)(),w=Object(c.v)("div"),w.innerHTML="<div>Creating native applications for specific platforms is discouraged. In most cases, Plain HTML or Zip will have numerous advantages:</div> \n <ul><li>Can be run directly from a website on any platform, even phones</li> \n <li>Users are significantly less likely to be suspicious of a virus</li> \n <li>Significantly smaller file size</li> \n <li>Can still be downloaded locally and run offline</li></ul> \n <div>If you don't truly need to make a self-contained application for each platform (we understand there are some cases where this is necessary), we recommend you don't.</div>",$=Object(c.U)(),H&&H.c(),S=Object(c.U)(),F&&F.c(),C=Object(c.w)(),Object(c.g)(r,"type","text"),Object(c.g)(r,"pattern","[\\w \\-]+"),Object(c.g)(r,"minlength","1"),Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(s,"class","option svelte-bq9yyz"),Object(c.g)(b,"class","svelte-bq9yyz"),Object(c.g)(g,"type","text"),Object(c.g)(g,"class","version svelte-bq9yyz"),Object(c.g)(g,"pattern","\\d+\\.\\d+\\.\\d+"),Object(c.g)(g,"placeholder","1.0.0"),Object(c.g)(g,"minlength","1"),Object(c.g)(p,"class","option svelte-bq9yyz"),Object(c.g)(m,"class","svelte-bq9yyz"),Object(c.g)(w,"class","warning svelte-bq9yyz")},m(x,k){Object(c.E)(x,t,k),Object(c.d)(t,n),Object(c.E)(x,o,k),Object(c.E)(x,s,k),Object(c.d)(s,a),Object(c.d)(s,i),Object(c.d)(s,r),Object(c.R)(r,e[1].app.packageName),Object(c.E)(x,l,k),Object(c.E)(x,b,k),Object(c.d)(b,d),Object(c.E)(x,O,k),Object(c.E)(x,p,k),Object(c.d)(p,j),Object(c.d)(p,u),Object(c.d)(p,g),Object(c.R)(g,e[1].app.version),Object(c.E)(x,h,k),Object(c.E)(x,m,k),Object(c.d)(m,v),Object(c.E)(x,f,k),B&&B.m(x,k),Object(c.E)(x,y,k),Object(c.E)(x,w,k),Object(c.E)(x,$,k),H&&H.m(x,k),Object(c.E)(x,S,k),F&&F.m(x,k),Object(c.E)(x,C,k),I||(R=[Object(c.G)(r,"input",e[103]),Object(c.G)(g,"input",e[104])],I=!0)},p(e,t){256&t[0]&&q!==(q=e[8]("options.applicationSettings")+"")&&Object(c.Q)(n,q),256&t[0]&&T!==(T=e[8]("options.packageName")+"")&&Object(c.Q)(a,T),2&t[0]&&r.value!==e[1].app.packageName&&Object(c.R)(r,e[1].app.packageName),256&t[0]&&A!==(A=e[8]("options.packageNameHelp")+"")&&Object(c.Q)(d,A),256&t[0]&&N!==(N=e[8]("options.version")+"")&&Object(c.Q)(j,N),2&t[0]&&g.value!==e[1].app.version&&Object(c.R)(g,e[1].app.version),256&t[0]&&L!==(L=e[8]("options.versionHelp")+"")&&Object(c.Q)(v,L),2&t[0]&&(P=e[1].target.includes("electron")),P?B?B.p(e,t):(B=St(e),B.c(),B.m(y.parentNode,y)):B&&(B.d(1),B=null),M!==(M=Y(e,t))&&(H&&H.d(1),H=M&&M(e),H&&(H.c(),H.m(S.parentNode,S))),Q===(Q=W(e,t))&&F?F.p(e,t):(F&&F.d(1),F=Q&&Q(e),F&&(F.c(),F.m(C.parentNode,C)))},d(e){e&&Object(c.u)(t),e&&Object(c.u)(o),e&&Object(c.u)(s),e&&Object(c.u)(l),e&&Object(c.u)(b),e&&Object(c.u)(O),e&&Object(c.u)(p),e&&Object(c.u)(h),e&&Object(c.u)(m),e&&Object(c.u)(f),B&&B.d(e),e&&Object(c.u)(y),e&&Object(c.u)(w),e&&Object(c.u)($),H&&H.d(e),e&&Object(c.u)(S),F&&F.d(e),e&&Object(c.u)(C),I=!1,Object(c.L)(R)}}}function Et(e){let t,n,o;return{c(){t=Object(c.v)("h2"),t.textContent="Zip",n=Object(c.U)(),o=Object(c.v)("p"),o.textContent='The zip environment is intended to be used for publishing to a website. Other uses such as sending your project to a friend over a chat app or email should use "Plain HTML" instead as zip will not work.',Object(c.g)(o,"class","svelte-bq9yyz")},m(e,s){Object(c.E)(e,t,s),Object(c.E)(e,n,s),Object(c.E)(e,o,s)},p:c.I,d(e){e&&Object(c.u)(t),e&&Object(c.u)(n),e&&Object(c.u)(o)}}}function St(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x,k,E,S,z,_,U,C,I,R,q,T,A=e[8]("options.initalWindowSize")+"",N=e[8]("options.startWindow")+"",L=e[8]("options.startMaximized")+"",P=e[8]("options.startFullscreen")+"",B=e[8]("options.escapeBehavior")+"",Y=e[8]("options.unFullscreenOnly")+"",M=e[8]("options.exitOnly")+"",H=e[8]("options.unFullscreenOrExit")+"",W=e[8]("options.doNothing")+"",Q=e[8]("options.windowControls")+"",F=e[8]("options.defaultControls")+"",D=e[8]("options.noControls")+"";return{c(){t=Object(c.v)("label"),n=Object(c.Y)(A),o=Object(c.U)(),s=Object(c.v)("select"),a=Object(c.v)("option"),i=Object(c.Y)(N),r=Object(c.v)("option"),l=Object(c.Y)(L),b=Object(c.v)("option"),d=Object(c.Y)(P),O=Object(c.U)(),p=Object(c.v)("label"),j=Object(c.Y)(B),u=Object(c.U)(),g=Object(c.v)("select"),h=Object(c.v)("option"),m=Object(c.Y)(Y),v=Object(c.v)("option"),f=Object(c.Y)(M),y=Object(c.v)("option"),w=Object(c.Y)(H),$=Object(c.v)("option"),x=Object(c.Y)(W),k=Object(c.U)(),E=Object(c.v)("label"),S=Object(c.Y)(Q),z=Object(c.U)(),_=Object(c.v)("select"),U=Object(c.v)("option"),C=Object(c.Y)(F),I=Object(c.v)("option"),R=Object(c.Y)(D),a.__value="window",a.value=a.__value,r.__value="maximize",r.value=r.__value,b.__value="fullscreen",b.value=b.__value,void 0===e[1].app.windowMode&&Object(c.c)((()=>e[105].call(s))),Object(c.g)(t,"class","option svelte-bq9yyz"),h.__value="unfullscreen-only",h.value=h.__value,v.__value="exit-only",v.value=v.__value,y.__value="unfullscreen-or-exit",y.value=y.__value,$.__value="nothing",$.value=$.__value,void 0===e[1].app.escapeBehavior&&Object(c.c)((()=>e[106].call(g))),Object(c.g)(p,"class","option svelte-bq9yyz"),U.__value="default",U.value=U.__value,I.__value="frameless",I.value=I.__value,void 0===e[1].app.windowControls&&Object(c.c)((()=>e[107].call(_))),Object(c.g)(E,"class","option svelte-bq9yyz")},m(A,N){Object(c.E)(A,t,N),Object(c.d)(t,n),Object(c.d)(t,o),Object(c.d)(t,s),Object(c.d)(s,a),Object(c.d)(a,i),Object(c.d)(s,r),Object(c.d)(r,l),Object(c.d)(s,b),Object(c.d)(b,d),Object(c.N)(s,e[1].app.windowMode,!0),Object(c.E)(A,O,N),Object(c.E)(A,p,N),Object(c.d)(p,j),Object(c.d)(p,u),Object(c.d)(p,g),Object(c.d)(g,h),Object(c.d)(h,m),Object(c.d)(g,v),Object(c.d)(v,f),Object(c.d)(g,y),Object(c.d)(y,w),Object(c.d)(g,$),Object(c.d)($,x),Object(c.N)(g,e[1].app.escapeBehavior,!0),Object(c.E)(A,k,N),Object(c.E)(A,E,N),Object(c.d)(E,S),Object(c.d)(E,z),Object(c.d)(E,_),Object(c.d)(_,U),Object(c.d)(U,C),Object(c.d)(_,I),Object(c.d)(I,R),Object(c.N)(_,e[1].app.windowControls,!0),q||(T=[Object(c.G)(s,"change",e[105]),Object(c.G)(g,"change",e[106]),Object(c.G)(_,"change",e[107])],q=!0)},p(e,t){256&t[0]&&A!==(A=e[8]("options.initalWindowSize")+"")&&Object(c.Q)(n,A),256&t[0]&&N!==(N=e[8]("options.startWindow")+"")&&Object(c.Q)(i,N),256&t[0]&&L!==(L=e[8]("options.startMaximized")+"")&&Object(c.Q)(l,L),256&t[0]&&P!==(P=e[8]("options.startFullscreen")+"")&&Object(c.Q)(d,P),2&t[0]&&Object(c.N)(s,e[1].app.windowMode),256&t[0]&&B!==(B=e[8]("options.escapeBehavior")+"")&&Object(c.Q)(j,B),256&t[0]&&Y!==(Y=e[8]("options.unFullscreenOnly")+"")&&Object(c.Q)(m,Y),256&t[0]&&M!==(M=e[8]("options.exitOnly")+"")&&Object(c.Q)(f,M),256&t[0]&&H!==(H=e[8]("options.unFullscreenOrExit")+"")&&Object(c.Q)(w,H),256&t[0]&&W!==(W=e[8]("options.doNothing")+"")&&Object(c.Q)(x,W),2&t[0]&&Object(c.N)(g,e[1].app.escapeBehavior),256&t[0]&&Q!==(Q=e[8]("options.windowControls")+"")&&Object(c.Q)(S,Q),256&t[0]&&F!==(F=e[8]("options.defaultControls")+"")&&Object(c.Q)(C,F),256&t[0]&&D!==(D=e[8]("options.noControls")+"")&&Object(c.Q)(R,D),2&t[0]&&Object(c.N)(_,e[1].app.windowControls)},d(e){e&&Object(c.u)(t),e&&Object(c.u)(O),e&&Object(c.u)(p),e&&Object(c.u)(k),e&&Object(c.u)(E),q=!1,Object(c.L)(T)}}}function zt(e){let t;return{c(){t=Object(c.v)("div"),t.innerHTML='<h2>Linux</h2> \n <p class="svelte-bq9yyz">Linux support is still experimental.</p>'},m(e,n){Object(c.E)(e,t,n)},d(e){e&&Object(c.u)(t)}}}function _t(e){let t;return{c(){t=Object(c.v)("div"),t.innerHTML='<h2>macOS</h2> \n <p class="svelte-bq9yyz">Due to Apple policy, packaging for their platforms is troublesome. You either have to:</p> \n <ul><li>Instruct users to ignore scary Gatekeeper warnings by opening Finder > Navigating to the application > Right click > Open > Open. This website generates applications that require this workaround.</li> \n <li>Or pay Apple $100/year for a developer account to sign and notarize the app (very involved process; reach out in feedback for more information)</li></ul>'},m(e,n){Object(c.E)(e,t,n)},d(e){e&&Object(c.u)(t)}}}function Ut(e){let t;return{c(){t=Object(c.v)("div"),t.innerHTML='<h2>Windows</h2> \n <p class="svelte-bq9yyz">All Windows applications generated by this site are unsigned, so users will see SmartScreen warnings when they try to run it for the first time. They can bypass these warnings by pressing "More info" then "Run anyways".</p> \n <p class="svelte-bq9yyz">To change the icon of the executable file or create an installer program, download and run <a href="https://github.com/TurboWarp/packager-extras/releases">TurboWarp Packager Extras</a> and select the output of this website.</p>'},m(e,n){Object(c.E)(e,t,n)},d(e){e&&Object(c.u)(t)}}}function Ct(e){let t;return{c(){t=Object(c.v)("div"),t.innerHTML='<h2>WKWebView</h2> \n <p class="svelte-bq9yyz">WKWebView is the preferred way to package for macOS. It will be hundreds of MB smaller than the other macOS-specific environments and typically run the fastest.</p> \n <p class="svelte-bq9yyz">The app will run natively on both Intel and Apple silicon Macs running macOS 10.13 or later.</p> \n <p class="svelte-bq9yyz">Note that:</p> \n <ul><li>Video sensing and loudness blocks will only work in macOS 12 or later.</li> \n <li>Pointer lock will not work.</li> \n <li>Extremely large projects might not work properly.</li></ul> \n <p class="svelte-bq9yyz">Use the "Electron macOS Application" (inside Other environments) or "Plain HTML" environments instead if you encounter these issues.</p>'},m(e,n){Object(c.E)(e,t,n)},p:c.I,d(e){e&&Object(c.u)(t)}}}function It(e){let t,n,o,s,a,i,r,l,b,d=e[1].target.includes("mac"),O=d&&qt(e);return{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),n.textContent="NW.js",o=Object(c.U)(),s=Object(c.v)("p"),s.textContent="NW.js support is deprecated and may be removed in the future. Use the Electron environments instead. They're better in every way.",a=Object(c.U)(),i=Object(c.v)("p"),i.textContent="The NW.js environment works by embedding a copy of Chromium (the open source part of Google Chrome) along with your project, which means the app will be very large.",r=Object(c.U)(),l=Object(c.v)("p"),l.innerHTML='For further help and steps, see <a href="https://docs.nwjs.io/en/latest/For%20Users/Package%20and%20Distribute/#linux">NW.js Documentation</a>.',b=Object(c.U)(),O&&O.c(),Object(c.g)(s,"class","warning svelte-bq9yyz"),Object(c.g)(i,"class","svelte-bq9yyz"),Object(c.g)(l,"class","svelte-bq9yyz")},m(e,d){Object(c.E)(e,t,d),Object(c.d)(t,n),Object(c.d)(t,o),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.d)(t,i),Object(c.d)(t,r),Object(c.d)(t,l),Object(c.d)(t,b),O&&O.m(t,null)},p(e,n){2&n[0]&&(d=e[1].target.includes("mac")),d?O||(O=qt(e),O.c(),O.m(t,null)):O&&(O.d(1),O=null)},d(e){e&&Object(c.u)(t),O&&O.d()}}}function Rt(e){let t,n,o,s,a,i,r,l;function b(e,t){return 2&t[0]&&(i=null),2&t[0]&&(r=null),2&t[0]&&(l=null),null==i&&(i=!!e[1].target.includes("win")),i?Nt:(null==r&&(r=!!e[1].target.includes("mac")),r?At:(null==l&&(l=!!e[1].target.includes("linux")),l?Tt:void 0))}let d=b(e,[-1,-1,-1,-1]),O=d&&d(e);return{c(){t=Object(c.v)("div"),n=Object(c.v)("h2"),n.textContent="Electron",o=Object(c.U)(),s=Object(c.v)("p"),s.textContent="The Electron environment works by embedding a copy of Chromium (the open source part of Google Chrome) along with your project, which means the app will be very large.",a=Object(c.U)(),O&&O.c(),Object(c.g)(s,"class","svelte-bq9yyz")},m(e,i){Object(c.E)(e,t,i),Object(c.d)(t,n),Object(c.d)(t,o),Object(c.d)(t,s),Object(c.d)(t,a),O&&O.m(t,null)},p(e,n){d===(d=b(e,n))&&O?O.p(e,n):(O&&O.d(1),O=d&&d(e),O&&(O.c(),O.m(t,null)))},d(e){e&&Object(c.u)(t),O&&O.d()}}}function qt(e){let t;return{c(){t=Object(c.v)("p"),t.textContent="On macOS, the app will run using Rosetta on Apple Silicon Macs.",Object(c.g)(t,"class","svelte-bq9yyz")},m(e,n){Object(c.E)(e,t,n)},d(e){e&&Object(c.u)(t)}}}function Tt(e){let t;return{c(){t=Object(c.v)("p"),t.innerHTML="On Linux, the application can be started by running <code>start.sh</code>",Object(c.g)(t,"class","svelte-bq9yyz")},m(e,n){Object(c.E)(e,t,n)},p:c.I,d(e){e&&Object(c.u)(t)}}}function At(e){let t;return{c(){t=Object(c.v)("p"),t.textContent="On macOS, the app will run natively on both Intel Silicon and Apple Silicon Macs.",Object(c.g)(t,"class","svelte-bq9yyz")},m(e,n){Object(c.E)(e,t,n)},p:c.I,d(e){e&&Object(c.u)(t)}}}function Nt(e){let t,n=e[1].target.includes("32"),o=n&&Lt(e);return{c(){o&&o.c(),t=Object(c.w)()},m(e,n){o&&o.m(e,n),Object(c.E)(e,t,n)},p(e,c){2&c[0]&&(n=e[1].target.includes("32")),n?o||(o=Lt(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&Object(c.u)(t)}}}function Lt(e){let t;return{c(){t=Object(c.v)("p"),t.textContent='Note: You have selected the 32-bit or 64-bit mode. This maximizes device compatibility but limits the amount of memory the app can use. If you encounter crashes, try going into "Other environments" and using the 64-bit only mode instead.',Object(c.g)(t,"class","svelte-bq9yyz")},m(e,n){Object(c.E)(e,t,n)},d(e){e&&Object(c.u)(t)}}}function Pt(e){let t,n;function o(e,t){return 2&t[0]&&(n=null),null==n&&(n=!!e[1].target.startsWith("zip")),n?Et:kt}let s=o(e,[-1,-1,-1,-1]),a=s(e);return{c(){t=Object(c.v)("div"),a.c()},m(e,n){Object(c.E)(e,t,n),a.m(t,null)},p(e,n){s===(s=o(e,n))&&a?a.p(e,n):(a.d(1),a=s(e),a&&(a.c(),a.m(t,null)))},d(e){e&&Object(c.u)(t),a.d()}}}function Bt(e){let t,n;return t=new i.a({props:{accent:"#136C9F",reset:e[111],$$slots:{default:[Wt]},$$scope:{ctx:e}}}),{c(){Object(c.o)(t.$$.fragment)},m(e,o){Object(c.H)(t,e,o),n=!0},p(e,n){const c={};258&n[0]|268435456&n[3]&&(c.$$scope={dirty:n,ctx:e}),t.$set(c)},i(e){n||(Object(c.cb)(t.$$.fragment,e),n=!0)},o(e){Object(c.db)(t.$$.fragment,e),n=!1},d(e){Object(c.s)(t,e)}}}function Yt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m=e[8]("options.steamworksUnavailable")+"",v=e[8]("options.application-win64").replace("{type}","Electron")+"",f=e[8]("options.application-mac").replace("{type}","Electron")+"",y=e[8]("options.steamworksMacWarning")+"",w=e[8]("options.application-linux64").replace("{type}","Electron")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(m),o=Object(c.U)(),s=Object(c.v)("ul"),a=Object(c.v)("li"),i=Object(c.Y)(v),r=Object(c.U)(),l=Object(c.v)("li"),b=Object(c.Y)(f),d=Object(c.U)(),O=Object(c.v)("br"),p=Object(c.U)(),j=Object(c.Y)(y),u=Object(c.U)(),g=Object(c.v)("li"),h=Object(c.Y)(w),Object(c.g)(t,"class","svelte-bq9yyz")},m(e,m){Object(c.E)(e,t,m),Object(c.d)(t,n),Object(c.E)(e,o,m),Object(c.E)(e,s,m),Object(c.d)(s,a),Object(c.d)(a,i),Object(c.d)(s,r),Object(c.d)(s,l),Object(c.d)(l,b),Object(c.d)(l,d),Object(c.d)(l,O),Object(c.d)(l,p),Object(c.d)(l,j),Object(c.d)(s,u),Object(c.d)(s,g),Object(c.d)(g,h)},p(e,t){256&t[0]&&m!==(m=e[8]("options.steamworksUnavailable")+"")&&Object(c.Q)(n,m),256&t[0]&&v!==(v=e[8]("options.application-win64").replace("{type}","Electron")+"")&&Object(c.Q)(i,v),256&t[0]&&f!==(f=e[8]("options.application-mac").replace("{type}","Electron")+"")&&Object(c.Q)(b,f),256&t[0]&&y!==(y=e[8]("options.steamworksMacWarning")+"")&&Object(c.Q)(j,y),256&t[0]&&w!==(w=e[8]("options.application-linux64").replace("{type}","Electron")+"")&&Object(c.Q)(h,w)},d(e){e&&Object(c.u)(t),e&&Object(c.u)(o),e&&Object(c.u)(s)}}}function Mt(e){let t,n,o,s,a,i,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x=e[8]("options.steamworksAvailable").replace("{n}","480")+"",k=e[8]("options.steamworksAppId")+"",E=e[8]("options.steamworksOnError")+"",S=e[8]("options.steamworksIgnore")+"",z=e[8]("options.steamworksWarning")+"",_=e[8]("options.steamworksError")+"",U="electron-mac"===e[1].target&&Ht(e);return{c(){t=Object(c.v)("p"),n=Object(c.Y)(x),o=Object(c.U)(),s=Object(c.v)("label"),a=Object(c.Y)(k),i=Object(c.U)(),r=Object(c.v)("input"),l=Object(c.U)(),b=Object(c.v)("label"),d=Object(c.Y)(E),O=Object(c.U)(),p=Object(c.v)("select"),j=Object(c.v)("option"),u=Object(c.Y)(S),g=Object(c.v)("option"),h=Object(c.Y)(z),m=Object(c.v)("option"),v=Object(c.Y)(_),f=Object(c.U)(),U&&U.c(),y=Object(c.w)(),Object(c.g)(t,"class","svelte-bq9yyz"),Object(c.g)(r,"pattern","\\d+"),Object(c.g)(r,"minlength","1"),Object(c.g)(r,"class","svelte-bq9yyz"),Object(c.g)(s,"class","option svelte-bq9yyz"),j.__value="ignore",j.value=j.__value,g.__value="warning",g.value=g.__value,m.__value="error",m.value=m.__value,void 0===e[1].steamworks.onError&&Object(c.c)((()=>e[110].call(p))),Object(c.g)(b,"class","option svelte-bq9yyz")},m(x,k){Object(c.E)(x,t,k),Object(c.d)(t,n),Object(c.E)(x,o,k),Object(c.E)(x,s,k),Object(c.d)(s,a),Object(c.d)(s,i),Object(c.d)(s,r),Object(c.R)(r,e[1].steamworks.appId),Object(c.E)(x,l,k),Object(c.E)(x,b,k),Object(c.d)(b,d),Object(c.d)(b,O),Object(c.d)(b,p),Object(c.d)(p,j),Object(c.d)(j,u),Object(c.d)(p,g),Object(c.d)(g,h),Object(c.d)(p,m),Object(c.d)(m,v),Object(c.N)(p,e[1].steamworks.onError,!0),Object(c.E)(x,f,k),U&&U.m(x,k),Object(c.E)(x,y,k),w||($=[Object(c.G)(r,"input",e[109]),Object(c.G)(p,"change",e[110])],w=!0)},p(e,t){256&t[0]&&x!==(x=e[8]("options.steamworksAvailable").replace("{n}","480")+"")&&Object(c.Q)(n,x),256&t[0]&&k!==(k=e[8]("options.steamworksAppId")+"")&&Object(c.Q)(a,k),2&t[0]&&r.value!==e[1].steamworks.appId&&Object(c.R)(r,e[1].steamworks.appId),256&t[0]&&E!==(E=e[8]("options.steamworksOnError")+"")&&Object(c.Q)(d,E),256&t[0]&&S!==(S=e[8]("options.steamworksIgnore")+"")&&Object(c.Q)(u,S),256&t[0]&&z!==(z=e[8]("options.steamworksWarning")+"")&&Object(c.Q)(h,z),256&t[0]&&_!==(_=e[8]("options.steamworksError")+"")&&Object(c.Q)(v,_),2&t[0]&&Object(c.N)(p,e[1].steamworks.onError),"electron-mac"===e[1].target?U?U.p(e,t):(U=Ht(e),U.c(),U.m(y.parentNode,y)):U&&(U.d(1),U=null)},d(e){e&&Object(c.u)(t),e&&Object(c.u)(o),e&&Object(c.u)(s),e&&Object(c.u)(l),e&&Object(c.u)(b),e&&Object(c.u)(f),U&&U.d(e),e&&Object(c.u)(y),w=!1,Object(c.L)($)}}}function Ht(e){let t,n,o=e[8]("options.steamworksMacWarning")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(o),Object(c.g)(t,"class","warning svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.steamworksMacWarning")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}function Wt(e){let t,n,o,s,a,i,r,l,b=e[8]("options.steamworksExtension")+"",d=e[8]("options.steamworksDocumentation")+"";function O(e,t){return 2&t[0]&&(s=null),null==s&&(s=!!["electron-win64","electron-linux64","electron-mac"].includes(e[1].target)),s?Mt:Yt}let p=O(e,[-1,-1,-1,-1]),j=p(e);return{c(){t=Object(c.v)("h2"),n=Object(c.Y)(b),o=Object(c.U)(),j.c(),a=Object(c.U)(),i=Object(c.v)("p"),r=Object(c.v)("a"),l=Object(c.Y)(d),Object(c.g)(r,"href","https://extensions.turbowarp.org/steamworks"),Object(c.g)(i,"class","svelte-bq9yyz")},m(e,s){Object(c.E)(e,t,s),Object(c.d)(t,n),Object(c.E)(e,o,s),j.m(e,s),Object(c.E)(e,a,s),Object(c.E)(e,i,s),Object(c.d)(i,r),Object(c.d)(r,l)},p(e,t){256&t[0]&&b!==(b=e[8]("options.steamworksExtension")+"")&&Object(c.Q)(n,b),p===(p=O(e,t))&&j?j.p(e,t):(j.d(1),j=p(e),j&&(j.c(),j.m(a.parentNode,a))),256&t[0]&&d!==(d=e[8]("options.steamworksDocumentation")+"")&&Object(c.Q)(l,d)},d(e){e&&Object(c.u)(t),e&&Object(c.u)(o),j.d(e),e&&Object(c.u)(a),e&&Object(c.u)(i)}}}function Qt(e){let t,n,o,s,a,i,l,b,d,O;return o=new r.a({props:{secondary:!0,text:e[8]("options.export")}}),o.$on("click",e[22]),i=new r.a({props:{secondary:!0,text:e[8]("options.import")}}),i.$on("click",e[23]),d=new r.a({props:{dangerous:!0,text:e[8]("options.resetAll")}}),d.$on("click",e[21]),{c(){t=Object(c.v)("div"),n=Object(c.v)("div"),Object(c.o)(o.$$.fragment),s=Object(c.U)(),a=Object(c.v)("div"),Object(c.o)(i.$$.fragment),l=Object(c.U)(),b=Object(c.v)("div"),Object(c.o)(d.$$.fragment),Object(c.g)(n,"class","button svelte-bq9yyz"),Object(c.g)(a,"class","button svelte-bq9yyz"),Object(c.g)(b,"class","side-buttons svelte-bq9yyz"),Object(c.g)(t,"class","buttons svelte-bq9yyz")},m(e,r){Object(c.E)(e,t,r),Object(c.d)(t,n),Object(c.H)(o,n,null),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.H)(i,a,null),Object(c.d)(t,l),Object(c.d)(t,b),Object(c.H)(d,b,null),O=!0},p(e,t){const n={};256&t[0]&&(n.text=e[8]("options.export")),o.$set(n);const c={};256&t[0]&&(c.text=e[8]("options.import")),i.$set(c);const s={};256&t[0]&&(s.text=e[8]("options.resetAll")),d.$set(s)},i(e){O||(Object(c.cb)(o.$$.fragment,e),Object(c.cb)(i.$$.fragment,e),Object(c.cb)(d.$$.fragment,e),O=!0)},o(e){Object(c.db)(o.$$.fragment,e),Object(c.db)(i.$$.fragment,e),Object(c.db)(d.$$.fragment,e),O=!1},d(e){e&&Object(c.u)(t),Object(c.s)(o),Object(c.s)(i),Object(c.s)(d)}}}function Ft(e){let t,n;return t=new l.a({props:{$$slots:{default:[Qt]},$$scope:{ctx:e}}}),t.$on("drop",e[112]),{c(){Object(c.o)(t.$$.fragment)},m(e,o){Object(c.H)(t,e,o),n=!0},p(e,n){const c={};256&n[0]|268435456&n[3]&&(c.$$scope={dirty:n,ctx:e}),t.$set(c)},i(e){n||(Object(c.cb)(t.$$.fragment,e),n=!0)},o(e){Object(c.db)(t.$$.fragment,e),n=!1},d(e){Object(c.s)(t,e)}}}function Dt(e){let t,n,o,s,a,i,l;return o=new r.a({props:{text:e[8]("options.package")}}),o.$on("click",e[18]),i=new r.a({props:{secondary:!0,text:e[8]("options.preview")}}),i.$on("click",e[19]),{c(){t=Object(c.v)("div"),n=Object(c.v)("div"),Object(c.o)(o.$$.fragment),s=Object(c.U)(),a=Object(c.v)("div"),Object(c.o)(i.$$.fragment),Object(c.g)(n,"class","button svelte-bq9yyz"),Object(c.g)(a,"clas","button"),Object(c.g)(t,"class","buttons svelte-bq9yyz")},m(e,r){Object(c.E)(e,t,r),Object(c.d)(t,n),Object(c.H)(o,n,null),Object(c.d)(t,s),Object(c.d)(t,a),Object(c.H)(i,a,null),l=!0},p(e,t){const n={};256&t[0]&&(n.text=e[8]("options.package")),o.$set(n);const c={};256&t[0]&&(c.text=e[8]("options.preview")),i.$set(c)},i(e){l||(Object(c.cb)(o.$$.fragment,e),Object(c.cb)(i.$$.fragment,e),l=!0)},o(e){Object(c.db)(o.$$.fragment,e),Object(c.db)(i.$$.fragment,e),l=!1},d(e){e&&Object(c.u)(t),Object(c.s)(o),Object(c.s)(i)}}}function Vt(e){let t,n;return t=new i.a({props:{caption:!0,$$slots:{default:[Jt]},$$scope:{ctx:e}}}),{c(){Object(c.o)(t.$$.fragment)},m(e,o){Object(c.H)(t,e,o),n=!0},p(e,n){const c={};256&n[0]|268435456&n[3]&&(c.$$scope={dirty:n,ctx:e}),t.$set(c)},i(e){n||(Object(c.cb)(t.$$.fragment,e),n=!0)},o(e){Object(c.db)(t.$$.fragment,e),n=!1},d(e){Object(c.s)(t,e)}}}function Gt(e){let t,n;return t=new _e({props:{name:e[7]?e[7].filename:null,url:e[7]?e[7].url:null,blob:e[7]?e[7].blob:null}}),{c(){Object(c.o)(t.$$.fragment)},m(e,o){Object(c.H)(t,e,o),n=!0},p(e,n){const c={};128&n[0]&&(c.name=e[7]?e[7].filename:null),128&n[0]&&(c.url=e[7]?e[7].url:null),128&n[0]&&(c.blob=e[7]?e[7].blob:null),t.$set(c)},i(e){n||(Object(c.cb)(t.$$.fragment,e),n=!0)},o(e){Object(c.db)(t.$$.fragment,e),n=!1},d(e){Object(c.s)(t,e)}}}function Jt(e){let t,n,o=e[8]("options.downloadsWillAppearHere")+"";return{c(){t=Object(c.v)("p"),n=Object(c.Y)(o),Object(c.g)(t,"class","svelte-bq9yyz")},m(e,o){Object(c.E)(e,t,o),Object(c.d)(t,n)},p(e,t){256&t[0]&&o!==(o=e[8]("options.downloadsWillAppearHere")+"")&&Object(c.Q)(n,o)},d(e){e&&Object(c.u)(t)}}}function Zt(e){let t,n,o,s,a,r,l,b,d,O,p,j,u,g,h,m,v,f,y,w,$,x;t=new i.a({props:{accent:"#FFAB19",reset:e[42],$$slots:{default:[lt]},$$scope:{ctx:e}}}),o=new i.a({props:{accent:"#9966FF",reset:e[61],$$slots:{default:[Ot]},$$scope:{ctx:e}}}),a=new i.a({props:{accent:"#4CBFE6",reset:e[70],$$slots:{default:[jt]},$$scope:{ctx:e}}}),l=new i.a({props:{accent:"#FF8C1A",reset:0===e[9].length?null:e[76],$$slots:{default:[yt]},$$scope:{ctx:e}}}),d=new i.a({props:{accent:"#FF6680",reset:e[86],$$slots:{default:[wt]},$$scope:{ctx:e}}}),p=new i.a({props:{accent:"#0FBD8C",reset:e[102],$$slots:{default:[$t]},$$scope:{ctx:e}}});let k="html"!==e[1].target&&xt(e),E=e[0].project.analysis.usesSteamworks&&Bt(e);h=new i.a({props:{$$slots:{default:[Ft]},$$scope:{ctx:e}}}),v=new i.a({props:{$$slots:{default:[Dt]},$$scope:{ctx:e}}});const S=[Gt,Vt],z=[];function _(e,t){return e[7]?0:e[5].visible?-1:1}return~(y=_(e))&&(w=z[y]=S[y](e)),{c(){Object(c.o)(t.$$.fragment),n=Object(c.U)(),Object(c.o)(o.$$.fragment),s=Object(c.U)(),Object(c.o)(a.$$.fragment),r=Object(c.U)(),Object(c.o)(l.$$.fragment),b=Object(c.U)(),Object(c.o)(d.$$.fragment),O=Object(c.U)(),Object(c.o)(p.$$.fragment),j=Object(c.U)(),k&&k.c(),u=Object(c.U)(),E&&E.c(),g=Object(c.U)(),Object(c.o)(h.$$.fragment),m=Object(c.U)(),Object(c.o)(v.$$.fragment),f=Object(c.U)(),w&&w.c(),$=Object(c.w)()},m(e,i){Object(c.H)(t,e,i),Object(c.E)(e,n,i),Object(c.H)(o,e,i),Object(c.E)(e,s,i),Object(c.H)(a,e,i),Object(c.E)(e,r,i),Object(c.H)(l,e,i),Object(c.E)(e,b,i),Object(c.H)(d,e,i),Object(c.E)(e,O,i),Object(c.H)(p,e,i),Object(c.E)(e,j,i),k&&k.m(e,i),Object(c.E)(e,u,i),E&&E.m(e,i),Object(c.E)(e,g,i),Object(c.H)(h,e,i),Object(c.E)(e,m,i),Object(c.H)(v,e,i),Object(c.E)(e,f,i),~y&&z[y].m(e,i),Object(c.E)(e,$,i),x=!0},p(e,n){const s={};322&n[0]|268435456&n[3]&&(s.$$scope={dirty:n,ctx:e}),t.$set(s);const i={};20&n[0]&&(i.reset=e[61]),278&n[0]|268435456&n[3]&&(i.$$scope={dirty:n,ctx:e}),o.$set(i);const r={};8&n[0]&&(r.reset=e[70]),266&n[0]|268435456&n[3]&&(r.$$scope={dirty:n,ctx:e}),a.$set(r);const b={};258&n[0]|268435456&n[3]&&(b.$$scope={dirty:n,ctx:e}),l.$set(b);const O={};322&n[0]|268435456&n[3]&&(O.$$scope={dirty:n,ctx:e}),d.$set(O);const j={};258&n[0]|268435456&n[3]&&(j.$$scope={dirty:n,ctx:e}),p.$set(j),"html"!==e[1].target?k?(k.p(e,n),2&n[0]&&Object(c.cb)(k,1)):(k=xt(e),k.c(),Object(c.cb)(k,1),k.m(u.parentNode,u)):k&&(Object(c.z)(),Object(c.db)(k,1,1,(()=>{k=null})),Object(c.k)()),e[0].project.analysis.usesSteamworks?E?(E.p(e,n),1&n[0]&&Object(c.cb)(E,1)):(E=Bt(e),E.c(),Object(c.cb)(E,1),E.m(g.parentNode,g)):E&&(Object(c.z)(),Object(c.db)(E,1,1,(()=>{E=null})),Object(c.k)());const m={};256&n[0]|268435456&n[3]&&(m.$$scope={dirty:n,ctx:e}),h.$set(m);const f={};256&n[0]|268435456&n[3]&&(f.$$scope={dirty:n,ctx:e}),v.$set(f);let x=y;y=_(e),y===x?~y&&z[y].p(e,n):(w&&(Object(c.z)(),Object(c.db)(z[x],1,1,(()=>{z[x]=null})),Object(c.k)()),~y?(w=z[y],w?w.p(e,n):(w=z[y]=S[y](e),w.c()),Object(c.cb)(w,1),w.m($.parentNode,$)):w=null)},i(e){x||(Object(c.cb)(t.$$.fragment,e),Object(c.cb)(o.$$.fragment,e),Object(c.cb)(a.$$.fragment,e),Object(c.cb)(l.$$.fragment,e),Object(c.cb)(d.$$.fragment,e),Object(c.cb)(p.$$.fragment,e),Object(c.cb)(k),Object(c.cb)(E),Object(c.cb)(h.$$.fragment,e),Object(c.cb)(v.$$.fragment,e),Object(c.cb)(w),x=!0)},o(e){Object(c.db)(t.$$.fragment,e),Object(c.db)(o.$$.fragment,e),Object(c.db)(a.$$.fragment,e),Object(c.db)(l.$$.fragment,e),Object(c.db)(d.$$.fragment,e),Object(c.db)(p.$$.fragment,e),Object(c.db)(k),Object(c.db)(E),Object(c.db)(h.$$.fragment,e),Object(c.db)(v.$$.fragment,e),Object(c.db)(w),x=!1},d(e){Object(c.s)(t,e),e&&Object(c.u)(n),Object(c.s)(o,e),e&&Object(c.u)(s),Object(c.s)(a,e),e&&Object(c.u)(r),Object(c.s)(l,e),e&&Object(c.u)(b),Object(c.s)(d,e),e&&Object(c.u)(O),Object(c.s)(p,e),e&&Object(c.u)(j),k&&k.d(e),e&&Object(c.u)(u),E&&E.d(e),e&&Object(c.u)(g),Object(c.s)(h,e),e&&Object(c.u)(m),Object(c.s)(v,e),e&&Object(c.u)(f),~y&&z[y].d(e),e&&Object(c.u)($)}}}const Kt=9999999999;function Xt(e,t,n){let a,i,r,l,b,d,O;Object(c.l)(e,Pe.b,(e=>n(113,a=e))),Object(c.l)(e,s.a,(e=>n(8,i=e))),Object(c.l)(e,Pe.c,(e=>n(5,O=e)));let{projectData:p}=t,{title:j}=t;const u=p.project.analysis.stageVariables.filter((e=>e.isCloud)).map((e=>e.name)),g=Ze.DEFAULT_OPTIONS();g.projectId=p.projectId||`p4-${p.uniqueId}`;for(const e of u)g.cloudVariables.custom[e]="ws";g.app.packageName=Ze.getDefaultPackageNameFromFileName(p.title),g.app.windowTitle=Ze.getWindowTitleFromFileName(p.title),g.extensions=p.project.analysis.extensions;const h=Object(Ue.a)(`PackagerOptions.${p.uniqueId}`,g);Object(c.l)(e,h,(e=>n(1,r=e))),Object(c.S)(h,r.extensions=r.extensions.map((e=>"object"==typeof e&&e?e.url||"":e)),r);const m=(v=" // _twconfig_",p.project.analysis.stageComments.find((e=>e.split("\n").find((e=>e.endsWith(v))))));var v;let f=null,y=null;const w=()=>{n(26,y=null),f&&URL.revokeObjectURL(f.url),n(7,f=null)},$=Le(`PackagerOptions.icon.${p.uniqueId}`);Object(c.l)(e,$,(e=>n(4,d=e)));const x=Le(`PackagerOptions.customCursorIcon.${p.uniqueId}`);Object(c.l)(e,x,(e=>n(3,b=e)));const k=Le(`PackagerOptions.loadingScreenImage.${p.uniqueId}`);Object(c.l)(e,k,(e=>n(2,l=e)));const E=!["html","zip","electron-win32","webview-mac","electron-linux64"].includes(r.target),S=r.compiler.enabled!==g.compiler.enabled||r.compiler.warpTimer!==g.compiler.warpTimer||0!==r.extensions.length||r.bakeExtensions!==g.bakeExtensions||""!==r.custom.css||""!==r.custom.js||r.projectId!==g.projectId||r.packagedRuntime!==g.packagedRuntime||r.maxTextureDimension!==g.maxTextureDimension,z=async(e,t)=>{const n=new Ze;n.options=t,n.project=p.project,e.addEventListener("abort",(()=>{n.abort()})),e.setProgressText(i("progress.loadingScripts")),n.addEventListener("fetch-extensions",(({detail:t})=>{e.setProgressText(i("progress.downloadingExtensions")),e.setProgress(t.progress)})),n.addEventListener("large-asset-fetch",(({detail:t})=>{let n;t.asset.startsWith("nwjs-")?n="NW.js":t.asset.startsWith("electron-")?n="Electron":"webview-mac"===t.asset?n="WKWebView":"steamworks.js"===t.asset&&(n="Steamworks.js"),n&&e.setProgressText(i("progress.loadingLargeAsset").replace("{thing}",n)),e.setProgress(t.progress)})),n.addEventListener("zip-progress",(({detail:t})=>{e.setProgressText(i("progress.compressingProject")),e.setProgress(t.progress)}));const c=await n.package();return c.blob=new Blob([c.data],{type:c.type}),c.url=URL.createObjectURL(c.blob),c},_=e=>{for(const t of e){let e=r,n=g;const c=t.split("."),o=c.pop();for(const t of c)e=e[t],n=n[t];e[o]=We(n[o])}h.set(r)},U=async e=>{const t=e.files[0];var n;if(t)try{const e=await Object(Y.b)(t),o=JSON.parse(e),s=ot(o),a=We(g),O=Object(st.a)(s,a);Ze.usesUnsafeOptions(O)&&!confirm(i("options.confirmImportUnsafe"))||(n=O,Object(c.S)(h,r=n,r),Object(c.S)($,d=r.app.icon,d),Object(c.S)(x,b=r.cursor.custom,b),Object(c.S)(k,l=r.loadingScreen.image,l))}catch(e){Object(c.S)(Pe.b,a=e,a)}};Object(o.b)((()=>{f&&URL.revokeObjectURL(f.url)}));return e.$$set=e=>{"projectData"in e&&n(0,p=e.projectData),"title"in e&&n(25,j=e.title)},e.$$.update=()=>{67108896&e.$$.dirty[0]&&y&&y.setProgress(O.progress,O.text),16&e.$$.dirty[0]&&Object(c.S)(h,r.app.icon=d,r),8&e.$$.dirty[0]&&Object(c.S)(h,r.cursor.custom=b,r),4&e.$$.dirty[0]&&Object(c.S)(h,r.loadingScreen.image=l,r),2&e.$$.dirty[0]&&(w(),Pe.a.abort()),2&e.$$.dirty[0]&&n(25,j=r.app.windowTitle)},[p,r,l,b,d,O,g,f,i,u,h,m,$,x,k,E,S,()=>{const e=b,t=URL.createObjectURL(e),n=new Image,o=()=>{n.onerror=null,n.onload=null,URL.revokeObjectURL(t)};n.onload=()=>{Object(c.S)(h,r.cursor.center.x=Math.round(n.width/2),r),Object(c.S)(h,r.cursor.center.y=Math.round(n.height/2),r),o()},n.onerror=()=>{throw o(),Object(c.S)(Pe.b,a=new Error("Image could not be loaded"),a),a},n.src=t},async()=>{w();const e=new Ke.a;n(7,f=await e.do(z(e,We(r)))),e.done(),ye(f.filename,f.url)},async()=>{w(),n(26,y=new Me);const e=new Ke.a,t=We(r);t.target="html";try{n(7,f=await e.do(z(e,t))),e.done(),y.setContent(f.blob)}catch(e){y.close()}},_,()=>{confirm(i("reset.confirmAll"))&&(_(Object.keys(r)),Object(c.S)($,d=null,d),Object(c.S)(x,b=null,b),Object(c.S)(k,l=null,l))},async()=>{const e=await ct(r),t=new Blob([JSON.stringify(e)],{type:"application/json"}),n=URL.createObjectURL(t),c=G.APP_NAME.replace(/[^a-z0-9 ]/gi,"").replace(/ /g,"-").toLowerCase();ye(`${c}-settings.json`,n),URL.revokeObjectURL(n)},async()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.addEventListener("change",(e=>{U(e.target)})),document.body.appendChild(e),e.click(),e.remove()},U,j,y,function(){r.turbo=this.checked,h.set(r)},function(){r.framerate=Object(c.ab)(this.value),h.set(r)},function(){r.interpolation=this.checked,h.set(r)},function(){r.highQualityPen=this.checked,h.set(r)},e=>{Object(c.S)(h,r.maxClones=e.target.checked?Kt:300,r)},e=>{Object(c.S)(h,r.fencing=!e.target.checked,r)},e=>{Object(c.S)(h,r.miscLimits=!e.target.checked,r)},function(){r.username=this.value,h.set(r)},function(){r.closeWhenStopped=this.checked,h.set(r)},function(){r.stageWidth=Object(c.ab)(this.value),h.set(r)},function(){r.stageHeight=Object(c.ab)(this.value),h.set(r)},function(){r.resizeMode=this.__value,h.set(r)},[[],[],[],[]],function(){r.resizeMode=this.__value,h.set(r)},function(){r.resizeMode=this.__value,h.set(r)},()=>{_(["turbo","framerate","interpolation","highQualityPen","maxClones","fencing","miscLimits","stageWidth","stageHeight","resizeMode","username"])},function(){r.app.windowTitle=this.value,h.set(r)},function(e){d=e,$.set(d)},function(){r.loadingScreen.progressBar=this.checked,h.set(r)},function(){r.loadingScreen.text=this.value,h.set(r)},function(e){l=e,k.set(l)},function(){r.loadingScreen.imageMode=this.__value,h.set(r)},function(){r.loadingScreen.imageMode=this.__value,h.set(r)},function(){r.autoplay=this.checked,h.set(r)},function(){r.controls.greenFlag.enabled=this.checked,h.set(r)},function(){r.controls.stopAll.enabled=this.checked,h.set(r)},function(){r.controls.pause.enabled=this.checked,h.set(r)},function(){r.controls.fullscreen.enabled=this.checked,h.set(r)},function(t){e.$$.not_equal(r.appearance.background,t)&&(r.appearance.background=t,h.set(r))},function(t){e.$$.not_equal(r.appearance.foreground,t)&&(r.appearance.foreground=t,h.set(r))},function(t){e.$$.not_equal(r.appearance.accent,t)&&(r.appearance.accent=t,h.set(r))},function(){r.monitors.editableLists=this.checked,h.set(r)},function(t){e.$$.not_equal(r.monitors.variableColor,t)&&(r.monitors.variableColor=t,h.set(r))},function(t){e.$$.not_equal(r.monitors.listColor,t)&&(r.monitors.listColor=t,h.set(r))},()=>{Object(c.S)($,d=null,d),Object(c.S)(k,l=null,l),_(["app.windowTitle","loadingScreen","autoplay","controls","appearance","monitors"])},function(){r.cursor.type=this.__value,h.set(r)},function(){r.cursor.type=this.__value,h.set(r)},function(){r.cursor.type=this.__value,h.set(r)},function(e){b=e,x.set(b)},function(){r.cursor.center.x=Object(c.ab)(this.value),h.set(r)},function(){r.cursor.center.y=Object(c.ab)(this.value),h.set(r)},function(){r.chunks.pointerlock=this.checked,h.set(r)},function(){r.chunks.gamepad=this.checked,h.set(r)},()=>{Object(c.S)(x,b=null,b),_(["cursor","chunks"])},function(){r.cloudVariables.mode=Object(c.O)(this),h.set(r)},function(e){r.cloudVariables.custom[e]=Object(c.O)(this),h.set(r)},function(){r.cloudVariables.cloudHost=this.value,h.set(r)},function(){r.cloudVariables.specialCloudBehaviors=this.checked,h.set(r)},function(){r.cloudVariables.unsafeCloudBehaviors=this.checked,h.set(r)},()=>{_(["cloudVariables"])},function(){r.compiler.enabled=this.checked,h.set(r)},function(){r.compiler.warpTimer=this.checked,h.set(r)},function(t){e.$$.not_equal(r.extensions,t)&&(r.extensions=t,h.set(r))},function(){r.bakeExtensions=this.checked,h.set(r)},function(){r.custom.css=this.value,h.set(r)},function(){r.custom.js=this.value,h.set(r)},function(){r.projectId=this.value,h.set(r)},function(){r.packagedRuntime=this.checked,h.set(r)},e=>{Object(c.S)(h,r.maxTextureDimension=g.maxTextureDimension*(e.target.checked?2:1),r)},()=>{_(["compiler","extensions","bakeExtensions","custom","projectId","maxTextureDimension"])},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},function(){r.target=this.__value,h.set(r)},()=>{_(["target"])},function(){r.app.packageName=this.value,h.set(r)},function(){r.app.version=this.value,h.set(r)},function(){r.app.windowMode=Object(c.O)(this),h.set(r)},function(){r.app.escapeBehavior=Object(c.O)(this),h.set(r)},function(){r.app.windowControls=Object(c.O)(this),h.set(r)},()=>{_(["app.packageName","app.windowMode","app.escapeBehavior"])},function(){r.steamworks.appId=this.value,h.set(r)},function(){r.steamworks.onError=Object(c.O)(this),h.set(r)},()=>{_(["steamworks"])},e=>U(e.detail)]}class en extends c.a{constructor(e){super(),Object(c.C)(this,e,Xt,Zt,c.M,{projectData:0,title:25},at,[-1,-1,-1,-1])}}t.default=en}}]);
//# sourceMappingURL=packager-options-ui.b323b4ae92089ededdfd.js.map |