From 6b6b11db82f843b5e66ec9e2842ece89d3df7605 Mon Sep 17 00:00:00 2001 From: cyderize Date: Wed, 18 Sep 2024 23:59:04 +0000 Subject: [PATCH] deploy: a1e2452ae5dae563c4f91810f5adfbab34365f12 --- .../{FileSaver.min-DtMeQsBk.js => FileSaver.min-BMYjv9ER.js} | 2 +- develop/assets/{index-Do04burZ.js => index-BocD5m97.js} | 4 ++-- .../assets/{jszip.min-BOFwHsSm.js => jszip.min-Bl2THA8X.js} | 2 +- develop/index.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename develop/assets/{FileSaver.min-DtMeQsBk.js => FileSaver.min-BMYjv9ER.js} (97%) rename develop/assets/{index-Do04burZ.js => index-BocD5m97.js} (99%) rename develop/assets/{jszip.min-BOFwHsSm.js => jszip.min-Bl2THA8X.js} (99%) diff --git a/develop/assets/FileSaver.min-DtMeQsBk.js b/develop/assets/FileSaver.min-BMYjv9ER.js similarity index 97% rename from develop/assets/FileSaver.min-DtMeQsBk.js rename to develop/assets/FileSaver.min-BMYjv9ER.js index f31e4d1..2ae1f6d 100644 --- a/develop/assets/FileSaver.min-DtMeQsBk.js +++ b/develop/assets/FileSaver.min-BMYjv9ER.js @@ -1 +1 @@ -import{g as j,c as s}from"./index-Do04burZ.js";var E={exports:{}};(function(b,S){(function(p,i){i()})(s,function(){function p(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function i(e,t,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){u(o.response,t,r)},o.onerror=function(){console.error("could not download file")},o.send()}function v(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof s=="object"&&s.global===s?s:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,r){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?l(n):v(n.href)?i(e,t,r):l(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){l(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(p(e,r),t);else if(v(e))i(e,t,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){l(o)})}}:function(e,t,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return i(e,t,r);var n=e.type==="application/octet-stream",h=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||n&&h||m)&&typeof FileReader<"u"){var d=new FileReader;d.onloadend=function(){var c=d.result;c=w?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location=c,o=null},d.readAsDataURL(e)}else{var y=a.URL||a.webkitURL,f=y.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){y.revokeObjectURL(f)},4e4)}});a.saveAs=u.saveAs=u,b.exports=u})})(E);var L=E.exports;const R=j(L),A=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{A as F}; +import{g as j,c as s}from"./index-BocD5m97.js";var E={exports:{}};(function(b,S){(function(p,i){i()})(s,function(){function p(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function i(e,t,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){u(o.response,t,r)},o.onerror=function(){console.error("could not download file")},o.send()}function v(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof s=="object"&&s.global===s?s:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,r){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?l(n):v(n.href)?i(e,t,r):l(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){l(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(p(e,r),t);else if(v(e))i(e,t,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){l(o)})}}:function(e,t,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return i(e,t,r);var n=e.type==="application/octet-stream",h=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||n&&h||m)&&typeof FileReader<"u"){var d=new FileReader;d.onloadend=function(){var c=d.result;c=w?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location=c,o=null},d.readAsDataURL(e)}else{var y=a.URL||a.webkitURL,f=y.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){y.revokeObjectURL(f)},4e4)}});a.saveAs=u.saveAs=u,b.exports=u})})(E);var L=E.exports;const R=j(L),A=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{A as F}; diff --git a/develop/assets/index-Do04burZ.js b/develop/assets/index-BocD5m97.js similarity index 99% rename from develop/assets/index-Do04burZ.js rename to develop/assets/index-BocD5m97.js index 48d44ac..bc59dcb 100644 --- a/develop/assets/index-Do04burZ.js +++ b/develop/assets/index-BocD5m97.js @@ -1,7 +1,7 @@ var DW=Object.defineProperty;var VW=(n,e,t)=>e in n?DW(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Uh=(n,e,t)=>VW(n,typeof e!="symbol"?e+"":e,t);import*as qW from"https://cdn.jsdelivr.net/npm/minizinc/dist/minizinc.mjs";import*as IW from"https://cdn.jsdelivr.net/npm/minizinc@edge/dist/minizinc.mjs";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function Qe(){}const vd=n=>n;function LW(n,e){for(const t in e)n[t]=e[t];return n}function Fb(n){return n()}function hm(){return Object.create(null)}function Ft(n){n.forEach(Fb)}function Gc(n){return typeof n=="function"}function Oi(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Wf;function Om(n,e){return n===e?!0:(Wf||(Wf=document.createElement("a")),Wf.href=e,n===Wf.href)}function NW(n){return Object.keys(n).length===0}function jW(n,...e){if(n==null){for(const i of e)i(void 0);return Qe}const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function $O(n,e,t){n.$$.on_destroy.push(jW(e,t))}function Zi(n,e,t,i){if(n){const r=Gb(n,e,t,i);return n[0](r)}}function Gb(n,e,t,i){return n[1]&&i?LW(t.ctx.slice(),n[1](i(e))):t.ctx}function Ri(n,e,t,i){if(n[2]&&i){const r=n[2](i(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],l=Math.max(e.dirty.length,r.length);for(let o=0;o32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),wd=Hb?n=>requestAnimationFrame(n):Qe;const _l=new Set;function Jb(n){_l.forEach(e=>{e.c(n)||(_l.delete(e),e.f())}),_l.size!==0&&wd(Jb)}function e$(n){let e;return _l.size===0&&wd(Jb),{promise:new Promise(t=>{_l.add(e={c:n,f:t})}),abort(){_l.delete(e)}}}const FW=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Q(n,e){n.appendChild(e)}function t$(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function GW(n){const e=k("style");return e.textContent="/* empty */",HW(t$(n),e),e.sheet}function HW(n,e){return Q(n.head||n,e),e.sheet}function Y(n,e,t){n.insertBefore(e,t||null)}function A(n){n.parentNode&&n.parentNode.removeChild(n)}function di(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function i$(n){return function(e){return e.preventDefault(),n.call(this,e)}}function v(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Bo(n){return n===""?null:+n}function KW(n){return Array.from(n.childNodes)}function Ne(n,e){e=""+e,n.data!==e&&(n.data=e)}function si(n,e){n.value=e??""}function pm(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,"")}function Yl(n,e,t){for(let i=0;ie.__value)}function ne(n,e,t){n.classList.toggle(e,!!t)}function n$(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}const dc=new Map;let pc=0;function e4(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function t4(n,e){const t={stylesheet:GW(e),rules:{}};return dc.set(n,t),t}function vO(n,e,t,i,r,s,l,o=0){const a=16.666/i;let c=`{ `;for(let y=0;y<=1;y+=a){const _=e+(t-e)*s(y);c+=y*100+`%{${l(_,1-_)}} `}const h=c+`100% {${l(t,1-t)}} -}`,O=`__svelte_${e4(h)}_${o}`,p=t$(n),{stylesheet:g,rules:m}=dc.get(p)||t4(p,n);m[O]||(m[O]=!0,g.insertRule(`@keyframes ${O} ${h}`,g.cssRules.length));const $=n.style.animation||"";return n.style.animation=`${$?`${$}, `:""}${O} ${i}ms linear ${r}ms 1 both`,pc+=1,O}function r$(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-i.length;r&&(n.style.animation=i.join(", "),pc-=r,pc||i4())}function i4(){wd(()=>{pc||(dc.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&A(e)}),dc.clear())})}function n4(n,e,t,i){if(!e)return Qe;const r=n.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return Qe;const{delay:s=0,duration:l=300,easing:o=vd,start:a=Kb()+s,end:c=a+l,tick:h=Qe,css:O}=t(n,{from:e,to:r},i);let p=!0,g=!1,m;function $(){O&&(m=vO(n,0,1,l,s,o,O)),s||(g=!0)}function y(){O&&r$(n,m),p=!1}return e$(_=>{if(!g&&_>=a&&(g=!0),g&&_>=c&&(h(1,0),y()),!p)return!1;if(g){const W=_-a,R=0+1*o(W/l);h(R,1-R)}return!0}),$(),h(0,1),y}function r4(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,r=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,s4(n,r)}}function s4(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),r=i.transform==="none"?"":i.transform;n.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let Fo;function Do(n){Fo=n}function s$(){if(!Fo)throw new Error("Function called outside component initialization");return Fo}function Hc(n){s$().$$.on_mount.push(n)}function en(){const n=s$();return(e,t,{cancelable:i=!1}={})=>{const r=n.$$.callbacks[e];if(r){const s=n$(e,t,{cancelable:i});return r.slice().forEach(l=>{l.call(n,s)}),!s.defaultPrevented}return!0}}function mm(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Sl=[],Et=[];let Pl=[];const wO=[],l$=Promise.resolve();let QO=!1;function o$(){QO||(QO=!0,l$.then(a$))}function Fn(){return o$(),l$}function Hn(n){Pl.push(n)}function Vo(n){wO.push(n)}const Eh=new Set;let pl=0;function a$(){if(pl!==0)return;const n=Fo;do{try{for(;pln.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Pl=e}let Qo;function a4(){return Qo||(Qo=Promise.resolve(),Qo.then(()=>{Qo=null})),Qo}function zh(n,e,t){n.dispatchEvent(n$(`${e?"intro":"outro"}${t}`))}const tc=new Set;let Er;function Je(){Er={r:0,c:[],p:Er}}function et(){Er.r||Ft(Er.c),Er=Er.p}function M(n,e){n&&n.i&&(tc.delete(n),n.i(e))}function j(n,e,t,i){if(n&&n.o){if(tc.has(n))return;tc.add(n),Er.c.push(()=>{tc.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const f4={duration:0};function yl(n,e,t,i){let s=e(n,t,{direction:"both"}),l=i?0:1,o=null,a=null,c=null,h;function O(){c&&r$(n,c)}function p(m,$){const y=m.b-l;return $*=Math.abs(y),{a:l,b:m.b,d:y,duration:$,start:m.start,end:m.start+$,group:m.group}}function g(m){const{delay:$=0,duration:y=300,easing:_=vd,tick:W=Qe,css:R}=s||f4,X={start:Kb()+$,b:m};m||(X.group=Er,Er.r+=1),"inert"in n&&(m?h!==void 0&&(n.inert=h):(h=n.inert,n.inert=!0)),o||a?a=X:(R&&(O(),c=vO(n,l,m,y,$,_,R)),m&&W(0,1),o=p(X,y),Hn(()=>zh(n,m,"start")),e$(C=>{if(a&&C>a.start&&(o=p(a,y),a=null,zh(n,o.b,"start"),R&&(O(),c=vO(n,l,o.b,o.duration,0,_,s.css))),o){if(C>=o.end)W(l=o.b,1-l),zh(n,o.b,"end"),a||(o.b?O():--o.group.r||Ft(o.group.c)),o=null;else if(C>=o.start){const E=C-o.start;l=o.a+o.d*_(E/o.duration),W(l,1-l)}}return!!(o||a)}))}return{run(m){Gc(s)?a4().then(()=>{s=s({direction:m?"in":"out"}),g(m)}):g(m)},end(){O(),o=a=null}}}function st(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function c4(n,e){j(n,1,1,()=>{e.delete(n.key)})}function u4(n,e){n.f(),c4(n,e)}function h4(n,e,t,i,r,s,l,o,a,c,h,O){let p=n.length,g=s.length,m=p;const $={};for(;m--;)$[n[m].key]=m;const y=[],_=new Map,W=new Map,R=[];for(m=g;m--;){const D=O(r,s,m),z=t(D);let F=l.get(z);F?R.push(()=>F.p(D,e)):(F=c(z,D),F.c()),_.set(z,y[m]=F),z in $&&W.set(z,Math.abs(m-$[z]))}const X=new Set,C=new Set;function E(D){M(D,1),D.m(o,h),l.set(D.key,D),h=D.first,g--}for(;p&&g;){const D=y[g-1],z=n[p-1],F=D.key,B=z.key;D===z?(h=D.first,p--,g--):_.has(B)?!l.has(F)||X.has(F)?E(D):C.has(B)?p--:W.get(F)>W.get(B)?(C.add(F),E(D)):(X.add(B),p--):(a(z,l),p--)}for(;p--;){const D=n[p];_.has(D.key)||a(D,l)}for(;g;)E(y[g-1]);return Ft(R),y}function qo(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function Ae(n){n&&n.c()}function Re(n,e,t){const{fragment:i,after_update:r}=n.$$;i&&i.m(e,t),Hn(()=>{const s=n.$$.on_mount.map(Fb).filter(Gc);n.$$.on_destroy?n.$$.on_destroy.push(...s):Ft(s),n.$$.on_mount=[]}),r.forEach(Hn)}function Xe(n,e){const t=n.$$;t.fragment!==null&&(o4(t.after_update),Ft(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function O4(n,e){n.$$.dirty[0]===-1&&(Sl.push(n),o$(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=g.length?g[0]:p;return c.ctx&&r(c.ctx[O],c.ctx[O]=m)&&(!c.skip_bound&&c.bound[O]&&c.bound[O](m),h&&O4(n,O)),p}):[],c.update(),h=!0,Ft(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){const O=KW(e.target);c.fragment&&c.fragment.l(O),O.forEach(A)}else c.fragment&&c.fragment.c();e.intro&&M(n.$$.fragment),Re(n,e.target,e.anchor),a$()}Do(a)}class $i{constructor(){Uh(this,"$$");Uh(this,"$$set")}$destroy(){Xe(this,1),this.$destroy=Qe}$on(e,t){if(!Gc(t))return Qe;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!NW(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const d4="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(d4);const p4="modulepreload",g4=function(n){return"/develop/"+n},Sm={},bm=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.all(t.map(o=>{if(o=g4(o),o in Sm)return;Sm[o]=!0;const a=o.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${c}`))return;const h=document.createElement("link");if(h.rel=a?"stylesheet":p4,a||(h.as="script",h.crossOrigin=""),h.href=o,l&&h.setAttribute("nonce",l),document.head.appendChild(h),a)return new Promise((O,p)=>{h.addEventListener("load",O),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${o}`)))})}))}return r.then(()=>e()).catch(s=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s})};class mt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),hr.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),hr.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Io(this),s=new Io(e);for(let l=t,o=t;;){if(r.next(l),s.next(l),l=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new Io(this,e)}iterRange(e,t=this.length){return new f$(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new c$(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?mt.empty:e.length<=32?new ni(e):hr.from(ni.split(e,[]))}}class ni extends mt{constructor(e,t=m4(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.text[s],o=r+l.length;if((t?i:o)>=e)return new S4(r,o,i,l);r=o+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ni($m(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=i.pop(),o=ic(s.text,l.text.slice(),0,s.length);if(o.length<=32)i.push(new ni(o,l.length+s.length));else{let a=o.length>>1;i.push(new ni(o.slice(0,a)),new ni(o.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ni))return super.replace(e,t,i);let r=ic(this.text,ic(i.text,$m(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ni(r,s):hr.from(ni.split(r,[]),s)}sliceString(e,t=this.length,i=` +}`,O=`__svelte_${e4(h)}_${o}`,p=t$(n),{stylesheet:g,rules:m}=dc.get(p)||t4(p,n);m[O]||(m[O]=!0,g.insertRule(`@keyframes ${O} ${h}`,g.cssRules.length));const $=n.style.animation||"";return n.style.animation=`${$?`${$}, `:""}${O} ${i}ms linear ${r}ms 1 both`,pc+=1,O}function r$(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-i.length;r&&(n.style.animation=i.join(", "),pc-=r,pc||i4())}function i4(){wd(()=>{pc||(dc.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&A(e)}),dc.clear())})}function n4(n,e,t,i){if(!e)return Qe;const r=n.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return Qe;const{delay:s=0,duration:l=300,easing:o=vd,start:a=Kb()+s,end:c=a+l,tick:h=Qe,css:O}=t(n,{from:e,to:r},i);let p=!0,g=!1,m;function $(){O&&(m=vO(n,0,1,l,s,o,O)),s||(g=!0)}function y(){O&&r$(n,m),p=!1}return e$(_=>{if(!g&&_>=a&&(g=!0),g&&_>=c&&(h(1,0),y()),!p)return!1;if(g){const W=_-a,R=0+1*o(W/l);h(R,1-R)}return!0}),$(),h(0,1),y}function r4(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,r=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,s4(n,r)}}function s4(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),r=i.transform==="none"?"":i.transform;n.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let Fo;function Do(n){Fo=n}function s$(){if(!Fo)throw new Error("Function called outside component initialization");return Fo}function Hc(n){s$().$$.on_mount.push(n)}function en(){const n=s$();return(e,t,{cancelable:i=!1}={})=>{const r=n.$$.callbacks[e];if(r){const s=n$(e,t,{cancelable:i});return r.slice().forEach(l=>{l.call(n,s)}),!s.defaultPrevented}return!0}}function mm(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Sl=[],Et=[];let Pl=[];const wO=[],l$=Promise.resolve();let QO=!1;function o$(){QO||(QO=!0,l$.then(a$))}function Fn(){return o$(),l$}function Hn(n){Pl.push(n)}function Vo(n){wO.push(n)}const Eh=new Set;let pl=0;function a$(){if(pl!==0)return;const n=Fo;do{try{for(;pln.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Pl=e}let Qo;function a4(){return Qo||(Qo=Promise.resolve(),Qo.then(()=>{Qo=null})),Qo}function zh(n,e,t){n.dispatchEvent(n$(`${e?"intro":"outro"}${t}`))}const tc=new Set;let Er;function Je(){Er={r:0,c:[],p:Er}}function et(){Er.r||Ft(Er.c),Er=Er.p}function M(n,e){n&&n.i&&(tc.delete(n),n.i(e))}function j(n,e,t,i){if(n&&n.o){if(tc.has(n))return;tc.add(n),Er.c.push(()=>{tc.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const f4={duration:0};function yl(n,e,t,i){let s=e(n,t,{direction:"both"}),l=i?0:1,o=null,a=null,c=null,h;function O(){c&&r$(n,c)}function p(m,$){const y=m.b-l;return $*=Math.abs(y),{a:l,b:m.b,d:y,duration:$,start:m.start,end:m.start+$,group:m.group}}function g(m){const{delay:$=0,duration:y=300,easing:_=vd,tick:W=Qe,css:R}=s||f4,X={start:Kb()+$,b:m};m||(X.group=Er,Er.r+=1),"inert"in n&&(m?h!==void 0&&(n.inert=h):(h=n.inert,n.inert=!0)),o||a?a=X:(R&&(O(),c=vO(n,l,m,y,$,_,R)),m&&W(0,1),o=p(X,y),Hn(()=>zh(n,m,"start")),e$(C=>{if(a&&C>a.start&&(o=p(a,y),a=null,zh(n,o.b,"start"),R&&(O(),c=vO(n,l,o.b,o.duration,0,_,s.css))),o){if(C>=o.end)W(l=o.b,1-l),zh(n,o.b,"end"),a||(o.b?O():--o.group.r||Ft(o.group.c)),o=null;else if(C>=o.start){const E=C-o.start;l=o.a+o.d*_(E/o.duration),W(l,1-l)}}return!!(o||a)}))}return{run(m){Gc(s)?a4().then(()=>{s=s({direction:m?"in":"out"}),g(m)}):g(m)},end(){O(),o=a=null}}}function st(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function c4(n,e){j(n,1,1,()=>{e.delete(n.key)})}function u4(n,e){n.f(),c4(n,e)}function h4(n,e,t,i,r,s,l,o,a,c,h,O){let p=n.length,g=s.length,m=p;const $={};for(;m--;)$[n[m].key]=m;const y=[],_=new Map,W=new Map,R=[];for(m=g;m--;){const D=O(r,s,m),z=t(D);let F=l.get(z);F?R.push(()=>F.p(D,e)):(F=c(z,D),F.c()),_.set(z,y[m]=F),z in $&&W.set(z,Math.abs(m-$[z]))}const X=new Set,C=new Set;function E(D){M(D,1),D.m(o,h),l.set(D.key,D),h=D.first,g--}for(;p&&g;){const D=y[g-1],z=n[p-1],F=D.key,B=z.key;D===z?(h=D.first,p--,g--):_.has(B)?!l.has(F)||X.has(F)?E(D):C.has(B)?p--:W.get(F)>W.get(B)?(C.add(F),E(D)):(X.add(B),p--):(a(z,l),p--)}for(;p--;){const D=n[p];_.has(D.key)||a(D,l)}for(;g;)E(y[g-1]);return Ft(R),y}function qo(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function Ae(n){n&&n.c()}function Re(n,e,t){const{fragment:i,after_update:r}=n.$$;i&&i.m(e,t),Hn(()=>{const s=n.$$.on_mount.map(Fb).filter(Gc);n.$$.on_destroy?n.$$.on_destroy.push(...s):Ft(s),n.$$.on_mount=[]}),r.forEach(Hn)}function Xe(n,e){const t=n.$$;t.fragment!==null&&(o4(t.after_update),Ft(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function O4(n,e){n.$$.dirty[0]===-1&&(Sl.push(n),o$(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=g.length?g[0]:p;return c.ctx&&r(c.ctx[O],c.ctx[O]=m)&&(!c.skip_bound&&c.bound[O]&&c.bound[O](m),h&&O4(n,O)),p}):[],c.update(),h=!0,Ft(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){const O=KW(e.target);c.fragment&&c.fragment.l(O),O.forEach(A)}else c.fragment&&c.fragment.c();e.intro&&M(n.$$.fragment),Re(n,e.target,e.anchor),a$()}Do(a)}class $i{constructor(){Uh(this,"$$");Uh(this,"$$set")}$destroy(){Xe(this,1),this.$destroy=Qe}$on(e,t){if(!Gc(t))return Qe;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!NW(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const d4="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(d4);const p4="modulepreload",g4=function(n){return"/develop/"+n},Sm={},bm=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=Promise.allSettled(t.map(a=>{if(a=g4(a),a in Sm)return;Sm[a]=!0;const c=a.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${h}`))return;const O=document.createElement("link");if(O.rel=c?"stylesheet":p4,c||(O.as="script"),O.crossOrigin="",O.href=a,o&&O.setAttribute("nonce",o),document.head.appendChild(O),c)return new Promise((p,g)=>{O.addEventListener("load",p),O.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return r.then(l=>{for(const o of l||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};class mt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),hr.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),hr.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Io(this),s=new Io(e);for(let l=t,o=t;;){if(r.next(l),s.next(l),l=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new Io(this,e)}iterRange(e,t=this.length){return new f$(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new c$(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?mt.empty:e.length<=32?new ni(e):hr.from(ni.split(e,[]))}}class ni extends mt{constructor(e,t=m4(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.text[s],o=r+l.length;if((t?i:o)>=e)return new S4(r,o,i,l);r=o+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ni($m(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=i.pop(),o=ic(s.text,l.text.slice(),0,s.length);if(o.length<=32)i.push(new ni(o,l.length+s.length));else{let a=o.length>>1;i.push(new ni(o.slice(0,a)),new ni(o.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ni))return super.replace(e,t,i);let r=ic(this.text,ic(i.text,$m(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ni(r,s):hr.from(ni.split(r,[]),s)}sliceString(e,t=this.length,i=` `){let r="";for(let s=0,l=0;s<=t&&le&&l&&(r+=i),es&&(r+=o.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new ni(i,r)),i=[],r=-1);return r>-1&&t.push(new ni(i,r)),t}}class hr extends mt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.children[s],o=r+l.length,a=i+l.lines-1;if((t?a:o)>=e)return l.lineInner(e,t,i,r);r=o+1,i=a+1}}decompose(e,t,i,r){for(let s=0,l=0;l<=t&&s=l){let c=r&((l<=e?1:0)|(a>=t?2:0));l>=e&&a<=t&&!c?i.push(o):o.decompose(e-l,t-l,i,c)}l=a+1}}replace(e,t,i){if(i.lines=s&&t<=o){let a=l.replace(e-s,t-s,i),c=this.lines-l.lines+a.lines;if(a.lines>4&&a.lines>c>>6){let h=this.children.slice();return h[r]=a,new hr(h,this.length-(t-e)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` `){let r="";for(let s=0,l=0;se&&s&&(r+=i),el&&(r+=o.sliceString(e-l,t-l,i)),l=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof hr))return 0;let i=0,[r,s,l,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==l||s==o)return i;let a=this.children[r],c=e.children[s];if(a!=c)return i+a.scanIdentical(c,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let g of e)i+=g.lines;if(i<32){let g=[];for(let m of e)m.flatten(g);return new ni(g,t)}let r=Math.max(32,i>>5),s=r<<1,l=r>>1,o=[],a=0,c=-1,h=[];function O(g){let m;if(g.lines>s&&g instanceof hr)for(let $ of g.children)O($);else g.lines>l&&(a>l||!a)?(p(),o.push(g)):g instanceof ni&&a&&(m=h[h.length-1])instanceof ni&&g.lines+m.lines<=32?(a+=g.lines,c+=g.length+1,h[h.length-1]=new ni(m.text.concat(g.text),m.length+1+g.length)):(a+g.lines>r&&p(),a+=g.lines,c+=g.length+1,h.push(g))}function p(){a!=0&&(o.push(h.length==1?h[0]:hr.from(h,c)),c=-1,a=h.length=0)}for(let g of e)O(g);return p(),o.length==1?o[0]:new hr(o,t)}}mt.empty=new ni([""],0);function m4(n){let e=-1;for(let t of n)e+=t.length+1;return e}function ic(n,e,t=0,i=1e9){for(let r=0,s=0,l=!0;s=t&&(a>i&&(o=o.slice(0,i-r)),r0?1:(e instanceof ni?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],l=s>>1,o=r instanceof ni?r.text.length:r.children.length;if(l==(t>0?o:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(r instanceof ni){let a=r.text[l+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[l+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ni?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class f${constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Io(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class c${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(mt.prototype[Symbol.iterator]=function(){return this.iter()},Io.prototype[Symbol.iterator]=f$.prototype[Symbol.iterator]=c$.prototype[Symbol.iterator]=function(){return this});class S4{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}let xl="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return xl[e-1]<=n;return!1}function ym(n){return n>=127462&&n<=127487}const vm=8205;function Ei(n,e,t=!0,i=!0){return(t?u$:$4)(n,e,i)}function u$(n,e,t){if(e==n.length)return e;e&&h$(n.charCodeAt(e))&&O$(n.charCodeAt(e-1))&&e--;let i=Qi(n,e);for(e+=Zn(i);e=0&&ym(Qi(n,l));)s++,l-=2;if(s%2==0)break;e+=2}else break}return e}function $4(n,e,t){for(;e>0;){let i=u$(n,e-2,t);if(i=56320&&n<57344}function O$(n){return n>=55296&&n<56320}function Qi(n,e){let t=n.charCodeAt(e);if(!O$(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return h$(i)?(t-55296<<10)+(i-56320)+65536:t}function Qd(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Zn(n){return n<65536?1:2}const _O=/\r\n?|\n/;var ki=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(ki||(ki={}));class mr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-r);s+=o}else{if(i!=ki.Simple&&c>=e&&(i==ki.TrackDel&&re||i==ki.TrackBefore&&re))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?s:s+a;s+=a}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i=0&&r<=t&&o>=e)return rt?"cover":!0;r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new mr(e)}static create(e){return new mr(e)}}class ui extends mr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return kO(this,(t,i,r,s,l)=>e=e.replace(r,r+(i-t),l),!1),e}mapDesc(e,t=!1){return PO(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r=0){t[r]=o,t[r+1]=l;let a=r>>1;for(;i.length0&&ds(i,t,s.text),s.forward(h),o+=h}let c=e[l++];for(;o>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],l=0,o=null;function a(h=!1){if(!h&&!r.length)return;lp||O<0||p>t)throw new RangeError(`Invalid change range ${O} to ${p} (in doc of length ${t})`);let m=g?typeof g=="string"?mt.of(g.split(i||_O)):g:mt.empty,$=m.length;if(O==p&&$==0)return;Ol&&Ti(r,O-l,-1),Ti(r,p-O,$),ds(s,r,m),l=p}}return c(e),a(!o),o}static empty(e){return new ui(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;ro&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function ds(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)o=n.sections[l++],a=n.sections[l++];e(r,c,s,h,O),r=c,s=h}}}function PO(n,e,t,i=!1){let r=[],s=i?[]:null,l=new Go(n),o=new Go(e);for(let a=-1;;)if(l.ins==-1&&o.ins==-1){let c=Math.min(l.len,o.len);Ti(r,c,-1),l.forward(c),o.forward(c)}else if(o.ins>=0&&(l.ins<0||a==l.i||l.off==0&&(o.len=0&&a=0){let c=0,h=l.len;for(;h;)if(o.ins==-1){let O=Math.min(h,o.len);c+=O,h-=O,o.forward(O)}else if(o.ins==0&&o.lena||l.ins>=0&&l.len>a)&&(o||i.length>c),s.forward2(a),l.forward(a)}}}}class Go{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?mt.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?mt.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class js{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new js(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return ee.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ee.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ee.range(e.anchor,e.head)}static create(e,t,i){return new js(e,t,i)}}class ee{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ee.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ee(e.ranges.map(t=>js.fromJSON(t)),e.main)}static single(e,t=e){return new ee([ee.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;rs.head?ee.range(a,o):ee.range(o,a))}}return new ee(e,t)}}function p$(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let _d=0;class _e{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=_d++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new _e(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:kd),!!e.static,e.enables)}of(e){return new nc([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new nc(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new nc(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function kd(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class nc{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=_d++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,l=e[s]>>1,o=this.type==2,a=!1,c=!1,h=[];for(let O of this.dependencies)O=="doc"?a=!0:O=="selection"?c=!0:((t=e[O.id])!==null&&t!==void 0?t:1)&1||h.push(e[O.id]);return{create(O){return O.values[l]=i(O),1},update(O,p){if(a&&p.docChanged||c&&(p.docChanged||p.selection)||xO(O,h)){let g=i(O);if(o?!wm(g,O.values[l],r):!r(g,O.values[l]))return O.values[l]=g,1}return 0},reconfigure:(O,p)=>{let g,m=p.config.address[s];if(m!=null){let $=mc(p,m);if(this.dependencies.every(y=>y instanceof _e?p.facet(y)===O.facet(y):y instanceof pi?p.field(y,!1)==O.field(y,!1):!0)||(o?wm(g=i(O),$,r):r(g=i(O),$)))return O.values[l]=$,0}else g=i(O);return O.values[l]=g,1}}}}function wm(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),l=n[e.id]>>1;function o(a){let c=[];for(let h=0;hi===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Qm).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],l=this.updateF(s,r);return this.compareF(s,l)?0:(i.values[t]=l,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Qm.of({field:this,create:e})]}get extension(){return this}}const qs={lowest:4,low:3,default:2,high:1,highest:0};function _o(n){return e=>new g$(e,n)}const Ks={highest:_o(qs.highest),high:_o(qs.high),default:_o(qs.default),low:_o(qs.low),lowest:_o(qs.lowest)};class g${constructor(e,t){this.inner=e,this.prec=t}}class ql{of(e){return new WO(this,e)}reconfigure(e){return ql.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class WO{constructor(e,t){this.compartment=e,this.inner=t}}class gc{constructor(e,t,i,r,s,l){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=l,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let r=[],s=Object.create(null),l=new Map;for(let p of v4(e,t,l))p instanceof pi?r.push(p):(s[p.facet.id]||(s[p.facet.id]=[])).push(p);let o=Object.create(null),a=[],c=[];for(let p of r)o[p.id]=c.length<<1,c.push(g=>p.slot(g));let h=i==null?void 0:i.config.facets;for(let p in s){let g=s[p],m=g[0].facet,$=h&&h[p]||[];if(g.every(y=>y.type==0))if(o[m.id]=a.length<<1|1,kd($,g))a.push(i.facet(m));else{let y=m.combine(g.map(_=>_.value));a.push(i&&m.compare(y,i.facet(m))?i.facet(m):y)}else{for(let y of g)y.type==0?(o[y.id]=a.length<<1|1,a.push(y.value)):(o[y.id]=c.length<<1,c.push(_=>y.dynamicSlot(_)));o[m.id]=c.length<<1,c.push(y=>y4(y,m,g))}}let O=c.map(p=>p(o));return new gc(e,l,O,o,a,s)}}function v4(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(l,o){let a=r.get(l);if(a!=null){if(a<=o)return;let c=i[a].indexOf(l);c>-1&&i[a].splice(c,1),l instanceof WO&&t.delete(l.compartment)}if(r.set(l,o),Array.isArray(l))for(let c of l)s(c,o);else if(l instanceof WO){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(l.compartment)||l.inner;t.set(l.compartment,c),s(c,o)}else if(l instanceof g$)s(l.inner,l.prec);else if(l instanceof pi)i[o].push(l),l.provides&&s(l.provides,o);else if(l instanceof nc)i[o].push(l),l.facet.extensions&&s(l.facet.extensions,qs.default);else{let c=l.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,o)}}return s(n,qs.default),i.reduce((l,o)=>l.concat(o))}function Lo(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function mc(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const m$=_e.define(),S$=_e.define({combine:n=>n.some(e=>e),static:!0}),b$=_e.define({combine:n=>n.length?n[0]:void 0,static:!0}),$$=_e.define(),y$=_e.define(),v$=_e.define(),w$=_e.define({combine:n=>n.length?n[0]:!1});class Ir{constructor(e,t){this.type=e,this.value=t}static define(){return new w4}}class w4{of(e){return new Ir(this,e)}}class Q4{constructor(e){this.map=e}of(e){return new Le(this,e)}}class Le{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Le(this.type,t)}is(e){return this.type==e}static define(e={}){return new Q4(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}Le.reconfigure=Le.define();Le.appendConfig=Le.define();class hi{constructor(e,t,i,r,s,l){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=l,this._doc=null,this._state=null,i&&p$(i,t.newLength),s.some(o=>o.type==hi.time)||(this.annotations=s.concat(hi.time.of(Date.now())))}static create(e,t,i,r,s,l){return new hi(e,t,i,r,s,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(hi.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}hi.time=Ir.define();hi.userEvent=Ir.define();hi.addToHistory=Ir.define();hi.remote=Ir.define();function _4(n,e){let t=[];for(let i=0,r=0;;){let s,l;if(i=n[i]))s=n[i++],l=n[i++];else if(r=0;r--){let s=i[r](n);s instanceof hi?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof hi?n=s[0]:n=_$(e,Wl(s),!1)}return n}function P4(n){let e=n.startState,t=e.facet(v$),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Q$(i,CO(e,s,n.changes.newLength),!0))}return i==n?n:hi.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const x4=[];function Wl(n){return n==null?x4:Array.isArray(n)?n:[n]}var Lt=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Lt||(Lt={}));const W4=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let TO;try{TO=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function C4(n){if(TO)return TO.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||W4.test(t)))return!0}return!1}function T4(n){return e=>{if(!/\S/.test(e))return Lt.Space;if(C4(e))return Lt.Word;for(let t=0;t-1)return Lt.Word;return Lt.Other}}class Ot{constructor(e,t,i,r,s,l){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,l&&(l._state=this);for(let o=0;or.set(a,o)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(Le.reconfigure)?(t=null,i=l.value):l.is(Le.appendConfig)&&(t=null,i=Wl(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=gc.resolve(i,r,this),s=new Ot(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(o,a)=>a.reconfigure(o,this),null).values),new Ot(t,e.newDoc,e.newSelection,s,(l,o)=>o.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ee.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],l=Wl(i.effects);for(let o=1;ol.spec.fromJSON(o,a)))}}return Ot.create({doc:e.doc,selection:ee.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=gc.resolve(e.extensions||[],new Map),i=e.doc instanceof mt?e.doc:mt.of((e.doc||"").split(t.staticFacet(Ot.lineSeparator)||_O)),r=e.selection?e.selection instanceof ee?e.selection:ee.single(e.selection.anchor,e.selection.head):ee.single(0);return p$(r,i.length),t.staticFacet(S$)||(r=r.asSingle()),new Ot(t,i,r,t.dynamicSlots.map(()=>null),(s,l)=>l.create(s),null)}get tabSize(){return this.facet(Ot.tabSize)}get lineBreak(){return this.facet(Ot.lineSeparator)||` @@ -196,5 +196,5 @@ function print() { __p += __j.call(arguments, '') } })(); `;function ES(n,e,t){const i=n.slice();return i[23]=e[t],i[24]=e,i[25]=t,i}function zS(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R;return y=new wt({props:{icon:WC}}),{c(){e=k("div"),t=k("div"),t.innerHTML="Solution:",i=N(),r=k("div"),s=k("input"),o=N(),a=k("div"),c=k("input"),O=N(),p=k("div"),g=k("p"),m=k("button"),$=k("span"),Ae(y.$$.fragment),v(t,"class","solution-label svelte-g2g7zr"),v(s,"class","input is-small"),v(s,"type","number"),v(s,"min",l=n[2]>0?1:0),v(s,"max",n[2]),v(c,"type","range"),v(c,"min",h=n[2]>0?1:0),v(c,"max",n[2]),v(c,"class","svelte-g2g7zr"),v(a,"class","solution-slider svelte-g2g7zr"),v($,"class","icon"),v(m,"class","button is-small"),v(m,"title","Follow latest solution"),ne(m,"is-primary",n[0]),ne(m,"is-light",!n[0]),v(g,"class","control"),v(p,"class","field has-addons svelte-g2g7zr"),v(e,"class","top svelte-g2g7zr")},m(X,C){Y(X,e,C),Q(e,t),Q(e,i),Q(e,r),Q(r,s),si(s,n[1]),Q(e,o),Q(e,a),Q(a,c),si(c,n[1]),Q(e,O),Q(e,p),Q(p,g),Q(g,m),Q(m,$),Re(y,$,null),_=!0,W||(R=[le(s,"input",n[12]),le(c,"change",n[13]),le(c,"input",n[13]),le(m,"click",n[14])],W=!0)},p(X,C){(!_||C&4&&l!==(l=X[2]>0?1:0))&&v(s,"min",l),(!_||C&4)&&v(s,"max",X[2]),C&2&&Bo(s.value)!==X[1]&&si(s,X[1]),(!_||C&4&&h!==(h=X[2]>0?1:0))&&v(c,"min",h),(!_||C&4)&&v(c,"max",X[2]),C&2&&si(c,X[1]),(!_||C&1)&&ne(m,"is-primary",X[0]),(!_||C&1)&&ne(m,"is-light",!X[0])},i(X){_||(M(y.$$.fragment,X),_=!0)},o(X){j(y.$$.fragment,X),_=!1},d(X){X&&A(e),Xe(y),W=!1,Ft(R)}}}function MS(n){let e,t,i=n[24],r=n[25],s,l;const o=()=>n[15](e,i,r),a=()=>n[15](null,i,r);function c(...h){return n[16](n[23],...h)}return{c(){e=k("iframe"),v(e,"class","vis-window svelte-g2g7zr"),Om(e.src,t=n[23].url)||v(e,"src",t),v(e,"title","Visualisation")},m(h,O){Y(h,e,O),o(),s||(l=le(e,"load",c),s=!0)},p(h,O){n=h,O&8&&!Om(e.src,t=n[23].url)&&v(e,"src",t),(i!==n[24]||r!==n[25])&&(a(),i=n[24],r=n[25],o())},d(h){h&&A(e),a(),s=!1,l()}}}function G9(n){let e,t,i,r,s,l,o,a=n[2]>0&&zS(n),c=st(n[3]),h=[];for(let O=0;O0?a?(a.p(O,p),p&4&&M(a,1)):(a=zS(O),a.c(),M(a,1),a.m(e,t)):a&&(Je(),j(a,1,1,()=>{a=null}),et()),p&8){c=st(O[3]);let g;for(g=0;g{re=ke});ae.then(ke=>{ke.contentWindow.postMessage({event:"init",payload:L},"*")});const ye=s.reduce((ke,We)=>({...ke,[We.name]:We.state.doc.toString()}),{}),Se=[],ge=new DOMParser().parseFromString(q,"text/html");for(const ke of ge.getElementsByTagName("script")){const We=ke.getAttribute("src");if(We==="/minizinc-ide.js")ke.src=H9;else if(We in ye&&We.endsWith(".js")){const lt=URL.createObjectURL(new Blob([ye[We]],{type:"text/javascript; charset=utf-8"}));ke.src=lt,Se.push(lt)}}for(const ke of ge.getElementsByTagName("link")){const We=ke.getAttribute("href");if(We in ye&&We.endsWith(".css")){const lt=URL.createObjectURL(new Blob([ye[We]],{type:"text/css; charset=utf-8"}));ke.href=lt,Se.push(lt)}}const Ue=new XMLSerializer().serializeToString(ge.doctype)+ge.documentElement.outerHTML,Ie=URL.createObjectURL(new Blob([Ue],{type:"text/html; charset=utf-8"}));t(3,O=[...O,{key:B,url:Ie,extraUrls:Se,makeReady:re,ready:ae,solutions:[],element:null}])}function y(B,q){for(const L in B){const re=O.find(ye=>ye.key===L);if(!re){console.error(`Did not find visualisation for ${L}`);continue}const ae={time:q,data:B[L]};re.solutions.push(ae),xn({event:"solution",payload:ae},re)}t(2,h++,h)}function _(B,q){p={status:B,time:q};for(let L=0;Lre.element.contentWindow===B.source);switch(q.event){case"rebroadcast":for(const ae of O)xn(q.message,ae);q.message.event==="goToSolution"&&(l=q.message.payload===-1,t(0,o=q.message.payload===-1),a=q.message.payload+1,t(1,c=q.message.payload+1));break;case"solve":r("solve",{modelFile:q.modelFile,dataFiles:q.dataFiles,options:q.options});break;case"getNumSolutions":xn({event:"response",id:q.id,payload:L.solutions.length},L);break;case"getSolution":const re=q.index<0?q.index+L.solutions.length:q.index;if(re<0||re>=L.solutions.length)xn({event:"error",id:q.id,message:"Solution index out of range"},L);else{xn({event:"response",id:q.id,payload:L.solutions[q.index===-1?L.solutions.length-1:q.index]},L);break}case"getAllSolutions":xn({event:"response",id:q.id,payload:L.solutions},L);break;case"getStatus":xn({event:"response",id:q.id,payload:p},L);break;case"getFinishTime":xn({event:"response",id:q.id,payload:g},L);break}}function X(B,q,L){if(o&&a===c&&(a=h,t(1,c=h)),o!==l){l=o;for(const re of O)xn({event:"goToSolution",payload:o?-1:c-1},re)}if(a!==c){a=c,l=!1,t(0,o=!1);for(const re of O)xn({event:"goToSolution",payload:c-1},re)}}function C(){c=Bo(this.value),t(1,c)}function E(){c=Bo(this.value),t(1,c)}const D=()=>t(0,o=!o);function z(B,q,L){Et[B?"unshift":"push"](()=>{q[L].element=B,t(3,O)})}const F=(B,q)=>B.makeReady(q.target);return n.$$set=B=>{"files"in B&&t(6,s=B.files)},n.$$.update=()=>{n.$$.dirty&8&&t(4,i=Math.ceil(Math.sqrt(O.length))),n.$$.dirty&7&&X()},[o,c,h,O,i,R,s,m,$,y,_,W,C,E,D,z,F]}class J9 extends $i{constructor(e){super(),bi(this,e,K9,G9,Oi,{files:6,reset:7,addVisualisation:8,addSolution:9,status:10,finish:11})}get reset(){return this.$$.ctx[7]}get addVisualisation(){return this.$$.ctx[8]}get addSolution(){return this.$$.ctx[9]}get status(){return this.$$.ctx[10]}get finish(){return this.$$.ctx[11]}}const DS=[".mzn",".mzc",".dzn",".json",".html",".js",".css"];async function sQ(n){const e=n.startsWith("http://")||n.startsWith("https://")?n:`http://${n}`,t=e.split("/").pop();if(!t.endsWith(".mzp")&&DS.every(r=>!t.endsWith(r)))throw new Error("File type not recognised");const i=await fetch(new URL(e));if(!i.ok)throw new Error(`Request failed (${i.status} ${i.statusText})`);if(t.endsWith(".mzp")){const r=await i.json(),s=[],l=r.openFiles[r.openTab];let o=0;for(const c of r.projectFiles){const h=c.split("/").pop();if(DS.every(g=>!h.endsWith(g)))continue;c===l&&(o=s.length);const O=await fetch(new URL(c,e));if(!O.ok)throw new Error(`Request failed (${O.status} ${O.statusText})`);const p=await O.text();s.push({name:h,contents:p,hidden:r.openFiles.indexOf(c)===-1})}let a=r.selectedBuiltinConfigId;return a==="org.gecode.gecode"?a="org.minizinc.gecode_presolver":a==="org.chuffed.chuffed"&&(a="org.minizinc.chuffed"),{files:s,tab:o,solverId:a,timestamp:Date.now()}}else{const r=await i.text();return{files:[{name:t,contents:r}],timestamp:Date.now()}}}function e7(n){let e,t;return e=new _s({props:{active:n[0],title:"Create new file",$$slots:{default:[i7]},$$scope:{ctx:n}}}),e.$on("activate",n[8]),e.$on("cancel",n[23]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&1&&(s.active=i[0]),r&134217770&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function t7(n){let e,t;return e=new _s({props:{active:n[0],title:"Import from URL",$$slots:{footer:[r7],default:[n7]},$$scope:{ctx:n}}}),e.$on("activate",n[8]),e.$on("cancel",n[14]),e.$on("submit",n[10]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&1&&(s.active=i[0]),r&134217816&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function i7(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R,X,C,E,D,z,F,B,q,L,re,ae,ye,Se,ge,Ue,Ie;return{c(){e=k("aside"),t=k("p"),t.textContent="Model",i=N(),r=k("ul"),s=k("li"),l=k("button"),l.textContent="Model file (.mzn)",o=N(),a=k("li"),c=k("button"),c.textContent="Solution checker model (.mzc.mzn)",h=N(),O=k("p"),O.textContent="Data",p=N(),g=k("ul"),m=k("li"),$=k("button"),$.textContent="Data file (.dzn)",y=N(),_=k("li"),W=k("button"),W.textContent="JSON data file (.json)",R=N(),X=k("p"),X.textContent="Visualisation",C=N(),E=k("ul"),D=k("li"),z=k("button"),z.textContent="Custom visualisation (.html)",F=N(),B=k("p"),B.textContent="Import",q=N(),L=k("ul"),re=k("li"),ae=k("button"),ae.textContent="Upload file(s)",ye=N(),Se=k("li"),ge=k("button"),ge.textContent="Import from URL",v(t,"class","menu-label"),v(l,"type","button"),v(c,"type","button"),v(r,"class","menu-list"),v(O,"class","menu-label"),v($,"type","button"),v(W,"type","button"),v(g,"class","menu-list"),v(X,"class","menu-label"),v(z,"type","button"),v(E,"class","menu-list"),v(B,"class","menu-label"),v(ae,"type","button"),v(ge,"type","button"),v(L,"class","menu-list"),v(e,"class","menu")},m(ke,We){Y(ke,e,We),Q(e,t),Q(e,i),Q(e,r),Q(r,s),Q(s,l),n[15](l),Q(r,o),Q(r,a),Q(a,c),Q(e,h),Q(e,O),Q(e,p),Q(e,g),Q(g,m),Q(m,$),Q(g,y),Q(g,_),Q(_,W),Q(e,R),Q(e,X),Q(e,C),Q(e,E),Q(E,D),Q(D,z),Q(e,F),Q(e,B),Q(e,q),Q(e,L),Q(L,re),Q(re,ae),Q(L,ye),Q(L,Se),Q(Se,ge),Ue||(Ie=[le(l,"click",n[16]),le(c,"click",n[17]),le($,"click",n[18]),le(W,"click",n[19]),le(z,"click",n[20]),le(ae,"click",n[21]),le(ge,"click",n[22])],Ue=!0)},p:Qe,d(ke){ke&&A(e),n[15](null),Ue=!1,Ft(Ie)}}}function VS(n){let e,t;return{c(){e=k("div"),t=pe(n[6]),v(e,"class","error svelte-6l40ed")},m(i,r){Y(i,e,r),Q(e,t)},p(i,r){r&64&&Ne(t,i[6])},d(i){i&&A(e)}}}function n7(n){let e,t,i,r,s,l,o=n[6]&&VS(n);return{c(){o&&o.c(),e=N(),t=k("div"),i=k("p"),r=k("input"),v(r,"class","input"),v(r,"type","text"),v(r,"pattern",".+\\.(mzn|dzn|json|js|html|css|mzp|mzc)"),r.required=!0,v(i,"class","control is-expanded"),v(t,"class","field")},m(a,c){o&&o.m(a,c),Y(a,e,c),Y(a,t,c),Q(t,i),Q(i,r),n[12](r),si(r,n[4]),s||(l=le(r,"input",n[13]),s=!0)},p(a,c){a[6]?o?o.p(a,c):(o=VS(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),c&16&&r.value!==a[4]&&si(r,a[4])},d(a){a&&(A(e),A(t)),o&&o.d(a),n[12](null),s=!1,l()}}}function r7(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),t.textContent="OK",i=N(),r=k("button"),r.textContent="Cancel",v(t,"class","button is-primary"),v(r,"class","button"),v(r,"type","button"),v(e,"slot","footer")},m(o,a){Y(o,e,a),Q(e,t),Q(e,i),Q(e,r),s||(l=le(r,"click",n[11]),s=!0)},p:Qe,d(o){o&&A(e),s=!1,l()}}}function s7(n){let e,t,i,r,s,l,o;const a=[t7,e7],c=[];function h(O,p){return O[5]?0:1}return e=h(n),t=c[e]=a[e](n),{c(){t.c(),i=N(),r=k("input"),v(r,"class","is-hidden svelte-6l40ed"),v(r,"type","file"),r.multiple=!0,v(r,"accept",".mzn,.mzc,.dzn,.json,.html,.js,.css")},m(O,p){c[e].m(O,p),Y(O,i,p),Y(O,r,p),n[24](r),s=!0,l||(o=[le(r,"change",n[25]),le(r,"change",n[9])],l=!0)},p(O,[p]){let g=e;e=h(O),e===g?c[e].p(O,p):(Je(),j(c[g],1,1,()=>{c[g]=null}),et(),t=c[e],t?t.p(O,p):(t=c[e]=a[e](O),t.c()),M(t,1),t.m(i.parentNode,i))},i(O){s||(M(t),s=!0)},o(O){j(t),s=!1},d(O){O&&(A(i),A(r)),c[e].d(O),n[24](null),l=!1,Ft(o)}}}function l7(n,e,t){let{active:i=!1}=e;const r=en();let s,l,o,a="",c=!1,h=null;function O(ae){t(5,c=!1),t(4,a=""),t(6,h=null)}async function p(){await Fn(),o&&o.focus()}async function g(){const ae=[];for(const Se of l)ae.push(new Promise((ge,Ue)=>{const Ie=new FileReader;Ie.onload=()=>{ge({name:Se.name,contents:Ie.result})},Ie.onerror=ke=>Ue(ke),Ie.readAsText(Se)}));const ye=await Promise.all(ae);r("open",{files:ye})}async function m(){try{r("open",await sQ(a))}catch(ae){t(6,h=`Failed to import from URL: ${ae.message||ae}`),console.error(ae)}}const $=()=>r("cancel");function y(ae){Et[ae?"unshift":"push"](()=>{o=ae,t(3,o)})}function _(){a=this.value,t(4,a)}const W=()=>r("cancel");function R(ae){Et[ae?"unshift":"push"](()=>{o=ae,t(3,o)})}const X=()=>r("new",{type:".mzn"}),C=()=>r("new",{type:".mzc.mzn"}),E=()=>r("new",{type:".dzn"}),D=()=>r("new",{type:".json"}),z=()=>r("new",{type:".html"}),F=()=>s.click(),B=()=>t(5,c=!0),q=()=>r("cancel");function L(ae){Et[ae?"unshift":"push"](()=>{s=ae,t(1,s)})}function re(){l=this.files,t(2,l)}return n.$$set=ae=>{"active"in ae&&t(0,i=ae.active)},n.$$.update=()=>{n.$$.dirty&1&&O()},[i,s,l,o,a,c,h,r,p,g,m,$,y,_,W,R,X,C,E,D,z,F,B,q,L,re]}class o7 extends $i{constructor(e){super(),bi(this,e,l7,s7,Oi,{active:0})}}function qS(n,e,t){const i=n.slice();return i[14]=e[t],i}function IS(n,e,t){const i=n.slice();return i[17]=e[t].file,i[18]=e[t].index,i}function a7(n){let e,t,i,r,s,l,o;i=new wt({props:{icon:n[17].readOnly?rd:C1}});function a(){return n[11](n[18],n[17])}return{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small"),v(e,"title",r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"),v(e,"type","button"),ne(e,"is-primary",!n[17].readOnly),ne(e,"is-light",n[17].readOnly)},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),s=!0,l||(o=le(e,"click",a),l=!0)},p(c,h){n=c;const O={};h&2&&(O.icon=n[17].readOnly?rd:C1),i.$set(O),(!s||h&2&&r!==(r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"))&&v(e,"title",r),(!s||h&2)&&ne(e,"is-primary",!n[17].readOnly),(!s||h&2)&&ne(e,"is-light",n[17].readOnly)},i(c){s||(M(i.$$.fragment,c),s=!0)},o(c){j(i.$$.fragment,c),s=!1},d(c){c&&A(e),Xe(i),l=!1,o()}}}function f7(n){let e,t,i,r;return i=new wt({props:{icon:rd}}),{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small is-light"),v(e,"title","Compiled checkers are read only"),v(e,"type","button"),e.disabled=!0},m(s,l){Y(s,e,l),Q(e,t),Re(i,t,null),r=!0},p:Qe,i(s){r||(M(i.$$.fragment,s),r=!0)},o(s){j(i.$$.fragment,s),r=!1},d(s){s&&A(e),Xe(i)}}}function LS(n){let e,t,i=n[17].name+"",r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R,X,C,E,D,z,F,B;p=new wt({props:{icon:n[17].hidden?W1:T1}});function q(){return n[10](n[18],n[17])}const L=[f7,a7],re=[];function ae(Se,ge){return ge&2&&(y=null),y==null&&(y=!!Se[17].name.endsWith(".mzc")),y?0:1}_=ae(n,-1),W=re[_]=L[_](n),D=new wt({props:{icon:Uy}});function ye(){return n[12](n[18])}return{c(){e=k("tr"),t=k("td"),r=pe(i),s=N(),l=k("td"),o=k("div"),a=k("div"),c=k("p"),h=k("button"),O=k("span"),Ae(p.$$.fragment),m=N(),$=k("p"),W.c(),R=N(),X=k("p"),C=k("button"),E=k("span"),Ae(D.$$.fragment),v(O,"class","icon"),v(h,"class","button is-small"),v(h,"title",g="Click to "+(n[17].hidden?"show":"hide")+" this file"),v(h,"type","button"),ne(h,"is-primary",!n[17].hidden),ne(h,"is-light",n[17].hidden),v(c,"class","control"),v($,"class","control"),v(E,"class","icon"),v(C,"class","button is-small is-danger"),v(C,"title","Delete this file"),v(C,"type","button"),v(X,"class","control"),v(a,"class","field is-grouped"),v(o,"class","tool-buttons svelte-1bgv9sn")},m(Se,ge){Y(Se,e,ge),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,a),Q(a,c),Q(c,h),Q(h,O),Re(p,O,null),Q(a,m),Q(a,$),re[_].m($,null),Q(a,R),Q(a,X),Q(X,C),Q(C,E),Re(D,E,null),z=!0,F||(B=[le(h,"click",q),le(C,"click",ye)],F=!0)},p(Se,ge){n=Se,(!z||ge&2)&&i!==(i=n[17].name+"")&&Ne(r,i);const Ue={};ge&2&&(Ue.icon=n[17].hidden?W1:T1),p.$set(Ue),(!z||ge&2&&g!==(g="Click to "+(n[17].hidden?"show":"hide")+" this file"))&&v(h,"title",g),(!z||ge&2)&&ne(h,"is-primary",!n[17].hidden),(!z||ge&2)&&ne(h,"is-light",n[17].hidden);let Ie=_;_=ae(n,ge),_===Ie?re[_].p(n,ge):(Je(),j(re[Ie],1,1,()=>{re[Ie]=null}),et(),W=re[_],W?W.p(n,ge):(W=re[_]=L[_](n),W.c()),M(W,1),W.m($,null))},i(Se){z||(M(p.$$.fragment,Se),M(W),M(D.$$.fragment,Se),z=!0)},o(Se){j(p.$$.fragment,Se),j(W),j(D.$$.fragment,Se),z=!1},d(Se){Se&&A(e),Xe(p),re[_].d(),Xe(D),F=!1,Ft(B)}}}function NS(n){let e,t=n[14].label+"",i,r,s,l,o=st(n[14].files),a=[];for(let h=0;hj(a[h],1,1,()=>{a[h]=null});return{c(){e=k("p"),i=pe(t),r=N(),s=k("table");for(let h=0;hj(p[m],1,1,()=>{p[m]=null});return s=new wt({props:{icon:zy}}),{c(){for(let m=0;mAccept',v(e,"slot","footer")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&A(e)}}}function h7(n){let e,t;return e=new _s({props:{active:n[0],title:"Manage files",$$slots:{footer:[u7],default:[c7]},$$scope:{ctx:n}}}),e.$on("submit",n[3]),e.$on("cancel",n[3]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,[r]){const s={};r&1&&(s.active=i[0]),r&2097154&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function O7(n,e,t){let i,r,s,l,o,a,{active:c=!1}=e,{files:h=[]}=e;const O=en();function p(){O("close")}const g=(_,W)=>O("modifyFile",{index:_,options:{hidden:!W.hidden}}),m=(_,W)=>O("modifyFile",{index:_,options:{readOnly:!W.readOnly}}),$=_=>O("delete",{index:_}),y=()=>O("newFile");return n.$$set=_=>{"active"in _&&t(0,c=_.active),"files"in _&&t(4,h=_.files)},n.$$.update=()=>{n.$$.dirty&16&&t(9,i=h.map((_,W)=>({file:_,index:W}))),n.$$.dirty&512&&t(8,r=i.filter(_=>_.file.name.endsWith(".mzn")&&!_.file.name.endsWith(".mzc.mzn")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(7,s=i.filter(_=>_.file.name.endsWith(".dzn")||_.file.name.endsWith(".json")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(6,l=i.filter(_=>_.file.name.endsWith(".mzc")||_.file.name.endsWith(".mzc.mzn")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(5,o=i.filter(_=>!_.file.name.endsWith(".mzn")&&!_.file.name.endsWith(".mzc")&&!_.file.name.endsWith(".dzn")&&!_.file.name.endsWith(".json")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&480&&t(1,a=[{label:"Model files",files:r},{label:"Data files",files:s},{label:"Solution checkers",files:l},{label:"Other files",files:o}].filter(_=>_.files.length>0))},[c,a,O,p,h,o,l,s,r,i,g,m,$,y]}class d7 extends $i{constructor(e){super(),bi(this,e,O7,h7,Oi,{active:0,files:4})}}function jS(n,e,t){const i=n.slice();return i[9]=e[t],i}function BS(n){let e,t=n[9]+"",i,r;return{c(){e=k("option"),i=pe(t),e.__value=r=n[9],si(e,e.__value),v(e,"class","svelte-1x5266v")},m(s,l){Y(s,e,l),Q(e,i)},p(s,l){l&1&&t!==(t=s[9]+"")&&Ne(i,t),l&1&&r!==(r=s[9])&&(e.__value=r,si(e,e.__value))},d(s){s&&A(e)}}}function p7(n){let e,t,i,r,s,l=st(n[0]),o=[];for(let a=0;an[6].call(t)),v(e,"class","select is-fullwidth is-multiple svelte-1x5266v")},m(a,c){Y(a,e,c),Q(e,t);for(let h=0;h0&&t(2,l=p[0])}function a(){i("accept",{modelFile:l})}const c=()=>i("cancel");function h(){l=yO(this),t(2,l),t(0,r)}const O=()=>i("cancel");return n.$$set=p=>{"modelFiles"in p&&t(0,r=p.modelFiles),"active"in p&&t(1,s=p.active)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,s,l,i,a,c,h,O]}class b7 extends $i{constructor(e){super(),bi(this,e,S7,m7,Oi,{modelFiles:0,active:1})}}function FS(n,e,t){const i=n.slice();return i[25]=e[t],i[26]=e,i[27]=t,i}function GS(n,e,t){const i=n.slice();return i[22]=e[t],i}function HS(n){let e,t,i,r,s,l,o,a,c;return{c(){e=k("div"),t=k("ul"),i=k("li"),r=k("a"),r.textContent="Enter parameters",s=N(),l=k("li"),o=k("a"),o.textContent="Select data file",ne(i,"is-active",!n[2]),ne(l,"is-active",n[2]),v(e,"class","tabs")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(t,s),Q(t,l),Q(l,o),a||(c=[le(r,"click",n[13]),le(o,"click",n[14])],a=!0)},p(h,O){O&4&&ne(i,"is-active",!h[2]),O&4&&ne(l,"is-active",h[2])},d(h){h&&A(e),a=!1,Ft(c)}}}function $7(n){let e,t=st(n[5]),i=[];for(let r=0;rn[16].call(t)),v(e,"class","select is-fullwidth is-multiple")},m(a,c){Y(a,e,c),Q(e,t);for(let h=0;hF[B]===void 0?{name:B,value:""}:{name:B,value:F[B]}))}function $(){r?s("accept",{dataFiles:h}):s("accept",{parameters:O.reduce((F,B)=>({...F,[B.name]:B.value}),{})})}const y=()=>s("cancel"),_=()=>t(2,c=!1),W=()=>t(2,c=!0);function R(F){Et[F?"unshift":"push"](()=>{p=F,t(6,p)})}function X(){h=JW(this),t(4,h),t(1,a)}function C(F){Et[F?"unshift":"push"](()=>{p=F,t(6,p)})}function E(F,B){F[B].value=this.value,t(5,O)}function D(F,B){F[B].value=this.value,t(5,O)}const z=()=>s("cancel");return n.$$set=F=>{"active"in F&&t(0,l=F.active),"parameters"in F&&t(11,o=F.parameters),"dataFiles"in F&&t(1,a=F.dataFiles)},n.$$.update=()=>{n.$$.dirty&2048&&m(o),n.$$.dirty&2&&t(3,i=a.length>0),n.$$.dirty&12&&t(7,r=i&&c)},[l,a,c,i,h,O,p,r,s,g,$,o,y,_,W,R,X,C,E,D,z]}class x7 extends $i{constructor(e){super(),bi(this,e,P7,k7,Oi,{active:0,parameters:11,dataFiles:1})}}function eb(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R=Cn(n[1],"-a"),X,C=Cn(n[1],"-f"),E,D,z,F,B,q,L,re,ae,ye=Cn(n[1],"-v"),Se,ge,Ue,Ie,ke,We,lt,Vt=Cn(n[1],"-s"),Qt,pt,qt,$e,oe,H,ue,ce,Ee,tt,ft,je,At,ut,En,_t;r=new wt({props:{icon:My}});let xt=R&&tb(n),St=C&&ib(n),Be=ye&&nb(n),fe=Vt&&rb(n);return{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),s=N(),l=k("form"),o=k("h5"),o.textContent="Solving options",a=N(),c=k("div"),h=k("p"),O=k("input"),p=N(),g=k("label"),g.textContent="Time limit (s)",m=N(),$=k("p"),y=k("input"),W=N(),xt&&xt.c(),X=N(),St&&St.c(),E=N(),D=k("h5"),D.textContent="Output options",z=N(),F=k("div"),B=k("p"),q=k("input"),L=N(),re=k("label"),re.textContent="Verbose compilation",ae=N(),Be&&Be.c(),Se=N(),ge=k("div"),Ue=k("p"),Ie=k("input"),ke=N(),We=k("label"),We.textContent="Compilation statistics",lt=N(),fe&&fe.c(),Qt=N(),pt=k("div"),qt=k("p"),$e=k("input"),oe=N(),H=k("label"),H.textContent="Timing information",ue=N(),ce=k("div"),Ee=k("p"),Ee.innerHTML='',tt=N(),ft=k("p"),je=k("button"),je.textContent="Reset to defaults",v(i,"class","icon"),v(t,"class","button is-text is-small exit-button svelte-makhy9"),v(o,"class","title is-5 svelte-makhy9"),v(O,"id","enable-timelimit"),v(O,"type","checkbox"),v(O,"class","svelte-makhy9"),v(g,"for","enable-timelimit"),v(g,"class","svelte-makhy9"),v(h,"class","control checkbox-control svelte-makhy9"),v(y,"class","input is-fullwidth"),v(y,"type","number"),v(y,"step","1"),v(y,"min",0),y.disabled=_=!n[3].enableTimeLimit,v($,"class","control is-expanded"),v(c,"class","field is-grouped"),v(D,"class","title is-5 svelte-makhy9"),v(q,"id","enable-verbose-compile"),v(q,"type","checkbox"),v(q,"class","svelte-makhy9"),v(re,"for","enable-verbose-compile"),v(re,"class","svelte-makhy9"),v(B,"class","control checkbox-control svelte-makhy9"),v(F,"class","field"),v(Ie,"id","enable-compilation-satistics"),v(Ie,"type","checkbox"),v(Ie,"class","svelte-makhy9"),v(We,"for","enable-compilation-satistics"),v(We,"class","svelte-makhy9"),v(Ue,"class","control checkbox-control svelte-makhy9"),v(ge,"class","field"),v($e,"id","enable-timing-information"),v($e,"type","checkbox"),v($e,"class","svelte-makhy9"),v(H,"for","enable-timing-information"),v(H,"class","svelte-makhy9"),v(qt,"class","control checkbox-control svelte-makhy9"),v(pt,"class","field"),v(Ee,"class","control"),v(je,"type","button"),v(je,"class","button is-danger"),v(ft,"class","control"),v(ce,"class","field is-grouped bottom-buttons svelte-makhy9"),v(e,"class","config-window svelte-makhy9")},m(Fe,He){Y(Fe,e,He),Q(e,t),Q(t,i),Re(r,i,null),Q(e,s),Q(e,l),Q(l,o),Q(l,a),Q(l,c),Q(c,h),Q(h,O),O.checked=n[3].enableTimeLimit,Q(h,p),Q(h,g),Q(c,m),Q(c,$),Q($,y),si(y,n[3].timeLimit),Q(l,W),xt&&xt.m(l,null),Q(l,X),St&&St.m(l,null),Q(l,E),Q(l,D),Q(l,z),Q(l,F),Q(F,B),Q(B,q),q.checked=n[3].verboseCompilation,Q(B,L),Q(B,re),Q(l,ae),Be&&Be.m(l,null),Q(l,Se),Q(l,ge),Q(ge,Ue),Q(Ue,Ie),Ie.checked=n[3].compilerStatistics,Q(Ue,ke),Q(Ue,We),Q(l,lt),fe&&fe.m(l,null),Q(l,Qt),Q(l,pt),Q(pt,qt),Q(qt,$e),$e.checked=n[3].outputTime,Q(qt,oe),Q(qt,H),Q(l,ue),Q(l,ce),Q(ce,Ee),Q(ce,tt),Q(ce,ft),Q(ft,je),ut=!0,En||(_t=[le(t,"click",n[10]),le(O,"change",n[11]),le(y,"input",n[12]),le(q,"change",n[15]),le(Ie,"change",n[17]),le($e,"change",n[19]),le(je,"click",n[2]),le(l,"submit",i$(n[20]))],En=!0)},p(Fe,He){He&8&&(O.checked=Fe[3].enableTimeLimit),(!ut||He&8&&_!==(_=!Fe[3].enableTimeLimit))&&(y.disabled=_),He&8&&Bo(y.value)!==Fe[3].timeLimit&&si(y,Fe[3].timeLimit),He&2&&(R=Cn(Fe[1],"-a")),R?xt?xt.p(Fe,He):(xt=tb(Fe),xt.c(),xt.m(l,X)):xt&&(xt.d(1),xt=null),He&2&&(C=Cn(Fe[1],"-f")),C?St?St.p(Fe,He):(St=ib(Fe),St.c(),St.m(l,E)):St&&(St.d(1),St=null),He&8&&(q.checked=Fe[3].verboseCompilation),He&2&&(ye=Cn(Fe[1],"-v")),ye?Be?Be.p(Fe,He):(Be=nb(Fe),Be.c(),Be.m(l,Se)):Be&&(Be.d(1),Be=null),He&8&&(Ie.checked=Fe[3].compilerStatistics),He&2&&(Vt=Cn(Fe[1],"-s")),Vt?fe?fe.p(Fe,He):(fe=rb(Fe),fe.c(),fe.m(l,Qt)):fe&&(fe.d(1),fe=null),He&8&&($e.checked=Fe[3].outputTime)},i(Fe){ut||(M(r.$$.fragment,Fe),Fe&&Hn(()=>{ut&&(At||(At=yl(e,wc,{x:100,duration:200},!0)),At.run(1))}),ut=!0)},o(Fe){j(r.$$.fragment,Fe),Fe&&(At||(At=yl(e,wc,{x:100,duration:200},!1)),At.run(0)),ut=!1},d(Fe){Fe&&A(e),Xe(r),xt&&xt.d(),St&&St.d(),Be&&Be.d(),fe&&fe.d(),Fe&&At&&At.end(),En=!1,Ft(_t)}}}function tb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="All solutions (for satisfication problems)",v(i,"id","enable-all-solutions"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-all-solutions"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].allSolutions,Q(t,r),Q(t,s),l||(o=le(i,"change",n[13]),l=!0)},p(a,c){c&8&&(i.checked=a[3].allSolutions)},d(a){a&&A(e),l=!1,o()}}}function ib(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Free search",v(i,"id","enable-free-search"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-free-search"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].freeSearch,Q(t,r),Q(t,s),l||(o=le(i,"change",n[14]),l=!0)},p(a,c){c&8&&(i.checked=a[3].freeSearch)},d(a){a&&A(e),l=!1,o()}}}function nb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Verbose solving",v(i,"id","enable-verbose-solve"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-verbose-solve"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].verboseSolving,Q(t,r),Q(t,s),l||(o=le(i,"change",n[16]),l=!0)},p(a,c){c&8&&(i.checked=a[3].verboseSolving)},d(a){a&&A(e),l=!1,o()}}}function rb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Solving statistics",v(i,"id","enable-solving-satistics"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-solving-satistics"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].solvingStatistics,Q(t,r),Q(t,s),l||(o=le(i,"change",n[18]),l=!0)},p(a,c){c&8&&(i.checked=a[3].solvingStatistics)},d(a){a&&A(e),l=!1,o()}}}function W7(n){let e,t,i=n[0]&&eb(n);return{c(){i&&i.c(),e=Gt()},m(r,s){i&&i.m(r,s),Y(r,e,s),t=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&M(i,1)):(i=eb(r),i.c(),M(i,1),i.m(e.parentNode,e)):i&&(Je(),j(i,1,1,()=>{i=null}),et())},i(r){t||(M(i),t=!0)},o(r){j(i),t=!1},d(r){r&&A(e),i&&i.d(r)}}}function Cn(n,e){return n.indexOf(e)!==-1}function C7(n,e,t){const i=en();let{active:r}=e,{stdFlags:s=[]}=e;const l={enableTimeLimit:!1,timeLimit:1,allSolutions:!1,verboseCompilation:!1,verboseSolving:!1,compilerStatistics:!1,solvingStatistics:!1,outputTime:!1,freeSearch:!1};let o={...l};function a(B){const q=B*1e3;q!==Math.floor(q)&&t(3,o.timeLimit=Math.floor(q)/1e3,o)}function c(){for(const B in o)if(l[B]!==o[B])return!1;return!0}function h(){t(3,o={...l})}function O(B){const q={...l};for(const L in l)L in B&&(q[L]=B[L]);t(3,o=q)}function p(){return{...o}}function g(B){const q={solver:B};return o.enableTimeLimit&&o.timeLimit>0&&(q["time-limit"]=o.timeLimit*1e3),o.allSolutions&&Cn(s,"-a")&&(q["all-satisfaction"]=!0),o.verboseCompilation&&(q["verbose-compilation"]=!0),o.verboseSolving&&Cn(s,"-v")&&(q["verbose-solving"]=!0),o.compilerStatistics&&(q["compiler-statistics"]=!0),o.solvingStatistics&&Cn(s,"-s")&&(q["solver-statistics"]=!0),o.outputTime&&(q["output-time"]=!0),o.freeSearch&&Cn(s,"-f")&&(q["free-search"]=!0),q}function m(B){const q={solver:B};return o.verboseCompilation&&(q["verbose-compilation"]=!0),o.compilerStatistics&&(q["compiler-statistics"]=!0),q}const $=()=>i("close");function y(){o.enableTimeLimit=this.checked,t(3,o)}function _(){o.timeLimit=Bo(this.value),t(3,o)}function W(){o.allSolutions=this.checked,t(3,o)}function R(){o.freeSearch=this.checked,t(3,o)}function X(){o.verboseCompilation=this.checked,t(3,o)}function C(){o.verboseSolving=this.checked,t(3,o)}function E(){o.compilerStatistics=this.checked,t(3,o)}function D(){o.solvingStatistics=this.checked,t(3,o)}function z(){o.outputTime=this.checked,t(3,o)}const F=()=>i("close");return n.$$set=B=>{"active"in B&&t(0,r=B.active),"stdFlags"in B&&t(1,s=B.stdFlags)},n.$$.update=()=>{n.$$.dirty&8&&a(o.timeLimit)},[r,s,h,o,i,c,O,p,g,m,$,y,_,W,R,X,C,E,D,z,F]}class T7 extends $i{constructor(e){super(),bi(this,e,C7,W7,Oi,{active:0,stdFlags:1,isDefault:5,reset:2,load:6,save:7,getSolvingConfiguration:8,getCompilationConfiguration:9})}get isDefault(){return this.$$.ctx[5]}get reset(){return this.$$.ctx[2]}get load(){return this.$$.ctx[6]}get save(){return this.$$.ctx[7]}get getSolvingConfiguration(){return this.$$.ctx[8]}get getCompilationConfiguration(){return this.$$.ctx[9]}}function sb(n,e,t){const i=n.slice();return i[14]=e[t],i}const Z7=n=>({item:n&4}),lb=n=>({item:n[14]}),R7=n=>({item:n&8}),ob=n=>({item:n[3]});function ab(n){let e;const t=n[9].selected,i=Zi(t,n,n[8],ob),r=i||X7(n);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&264)&&Xi(i,t,s,s[8],e?Ri(t,s[8],l,R7):Ai(s[8]),ob):r&&r.p&&(!e||l&8)&&r.p(s,e?l:-1)},i(s){e||(M(r,s),e=!0)},o(s){j(r,s),e=!1},d(s){r&&r.d(s)}}}function X7(n){let e=n[3].label+"",t;return{c(){t=pe(e)},m(i,r){Y(i,t,r)},p(i,r){r&8&&e!==(e=i[3].label+"")&&Ne(t,e)},d(i){i&&A(t)}}}function A7(n){let e=n[14].label+"",t;return{c(){t=pe(e)},m(i,r){Y(i,t,r)},p(i,r){r&4&&e!==(e=i[14].label+"")&&Ne(t,e)},d(i){i&&A(t)}}}function fb(n){let e,t,i,r,s;const l=n[9].item,o=Zi(l,n,n[8],lb),a=o||A7(n);function c(){return n[11](n[14])}return{c(){e=k("a"),a&&a.c(),t=N(),v(e,"href","javascript:void(0);"),v(e,"class","dropdown-item"),ne(e,"is-active",n[3]===n[14])},m(h,O){Y(h,e,O),a&&a.m(e,null),Q(e,t),i=!0,r||(s=le(e,"click",c),r=!0)},p(h,O){n=h,o?o.p&&(!i||O&260)&&Xi(o,l,n,n[8],i?Ri(l,n[8],O,Z7):Ai(n[8]),lb):a&&a.p&&(!i||O&4)&&a.p(n,i?O:-1),(!i||O&12)&&ne(e,"is-active",n[3]===n[14])},i(h){i||(M(a,h),i=!0)},o(h){j(a,h),i=!1},d(h){h&&A(e),a&&a.d(h),r=!1,s()}}}function Y7(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,$=n[3]&&ab(n);a=new wt({props:{icon:XC}});let y=st(n[2]),_=[];for(let R=0;Rj(_[R],1,1,()=>{_[R]=null});return{c(){e=N(),t=k("div"),i=k("div"),r=k("button"),s=k("span"),$&&$.c(),l=N(),o=k("span"),Ae(a.$$.fragment),c=N(),h=k("div"),O=k("div");for(let R=0;R<_.length;R+=1)_[R].c();v(o,"class","icon is-small"),v(r,"class","button"),r.disabled=n[4],v(i,"class","dropdown-trigger"),v(O,"class","dropdown-content"),v(h,"class","dropdown-menu"),v(t,"class","dropdown"),v(t,"title",n[1]),ne(t,"is-active",n[0])},m(R,X){Y(R,e,X),Y(R,t,X),Q(t,i),Q(i,r),Q(r,s),$&&$.m(s,null),Q(r,l),Q(r,o),Re(a,o,null),Q(t,c),Q(t,h),Q(h,O);for(let C=0;C<_.length;C+=1)_[C]&&_[C].m(O,null);n[12](t),p=!0,g||(m=[le(document.body,"click",n[7]),le(r,"click",n[10])],g=!0)},p(R,[X]){if(R[3]?$?($.p(R,X),X&8&&M($,1)):($=ab(R),$.c(),M($,1),$.m(s,null)):$&&(Je(),j($,1,1,()=>{$=null}),et()),(!p||X&16)&&(r.disabled=R[4]),X&332){y=st(R[2]);let C;for(C=0;Ct(0,c=!c),$=_=>p(_);function y(_){Et[_?"unshift":"push"](()=>{O=_,t(5,O)})}return n.$$set=_=>{"title"in _&&t(1,l=_.title),"items"in _&&t(2,o=_.items),"currentItem"in _&&t(3,a=_.currentItem),"active"in _&&t(0,c=_.active),"disabled"in _&&t(4,h=_.disabled),"$$scope"in _&&t(8,r=_.$$scope)},[c,l,o,a,h,O,p,g,r,i,m,$,y]}class E7 extends $i{constructor(e){super(),bi(this,e,U7,Y7,Oi,{title:1,items:2,currentItem:3,active:0,disabled:4})}}const lQ=Le.define({map:(n,e)=>({from:e.mapPos(n.from),to:e.mapPos(n.to),msg:n.msg,type:n.type})}),oQ=Le.define(),cb=pi.define({create(){return Ye.none},update(n,e){n=n.map(e.changes);for(const t of e.effects)t.is(oQ)&&(n=Ye.none),t.is(lQ)&&(n=n.update({add:[Ye.mark({class:`cm-mzn-underline-${t.value.type}`,attributes:{title:t.value.msg}}).range(t.value.from,t.value.to)]}));return n},provide:n=>de.decorations.from(n)});function $d(n,e,t){let i,r=1,s=1;for(i=0;i=n&&s>=e)return i;s++,t[i]===` `&&(r++,s=1)}return i}function z7(n,e,t){const i=e.map(r=>lQ.of({from:$d(r.location.firstLine,r.location.firstColumn,n),to:$d(r.location.lastLine,r.location.lastColumn,n)+1,msg:`${r.type==="error"?"Error":"Warning"}: ${r.what}: ${r.message}`,type:r.type}));t.state.field(cb,!1)||i.push(Le.appendConfig.of([cb])),t.dispatch({effects:[oQ.of(null),...i]})}const ml=[];function aQ(n,e=Qe){let t;const i=new Set;function r(o){if(Oi(n,o)&&(n=o,t)){const a=!ml.length;for(const c of i)c[1](),ml.push(c,n);if(a){for(let c=0;c{i.delete(c),i.size===0&&t&&(t(),t=null)}}return{set:r,update:s,subscribe:l}}const fQ=n=>{const e=window.matchMedia(n);return aQ(e.matches,t=>{const i=()=>t(window.matchMedia(n).matches);return e.addEventListener("change",i),()=>e.removeEventListener("change",i)})},M7=fQ("(prefers-color-scheme: dark)"),D7=fQ("(max-width: 768px)"),V7=n=>({isMobile:n[1]&4194304}),ub=n=>({isMobile:n[53]}),q7=n=>({isMobile:n[1]&4194304}),hb=n=>({isMobile:n[53]}),I7=n=>({isMobile:n[1]&4194304}),Ob=n=>({isMobile:n[53]}),L7=n=>({isMobile:n[1]&4194304}),db=n=>({isMobile:n[53]}),N7=n=>({isMobile:n[1]&4194304}),pb=n=>({isMobile:n[53]});function gb(n,e,t){const i=n.slice();return i[157]=e[t],i[159]=t,i}const j7=n=>({isMobile:n[1]&4194304}),mb=n=>({isMobile:n[53]});function Sb(n,e,t){const i=n.slice();return i[157]=e[t],i[159]=t,i}const B7=n=>({isMobile:n[1]&4194304}),bb=n=>({isMobile:n[53]}),F7=n=>({isMobile:n[1]&4194304}),$b=n=>({isMobile:n[53]});function G7(n){let e,t,i,r,s,l,o,a,c;return s=new wt({props:{icon:YC}}),{c(){e=k("button"),t=k("span"),t.textContent="Run",i=N(),r=k("span"),Ae(s.$$.fragment),v(r,"class","icon"),v(e,"class","button is-primary"),v(e,"title","Run the current file"),e.disabled=l=!n[50]},m(h,O){Y(h,e,O),Q(e,t),Q(e,i),Q(e,r),Re(s,r,null),o=!0,a||(c=le(e,"click",n[62]),a=!0)},p(h,O){(!o||O[1]&524288&&l!==(l=!h[50]))&&(e.disabled=l)},i(h){o||(M(s.$$.fragment,h),o=!0)},o(h){j(s.$$.fragment,h),o=!1},d(h){h&&A(e),Xe(s),a=!1,c()}}}function H7(n){let e,t,i,r,s,l,o,a;return s=new wt({props:{icon:RC}}),{c(){e=k("button"),t=k("span"),t.textContent="Stop",i=N(),r=k("span"),Ae(s.$$.fragment),v(r,"class","icon"),v(e,"class","button is-danger"),v(e,"title","Cancel solving")},m(c,h){Y(c,e,h),Q(e,t),Q(e,i),Q(e,r),Re(s,r,null),l=!0,o||(a=le(e,"click",n[64]),o=!0)},p:Qe,i(c){l||(M(s.$$.fragment,c),l=!0)},o(c){j(s.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(s),o=!1,a()}}}function yb(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),i=k("span"),i.textContent="Compile",v(t,"class","button"),v(t,"title","Compile the current file and show the resultant FlatZinc"),t.disabled=r=n[47]||!n[49],v(e,"class","control")},m(o,a){Y(o,e,a),Q(e,t),Q(t,i),s||(l=le(t,"click",n[63]),s=!0)},p(o,a){a[1]&327680&&r!==(r=o[47]||!o[49])&&(t.disabled=r)},d(o){o&&A(e),s=!1,l()}}}function vb(n){let e,t,i;return t=new E7({props:{items:n[52],currentItem:n[0]?n[19].edge:n[19].latest,disabled:n[47],title:"Configure MiniZinc version",$$slots:{item:[K7,({item:r})=>({161:r}),({item:r})=>[0,0,0,0,0,r?64:0]]},$$scope:{ctx:n}}}),t.$on("selectItem",n[71]),{c(){e=k("div"),Ae(t.$$.fragment),v(e,"class","control")},m(r,s){Y(r,e,s),Re(t,e,null),i=!0},p(r,s){const l={};s[1]&2097152&&(l.items=r[52]),s[0]&524289&&(l.currentItem=r[0]?r[19].edge:r[19].latest),s[1]&65536&&(l.disabled=r[47]),s[4]&8192|s[5]&64&&(l.$$scope={dirty:s,ctx:r}),t.$set(l)},i(r){i||(M(t.$$.fragment,r),i=!0)},o(r){j(t.$$.fragment,r),i=!1},d(r){r&&A(e),Xe(t)}}}function K7(n){let e,t=n[161].label+"",i,r,s=n[161].detail+"",l,o;return{c(){e=k("span"),i=pe(t),r=pe(" ("),l=pe(s),o=pe(")"),v(e,"slot","item")},m(a,c){Y(a,e,c),Q(e,i),Q(e,r),Q(e,l),Q(e,o)},p(a,c){c[5]&64&&t!==(t=a[161].label+"")&&Ne(i,t),c[5]&64&&s!==(s=a[161].detail+"")&&Ne(l,s)},d(a){a&&A(e)}}}function wb(n){let e,t,i,r,s,l=st(n[23]),o=[];for(let a=0;an[93].call(i)),v(t,"class","select is-fullwidth"),v(e,"class","control is-expanded")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i);for(let h=0;hSolver:',r=N(),s=k("div"),l=k("div"),o=k("select");for(let $=0;$n[94].call(o)),v(l,"class","select is-fullwidth"),v(s,"class","control is-expanded"),v(t,"class","field has-addons"),v(e,"class","navbar-item is-hidden-mobile")},m($,y){Y($,e,y),Q(e,t),Q(t,i),Q(t,r),Q(t,s),Q(s,l),Q(l,o);for(let _=0;_{m=null}),et())},i($){c||(M(m),c=!0)},o($){j(m),c=!1},d($){$&&A(e),di(g,$),m&&m.d(),h=!1,O()}}}function kb(n){let e,t=n[157].name+"",i,r,s=n[157].version+"",l,o;return{c(){e=k("option"),i=pe(t),r=N(),l=pe(s),o=N(),e.__value=n[159],si(e,e.__value)},m(a,c){Y(a,e,c),Q(e,i),Q(e,r),Q(e,l),Q(e,o)},p(a,c){c[0]&8388608&&t!==(t=a[157].name+"")&&Ne(i,t),c[0]&8388608&&s!==(s=a[157].version+"")&&Ne(l,s)},d(a){a&&A(e)}}}function Pb(n){let e,t,i,r,s,l,o;return r=new wt({props:{icon:Ey}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(t,"title","Solver configuration"),v(e,"class","control")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),Re(r,i,null),s=!0,l||(o=le(t,"click",n[55]),l=!0)},p:Qe,i(a){s||(M(r.$$.fragment,a),s=!0)},o(a){j(r.$$.fragment,a),s=!1},d(a){a&&A(e),Xe(r),l=!1,o()}}}function J7(n){let e,t,i,r,s,l,o;const a=n[92]["navbar-before-share-buttons"],c=Zi(a,n,n[137],Ob);let h=n[10]&&xb(n),O=n[11]&&Wb(n),p=n[12]&&Cb(n);const g=n[92]["navbar-share-buttons"],m=Zi(g,n,n[137],hb);return{c(){c&&c.c(),e=N(),t=k("div"),i=k("div"),h&&h.c(),r=N(),O&&O.c(),s=N(),p&&p.c(),l=N(),m&&m.c(),v(i,"class","field has-addons"),v(t,"class","navbar-item")},m($,y){c&&c.m($,y),Y($,e,y),Y($,t,y),Q(t,i),h&&h.m(i,null),Q(i,r),O&&O.m(i,null),Q(i,s),p&&p.m(i,null),Q(i,l),m&&m.m(i,null),o=!0},p($,y){c&&c.p&&(!o||y[1]&4194304|y[4]&8192)&&Xi(c,a,$,$[137],o?Ri(a,$[137],y,I7):Ai($[137]),Ob),$[10]?h?(h.p($,y),y[0]&1024&&M(h,1)):(h=xb($),h.c(),M(h,1),h.m(i,r)):h&&(Je(),j(h,1,1,()=>{h=null}),et()),$[11]?O?(O.p($,y),y[0]&2048&&M(O,1)):(O=Wb($),O.c(),M(O,1),O.m(i,s)):O&&(Je(),j(O,1,1,()=>{O=null}),et()),$[12]?p?(p.p($,y),y[0]&4096&&M(p,1)):(p=Cb($),p.c(),M(p,1),p.m(i,l)):p&&(Je(),j(p,1,1,()=>{p=null}),et()),m&&m.p&&(!o||y[1]&4194304|y[4]&8192)&&Xi(m,g,$,$[137],o?Ri(g,$[137],y,q7):Ai($[137]),hb)},i($){o||(M(c,$),M(h),M(O),M(p),M(m,$),o=!0)},o($){j(c,$),j(h),j(O),j(p),j(m,$),o=!1},d($){$&&(A(e),A(t)),c&&c.d($),h&&h.d(),O&&O.d(),p&&p.d(),m&&m.d($)}}}function e8(n){let e,t,i,r,s,l,o,a=n[8]&&!n[47]&&n[49]&&Tb(n),c=n[9]&&n[5]&&n[23].length>0&&Zb(n),h=n[4]&&!n[47]&&Rb(n);const O=n[92]["navbar-before-share-buttons"],p=Zi(O,n,n[137],db);let g=n[10]&&n[18]===0&&Xb(n),m=n[12]&&n[18]===0&&Ab(n);return{c(){a&&a.c(),e=N(),c&&c.c(),t=N(),h&&h.c(),i=N(),p&&p.c(),r=N(),g&&g.c(),s=N(),m&&m.c(),l=Gt()},m($,y){a&&a.m($,y),Y($,e,y),c&&c.m($,y),Y($,t,y),h&&h.m($,y),Y($,i,y),p&&p.m($,y),Y($,r,y),g&&g.m($,y),Y($,s,y),m&&m.m($,y),Y($,l,y),o=!0},p($,y){$[8]&&!$[47]&&$[49]?a?(a.p($,y),y[0]&256|y[1]&327680&&M(a,1)):(a=Tb($),a.c(),M(a,1),a.m(e.parentNode,e)):a&&(Je(),j(a,1,1,()=>{a=null}),et()),$[9]&&$[5]&&$[23].length>0?c?(c.p($,y),y[0]&8389152&&M(c,1)):(c=Zb($),c.c(),M(c,1),c.m(t.parentNode,t)):c&&(Je(),j(c,1,1,()=>{c=null}),et()),$[4]&&!$[47]?h?(h.p($,y),y[0]&16|y[1]&65536&&M(h,1)):(h=Rb($),h.c(),M(h,1),h.m(i.parentNode,i)):h&&(Je(),j(h,1,1,()=>{h=null}),et()),p&&p.p&&(!o||y[1]&4194304|y[4]&8192)&&Xi(p,O,$,$[137],o?Ri(O,$[137],y,L7):Ai($[137]),db),$[10]&&$[18]===0?g?(g.p($,y),y[0]&263168&&M(g,1)):(g=Xb($),g.c(),M(g,1),g.m(s.parentNode,s)):g&&(Je(),j(g,1,1,()=>{g=null}),et()),$[12]&&$[18]===0?m?(m.p($,y),y[0]&266240&&M(m,1)):(m=Ab($),m.c(),M(m,1),m.m(l.parentNode,l)):m&&(Je(),j(m,1,1,()=>{m=null}),et())},i($){o||(M(a),M(c),M(h),M(p,$),M(g),M(m),o=!0)},o($){j(a),j(c),j(h),j(p,$),j(g),j(m),o=!1},d($){$&&(A(e),A(t),A(i),A(r),A(s),A(l)),a&&a.d($),c&&c.d($),h&&h.d($),p&&p.d($),g&&g.d($),m&&m.d($)}}}function xb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:Ay}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(t,"title","Share"),t.disabled=s=n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[101]),o=!0)},p(c,h){(!l||h[0]&262144&&s!==(s=c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(r),o=!1,a()}}}function Wb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:ZC}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button"),v(t,"title","Download project"),t.disabled=s=n[37]||n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[102]),o=!0)},p(c,h){(!l||h[0]&262144|h[1]&64&&s!==(s=c[37]||c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(r),o=!1,a()}}}function Cb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:Yy}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(t,"title","Open in playground"),t.disabled=s=n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[68]),o=!0)},p(c,h){(!l||h[0]&262144&&s!==(s=c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(r),o=!1,a()}}}function Tb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:UC}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Compile current file",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[96]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function Zb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Ey}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Solver configuration",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[97]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function Rb(n){let e,t,i,r,s,l,o=n[0]?"latest":"edge",a,c,h,O,p;return i=new wt({props:{icon:PC}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),l=pe("Switch to the "),a=pe(o),c=pe(" version of MiniZinc"),v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(g,m){Y(g,e,m),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),Q(s,l),Q(s,a),Q(s,c),h=!0,O||(p=le(e,"click",n[98]),O=!0)},p(g,m){(!h||m[0]&1)&&o!==(o=g[0]?"latest":"edge")&&Ne(a,o)},i(g){h||(M(i.$$.fragment,g),h=!0)},o(g){j(i.$$.fragment,g),h=!1},d(g){g&&A(e),Xe(i),O=!1,p()}}}function Xb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Ay}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Share this project",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[99]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function Ab(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Yy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Open in MiniZinc Playground",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[100]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function Yb(n){let e,t,i;return t=new NC({props:{files:n[20],currentIndex:n[21],readonly:!n[7]}}),t.$on("selectTab",n[110]),t.$on("reorder",n[111]),t.$on("newFile",n[112]),t.$on("rename",n[58]),t.$on("close",n[113]),t.$on("manageFiles",n[114]),{c(){e=k("div"),Ae(t.$$.fragment),v(e,"class","top svelte-hl0lfa")},m(r,s){Y(r,e,s),Re(t,e,null),i=!0},p(r,s){const l={};s[0]&1048576&&(l.files=r[20]),s[0]&2097152&&(l.currentIndex=r[21]),s[0]&128&&(l.readonly=!r[7]),t.$set(l)},i(r){i||(M(t.$$.fragment,r),i=!0)},o(r){j(t.$$.fragment,r),i=!1},d(r){r&&A(e),Xe(t)}}}function Ub(n){let e,t,i={state:n[51]};return e=new cC({props:i}),n[115](e),{c(){Ae(e.$$.fragment)},m(r,s){Re(e,r,s),t=!0},p(r,s){const l={};s[1]&1048576&&(l.state=r[51]),e.$set(l)},i(r){t||(M(e.$$.fragment,r),t=!0)},o(r){j(e.$$.fragment,r),t=!1},d(r){n[115](null),Xe(e,r)}}}function t8(n){let e,t,i,r,s=n[6]&&Yb(n),l=n[51]&&Ub(n);return{c(){e=k("div"),s&&s.c(),t=N(),i=k("div"),l&&l.c(),v(i,"class","grow svelte-hl0lfa"),v(e,"class","panel stack svelte-hl0lfa"),v(e,"slot","panelA")},m(o,a){Y(o,e,a),s&&s.m(e,null),Q(e,t),Q(e,i),l&&l.m(i,null),r=!0},p(o,a){o[6]?s?(s.p(o,a),a[0]&64&&M(s,1)):(s=Yb(o),s.c(),M(s,1),s.m(e,t)):s&&(Je(),j(s,1,1,()=>{s=null}),et()),o[51]?l?(l.p(o,a),a[1]&1048576&&M(l,1)):(l=Ub(o),l.c(),M(l,1),l.m(i,null)):l&&(Je(),j(l,1,1,()=>{l=null}),et())},i(o){r||(M(s),M(l),r=!0)},o(o){j(s),j(l),r=!1},d(o){o&&A(e),s&&s.d(),l&&l.d()}}}function Eb(n){let e,t,i,r,s,l,o,a,c,h,O,p,g=n[13]&&zb(n);return{c(){e=k("div"),t=k("div"),i=k("ul"),r=k("li"),s=k("a"),s.textContent="Output",l=N(),o=k("li"),a=k("a"),a.textContent="Visualisation",c=N(),g&&g.c(),v(s,"href","javascript:void(0);"),ne(r,"is-active",!n[43]),v(a,"href","javascript:void(0);"),ne(o,"is-active",n[43]),v(t,"class","tabs is-boxed"),v(e,"class","top svelte-hl0lfa")},m(m,$){Y(m,e,$),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Q(i,l),Q(i,o),Q(o,a),Q(i,c),g&&g.m(i,null),h=!0,O||(p=[le(s,"click",n[103]),le(a,"click",n[104])],O=!0)},p(m,$){(!h||$[1]&4096)&&ne(r,"is-active",!m[43]),(!h||$[1]&4096)&&ne(o,"is-active",m[43]),m[13]?g?(g.p(m,$),$[0]&8192&&M(g,1)):(g=zb(m),g.c(),M(g,1),g.m(i,null)):g&&(Je(),j(g,1,1,()=>{g=null}),et())},i(m){h||(M(g),h=!0)},o(m){j(g),h=!1},d(m){m&&A(e),g&&g.d(),O=!1,Ft(p)}}}function zb(n){let e,t,i,r,s,l,o;return r=new wt({props:{icon:Dy}}),{c(){e=k("li"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-small"),v(t,"title","Switch orientation"),v(e,"class","tab-end svelte-hl0lfa")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),Re(r,i,null),s=!0,l||(o=le(t,"click",n[70]),l=!0)},p:Qe,i(a){s||(M(r.$$.fragment,a),s=!0)},o(a){j(r.$$.fragment,a),s=!1},d(a){a&&A(e),Xe(r),l=!1,o()}}}function Mb(n){let e,t,i,r,s,l;return i=new wt({props:{icon:Dy}}),{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small"),v(e,"title","Switch orientation")},m(o,a){Y(o,e,a),Q(e,t),Re(i,t,null),r=!0,s||(l=le(e,"click",n[70]),s=!0)},p:Qe,i(o){r||(M(i.$$.fragment,o),r=!0)},o(o){j(i.$$.fragment,o),r=!1},d(o){o&&A(e),Xe(i),s=!1,l()}}}function i8(n){let e,t,i=n[13]&&!n[42]&&Mb(n);return{c(){e=k("p"),i&&i.c(),v(e,"class","control"),v(e,"slot","before-right-controls")},m(r,s){Y(r,e,s),i&&i.m(e,null),t=!0},p(r,s){r[13]&&!r[42]?i?(i.p(r,s),s[0]&8192|s[1]&2048&&M(i,1)):(i=Mb(r),i.c(),M(i,1),i.m(e,null)):i&&(Je(),j(i,1,1,()=>{i=null}),et())},i(r){t||(M(i),t=!0)},o(r){j(i),t=!1},d(r){r&&A(e),i&&i.d()}}}function n8(n){let e,t,i,r,s,l,o,a,c,h,O=n[42]&&Eb(n),p={files:n[20]};s=new J9({props:p}),n[105](s),s.$on("solve",n[106]);function g($){n[107]($)}let m={output:n[33],showClearOutput:n[14],showAutoClearOutput:n[15],showSectionToggles:n[16],showRightControls:n[17],isTab:n[42],$$slots:{"before-right-controls":[i8]},$$scope:{ctx:n}};return n[1]!==void 0&&(m.autoClearOutput=n[1]),a=new B9({props:m}),Et.push(()=>qo(a,"autoClearOutput",g)),a.$on("clear",n[108]),a.$on("goto",n[109]),{c(){e=k("div"),O&&O.c(),t=N(),i=k("div"),r=k("div"),Ae(s.$$.fragment),l=N(),o=k("div"),Ae(a.$$.fragment),v(r,"class","tab-window svelte-hl0lfa"),ne(r,"visible",n[43]),v(o,"class","tab-window svelte-hl0lfa"),ne(o,"visible",!n[42]||!n[43]),v(i,"class","grow svelte-hl0lfa"),v(e,"class","panel stack svelte-hl0lfa"),v(e,"slot","panelB")},m($,y){Y($,e,y),O&&O.m(e,null),Q(e,t),Q(e,i),Q(i,r),Re(s,r,null),Q(i,l),Q(i,o),Re(a,o,null),h=!0},p($,y){$[42]?O?(O.p($,y),y[1]&2048&&M(O,1)):(O=Eb($),O.c(),M(O,1),O.m(e,t)):O&&(Je(),j(O,1,1,()=>{O=null}),et());const _={};y[0]&1048576&&(_.files=$[20]),s.$set(_),(!h||y[1]&4096)&&ne(r,"visible",$[43]);const W={};y[1]&4&&(W.output=$[33]),y[0]&16384&&(W.showClearOutput=$[14]),y[0]&32768&&(W.showAutoClearOutput=$[15]),y[0]&65536&&(W.showSectionToggles=$[16]),y[0]&131072&&(W.showRightControls=$[17]),y[1]&2048&&(W.isTab=$[42]),y[0]&8192|y[1]&2048|y[4]&8192&&(W.$$scope={dirty:y,ctx:$}),!c&&y[0]&2&&(c=!0,W.autoClearOutput=$[1],Vo(()=>c=!1)),a.$set(W),(!h||y[1]&6144)&&ne(o,"visible",!$[42]||!$[43])},i($){h||(M(O),M(s.$$.fragment,$),M(a.$$.fragment,$),h=!0)},o($){j(O),j(s.$$.fragment,$),j(a.$$.fragment,$),h=!1},d($){$&&A(e),O&&O.d(),n[105](null),Xe(s),Xe(a)}}}function r8(n){let e,t,i,r=n[20][n[29]].name+"",s,l,o,a;return{c(){e=k("p"),t=pe("Are you sure you wish to delete "),i=k("code"),s=pe(r),l=pe("?"),o=N(),a=k("p"),a.textContent="This cannot be undone."},m(c,h){Y(c,e,h),Q(e,t),Q(e,i),Q(i,s),Q(e,l),Y(c,o,h),Y(c,a,h)},p(c,h){h[0]&537919488&&r!==(r=c[20][c[29]].name+"")&&Ne(s,r)},d(c){c&&(A(e),A(o),A(a))}}}function s8(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),t.textContent="Delete",i=N(),r=k("button"),r.textContent="Cancel",v(t,"class","button is-danger"),v(r,"type","button"),v(r,"class","button"),v(e,"slot","footer")},m(o,a){Y(o,e,a),Q(e,t),Q(e,i),Q(e,r),s||(l=[le(t,"click",n[126]),le(r,"click",n[127])],s=!0)},p:Qe,d(o){o&&A(e),s=!1,Ft(l)}}}function l8(n){let e,t,i,r,s,l,o,a,c,h,O;return a=new wt({props:{icon:xC}}),{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("p"),l=k("button"),o=k("span"),Ae(a.$$.fragment),v(i,"class","input"),v(i,"type","text"),i.value=n[39],i.readOnly=!0,v(t,"class","control is-expanded"),v(o,"class","icon"),v(l,"type","button"),v(l,"class","button"),ne(l,"is-primary",!n[40]),ne(l,"is-success",n[40]),v(s,"class","control"),v(e,"class","field has-addons")},m(p,g){Y(p,e,g),Q(e,t),Q(t,i),n[134](i),Q(e,r),Q(e,s),Q(s,l),Q(l,o),Re(a,o,null),c=!0,h||(O=[le(i,"click",n[135]),le(l,"click",n[67])],h=!0)},p(p,g){(!c||g[1]&256&&i.value!==p[39])&&(i.value=p[39]),(!c||g[1]&512)&&ne(l,"is-primary",!p[40]),(!c||g[1]&512)&&ne(l,"is-success",p[40])},i(p){c||(M(a.$$.fragment,p),c=!0)},o(p){j(a.$$.fragment,p),c=!1},d(p){p&&A(e),n[134](null),Xe(a),h=!1,Ft(O)}}}function o8(n){let e,t,i,r;return{c(){e=k("div"),t=k("button"),t.textContent="Done",v(t,"class","button is-primary"),v(e,"slot","footer")},m(s,l){Y(s,e,l),Q(e,t),i||(r=le(t,"click",n[133]),i=!0)},p:Qe,d(s){s&&A(e),i=!1,r()}}}function a8(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R,X,C,E,D,z,F,B,q,L,re,ae,ye,Se,ge,Ue,Ie,ke,We,lt,Vt,Qt,pt,qt,$e,oe,H,ue,ce,Ee,tt,ft,je,At,ut,En,_t,xt,St;const Be=n[92]["navbar-before-run-buttons"],fe=Zi(Be,n,n[137],$b),Fe=[H7,G7],He=[];function gi(J,we){return J[47]?0:1}O=gi(n),p=He[O]=Fe[O](n);let Wt=!n[53]&&n[8]&&yb(n),gt=!n[53]&&n[4]&&vb(n);const zn=n[92]["navbar-run-buttons"],oi=Zi(zn,n,n[137],bb);let Ht=n[53]&&n[5]&&n[23].length>0&&wb(n);const gn=n[92]["navbar-after-run-buttons"],Ct=Zi(gn,n,n[137],mb);let De=n[5]&&n[23].length>0&&_b(n);const mn=n[92]["navbar-after-solver-selector"],ri=Zi(mn,n,n[137],pb),Kt=[e8,J7],Sn=[];function tr(J,we){return J[53]?0:1}Se=tr(n),ge=Sn[Se]=Kt[Se](n);const Nr=n[92]["navbar-after-share-buttons"],zt=Zi(Nr,n,n[137],ub);function Ts(J){n[116](J)}let Zs={direction:n[2],showPanels:n[48],$$slots:{panelB:[n8],panelA:[t8]},$$scope:{ctx:n}};n[3]!==void 0&&(Zs.split=n[3]),lt=new $C({props:Zs}),Et.push(()=>qo(lt,"split",Ts));let Hl={active:n[35],stdFlags:n[45]};pt=new T7({props:Hl}),n[117](pt),pt.$on("close",n[118]),$e=new d7({props:{active:n[30],files:n[20]}}),$e.$on("close",n[119]),$e.$on("delete",n[120]),$e.$on("modifyFile",n[121]),$e.$on("newFile",n[122]),H=new o7({props:{active:n[28]}}),H.$on("cancel",n[123]),H.$on("new",n[124]),H.$on("open",n[125]),ce=new _s({props:{active:n[29]!==null,title:"Delete file",$$slots:{footer:[s8],default:[r8]},$$scope:{ctx:n}}}),ce.$on("cancel",n[128]),tt=new b7({props:{active:n[31],modelFiles:n[44]}}),tt.$on("accept",n[129]),tt.$on("cancel",n[130]),je=new x7({props:{active:n[32],dataFiles:n[46],parameters:n[34]}}),je.$on("accept",n[131]),je.$on("cancel",n[132]),ut=new _s({props:{active:n[39],title:"Share this project",$$slots:{footer:[o8],default:[l8]},$$scope:{ctx:n}}}),ut.$on("cancel",n[136]);const jr=n[92].default,Pi=Zi(jr,n,n[137],null);return{c(){e=k("div"),t=k("div"),i=k("div"),r=k("div"),s=k("nav"),l=k("div"),fe&&fe.c(),o=N(),a=k("div"),c=k("div"),h=k("div"),p.c(),g=N(),Wt&&Wt.c(),m=N(),gt&>.c(),$=N(),oi&&oi.c(),y=N(),Ht&&Ht.c(),_=N(),Ct&&Ct.c(),W=N(),De&&De.c(),R=N(),ri&&ri.c(),X=N(),C=k("a"),E=k("span"),D=N(),z=k("span"),F=N(),B=k("span"),q=N(),L=k("div"),re=k("div"),ae=N(),ye=k("div"),ge.c(),Ue=N(),zt&&zt.c(),Ie=N(),ke=k("div"),We=k("div"),Ae(lt.$$.fragment),Qt=N(),Ae(pt.$$.fragment),qt=N(),Ae($e.$$.fragment),oe=N(),Ae(H.$$.fragment),ue=N(),Ae(ce.$$.fragment),Ee=N(),Ae(tt.$$.fragment),ft=N(),Ae(je.$$.fragment),At=N(),Ae(ut.$$.fragment),En=N(),Pi&&Pi.c(),v(h,"class","control"),v(c,"class","field navbar-run-buttons has-addons svelte-hl0lfa"),v(a,"class","navbar-item is-expanded"),v(E,"aria-hidden","true"),v(z,"aria-hidden","true"),v(B,"aria-hidden","true"),v(C,"role","button"),v(C,"class","navbar-burger"),v(C,"aria-label","menu"),v(C,"aria-expanded",n[26]),ne(C,"is-active",n[26]),v(l,"class","navbar-brand"),v(re,"class","navbar-start is-hidden-tablet"),v(ye,"class","navbar-end"),v(L,"class","navbar-menu"),ne(L,"is-active",n[26]),v(s,"class","navbar"),v(r,"class","top svelte-hl0lfa"),v(We,"class","left svelte-hl0lfa"),v(ke,"class","grow main-panel svelte-hl0lfa"),v(i,"class","stack svelte-hl0lfa"),v(t,"class","mzn-playground-wrapper svelte-hl0lfa"),ne(t,"is-dark",n[24]),v(e,"class","mzn-playground svelte-hl0lfa")},m(J,we){Y(J,e,we),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Q(s,l),fe&&fe.m(l,null),Q(l,o),Q(l,a),Q(a,c),Q(c,h),He[O].m(h,null),Q(c,g),Wt&&Wt.m(c,null),Q(c,m),gt&>.m(c,null),Q(c,$),oi&&oi.m(c,null),Q(c,y),Ht&&Ht.m(c,null),Q(l,_),Ct&&Ct.m(l,null),Q(l,W),De&&De.m(l,null),Q(l,R),ri&&ri.m(l,null),Q(l,X),Q(l,C),Q(C,E),Q(C,D),Q(C,z),Q(C,F),Q(C,B),Q(s,q),Q(s,L),Q(L,re),Q(L,ae),Q(L,ye),Sn[Se].m(ye,null),Q(ye,Ue),zt&&zt.m(ye,null),Q(i,Ie),Q(i,ke),Q(ke,We),Re(lt,We,null),Q(ke,Qt),Re(pt,ke,null),Q(t,qt),Re($e,t,null),Q(t,oe),Re(H,t,null),Q(t,ue),Re(ce,t,null),Q(t,Ee),Re(tt,t,null),Q(t,ft),Re(je,t,null),Q(t,At),Re(ut,t,null),Q(t,En),Pi&&Pi.m(t,null),_t=!0,xt||(St=le(C,"click",n[95]),xt=!0)},p(J,we){fe&&fe.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(fe,Be,J,J[137],_t?Ri(Be,J[137],we,F7):Ai(J[137]),$b);let tn=O;O=gi(J),O===tn?He[O].p(J,we):(Je(),j(He[tn],1,1,()=>{He[tn]=null}),et(),p=He[O],p?p.p(J,we):(p=He[O]=Fe[O](J),p.c()),M(p,1),p.m(h,null)),!J[53]&&J[8]?Wt?Wt.p(J,we):(Wt=yb(J),Wt.c(),Wt.m(c,m)):Wt&&(Wt.d(1),Wt=null),!J[53]&&J[4]?gt?(gt.p(J,we),we[0]&16|we[1]&4194304&&M(gt,1)):(gt=vb(J),gt.c(),M(gt,1),gt.m(c,$)):gt&&(Je(),j(gt,1,1,()=>{gt=null}),et()),oi&&oi.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(oi,zn,J,J[137],_t?Ri(zn,J[137],we,B7):Ai(J[137]),bb),J[53]&&J[5]&&J[23].length>0?Ht?Ht.p(J,we):(Ht=wb(J),Ht.c(),Ht.m(c,null)):Ht&&(Ht.d(1),Ht=null),Ct&&Ct.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(Ct,gn,J,J[137],_t?Ri(gn,J[137],we,j7):Ai(J[137]),mb),J[5]&&J[23].length>0?De?(De.p(J,we),we[0]&8388640&&M(De,1)):(De=_b(J),De.c(),M(De,1),De.m(l,R)):De&&(Je(),j(De,1,1,()=>{De=null}),et()),ri&&ri.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(ri,mn,J,J[137],_t?Ri(mn,J[137],we,N7):Ai(J[137]),pb),(!_t||we[0]&67108864)&&v(C,"aria-expanded",J[26]),(!_t||we[0]&67108864)&&ne(C,"is-active",J[26]);let Br=Se;Se=tr(J),Se===Br?Sn[Se].p(J,we):(Je(),j(Sn[Br],1,1,()=>{Sn[Br]=null}),et(),ge=Sn[Se],ge?ge.p(J,we):(ge=Sn[Se]=Kt[Se](J),ge.c()),M(ge,1),ge.m(ye,Ue)),zt&&zt.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(zt,Nr,J,J[137],_t?Ri(Nr,J[137],we,V7):Ai(J[137]),ub),(!_t||we[0]&67108864)&&ne(L,"is-active",J[26]);const Mn={};we[0]&4&&(Mn.direction=J[2]),we[1]&131072&&(Mn.showPanels=J[48]),we[0]&1916002498|we[1]&1055748|we[4]&8192&&(Mn.$$scope={dirty:we,ctx:J}),!Vt&&we[0]&8&&(Vt=!0,Mn.split=J[3],Vo(()=>Vt=!1)),lt.$set(Mn);const vr={};we[1]&16&&(vr.active=J[35]),we[1]&16384&&(vr.stdFlags=J[45]),pt.$set(vr);const ir={};we[0]&1073741824&&(ir.active=J[30]),we[0]&1048576&&(ir.files=J[20]),$e.$set(ir);const Rs={};we[0]&268435456&&(Rs.active=J[28]),H.$set(Rs);const nr={};we[0]&536870912&&(nr.active=J[29]!==null),we[0]&537919488|we[4]&8192&&(nr.$$scope={dirty:we,ctx:J}),ce.$set(nr);const kt={};we[1]&1&&(kt.active=J[31]),we[1]&8192&&(kt.modelFiles=J[44]),tt.$set(kt);const wr={};we[1]&2&&(wr.active=J[32]),we[1]&32768&&(wr.dataFiles=J[46]),we[1]&8&&(wr.parameters=J[34]),je.$set(wr);const Fr={};we[1]&256&&(Fr.active=J[39]),we[1]&896|we[4]&8192&&(Fr.$$scope={dirty:we,ctx:J}),ut.$set(Fr),Pi&&Pi.p&&(!_t||we[4]&8192)&&Xi(Pi,jr,J,J[137],_t?Ri(jr,J[137],we,null):Ai(J[137]),null),(!_t||we[0]&16777216)&&ne(t,"is-dark",J[24])},i(J){_t||(M(fe,J),M(p),M(gt),M(oi,J),M(Ct,J),M(De),M(ri,J),M(ge),M(zt,J),M(lt.$$.fragment,J),M(pt.$$.fragment,J),M($e.$$.fragment,J),M(H.$$.fragment,J),M(ce.$$.fragment,J),M(tt.$$.fragment,J),M(je.$$.fragment,J),M(ut.$$.fragment,J),M(Pi,J),_t=!0)},o(J){j(fe,J),j(p),j(gt),j(oi,J),j(Ct,J),j(De),j(ri,J),j(ge),j(zt,J),j(lt.$$.fragment,J),j(pt.$$.fragment,J),j($e.$$.fragment,J),j(H.$$.fragment,J),j(ce.$$.fragment,J),j(tt.$$.fragment,J),j(je.$$.fragment,J),j(ut.$$.fragment,J),j(Pi,J),_t=!1},d(J){J&&A(e),fe&&fe.d(J),He[O].d(),Wt&&Wt.d(),gt&>.d(),oi&&oi.d(J),Ht&&Ht.d(),Ct&&Ct.d(J),De&&De.d(),ri&&ri.d(J),Sn[Se].d(),zt&&zt.d(J),Xe(lt),n[117](null),Xe(pt),Xe($e),Xe(H),Xe(ce),Xe(tt),Xe(je),Xe(ut),Pi&&Pi.d(J),xt=!1,St()}}}function Db(n,e){n.effects=n.effects?[...n.effects,e]:[e]}function f8(n,e,t){let i,r,s,l,o,a,c,h,O,p,g,m,$,y,_,W,R,X,C;$O(n,M7,Z=>t(91,X=Z)),$O(n,D7,Z=>t(53,C=Z));let{$$slots:E={},$$scope:D}=e,{showVersionSwitcher:z=!0}=e,{showSolverDropdown:F=!0}=e,{edgeMiniZinc:B=!1}=e,{autoClearOutput:q=!1}=e,{showTabs:L=!0}=e,{canEditTabs:re=!0}=e,{compilationEnabled:ae=!0}=e,{project:ye}=e,{enabledSolvers:Se=null}=e,{canEditSolverSettings:ge=!0}=e,{showShareButton:Ue=!0}=e,{showDownloadButton:Ie=!0}=e,{externalPlaygroundURL:ke=null}=e,{splitterDirection:We="vertical"}=e,{splitterSize:lt=75}=e,{canSwitchOrientation:Vt=!0}=e,{showClearOutput:Qt=!0}=e,{showAutoClearOutput:pt=!0}=e,{showOutputSectionToggles:qt=!0}=e,{showOutputRightControls:$e=!0}=e,{theme:oe="auto"}=e,{hideOutputOnStartup:H=!0}=e,{autoFocus:ue=!0}=e;const ce=en();let Ee=0,tt=[],ft,je,At={latest:{label:"Latest",detail:"stable"},edge:{label:"Edge",detail:"development"}};function ut(Z){const he=B?IW:qW;if(je!==he){t(18,Ee++,Ee);const be=ft;ft=new Promise(async(Pe,ze)=>{be&&await be,je&&je.shutdown(),je=he,je.shutdown(),await je.init();const[it]=/version \d+\.\d+\.\d+(?:, build .*)?$/m.exec(await je.version()),Ze=B?"edge":"latest";t(19,At={...At,[Ze]:{...At[Ze],detail:it}}),t(83,tt=await je.solvers()),await Fn(),t(18,Ee--,Ee),Pe()})}return ft}const En=new Promise((Z,he)=>{Hc(()=>{ut(),Z()})});async function _t(Z){t(0,B=Z.minizincVersion==="edge"),await En,t(20,fe=[]),Zs(Z.files,ue),t(21,He=Z.tab||0),await ut(),Z.solverId?t(22,Kt=y.findIndex(he=>he.id===Z.solverId)):t(22,Kt=y.findIndex(he=>he.extraInfo&&he.extraInfo.isDefault)||0),Z.solverConfig?gi.load(Z.solverConfig):gi.reset()}async function xt(Z){const he=fe.length;Zs(Z.files),Z.tab!==void 0&&Z.tab!==null&&Z.tab>=0&&zt(he+Z.tab),Z.solverId&&(await ut(),t(22,Kt=y.findIndex(be=>be.id===Z.solverId)))}function St(){return fe.length>0}let Be,fe=[],Fe=!1,He=0,gi,Wt=!1,gt=null,zn=!1,oi=!1,Ht=null,gn=!1,Ct=[],De=null,mn=[],ri={},Kt=-1;async function Sn(Z,he){if(await ut(),Kt<0||Kt>=y.length){const be=y.findIndex(Pe=>Pe.extraInfo&&Pe.extraInfo.isDefault);be!==-1&&t(22,Kt=be)}}let tr=!1;function Nr(){t(35,tr=!tr)}async function zt(Z,he=!0){for(Be&&He=0&&fe[Z].hidden;)Z--;Z===-1&&(Z=fe.findIndex(be=>!be.hidden)),t(21,He=Z),await Fn(),Be&&h&&(he&&Be.focus(),h.scrollTop!==void 0&&Be.getView().requestMeasure({read(be){be.scrollDOM.scrollTo(h.scrollLeft,h.scrollTop)}}))}function Ts(Z){let he=`Untitled${Z}`,be=2;for(;fe.find(Pe=>Pe.name===he);)he=`Untitled-${be++}${Z}`;t(20,fe=[...fe,{name:he,state:Ot.create({extensions:ec(Z,kr,R)})}]),zt(fe.length-1),t(28,Wt=!1)}function Zs(Z,he=!0){let be=[];for(const Pe of Z){const ze=Pe.name.endsWith(".mzc.mzn")?Pe.name.length-8:Pe.name.lastIndexOf("."),it=Pe.name.substring(0,ze).replaceAll(/[\/\\\.]/g,""),Ze=Pe.name.substring(ze);let mi=`${it}${Ze}`,Zt=2;for(;fe.find(oo=>oo.name===mi);)mi=`${it}-${Zt++}${Ze}`;const Jr=ec(Ze,kr,R,Pe.readOnly);be.push({...Pe,hidden:Pe.hidden||Ze===".mzc",name:mi,state:Ot.create({doc:Pe.contents,extensions:Jr,selection:{anchor:Pe.anchor||0}})})}t(20,fe=[...fe,...be]),zt(fe.length-1,he),t(28,Wt=!1)}function Hl(Z){const{index:he,name:be,suffix:Pe}=Z.detail;let ze=be,it=2;for(;fe.some(Ze=>Ze===ze+Pe);)ze=`${be}-${it++}`;h&&t(87,h.state=Be.getState(),h),t(20,fe=[...fe.slice(0,he),{...fe[he],name:be+Pe},...fe.slice(he+1)])}function jr(Z){const he=r===1&&!fe[Z].hidden;t(20,fe=[...fe.slice(0,Z),...fe.slice(Z+1),...he?[{name:"Untitled.mzn",state:Ot.create({extensions:ec(".mzn",kr,R)})}]:[]]),He>=fe.length?zt(fe.length-1):zt(He),t(29,gt=null)}function Pi(Z,he){h&&t(87,h.state=Be.getState(),h);const be={...fe[Z],...he};"readOnly"in he&&Db(be,he.readOnly?h9:O9),t(20,fe=[...fe.slice(0,Z),be,...fe.slice(Z+1)]),zt(He)}function J(Z,he){let be;Z0){await Fn();const he=Be.getView();he&&he.state===Z.state&&(he.dispatch({effects:Z.effects}),Z.effects=[])}}let tn=null;async function Br(Z){t(18,Ee++,Ee),t(87,h.state=Be.getState(),h);let he=O?h:null;if(!he){if(m.length===0)return t(18,Ee--,Ee),!1;if(m.length===1)he=fe.find(ze=>ze.name===m[0]);else try{const ze=await new Promise((it,Ze)=>{t(36,tn=it),t(31,oi=!0)});if(!ze)return t(18,Ee--,Ee),!1;he=fe.find(it=>it.name===ze.modelFile)}finally{t(31,oi=!1)}}const be=new je.Model,Pe=[he.name];{const ze=he.name.substring(0,he.name.length-4),it=fe.find(Ze=>Ze.name===`${ze}.mzc`||Ze.name===`${ze}.mzc.mzn`);it&&Pe.push(it.name)}he!==h&&Pe.push(h.name);for(const ze of fe)be.addFile(ze.name,ze.state.doc.toString(),Pe.indexOf(ze.name)!==-1);try{const{input:ze}=await be.interface({options:gi.getCompilationConfiguration(_.id)});if(Object.keys(ze).length>0){const it={};for(const Ze in ze)it[Ze]=ri[Ze];t(34,ri=it),p&&mn.indexOf(h.name)===-1&&(mn=[...mn,h.name]);try{const Ze=await new Promise((mi,Zt)=>{t(36,tn=mi),t(32,Ht=!0)});if(!Ze)return t(18,Ee--,Ee),!1;if(Ze.parameters){let mi="";for(const Zt in Ze.parameters)Ze.parameters[Zt].trim().length>0&&(mi+=`${Zt} = ${Ze.parameters[Zt]}; -`);be.addDznString(mi),t(34,ri=Ze.parameters)}else{for(const mi of Ze.dataFiles)Pe.indexOf(mi)===-1&&(be.addFile(mi),Pe.push(mi));mn=Ze.dataFiles}}finally{t(32,Ht=!1)}}}catch(ze){console.error(ze)}return t(18,Ee--,Ee),{model:be,fileList:Pe}}async function Mn(){if(g){const ze=new je.Model;ze.addFile(h.name,h.state.doc.toString());const it=[h.name],Ze=gi.getSolvingConfiguration(_.id);await vr(ze,it,Ze);return}const Z=await Br();if(!Z)return;const{model:he,fileList:be}=Z,Pe=gi.getSolvingConfiguration(_.id);await vr(he,be,Pe)}async function vr(Z,he,be){t(84,gn=!0);const Pe=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:he,output:[]}]),t(85,De=Z.solve({options:be,jsonOutput:!1})),wr(),De.on("error",kt),De.on("warning",kt),De.on("solution",ze=>kt(ze,Date.now()-Pe)),De.on("status",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("trace",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("comment",kt),De.on("time",kt),De.on("checker",kt),De.on("stderr",kt);try{await De,kt({type:"exit",code:0,runTime:Date.now()-Pe})}catch(ze){kt({type:"exit",code:ze.code,runTime:Date.now()-Pe})}t(85,De=null)}async function ir(){t(84,gn=!0);const Z=await Br();if(!Z)return;wr();const{model:he,fileList:be}=Z,Pe=be[0],ze=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:be,isCompile:!0,output:[]}]),t(85,De=he.compile({options:gi.getCompilationConfiguration(_.id)})),De.on("error",kt),De.on("warning",kt),De.on("statistics",kt),De.on("trace",kt),De.on("statistics",kt),De.on("stderr",kt);try{const it=await De;t(20,fe=[...fe,{name:`${Pe.substring(0,Pe.indexOf("."))}.fzn`,state:Ot.create({extensions:ec(".fzn",kr,R),doc:it})}]),zt(fe.length-1),kt({type:"exit",code:0,runTime:Date.now()-ze})}catch(it){kt({type:"exit",code:it.code,runTime:Date.now()-ze})}t(85,De=null)}function Rs(){kt({type:"cancel"}),De.cancel()}let nr=null;function kt(Z,he){nr?nr.then(()=>{nr=Fr(Z,he)}):nr=Fr(Z,he),Ct[Ct.length-1].output.push(Z),t(33,Ct)}function wr(){bn&&bn.reset(),t(42,Gr=!1),t(43,Hr=!1)}async function Fr(Z,he){if(Z.type==="trace"&&Z.section.startsWith("mzn_vis_")){Gr||(t(42,Gr=!0),t(43,Hr=!0)),await Fn();const be=fe.find(ze=>ze.name===Z.message.url);let Pe=null;if(be)Pe=be.state.doc.toString();else try{Pe=await je.readStdlibFileContents(Z.message.url)}catch(ze){console.error(ze);return}if(Pe===null){console.error(`Failed to get visualisation file ${Z.message.url}`);return}bn.addVisualisation(Z.section,Pe,Z.message.userData);return}if(Gr){for(;!bn;)await Fn();switch(Z.type){case"solution":bn.addSolution(Z.sections.filter(be=>be.startsWith("mzn_vis_")).reduce((be,Pe)=>({...be,[Pe]:Z.output[Pe]}),{}),"time"in Z?Z.time:he);break;case"status":bn.status(Z.status,"time"in Z?Z.time:he);break;case"exit":bn.status("time"in Z?Z.time:he);break}}}function Kl(){return h&&t(87,h.state=Be.getState(),h),{files:fe.map(Z=>({name:Z.name,contents:Z.state.doc.toString(),...Z.hidden?{hidden:!0}:{},...Z.readOnly?{readOnly:!0}:{}})),tab:He,solverId:_.id,solverConfig:gi.save(),minizincVersion:B?"edge":"latest"}}let Jl=!1;async function Qa(){t(37,Jl=!0);try{const Z=(await bm(async()=>{const{default:Zt}=await import("./jszip.min-BOFwHsSm.js").then(Jr=>Jr.j);return{default:Zt}},[])).default,he=(await bm(async()=>{const{default:Zt}=await import("./FileSaver.min-DtMeQsBk.js").then(Jr=>Jr.F);return{default:Zt}},[])).default,be=Kl(),Pe=fe.map(Zt=>Zt.name),ze=fe.filter(Zt=>!Zt.hidden).map(Zt=>Zt.name);let it=_.id;it==="org.minizinc.gecode_presolver"?it="org.gecode.gecode":it==="org.minizinc.chuffed"&&(it="org.chuffed.chuffed");const Ze=new Z;for(const Zt of be.files)Ze.file(Zt.name,Zt.contents);Ze.file("Project.mzp",JSON.stringify({version:105,projectFiles:Pe,openFiles:ze,openTab:be.tab,selectedBuiltinConfigId:it,selectedBuiltinConfigVersion:"default"}));const mi=await Ze.generateAsync({type:"blob"});he.saveAs(mi,"Project.zip")}catch(Z){console.error(Z)}finally{t(37,Jl=!1)}}let Qr,_r=null,eo=!1;function Js(Z){const he=Kl(),be=new URL(Z);return be.hash=`#project=${encodeURIComponent(JSON.stringify(he))}`,t(40,eo=!1),be.toString()}function fu(){Qr.select(),Qr.setSelectionRange(0,_r.length),navigator.clipboard.writeText(_r),t(40,eo=!0)}function _a(){ke&&window.open(Js(ke),"_blank").focus()}let ka=null;async function kr(Z){const he=Z.view;if(!(Ee!==0||!_||!h||!h.name.endsWith(".mzn")))try{const be=he.state.doc.toString();if(be===ka)return;ka=be;const Pe=new je.Model;for(const Ze of fe)Pe.addFile(Ze.name,Ze.state.doc.toString(),!1);const ze=Pe.addString(be),it=await Pe.check({options:gi.getCompilationConfiguration(_.id)});if(he.state.doc.toString()!==be)return;z7(be,it.filter(Ze=>Ze.location.filename===ze),he)}catch(be){console.error(be)}}function Pa(Z){const he=fe.findIndex(be=>be.name===Z.filename);if(he!==-1){zt(he);const be=fe[he].state.doc.toString(),Pe=$d(Z.firstLine,Z.firstColumn,be);Be.focus(),Be.setCursor(Pe)}}function el(){We==="horizontal"?t(2,We="vertical"):t(2,We="horizontal")}function cu(Z){t(0,B=Z.detail.item===At.edge)}function uu(Z){h&&t(87,h.state=Be.getState(),h),fe.forEach(he=>Db(he,Z?p9:d9)),we(h)}let bn,Gr=!1,Hr=!1;function to(Z){De&&Rs();const he=[Z.modelFile],be=Z.modelFile.substring(0,Z.modelFile.length-4),Pe=fe.find(it=>it.name===`${be}.mzc`||it.name===`${be}.mzc.mzn`);if(Pe&&he.push(Pe.name),Z.dataFiles)for(const it of Z.dataFiles)he.push(it);const ze=new je.Model;for(const it of fe)ze.addFile(it.name,it.state.doc.toString(),he.indexOf(it.name)!==-1);vr(ze,he,Z.options||gi.getSolvingConfiguration(_.id))}function hu(){return Kt===(y.findIndex(Z=>Z.extraInfo&&Z.extraInfo.isDefault)||0)}function Ou(){return gi.isDefault()}function du(){Kt=yO(this),t(22,Kt)}function pu(){Kt=yO(this),t(22,Kt)}const xa=()=>{t(26,Fe=!Fe),t(35,tr=!1)},Wa=()=>{ir(),t(26,Fe=!1)},Ca=()=>{Nr(),t(26,Fe=!1)},io=()=>{t(0,B=!B),t(26,Fe=!1)},gu=()=>{t(39,_r=Js(window.location.href)),t(26,Fe=!1)},Ta=()=>{_a(),t(26,Fe=!1)},tl=()=>t(39,_r=Js(window.location.href)),Za=()=>Qa(),mu=()=>{t(43,Hr=!1)},Ra=()=>{t(43,Hr=!0)};function Xa(Z){Et[Z?"unshift":"push"](()=>{bn=Z,t(41,bn)})}const no=Z=>to(Z.detail);function Su(Z){q=Z,t(1,q)}const Aa=()=>t(33,Ct=[]),ro=Z=>Pa(Z.detail.location),so=Z=>zt(Z.detail.index),Kr=Z=>J(Z.detail.src,Z.detail.dest),Ya=()=>t(28,Wt=!0),Ua=Z=>t(29,gt=Z.detail.index),bu=()=>t(30,zn=!0);function Ea(Z){Et[Z?"unshift":"push"](()=>{Be=Z,t(25,Be)})}function za(Z){lt=Z,t(3,lt)}function Ma(Z){Et[Z?"unshift":"push"](()=>{gi=Z,t(27,gi)})}const Da=()=>t(35,tr=!1),$u=()=>t(30,zn=!1),yu=Z=>t(29,gt=Z.detail.index),vu=Z=>Pi(Z.detail.index,Z.detail.options),Va=()=>t(28,Wt=!0),wu=()=>t(28,Wt=!1),Qu=Z=>Ts(Z.detail.type),_u=Z=>xt(Z.detail),ku=()=>jr(gt),lo=()=>t(29,gt=null),Pu=()=>t(29,gt=null),xu=Z=>tn(Z.detail),Wu=()=>tn(!1),Cu=Z=>tn(Z.detail),Tu=()=>tn(!1),Tt=()=>t(39,_r=null);function Pt(Z){Et[Z?"unshift":"push"](()=>{Qr=Z,t(38,Qr)})}const Zu=()=>Qr.select(),Ru=()=>t(39,_r=null);return n.$$set=Z=>{"showVersionSwitcher"in Z&&t(4,z=Z.showVersionSwitcher),"showSolverDropdown"in Z&&t(5,F=Z.showSolverDropdown),"edgeMiniZinc"in Z&&t(0,B=Z.edgeMiniZinc),"autoClearOutput"in Z&&t(1,q=Z.autoClearOutput),"showTabs"in Z&&t(6,L=Z.showTabs),"canEditTabs"in Z&&t(7,re=Z.canEditTabs),"compilationEnabled"in Z&&t(8,ae=Z.compilationEnabled),"project"in Z&&t(73,ye=Z.project),"enabledSolvers"in Z&&t(74,Se=Z.enabledSolvers),"canEditSolverSettings"in Z&&t(9,ge=Z.canEditSolverSettings),"showShareButton"in Z&&t(10,Ue=Z.showShareButton),"showDownloadButton"in Z&&t(11,Ie=Z.showDownloadButton),"externalPlaygroundURL"in Z&&t(12,ke=Z.externalPlaygroundURL),"splitterDirection"in Z&&t(2,We=Z.splitterDirection),"splitterSize"in Z&&t(3,lt=Z.splitterSize),"canSwitchOrientation"in Z&&t(13,Vt=Z.canSwitchOrientation),"showClearOutput"in Z&&t(14,Qt=Z.showClearOutput),"showAutoClearOutput"in Z&&t(15,pt=Z.showAutoClearOutput),"showOutputSectionToggles"in Z&&t(16,qt=Z.showOutputSectionToggles),"showOutputRightControls"in Z&&t(17,$e=Z.showOutputRightControls),"theme"in Z&&t(75,oe=Z.theme),"hideOutputOnStartup"in Z&&t(76,H=Z.hideOutputOnStartup),"autoFocus"in Z&&t(77,ue=Z.autoFocus),"$$scope"in Z&&t(137,D=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[At.latest,At.edge]),n.$$.dirty[0]&1&&ut(),n.$$.dirty[2]&2048&&_t(ye),n.$$.dirty[0]&1048576&&(r=fe.filter(Z=>!Z.hidden).length),n.$$.dirty[0]&3145728&&t(87,h=HeSe.indexOf(Z.id)!==-1):tt),n.$$.dirty[0]&12582912&&t(86,_=Kt>=0&&KtZ.name.endsWith(".mzn")&&!Z.name.endsWith(".mzc.mzn")).map(Z=>Z.name)),n.$$.dirty[0]&1048576&&t(46,$=fe.filter(Z=>Z.name.endsWith(".dzn")||Z.name.endsWith(".json")).map(Z=>Z.name)),n.$$.dirty[0]&12582912&&Sn(),n.$$.dirty[2]&16777216&&t(45,W=_?_.stdFlags:[]),n.$$.dirty[2]&33554432&&we(h),n.$$.dirty[2]&536879104&&t(24,R={dark:!0,light:!1,auto:X}[oe]),n.$$.dirty[0]&16777216&&uu(R),n.$$.dirty[0]&8388608&&ce("solversChanged",{solvers:y})},[B,q,We,lt,z,F,L,re,ae,ge,Ue,Ie,ke,Vt,Qt,pt,qt,$e,Ee,At,fe,He,Kt,y,R,Be,Fe,gi,Wt,gt,zn,oi,Ht,Ct,ri,tr,tn,Jl,Qr,_r,eo,bn,Gr,Hr,m,W,$,c,a,o,l,s,i,C,xt,Nr,zt,Ts,Hl,jr,Pi,J,Mn,ir,Rs,Qa,Js,fu,_a,Pa,el,cu,to,ye,Se,oe,H,ue,_t,St,Kl,hu,Ou,tt,gn,De,_,h,g,p,O,X,E,du,pu,xa,Wa,Ca,io,gu,Ta,tl,Za,mu,Ra,Xa,no,Su,Aa,ro,so,Kr,Ya,Ua,bu,Ea,za,Ma,Da,$u,yu,vu,Va,wu,Qu,_u,ku,lo,Pu,xu,Wu,Cu,Tu,Tt,Pt,Zu,Ru,D]}class c8 extends $i{constructor(e){super(),bi(this,e,f8,a8,Oi,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:73,enabledSolvers:74,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:75,hideOutputOnStartup:76,autoFocus:77,loadProject:78,hasFiles:79,getProject:80,isDefaultSolver:81,isDefaultSolverConfig:82},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[78]}get hasFiles(){return this.$$.ctx[79]}get getProject(){return this.$$.ctx[80]}get isDefaultSolver(){return this.$$.ctx[81]}get isDefaultSolverConfig(){return this.$$.ctx[82]}}function Vb(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function qb(n){let e;return{c(){e=k("p"),e.textContent="No recent projects.",v(e,"class","has-text-centered")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&A(e)}}}function Ib(n){let e,t,i=Lb(n[10])+"",r,s,l,o,a=n[10].solver+"",c,h,O,p=new Date(n[10].timestamp).toLocaleString()+"",g,m,$,y;function _(){return n[7](n[12])}return{c(){e=k("div"),t=k("div"),r=pe(i),s=N(),l=k("div"),o=k("div"),c=pe(a),h=N(),O=k("div"),g=pe(p),m=N(),v(l,"class","info is-size-7 svelte-wl1zgv"),v(e,"class","item svelte-wl1zgv"),ne(e,"has-background-primary",n[2]===n[12]),ne(e,"has-text-white",n[2]===n[12])},m(W,R){Y(W,e,R),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,c),Q(l,h),Q(l,O),Q(O,g),Q(e,m),$||(y=[le(e,"click",_),le(e,"dblclick",n[5])],$=!0)},p(W,R){n=W,R&2&&i!==(i=Lb(n[10])+"")&&Ne(r,i),R&2&&a!==(a=n[10].solver+"")&&Ne(c,a),R&2&&p!==(p=new Date(n[10].timestamp).toLocaleString()+"")&&Ne(g,p),R&4&&ne(e,"has-background-primary",n[2]===n[12]),R&4&&ne(e,"has-text-white",n[2]===n[12])},d(W){W&&A(e),$=!1,Ft(y)}}}function u8(n){let e,t=st(n[1]),i=[];for(let s=0;si.name);return n.files.length>3&&t.push(`+${n.files.length-3} more…`),t.join(", ")}return n.files.map(t=>t.name).join(", ")}function d8(n,e,t){let i;const r=en();let{active:s=!1}=e,{projects:l=[]}=e,o=-1;function a(g){g||t(2,o=-1)}function c(){i&&r("accept",{project:l[o]})}const h=()=>r("cancel"),O=g=>t(2,o=g),p=()=>r("cancel");return n.$$set=g=>{"active"in g&&t(0,s=g.active),"projects"in g&&t(1,l=g.projects)},n.$$.update=()=>{n.$$.dirty&6&&t(3,i=o>=0&&o{const t=localStorage.getItem(yd);if(t&&t.length>0){ms=!0;try{e(i=>({...i,...JSON.parse(t)}))}catch(i){console.error(i)}ms=!1}window.addEventListener("storage",i=>{if(i.storageArea===localStorage&&i.key===yd&&i.newValue.length>0){ms=!0;try{e(r=>({...r,...JSON.parse(i.newValue)}))}catch(r){console.error(r)}ms=!1}})});Ns.subscribe(n=>{ms||(Object.keys(n.sessions).length>Nb&&(ms=!0,Ns.update(e=>{const t=Object.keys(e.sessions).map(i=>({key:i,value:e.sessions[i]}));return t.sort((i,r)=>r.value.timestamp-i.value.timestamp),ms=!0,{...e,sessions:t.slice(0,Nb).reduce((i,r)=>({...i,[r.key]:r.value}),{})}}),ms=!1),localStorage.setItem(yd,JSON.stringify(n)))});const{document:g8,window:jb}=FW;function m8(n){let e,t;return e=new p8({props:{projects:n[5],active:n[4]}}),e.$on("cancel",n[12]),e.$on("accept",n[13]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&32&&(s.projects=i[5]),r&16&&(s.active=i[4]),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function S8(n){let e,t,i,r,s,l,o,a,c;return l=new wt({props:{icon:Vy}}),{c(){e=k("div"),t=k("div"),i=k("div"),r=k("button"),s=k("span"),Ae(l.$$.fragment),v(s,"class","icon"),v(r,"class","button"),v(r,"title","Open recent project"),v(i,"class","control"),v(t,"class","field"),v(e,"class","navbar-item")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Re(l,s,null),o=!0,a||(c=le(r,"click",n[11]),a=!0)},p:Qe,i(h){o||(M(l.$$.fragment,h),o=!0)},o(h){j(l.$$.fragment,h),o=!1},d(h){h&&A(e),Xe(l),a=!1,c()}}}function b8(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Vy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Open recent project",v(t,"class","icon"),v(e,"class","navbar-item mobile-menu-item"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[10]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function $8(n){let e,t,i,r;const s=[b8,S8],l=[];function o(a,c){return a[25]?0:1}return e=o(n),t=l[e]=s[e](n),{c(){t.c(),i=Gt()},m(a,c){l[e].m(a,c),Y(a,i,c),r=!0},p(a,c){let h=e;e=o(a),e===h?l[e].p(a,c):(Je(),j(l[h],1,1,()=>{l[h]=null}),et(),t=l[e],t?t.p(a,c):(t=l[e]=s[e](a),t.c()),M(t,1),t.m(i.parentNode,i))},i(a){r||(M(t),r=!0)},o(a){j(t),r=!1},d(a){a&&A(i),l[e].d(a)}}}function y8(n){let e,t,i,r,s,l,o,a,c;function h(m){n[15](m)}function O(m){n[16](m)}function p(m){n[17](m)}let g={project:n[3],$$slots:{"navbar-before-share-buttons":[$8,({isMobile:m})=>({25:m}),({isMobile:m})=>m?33554432:0],default:[m8]},$$scope:{ctx:n}};return n[1].autoClearOutput!==void 0&&(g.autoClearOutput=n[1].autoClearOutput),n[1].splitterDirection!==void 0&&(g.splitterDirection=n[1].splitterDirection),n[1].splitterSize!==void 0&&(g.splitterSize=n[1].splitterSize),i=new c8({props:g}),n[14](i),Et.push(()=>qo(i,"autoClearOutput",h)),Et.push(()=>qo(i,"splitterDirection",O)),Et.push(()=>qo(i,"splitterSize",p)),i.$on("solversChanged",n[18]),{c(){e=N(),t=k("div"),Ae(i.$$.fragment),v(t,"class","playground-app svelte-tuc1wl")},m(m,$){Y(m,e,$),Y(m,t,$),Re(i,t,null),o=!0,a||(c=[le(jb,"beforeunload",n[7]),le(jb,"hashchange",n[6]),le(g8,"visibilitychange",n[9])],a=!0)},p(m,[$]){const y={};$&8&&(y.project=m[3]),$&100663346&&(y.$$scope={dirty:$,ctx:m}),!r&&$&2&&(r=!0,y.autoClearOutput=m[1].autoClearOutput,Vo(()=>r=!1)),!s&&$&2&&(s=!0,y.splitterDirection=m[1].splitterDirection,Vo(()=>s=!1)),!l&&$&2&&(l=!0,y.splitterSize=m[1].splitterSize,Vo(()=>l=!1)),i.$set(y)},i(m){o||(M(i.$$.fragment,m),o=!0)},o(m){j(i.$$.fragment,m),o=!1},d(m){m&&(A(e),A(t)),n[14](null),Xe(i),a=!1,Ft(c)}}}const bO=`% Use this editor as a MiniZinc scratch book +`);be.addDznString(mi),t(34,ri=Ze.parameters)}else{for(const mi of Ze.dataFiles)Pe.indexOf(mi)===-1&&(be.addFile(mi),Pe.push(mi));mn=Ze.dataFiles}}finally{t(32,Ht=!1)}}}catch(ze){console.error(ze)}return t(18,Ee--,Ee),{model:be,fileList:Pe}}async function Mn(){if(g){const ze=new je.Model;ze.addFile(h.name,h.state.doc.toString());const it=[h.name],Ze=gi.getSolvingConfiguration(_.id);await vr(ze,it,Ze);return}const Z=await Br();if(!Z)return;const{model:he,fileList:be}=Z,Pe=gi.getSolvingConfiguration(_.id);await vr(he,be,Pe)}async function vr(Z,he,be){t(84,gn=!0);const Pe=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:he,output:[]}]),t(85,De=Z.solve({options:be,jsonOutput:!1})),wr(),De.on("error",kt),De.on("warning",kt),De.on("solution",ze=>kt(ze,Date.now()-Pe)),De.on("status",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("trace",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("comment",kt),De.on("time",kt),De.on("checker",kt),De.on("stderr",kt);try{await De,kt({type:"exit",code:0,runTime:Date.now()-Pe})}catch(ze){kt({type:"exit",code:ze.code,runTime:Date.now()-Pe})}t(85,De=null)}async function ir(){t(84,gn=!0);const Z=await Br();if(!Z)return;wr();const{model:he,fileList:be}=Z,Pe=be[0],ze=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:be,isCompile:!0,output:[]}]),t(85,De=he.compile({options:gi.getCompilationConfiguration(_.id)})),De.on("error",kt),De.on("warning",kt),De.on("statistics",kt),De.on("trace",kt),De.on("statistics",kt),De.on("stderr",kt);try{const it=await De;t(20,fe=[...fe,{name:`${Pe.substring(0,Pe.indexOf("."))}.fzn`,state:Ot.create({extensions:ec(".fzn",kr,R),doc:it})}]),zt(fe.length-1),kt({type:"exit",code:0,runTime:Date.now()-ze})}catch(it){kt({type:"exit",code:it.code,runTime:Date.now()-ze})}t(85,De=null)}function Rs(){kt({type:"cancel"}),De.cancel()}let nr=null;function kt(Z,he){nr?nr.then(()=>{nr=Fr(Z,he)}):nr=Fr(Z,he),Ct[Ct.length-1].output.push(Z),t(33,Ct)}function wr(){bn&&bn.reset(),t(42,Gr=!1),t(43,Hr=!1)}async function Fr(Z,he){if(Z.type==="trace"&&Z.section.startsWith("mzn_vis_")){Gr||(t(42,Gr=!0),t(43,Hr=!0)),await Fn();const be=fe.find(ze=>ze.name===Z.message.url);let Pe=null;if(be)Pe=be.state.doc.toString();else try{Pe=await je.readStdlibFileContents(Z.message.url)}catch(ze){console.error(ze);return}if(Pe===null){console.error(`Failed to get visualisation file ${Z.message.url}`);return}bn.addVisualisation(Z.section,Pe,Z.message.userData);return}if(Gr){for(;!bn;)await Fn();switch(Z.type){case"solution":bn.addSolution(Z.sections.filter(be=>be.startsWith("mzn_vis_")).reduce((be,Pe)=>({...be,[Pe]:Z.output[Pe]}),{}),"time"in Z?Z.time:he);break;case"status":bn.status(Z.status,"time"in Z?Z.time:he);break;case"exit":bn.status("time"in Z?Z.time:he);break}}}function Kl(){return h&&t(87,h.state=Be.getState(),h),{files:fe.map(Z=>({name:Z.name,contents:Z.state.doc.toString(),...Z.hidden?{hidden:!0}:{},...Z.readOnly?{readOnly:!0}:{}})),tab:He,solverId:_.id,solverConfig:gi.save(),minizincVersion:B?"edge":"latest"}}let Jl=!1;async function Qa(){t(37,Jl=!0);try{const Z=(await bm(async()=>{const{default:Zt}=await import("./jszip.min-Bl2THA8X.js").then(Jr=>Jr.j);return{default:Zt}},[])).default,he=(await bm(async()=>{const{default:Zt}=await import("./FileSaver.min-BMYjv9ER.js").then(Jr=>Jr.F);return{default:Zt}},[])).default,be=Kl(),Pe=fe.map(Zt=>Zt.name),ze=fe.filter(Zt=>!Zt.hidden).map(Zt=>Zt.name);let it=_.id;it==="org.minizinc.gecode_presolver"?it="org.gecode.gecode":it==="org.minizinc.chuffed"&&(it="org.chuffed.chuffed");const Ze=new Z;for(const Zt of be.files)Ze.file(Zt.name,Zt.contents);Ze.file("Project.mzp",JSON.stringify({version:105,projectFiles:Pe,openFiles:ze,openTab:be.tab,selectedBuiltinConfigId:it,selectedBuiltinConfigVersion:"default"}));const mi=await Ze.generateAsync({type:"blob"});he.saveAs(mi,"Project.zip")}catch(Z){console.error(Z)}finally{t(37,Jl=!1)}}let Qr,_r=null,eo=!1;function Js(Z){const he=Kl(),be=new URL(Z);return be.hash=`#project=${encodeURIComponent(JSON.stringify(he))}`,t(40,eo=!1),be.toString()}function fu(){Qr.select(),Qr.setSelectionRange(0,_r.length),navigator.clipboard.writeText(_r),t(40,eo=!0)}function _a(){ke&&window.open(Js(ke),"_blank").focus()}let ka=null;async function kr(Z){const he=Z.view;if(!(Ee!==0||!_||!h||!h.name.endsWith(".mzn")))try{const be=he.state.doc.toString();if(be===ka)return;ka=be;const Pe=new je.Model;for(const Ze of fe)Pe.addFile(Ze.name,Ze.state.doc.toString(),!1);const ze=Pe.addString(be),it=await Pe.check({options:gi.getCompilationConfiguration(_.id)});if(he.state.doc.toString()!==be)return;z7(be,it.filter(Ze=>Ze.location.filename===ze),he)}catch(be){console.error(be)}}function Pa(Z){const he=fe.findIndex(be=>be.name===Z.filename);if(he!==-1){zt(he);const be=fe[he].state.doc.toString(),Pe=$d(Z.firstLine,Z.firstColumn,be);Be.focus(),Be.setCursor(Pe)}}function el(){We==="horizontal"?t(2,We="vertical"):t(2,We="horizontal")}function cu(Z){t(0,B=Z.detail.item===At.edge)}function uu(Z){h&&t(87,h.state=Be.getState(),h),fe.forEach(he=>Db(he,Z?p9:d9)),we(h)}let bn,Gr=!1,Hr=!1;function to(Z){De&&Rs();const he=[Z.modelFile],be=Z.modelFile.substring(0,Z.modelFile.length-4),Pe=fe.find(it=>it.name===`${be}.mzc`||it.name===`${be}.mzc.mzn`);if(Pe&&he.push(Pe.name),Z.dataFiles)for(const it of Z.dataFiles)he.push(it);const ze=new je.Model;for(const it of fe)ze.addFile(it.name,it.state.doc.toString(),he.indexOf(it.name)!==-1);vr(ze,he,Z.options||gi.getSolvingConfiguration(_.id))}function hu(){return Kt===(y.findIndex(Z=>Z.extraInfo&&Z.extraInfo.isDefault)||0)}function Ou(){return gi.isDefault()}function du(){Kt=yO(this),t(22,Kt)}function pu(){Kt=yO(this),t(22,Kt)}const xa=()=>{t(26,Fe=!Fe),t(35,tr=!1)},Wa=()=>{ir(),t(26,Fe=!1)},Ca=()=>{Nr(),t(26,Fe=!1)},io=()=>{t(0,B=!B),t(26,Fe=!1)},gu=()=>{t(39,_r=Js(window.location.href)),t(26,Fe=!1)},Ta=()=>{_a(),t(26,Fe=!1)},tl=()=>t(39,_r=Js(window.location.href)),Za=()=>Qa(),mu=()=>{t(43,Hr=!1)},Ra=()=>{t(43,Hr=!0)};function Xa(Z){Et[Z?"unshift":"push"](()=>{bn=Z,t(41,bn)})}const no=Z=>to(Z.detail);function Su(Z){q=Z,t(1,q)}const Aa=()=>t(33,Ct=[]),ro=Z=>Pa(Z.detail.location),so=Z=>zt(Z.detail.index),Kr=Z=>J(Z.detail.src,Z.detail.dest),Ya=()=>t(28,Wt=!0),Ua=Z=>t(29,gt=Z.detail.index),bu=()=>t(30,zn=!0);function Ea(Z){Et[Z?"unshift":"push"](()=>{Be=Z,t(25,Be)})}function za(Z){lt=Z,t(3,lt)}function Ma(Z){Et[Z?"unshift":"push"](()=>{gi=Z,t(27,gi)})}const Da=()=>t(35,tr=!1),$u=()=>t(30,zn=!1),yu=Z=>t(29,gt=Z.detail.index),vu=Z=>Pi(Z.detail.index,Z.detail.options),Va=()=>t(28,Wt=!0),wu=()=>t(28,Wt=!1),Qu=Z=>Ts(Z.detail.type),_u=Z=>xt(Z.detail),ku=()=>jr(gt),lo=()=>t(29,gt=null),Pu=()=>t(29,gt=null),xu=Z=>tn(Z.detail),Wu=()=>tn(!1),Cu=Z=>tn(Z.detail),Tu=()=>tn(!1),Tt=()=>t(39,_r=null);function Pt(Z){Et[Z?"unshift":"push"](()=>{Qr=Z,t(38,Qr)})}const Zu=()=>Qr.select(),Ru=()=>t(39,_r=null);return n.$$set=Z=>{"showVersionSwitcher"in Z&&t(4,z=Z.showVersionSwitcher),"showSolverDropdown"in Z&&t(5,F=Z.showSolverDropdown),"edgeMiniZinc"in Z&&t(0,B=Z.edgeMiniZinc),"autoClearOutput"in Z&&t(1,q=Z.autoClearOutput),"showTabs"in Z&&t(6,L=Z.showTabs),"canEditTabs"in Z&&t(7,re=Z.canEditTabs),"compilationEnabled"in Z&&t(8,ae=Z.compilationEnabled),"project"in Z&&t(73,ye=Z.project),"enabledSolvers"in Z&&t(74,Se=Z.enabledSolvers),"canEditSolverSettings"in Z&&t(9,ge=Z.canEditSolverSettings),"showShareButton"in Z&&t(10,Ue=Z.showShareButton),"showDownloadButton"in Z&&t(11,Ie=Z.showDownloadButton),"externalPlaygroundURL"in Z&&t(12,ke=Z.externalPlaygroundURL),"splitterDirection"in Z&&t(2,We=Z.splitterDirection),"splitterSize"in Z&&t(3,lt=Z.splitterSize),"canSwitchOrientation"in Z&&t(13,Vt=Z.canSwitchOrientation),"showClearOutput"in Z&&t(14,Qt=Z.showClearOutput),"showAutoClearOutput"in Z&&t(15,pt=Z.showAutoClearOutput),"showOutputSectionToggles"in Z&&t(16,qt=Z.showOutputSectionToggles),"showOutputRightControls"in Z&&t(17,$e=Z.showOutputRightControls),"theme"in Z&&t(75,oe=Z.theme),"hideOutputOnStartup"in Z&&t(76,H=Z.hideOutputOnStartup),"autoFocus"in Z&&t(77,ue=Z.autoFocus),"$$scope"in Z&&t(137,D=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[At.latest,At.edge]),n.$$.dirty[0]&1&&ut(),n.$$.dirty[2]&2048&&_t(ye),n.$$.dirty[0]&1048576&&(r=fe.filter(Z=>!Z.hidden).length),n.$$.dirty[0]&3145728&&t(87,h=HeSe.indexOf(Z.id)!==-1):tt),n.$$.dirty[0]&12582912&&t(86,_=Kt>=0&&KtZ.name.endsWith(".mzn")&&!Z.name.endsWith(".mzc.mzn")).map(Z=>Z.name)),n.$$.dirty[0]&1048576&&t(46,$=fe.filter(Z=>Z.name.endsWith(".dzn")||Z.name.endsWith(".json")).map(Z=>Z.name)),n.$$.dirty[0]&12582912&&Sn(),n.$$.dirty[2]&16777216&&t(45,W=_?_.stdFlags:[]),n.$$.dirty[2]&33554432&&we(h),n.$$.dirty[2]&536879104&&t(24,R={dark:!0,light:!1,auto:X}[oe]),n.$$.dirty[0]&16777216&&uu(R),n.$$.dirty[0]&8388608&&ce("solversChanged",{solvers:y})},[B,q,We,lt,z,F,L,re,ae,ge,Ue,Ie,ke,Vt,Qt,pt,qt,$e,Ee,At,fe,He,Kt,y,R,Be,Fe,gi,Wt,gt,zn,oi,Ht,Ct,ri,tr,tn,Jl,Qr,_r,eo,bn,Gr,Hr,m,W,$,c,a,o,l,s,i,C,xt,Nr,zt,Ts,Hl,jr,Pi,J,Mn,ir,Rs,Qa,Js,fu,_a,Pa,el,cu,to,ye,Se,oe,H,ue,_t,St,Kl,hu,Ou,tt,gn,De,_,h,g,p,O,X,E,du,pu,xa,Wa,Ca,io,gu,Ta,tl,Za,mu,Ra,Xa,no,Su,Aa,ro,so,Kr,Ya,Ua,bu,Ea,za,Ma,Da,$u,yu,vu,Va,wu,Qu,_u,ku,lo,Pu,xu,Wu,Cu,Tu,Tt,Pt,Zu,Ru,D]}class c8 extends $i{constructor(e){super(),bi(this,e,f8,a8,Oi,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:73,enabledSolvers:74,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:75,hideOutputOnStartup:76,autoFocus:77,loadProject:78,hasFiles:79,getProject:80,isDefaultSolver:81,isDefaultSolverConfig:82},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[78]}get hasFiles(){return this.$$.ctx[79]}get getProject(){return this.$$.ctx[80]}get isDefaultSolver(){return this.$$.ctx[81]}get isDefaultSolverConfig(){return this.$$.ctx[82]}}function Vb(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function qb(n){let e;return{c(){e=k("p"),e.textContent="No recent projects.",v(e,"class","has-text-centered")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&A(e)}}}function Ib(n){let e,t,i=Lb(n[10])+"",r,s,l,o,a=n[10].solver+"",c,h,O,p=new Date(n[10].timestamp).toLocaleString()+"",g,m,$,y;function _(){return n[7](n[12])}return{c(){e=k("div"),t=k("div"),r=pe(i),s=N(),l=k("div"),o=k("div"),c=pe(a),h=N(),O=k("div"),g=pe(p),m=N(),v(l,"class","info is-size-7 svelte-wl1zgv"),v(e,"class","item svelte-wl1zgv"),ne(e,"has-background-primary",n[2]===n[12]),ne(e,"has-text-white",n[2]===n[12])},m(W,R){Y(W,e,R),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,c),Q(l,h),Q(l,O),Q(O,g),Q(e,m),$||(y=[le(e,"click",_),le(e,"dblclick",n[5])],$=!0)},p(W,R){n=W,R&2&&i!==(i=Lb(n[10])+"")&&Ne(r,i),R&2&&a!==(a=n[10].solver+"")&&Ne(c,a),R&2&&p!==(p=new Date(n[10].timestamp).toLocaleString()+"")&&Ne(g,p),R&4&&ne(e,"has-background-primary",n[2]===n[12]),R&4&&ne(e,"has-text-white",n[2]===n[12])},d(W){W&&A(e),$=!1,Ft(y)}}}function u8(n){let e,t=st(n[1]),i=[];for(let s=0;si.name);return n.files.length>3&&t.push(`+${n.files.length-3} more…`),t.join(", ")}return n.files.map(t=>t.name).join(", ")}function d8(n,e,t){let i;const r=en();let{active:s=!1}=e,{projects:l=[]}=e,o=-1;function a(g){g||t(2,o=-1)}function c(){i&&r("accept",{project:l[o]})}const h=()=>r("cancel"),O=g=>t(2,o=g),p=()=>r("cancel");return n.$$set=g=>{"active"in g&&t(0,s=g.active),"projects"in g&&t(1,l=g.projects)},n.$$.update=()=>{n.$$.dirty&6&&t(3,i=o>=0&&o{const t=localStorage.getItem(yd);if(t&&t.length>0){ms=!0;try{e(i=>({...i,...JSON.parse(t)}))}catch(i){console.error(i)}ms=!1}window.addEventListener("storage",i=>{if(i.storageArea===localStorage&&i.key===yd&&i.newValue.length>0){ms=!0;try{e(r=>({...r,...JSON.parse(i.newValue)}))}catch(r){console.error(r)}ms=!1}})});Ns.subscribe(n=>{ms||(Object.keys(n.sessions).length>Nb&&(ms=!0,Ns.update(e=>{const t=Object.keys(e.sessions).map(i=>({key:i,value:e.sessions[i]}));return t.sort((i,r)=>r.value.timestamp-i.value.timestamp),ms=!0,{...e,sessions:t.slice(0,Nb).reduce((i,r)=>({...i,[r.key]:r.value}),{})}}),ms=!1),localStorage.setItem(yd,JSON.stringify(n)))});const{document:g8,window:jb}=FW;function m8(n){let e,t;return e=new p8({props:{projects:n[5],active:n[4]}}),e.$on("cancel",n[12]),e.$on("accept",n[13]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&32&&(s.projects=i[5]),r&16&&(s.active=i[4]),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function S8(n){let e,t,i,r,s,l,o,a,c;return l=new wt({props:{icon:Vy}}),{c(){e=k("div"),t=k("div"),i=k("div"),r=k("button"),s=k("span"),Ae(l.$$.fragment),v(s,"class","icon"),v(r,"class","button"),v(r,"title","Open recent project"),v(i,"class","control"),v(t,"class","field"),v(e,"class","navbar-item")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Re(l,s,null),o=!0,a||(c=le(r,"click",n[11]),a=!0)},p:Qe,i(h){o||(M(l.$$.fragment,h),o=!0)},o(h){j(l.$$.fragment,h),o=!1},d(h){h&&A(e),Xe(l),a=!1,c()}}}function b8(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Vy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=N(),s=k("span"),s.textContent="Open recent project",v(t,"class","icon"),v(e,"class","navbar-item mobile-menu-item"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[10]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&A(e),Xe(i),o=!1,a()}}}function $8(n){let e,t,i,r;const s=[b8,S8],l=[];function o(a,c){return a[25]?0:1}return e=o(n),t=l[e]=s[e](n),{c(){t.c(),i=Gt()},m(a,c){l[e].m(a,c),Y(a,i,c),r=!0},p(a,c){let h=e;e=o(a),e===h?l[e].p(a,c):(Je(),j(l[h],1,1,()=>{l[h]=null}),et(),t=l[e],t?t.p(a,c):(t=l[e]=s[e](a),t.c()),M(t,1),t.m(i.parentNode,i))},i(a){r||(M(t),r=!0)},o(a){j(t),r=!1},d(a){a&&A(i),l[e].d(a)}}}function y8(n){let e,t,i,r,s,l,o,a,c;function h(m){n[15](m)}function O(m){n[16](m)}function p(m){n[17](m)}let g={project:n[3],$$slots:{"navbar-before-share-buttons":[$8,({isMobile:m})=>({25:m}),({isMobile:m})=>m?33554432:0],default:[m8]},$$scope:{ctx:n}};return n[1].autoClearOutput!==void 0&&(g.autoClearOutput=n[1].autoClearOutput),n[1].splitterDirection!==void 0&&(g.splitterDirection=n[1].splitterDirection),n[1].splitterSize!==void 0&&(g.splitterSize=n[1].splitterSize),i=new c8({props:g}),n[14](i),Et.push(()=>qo(i,"autoClearOutput",h)),Et.push(()=>qo(i,"splitterDirection",O)),Et.push(()=>qo(i,"splitterSize",p)),i.$on("solversChanged",n[18]),{c(){e=N(),t=k("div"),Ae(i.$$.fragment),v(t,"class","playground-app svelte-tuc1wl")},m(m,$){Y(m,e,$),Y(m,t,$),Re(i,t,null),o=!0,a||(c=[le(jb,"beforeunload",n[7]),le(jb,"hashchange",n[6]),le(g8,"visibilitychange",n[9])],a=!0)},p(m,[$]){const y={};$&8&&(y.project=m[3]),$&100663346&&(y.$$scope={dirty:$,ctx:m}),!r&&$&2&&(r=!0,y.autoClearOutput=m[1].autoClearOutput,Vo(()=>r=!1)),!s&&$&2&&(s=!0,y.splitterDirection=m[1].splitterDirection,Vo(()=>s=!1)),!l&&$&2&&(l=!0,y.splitterSize=m[1].splitterSize,Vo(()=>l=!1)),i.$set(y)},i(m){o||(M(i.$$.fragment,m),o=!0)},o(m){j(i.$$.fragment,m),o=!1},d(m){m&&(A(e),A(t)),n[14](null),Xe(i),a=!1,Ft(c)}}}const bO=`% Use this editor as a MiniZinc scratch book `,Bb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function v8(n,e,t){let i,r;$O(n,Ns,L=>t(1,r=L));let s,l={files:[]},o=null,a=!1,c=[];function h(L,re){return!s||!re?[]:Object.entries(re.sessions).map(([ae,ye])=>{const Se=L.find(ge=>ge.id===ye.solverId);return{key:ae,files:ye.files,timestamp:ye.timestamp,solver:Se?Se.name:""}}).filter(ae=>ae.key!==sessionStorage.mznPlaygroundSession).sort((ae,ye)=>ye.timestamp-ae.timestamp)}function O(){const L=()=>Array(6).fill(0).map(()=>Bb[Math.floor(Math.random()*Bb.length)]).join("");let re=L();for(;re in r.sessions;)re=L();return re}function p(L){return L.solverId||(L.solver===0?L.solverId="org.minizinc.gecode_presolver":l.solver===1&&(L.solverId="org.minizinc.mip.coin-bc")),L}let g=!1;async function m(){const L=window.location.hash;if(L.length>0&&(g=!0,window.history.replaceState(void 0,void 0,window.location.pathname+window.location.search),g=!1),!g){if(L.startsWith("#project="))try{const re=decodeURIComponent(L.substring(9));y(O(),{...JSON.parse(re),timestamp:Date.now()});return}catch(re){console.error(re)}if(L.startsWith("#code="))try{const re=decodeURIComponent(L.substring(6));y(O(),{files:[{name:"Playground.mzn",contents:re,anchor:re.length}],timestamp:Date.now()});return}catch(re){console.error(re)}if(L.startsWith("#url="))try{const re=decodeURIComponent(L.substring(5));y(O(),await sQ(re));return}catch(re){console.error(re)}if(sessionStorage.mznPlaygroundSession&&r.sessions[sessionStorage.mznPlaygroundSession]){y(sessionStorage.mznPlaygroundSession,r.sessions[sessionStorage.mznPlaygroundSession]);return}l.files.length===0&&y(O(),{files:[{name:"Playground.mzn",contents:bO,anchor:bO.length}],timestamp:Date.now()})}}Hc(()=>m());function $(){if(sessionStorage.mznPlaygroundSession&&s.hasFiles())try{const L=s.getProject();if(!(sessionStorage.mznPlaygroundSession in r.sessions)&&s.isDefaultSolver()&&s.isDefaultSolverConfig()&&L.files.length===1&&L.files[0].name==="Playground.mzn"&&L.files[0].contents===bO)return;o=Date.now(),BW(Ns,r.sessions[sessionStorage.mznPlaygroundSession]={...L,timestamp:o},r)}catch(L){console.error(L)}}function y(L,re){$();try{const ae=p(re);sessionStorage.mznPlaygroundSession=L,t(3,l=ae),o=re.timestamp}catch(ae){console.error(ae)}t(4,a=!1),t(5,i=h(c,r))}function _(L){o!==null&&sessionStorage.mznPlaygroundSession in L.sessions&&L.sessions[sessionStorage.mznPlaygroundSession].timestamp>o&&(sessionStorage.mznPlaygroundSession=O(),t(5,i=h(c,L)))}const W=()=>{document.hidden&&$()},R=()=>t(4,a=!0),X=()=>t(4,a=!0),C=()=>t(4,a=!1),E=L=>y(L.detail.project.key,r.sessions[L.detail.project.key]);function D(L){Et[L?"unshift":"push"](()=>{s=L,t(2,s)})}function z(L){n.$$.not_equal(r.autoClearOutput,L)&&(r.autoClearOutput=L,Ns.set(r))}function F(L){n.$$.not_equal(r.splitterDirection,L)&&(r.splitterDirection=L,Ns.set(r))}function B(L){n.$$.not_equal(r.splitterSize,L)&&(r.splitterSize=L,Ns.set(r))}const q=L=>t(0,c=L.detail.solvers);return n.$$.update=()=>{n.$$.dirty&3&&t(5,i=h(c,r)),n.$$.dirty&2&&_(r)},[c,r,s,l,a,i,m,$,y,W,R,X,C,E,D,z,F,B,q]}class w8 extends $i{constructor(e){super(),bi(this,e,v8,y8,Oi,{})}}new w8({target:document.getElementById("app")});export{Xo as c,x8 as g}; diff --git a/develop/assets/jszip.min-BOFwHsSm.js b/develop/assets/jszip.min-Bl2THA8X.js similarity index 99% rename from develop/assets/jszip.min-BOFwHsSm.js rename to develop/assets/jszip.min-Bl2THA8X.js index 4c9a646..cfffe08 100644 --- a/develop/assets/jszip.min-BOFwHsSm.js +++ b/develop/assets/jszip.min-Bl2THA8X.js @@ -1,4 +1,4 @@ -import{g as At,c as bt}from"./index-Do04burZ.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var St={exports:{}};/*! +import{g as At,c as bt}from"./index-BocD5m97.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var St={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/develop/index.html b/develop/index.html index 4e70ef5..5546566 100644 --- a/develop/index.html +++ b/develop/index.html @@ -5,7 +5,7 @@ MiniZinc Playground - +