forked from Simnation/Main
44 lines
36 KiB
JavaScript
44 lines
36 KiB
JavaScript
const kt=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=t(l);fetch(l.href,o)}};kt();function $(){}const ot=n=>n;function st(n){return n()}function Re(){return Object.create(null)}function ie(n){n.forEach(st)}function Ve(n){return typeof n=="function"}function P(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function $t(n){return Object.keys(n).length===0}function ct(n,...e){if(n==null)return $;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Lt(n){let e;return ct(n,t=>e=t)(),e}function X(n,e,t){n.$$.on_destroy.push(ct(e,t))}function Be(n){return n==null?"":n}const ft=typeof window<"u";let at=ft?()=>window.performance.now():()=>Date.now(),De=ft?n=>requestAnimationFrame(n):$;const se=new Set;function ut(n){se.forEach(e=>{e.c(n)||(se.delete(e),e.f())}),se.size!==0&&De(ut)}function mt(n){let e;return se.size===0&&De(ut),{promise:new Promise(t=>{se.add(e={c:n,f:t})}),abort(){se.delete(e)}}}function g(n,e){n.appendChild(e)}function dt(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function jt(n){const e=y("style");return St(dt(n),e),e.sheet}function St(n,e){g(n.head||n,e)}function z(n,e,t){n.insertBefore(e,t||null)}function M(n){n.parentNode.removeChild(n)}function xt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function y(n){return document.createElement(n)}function E(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function W(n){return document.createTextNode(n)}function T(){return W(" ")}function je(){return W("")}function Y(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function m(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Mt(n){return Array.from(n.childNodes)}function ne(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function zt(n,e,{bubbles:t=!1,cancelable:r=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(n,t,r,e),l}const we=new Map;let ye=0;function At(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Nt(n,e){const t={stylesheet:jt(e),rules:{}};return we.set(n,t),t}function gt(n,e,t,r,l,o,i,s=0){const f=16.666/r;let c=`{
|
|
`;for(let h=0;h<=1;h+=f){const S=e+(t-e)*o(h);c+=h*100+`%{${i(S,1-S)}}
|
|
`}const a=c+`100% {${i(t,1-t)}}
|
|
}`,u=`__svelte_${At(a)}_${s}`,_=dt(n),{stylesheet:v,rules:C}=we.get(_)||Nt(_,n);C[u]||(C[u]=!0,v.insertRule(`@keyframes ${u} ${a}`,v.cssRules.length));const d=n.style.animation||"";return n.style.animation=`${d?`${d}, `:""}${u} ${r}ms linear ${l}ms 1 both`,ye+=1,u}function Ae(n,e){const t=(n.style.animation||"").split(", "),r=t.filter(e?o=>o.indexOf(e)<0:o=>o.indexOf("__svelte")===-1),l=t.length-r.length;l&&(n.style.animation=r.join(", "),ye-=l,ye||Vt())}function Vt(){De(()=>{ye||(we.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),we.clear())})}let de;function me(n){de=n}function _t(){if(!de)throw new Error("Function called outside component initialization");return de}function Dt(n){_t().$$.on_mount.push(n)}function Jt(n){_t().$$.on_destroy.push(n)}const ae=[],Ge=[],ve=[],Te=[],Et=Promise.resolve();let Ne=!1;function Ot(){Ne||(Ne=!0,Et.then(ht))}function re(n){ve.push(n)}const xe=new Set;let pe=0;function ht(){const n=de;do{for(;pe<ae.length;){const e=ae[pe];pe++,me(e),Ht(e.$$)}for(me(null),ae.length=0,pe=0;Ge.length;)Ge.pop()();for(let e=0;e<ve.length;e+=1){const t=ve[e];xe.has(t)||(xe.add(t),t())}ve.length=0}while(ae.length);for(;Te.length;)Te.pop()();Ne=!1,xe.clear(),me(n)}function Ht(n){if(n.fragment!==null){n.update(),ie(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(re)}}let fe;function pt(){return fe||(fe=Promise.resolve(),fe.then(()=>{fe=null})),fe}function Ce(n,e,t){n.dispatchEvent(zt(`${e?"intro":"outro"}${t}`))}const be=new Set;let Z;function R(){Z={r:0,c:[],p:Z}}function B(){Z.r||ie(Z.c),Z=Z.p}function p(n,e){n&&n.i&&(be.delete(n),n.i(e))}function w(n,e,t,r){if(n&&n.o){if(be.has(n))return;be.add(n),Z.c.push(()=>{be.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}const vt={duration:0};function bt(n,e,t){let r=e(n,t),l=!1,o,i,s=0;function f(){o&&Ae(n,o)}function c(){const{delay:u=0,duration:_=300,easing:v=ot,tick:C=$,css:d}=r||vt;d&&(o=gt(n,0,1,_,u,v,d,s++)),C(0,1);const h=at()+u,S=h+_;i&&i.abort(),l=!0,re(()=>Ce(n,!0,"start")),i=mt(x=>{if(l){if(x>=S)return C(1,0),Ce(n,!0,"end"),f(),l=!1;if(x>=h){const j=v((x-h)/_);C(j,1-j)}}return l})}let a=!1;return{start(){a||(a=!0,Ae(n),Ve(r)?(r=r(),pt().then(c)):c())},invalidate(){a=!1},end(){l&&(f(),l=!1)}}}function wt(n,e,t){let r=e(n,t),l=!0,o;const i=Z;i.r+=1;function s(){const{delay:f=0,duration:c=300,easing:a=ot,tick:u=$,css:_}=r||vt;_&&(o=gt(n,1,0,c,f,a,_));const v=at()+f,C=v+c;re(()=>Ce(n,!1,"start")),mt(d=>{if(l){if(d>=C)return u(0,1),Ce(n,!1,"end"),--i.r||ie(i.c),!1;if(d>=v){const h=a((d-v)/c);u(1-h,h)}}return l})}return Ve(r)?pt().then(()=>{r=r(),s()}):s(),{end(f){f&&r.tick&&r.tick(1,0),l&&(o&&Ae(n,o),l=!1)}}}function Rt(n,e){w(n,1,1,()=>{e.delete(n.key)})}function Bt(n,e,t,r,l,o,i,s,f,c,a,u){let _=n.length,v=o.length,C=_;const d={};for(;C--;)d[n[C].key]=C;const h=[],S=new Map,x=new Map;for(C=v;C--;){const L=u(l,o,C),J=t(L);let G=i.get(J);G?r&&G.p(L,e):(G=c(J,L),G.c()),S.set(J,h[C]=G),J in d&&x.set(J,Math.abs(C-d[J]))}const j=new Set,A=new Set;function k(L){p(L,1),L.m(s,a),i.set(L.key,L),a=L.first,v--}for(;_&&v;){const L=h[v-1],J=n[_-1],G=L.key,F=J.key;L===J?(a=L.first,_--,v--):S.has(F)?!i.has(G)||j.has(G)?k(L):A.has(F)?_--:x.get(G)>x.get(F)?(A.add(G),k(L)):(j.add(F),_--):(f(J,i),_--)}for(;_--;){const L=n[_];S.has(L.key)||f(L,i)}for(;v;)k(h[v-1]);return h}function D(n){n&&n.c()}function N(n,e,t,r){const{fragment:l,on_mount:o,on_destroy:i,after_update:s}=n.$$;l&&l.m(e,t),r||re(()=>{const f=o.map(st).filter(Ve);i?i.push(...f):ie(f),n.$$.on_mount=[]}),s.forEach(re)}function V(n,e){const t=n.$$;t.fragment!==null&&(ie(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gt(n,e){n.$$.dirty[0]===-1&&(ae.push(n),Ot(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function U(n,e,t,r,l,o,i,s=[-1]){const f=de;me(n);const c=n.$$={fragment:null,ctx:null,props:o,update:$,not_equal:l,bound:Re(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:Re(),dirty:s,skip_bound:!1,root:e.target||f.$$.root};i&&i(c.root);let a=!1;if(c.ctx=t?t(n,e.props||{},(u,_,...v)=>{const C=v.length?v[0]:_;return c.ctx&&l(c.ctx[u],c.ctx[u]=C)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](C),a&&Gt(n,u)),_}):[],c.update(),a=!0,ie(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const u=Mt(e.target);c.fragment&&c.fragment.l(u),u.forEach(M)}else c.fragment&&c.fragment.c();e.intro&&p(n.$$.fragment),N(n,e.target,e.anchor,e.customElement),ht()}me(f)}class I{$destroy(){V(this,1),this.$destroy=$}$on(e,t){const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const l=r.indexOf(t);l!==-1&&r.splice(l,1)}}$set(e){this.$$set&&!$t(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Tt(n){const e=n-1;return e*e*e+1}function ke(n,{delay:e=0,duration:t=400,easing:r=Tt,x:l=0,y:o=0,opacity:i=0}={}){const s=getComputedStyle(n),f=+s.opacity,c=s.transform==="none"?"":s.transform,a=f*(1-i);return{delay:e,duration:t,easing:r,css:(u,_)=>`
|
|
transform: ${c} translate(${(1-u)*l}px, ${(1-u)*o}px);
|
|
opacity: ${f-a*_}`}}function Pt(n){let e,t,r,l,o,i,s,f,c,a,u,_;var v=n[0];function C(d){return{}}return v&&(l=new v(C())),{c(){e=y("div"),t=y("div"),r=y("div"),l&&D(l.$$.fragment),o=T(),i=y("div"),s=y("p"),f=W(n[1]),c=W(`:
|
|
`),a=y("span"),u=W(n[2]),m(r,"class",n[3]),m(t,"class","w-full flex justify-center text-white"),m(a,"class","text-[var(--color-green)]"),m(s,"class","text-xs"),m(i,"class","text-center"),m(e,"class","flex flex-1 flex-col items-center gap-2 b-2 b-rd-2 border-[var(--color-darkblue)] pt-[14px] pb-[14px]")},m(d,h){z(d,e,h),g(e,t),g(t,r),l&&N(l,r,null),g(e,o),g(e,i),g(i,s),g(s,f),g(s,c),g(s,a),g(a,u),_=!0},p(d,[h]){if(v!==(v=d[0])){if(l){R();const S=l;w(S.$$.fragment,1,0,()=>{V(S,1)}),B()}v?(l=new v(C()),D(l.$$.fragment),p(l.$$.fragment,1),N(l,r,null)):l=null}(!_||h&8)&&m(r,"class",d[3]),(!_||h&2)&&ne(f,d[1]),(!_||h&4)&&ne(u,d[2])},i(d){_||(l&&p(l.$$.fragment,d),_=!0)},o(d){l&&w(l.$$.fragment,d),_=!1},d(d){d&&M(e),l&&V(l)}}}function Ut(n,e,t){let{icon:r=null}=e,{detail:l}=e,{value:o}=e,{svgSize:i}=e;return n.$$set=s=>{"icon"in s&&t(0,r=s.icon),"detail"in s&&t(1,l=s.detail),"value"in s&&t(2,o=s.value),"svgSize"in s&&t(3,i=s.svgSize)},[r,l,o,i]}class Me extends I{constructor(e){super(),U(this,e,Ut,Pt,P,{icon:0,detail:1,value:2,svgSize:3})}}function It(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M160 0C177.7 0 192 14.33 192 32V67.68C193.6 67.89 195.1 68.12 196.7 68.35C207.3 69.93 238.9 75.02 251.9 78.31C268.1
|
|
82.65 279.4 100.1 275 117.2C270.7 134.3 253.3 144.7 236.1 140.4C226.8 137.1 198.5 133.3 187.3 131.7C155.2 126.9 127.7 129.3
|
|
108.8 136.5C90.52 143.5 82.93 153.4 80.92 164.5C78.98 175.2 80.45 181.3 82.21 185.1C84.1 189.1 87.79 193.6 95.14 198.5C111.4
|
|
209.2 136.2 216.4 168.4 225.1L171.2 225.9C199.6 233.6 234.4 243.1 260.2 260.2C274.3 269.6 287.6 282.3 295.8 299.9C304.1 317.7
|
|
305.9 337.7 302.1 358.1C295.1 397 268.1 422.4 236.4 435.6C222.8 441.2 207.8 444.8 192 446.6V480C192 497.7 177.7 512 160 512C142.3
|
|
512 128 497.7 128 480V445.1C127.6 445.1 127.1 444.1 126.7 444.9L126.5 444.9C102.2 441.1 62.07 430.6 35 418.6C18.85 411.4 11.58
|
|
392.5 18.76 376.3C25.94 360.2 44.85 352.9 60.1 360.1C81.9 369.4 116.3 378.5 136.2 381.6C168.2 386.4 194.5 383.6 212.3 376.4C229.2
|
|
369.5 236.9 359.5 239.1 347.5C241 336.8 239.6 330.7 237.8 326.9C235.9 322.9 232.2 318.4 224.9 313.5C208.6 302.8 183.8 295.6 151.6
|
|
286.9L148.8 286.1C120.4 278.4 85.58 268.9 59.76 251.8C45.65 242.4 32.43 229.7 24.22 212.1C15.89 194.3 14.08 174.3 17.95 153C25.03
|
|
114.1 53.05 89.29 85.96 76.73C98.98 71.76 113.1 68.49 128 66.73V32C128 14.33 142.3 0 160 0V0z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 320 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class qt extends I{constructor(e){super(),U(this,e,null,It,P,{})}}function Ft(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M287.9 0C297.1 0 305.5 5.25 309.5 13.52L378.1 154.8L531.4 177.5C540.4 178.8 547.8 185.1 550.7 193.7C553.5 202.4
|
|
551.2 211.9 544.8 218.2L433.6 328.4L459.9 483.9C461.4 492.9 457.7 502.1 450.2 507.4C442.8 512.7 432.1 513.4 424.9 509.1L287.9
|
|
435.9L150.1 509.1C142.9 513.4 133.1 512.7 125.6 507.4C118.2 502.1 114.5 492.9 115.1 483.9L142.2 328.4L31.11 218.2C24.65 211.9
|
|
22.36 202.4 25.2 193.7C28.03 185.1 35.5 178.8 44.49 177.5L197.7 154.8L266.3 13.52C270.4 5.249 278.7 0 287.9 0L287.9 0zM287.9
|
|
78.95L235.4 187.2C231.9 194.3 225.1 199.3 217.3 200.5L98.98 217.9L184.9 303C190.4 308.5 192.9 316.4 191.6 324.1L171.4 443.7L276.6
|
|
387.5C283.7 383.7 292.2 383.7 299.2 387.5L404.4 443.7L384.2 324.1C382.9 316.4 385.5 308.5 391 303L476.9 217.9L358.6 200.5C350.7
|
|
199.3 343.9 194.3 340.5 187.2L287.9 78.95z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 576 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Kt extends I{constructor(e){super(),U(this,e,null,Ft,P,{})}}function Wt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M224 256c70.7 0 128-57.31 128-128s-57.3-128-128-128C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3C77.61
|
|
304 0 381.6 0 477.3c0 19.14 15.52 34.67 34.66 34.67h378.7C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 448 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Yt extends I{constructor(e){super(),U(this,e,null,Wt,P,{})}}function Qt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M547.3,112.1c-98,98.1-196,196.2-294,294.2c-11.9,11.9-23.7,23.8-35.6,35.6c-6,6-9.3,6-15.3,0
|
|
C141.5,381.1,80.7,320.2,19.8,259.3c-6-6-6-9.2,0-15.2c13.6-13.6,27.2-27.2,40.8-40.8c6-6,9.2-6,15.2,0
|
|
c43.2,43.2,86.5,86.4,129.7,129.7c1.3,1.3,2.4,3,3.8,4.8c2-1.9,3.4-3.1,4.7-4.4c90.5-90.5,181-181,271.5-271.5
|
|
c7.7-7.7,10-7.7,17.8,0.1c12.7,12.7,25.5,25.5,38.2,38.2c2.1,2.1,3.9,4.4,5.8,6.6C547.3,108.6,547.3,110.4,547.3,112.1z`),m(e,"fill","currentColor"),m(e,"x","0px"),m(e,"y","0px"),m(e,"viewBox","0 0 562.7 502.7"),m(e,"xml:space","preserve")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class $e extends I{constructor(e){super(),U(this,e,null,Qt,P,{})}}function Xt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3
|
|
0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5
|
|
12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 320 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Pe extends I{constructor(e){super(),U(this,e,null,Xt,P,{})}}function Zt(n){let e,t,r;return{c(){e=E("svg"),t=E("path"),r=E("path"),m(t,"d","M0 0h24v24H0z"),m(t,"fill","none"),m(r,"d","M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"),m(e,"fill","currentColor"),m(e,"viewBox","0 0 24 24")},m(l,o){z(l,e,o),g(e,t),g(e,r)},p:$,i:$,o:$,d(l){l&&M(e)}}}class Ue extends I{constructor(e){super(),U(this,e,null,Zt,P,{})}}function en(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0
|
|
8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24
|
|
10.7-24 24z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 512 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Ie extends I{constructor(e){super(),U(this,e,null,en,P,{})}}function tn(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M352 0C369.7 0 384 14.33 384 32V64L384 64.15C422.6 66.31 456.3 91.49 469.2 128.3L504.4 228.8C527.6 238.4 544
|
|
261.3 544 288V480C544 497.7 529.7 512 512 512H480C462.3 512 448 497.7 448 480V432H128V480C128 497.7 113.7 512 96 512H64C46.33
|
|
512 32 497.7 32 480V288C32 261.3 48.36 238.4 71.61 228.8L106.8 128.3C119.7 91.49 153.4 66.31 192 64.15L192 64V32C192 14.33
|
|
206.3 0 224 0L352 0zM197.4 128C183.8 128 171.7 136.6 167.2 149.4L141.1 224H434.9L408.8 149.4C404.3 136.6 392.2 128 378.6
|
|
128H197.4zM128 352C145.7 352 160 337.7 160 320C160 302.3 145.7 288 128 288C110.3 288 96 302.3 96 320C96 337.7 110.3 352
|
|
128 352zM448 288C430.3 288 416 302.3 416 320C416 337.7 430.3 352 448 352C465.7 352 480 337.7 480 320C480 302.3 465.7 288
|
|
448 288z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 576 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class qe extends I{constructor(e){super(),U(this,e,null,tn,P,{})}}const oe=[];function te(n,e=$){let t;const r=new Set;function l(s){if(P(n,s)&&(n=s,t)){const f=!oe.length;for(const c of r)c[1](),oe.push(c,n);if(f){for(let c=0;c<oe.length;c+=2)oe[c][0](oe[c+1]);oe.length=0}}}function o(s){l(s(n))}function i(s,f=$){const c=[s,f];return r.add(c),r.size===1&&(t=e(l)||$),s(n),()=>{r.delete(c),r.size===0&&(t(),t=null)}}return{set:l,update:o,subscribe:i}}async function ue(n,e={}){const t={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(e)},l=(()=>{try{return window.GetParentResourceName()}catch{return"ps-multijob"}})();try{return await(await fetch(`https://${l}/${n}`,t)).json()}catch{}}function nn(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d","M0 32v448h448V32H0zm316.5 325.2L224 445.9l-92.5-88.7 64.5-184-64.5-86.6h184.9L252 173.2l64.5 184z"),m(e,"fill",n[0]),m(e,"xmlns","http://www.w3.org/2000/svg"),m(e,"viewBox","0 0 448 512")},m(r,l){z(r,e,l),g(e,t)},p(r,[l]){l&1&&m(e,"fill",r[0])},i:$,o:$,d(r){r&&M(e)}}}function rn(n,e,t){let{color:r="black"}=e;return n.$$set=l=>{"color"in l&&t(0,r=l.color)},[r]}class ln extends I{constructor(e){super(),U(this,e,rn,nn,P,{color:0})}}function on(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M152.1 38.16C161.9 47.03 162.7 62.2 153.8 72.06L81.84 152.1C77.43 156.9 71.21 159.8 64.63 159.1C58.05
|
|
160.2 51.69 157.6 47.03 152.1L7.029 112.1C-2.343 103.6-2.343 88.4 7.029 79.03C16.4 69.66 31.6 69.66 40.97 79.03L63.08
|
|
101.1L118.2 39.94C127 30.09 142.2 29.29 152.1 38.16V38.16zM152.1 198.2C161.9 207 162.7 222.2 153.8 232.1L81.84 312.1C77.43
|
|
316.9 71.21 319.8 64.63 319.1C58.05 320.2 51.69 317.6 47.03 312.1L7.029 272.1C-2.343 263.6-2.343 248.4 7.029 239C16.4
|
|
229.7 31.6 229.7 40.97 239L63.08 261.1L118.2 199.9C127 190.1 142.2 189.3 152.1 198.2V198.2zM224 96C224 78.33 238.3 64
|
|
256 64H480C497.7 64 512 78.33 512 96C512 113.7 497.7 128 480 128H256C238.3 128 224 113.7 224 96V96zM224 256C224 238.3
|
|
238.3 224 256 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H256C238.3 288 224 273.7 224 256zM160 416C160
|
|
398.3 174.3 384 192 384H480C497.7 384 512 398.3 512 416C512 433.7 497.7 448 480 448H192C174.3 448 160 433.7 160 416zM0
|
|
416C0 389.5 21.49 368 48 368C74.51 368 96 389.5 96 416C96 442.5 74.51 464 48 464C21.49 464 0 442.5 0 416z`),m(e,"fill",n[0]),m(e,"xmlns","http://www.w3.org/2000/svg"),m(e,"viewBox","0 0 512 512")},m(r,l){z(r,e,l),g(e,t)},p(r,[l]){l&1&&m(e,"fill",r[0])},i:$,o:$,d(r){r&&M(e)}}}function sn(n,e,t){let{color:r="black"}=e;return n.$$set=l=>{"color"in l&&t(0,r=l.color)},[r]}class cn extends I{constructor(e){super(),U(this,e,sn,on,P,{color:0})}}const fn=[{name:"whitelist",icon:cn},{name:"civilian",icon:ln}],an=()=>{const n={panelActive:te(""),panels:te(fn),show:te(!1),side:te("right")},e={handleKeyUp(t){t.key=="Escape"&&(e.setShow(!1),ue("closemenu",null))},setActive(t){n.panelActive.set(t)},setShow(t){n.show.set(t)},setSide(t){n.side.set(t)}};return{...n,...e}},le=an(),un=()=>{const n={jobManifest:te({civilian:[],whitelist:[]}),activeJob:te("police person"),onDuty:te(!1)};return{...n,...{deleteJob(t,r,l){ue("removejob",{name:t,grade:r}),n.jobManifest.update(o=>(o[l]=o[l].filter(i=>i.name!=t),o))},receiveOpenMessage(t){n.jobManifest.set(t.jobs),n.activeJob.set(t.activeJob),n.onDuty.set(t.onDuty),le.side.set(t.side||"right")},recieveUpdateJob(t){Lt(n.activeJob)==t.name&&n.onDuty.set(t.onDuty),n.jobManifest.update(l=>{var a;function o(u,_){let v=l[u][_];v.grade=t.grade,v.gradeLabel=t.gradeLabel,v.salary=t.salary}function i(){return{name:t.name,label:t.label,description:t.description,salary:t.salary,gradeLabel:t.gradeLabel,grade:t.grade,active:0,icon:t.icon}}let s=u=>u.name==t.name;const f=t.isWhitelist?"whitelist":"civilian";let c=(a=l[f])==null?void 0:a.findIndex(s);return c!=-1?o(f,c):l[f]=[...l[f],i()],l})},async setActiveJob(t,r,l){n.activeJob.set(t);let o=await ue("selectjob",{name:r,grade:l});n.onDuty.set(o==null?void 0:o.onDuty)},unSetActiveJob(){n.activeJob.set(""),n.onDuty.set(!1),ue("selectjob",{name:"unemployed",grade:0})},toggleDuty(){n.onDuty.update(t=>!t),ue("toggleduty",null)}}}},Le=un();function mn(n){let e,t,r;var l=qe;function o(i){return{}}return l&&(e=new l(o())),{c(){e&&D(e.$$.fragment),t=je()},m(i,s){e&&N(e,i,s),z(i,t,s),r=!0},p(i,s){if(l!==(l=qe)){if(e){R();const f=e;w(f.$$.fragment,1,0,()=>{V(f,1)}),B()}l?(e=new l(o()),D(e.$$.fragment),p(e.$$.fragment,1),N(e,t.parentNode,t)):e=null}},i(i){r||(e&&p(e.$$.fragment,i),r=!0)},o(i){e&&w(e.$$.fragment,i),r=!1},d(i){i&&M(t),e&&V(e,i)}}}function dn(n){let e,t;return{c(){e=y("i"),m(e,"class",t=n[2]+" fa-lg")},m(r,l){z(r,e,l)},p(r,l){l[0]&4&&t!==(t=r[2]+" fa-lg")&&m(e,"class",t)},i:$,o:$,d(r){r&&M(e)}}}function Fe(n){let e,t,r,l,o,i,s,f;var c=$e;function a(u){return{}}return c&&(r=new c(a())),{c(){e=y("button"),t=y("div"),r&&D(r.$$.fragment),l=T(),o=y("p"),o.textContent="select",m(t,"class","w-4"),m(o,"class","ml-[5px] uppercase tracking-wide"),m(e,"class","bg-[var(--color-green)] flex flex-row h-11 items-center justify-center gap-1 b-rd-[5px] py-[10px] font-medium text-black flex-1 w-full")},m(u,_){z(u,e,_),g(e,t),r&&N(r,t,null),g(e,l),g(e,o),i=!0,s||(f=Y(e,"click",n[29]),s=!0)},p(u,_){if(c!==(c=$e)){if(r){R();const v=r;w(v.$$.fragment,1,0,()=>{V(v,1)}),B()}c?(r=new c(a()),D(r.$$.fragment),p(r.$$.fragment,1),N(r,t,null)):r=null}},i(u){i||(r&&p(r.$$.fragment,u),i=!0)},o(u){r&&w(r.$$.fragment,u),i=!1},d(u){u&&M(e),r&&V(r),s=!1,f()}}}function Ke(n){let e,t,r,l,o,i,s,f,c,a,u,_,v,C,d,h,S,x=!n[15]&&We(),j=(n[9]&&!n[11]||n[12])&&Ye(),A=(!n[9]&&!n[11]||n[13])&&Qe();return{c(){e=y("div"),t=y("button"),x&&x.c(),r=T(),l=y("p"),o=W(n[14]),s=T(),f=y("div"),c=y("button"),j&&j.c(),a=T(),A&&A.c(),u=T(),_=y("p"),v=W(n[16]),m(l,"class","uppercase tracking-wide"),m(t,"class",i="flex flex-1 flex-row gap-2 border-1 b-rd-[5px] justify-center items-center h-11"+(n[15]?"border-[var(--color-orange)] text-[var(--color-orange)]":"")),m(_,"class","ml-[5px] uppercase tracking-wide"),m(c,"class",C="flex flex-row justify-center items-center gap-1 h-11 border-1 b-rd-[5px] py-[10px] font-medium flex-1 w-full "+(n[9]?"border-[var(--color-green)] text-[var(--color-green)] ":"border-[var(--color-orange)] text-[var(--color-orange)] ")+(n[9]&&!n[12]?"hover:border-[var(--color-orange)] hover:text-[var(--color-orange)]":"")+(!n[9]&&!n[13]?"hover:border-[var(--color-green)] hover:text-[var(--color-green)]":"")),m(f,"class","flex-1"),m(e,"class","flex flex-row justify-between gap-2")},m(k,L){z(k,e,L),g(e,t),x&&x.m(t,null),g(t,r),g(t,l),g(l,o),g(e,s),g(e,f),g(f,c),j&&j.m(c,null),g(c,a),A&&A.m(c,null),g(c,u),g(c,_),g(_,v),d=!0,h||(S=[Y(t,"click",n[26]),Y(t,"mouseenter",n[24]),Y(t,"mouseleave",n[25]),Y(c,"click",n[23]),Y(c,"mouseenter",n[21]),Y(c,"mouseleave",n[22])],h=!0)},p(k,L){k[15]?x&&(R(),w(x,1,1,()=>{x=null}),B()):x?(x.p(k,L),L[0]&32768&&p(x,1)):(x=We(),x.c(),p(x,1),x.m(t,r)),(!d||L[0]&16384)&&ne(o,k[14]),(!d||L[0]&32768&&i!==(i="flex flex-1 flex-row gap-2 border-1 b-rd-[5px] justify-center items-center h-11"+(k[15]?"border-[var(--color-orange)] text-[var(--color-orange)]":"")))&&m(t,"class",i),k[9]&&!k[11]||k[12]?j?(j.p(k,L),L[0]&6656&&p(j,1)):(j=Ye(),j.c(),p(j,1),j.m(c,a)):j&&(R(),w(j,1,1,()=>{j=null}),B()),!k[9]&&!k[11]||k[13]?A?(A.p(k,L),L[0]&10752&&p(A,1)):(A=Qe(),A.c(),p(A,1),A.m(c,u)):A&&(R(),w(A,1,1,()=>{A=null}),B()),(!d||L[0]&65536)&&ne(v,k[16]),(!d||L[0]&12800&&C!==(C="flex flex-row justify-center items-center gap-1 h-11 border-1 b-rd-[5px] py-[10px] font-medium flex-1 w-full "+(k[9]?"border-[var(--color-green)] text-[var(--color-green)] ":"border-[var(--color-orange)] text-[var(--color-orange)] ")+(k[9]&&!k[12]?"hover:border-[var(--color-orange)] hover:text-[var(--color-orange)]":"")+(!k[9]&&!k[13]?"hover:border-[var(--color-green)] hover:text-[var(--color-green)]":"")))&&m(c,"class",C)},i(k){d||(p(x),p(j),p(A),d=!0)},o(k){w(x),w(j),w(A),d=!1},d(k){k&&M(e),x&&x.d(),j&&j.d(),A&&A.d(),h=!1,ie(S)}}}function We(n){let e,t,r;var l=$e;function o(i){return{}}return l&&(t=new l(o())),{c(){e=y("div"),t&&D(t.$$.fragment),m(e,"class","w-5")},m(i,s){z(i,e,s),t&&N(t,e,null),r=!0},p(i,s){if(l!==(l=$e)){if(t){R();const f=t;w(f.$$.fragment,1,0,()=>{V(f,1)}),B()}l?(t=new l(o()),D(t.$$.fragment),p(t.$$.fragment,1),N(t,e,null)):t=null}},i(i){r||(t&&p(t.$$.fragment,i),r=!0)},o(i){t&&w(t.$$.fragment,i),r=!1},d(i){i&&M(e),t&&V(t)}}}function Ye(n){let e,t,r;var l=Ie;function o(i){return{}}return l&&(t=new l(o())),{c(){e=y("div"),t&&D(t.$$.fragment),m(e,"class","w-5")},m(i,s){z(i,e,s),t&&N(t,e,null),r=!0},p(i,s){if(l!==(l=Ie)){if(t){R();const f=t;w(f.$$.fragment,1,0,()=>{V(f,1)}),B()}l?(t=new l(o()),D(t.$$.fragment),p(t.$$.fragment,1),N(t,e,null)):t=null}},i(i){r||(t&&p(t.$$.fragment,i),r=!0)},o(i){t&&w(t.$$.fragment,i),r=!1},d(i){i&&M(e),t&&V(t)}}}function Qe(n){let e,t,r;var l=Pe;function o(i){return{}}return l&&(t=new l(o())),{c(){e=y("div"),t&&D(t.$$.fragment),m(e,"class","w-[0.9rem]")},m(i,s){z(i,e,s),t&&N(t,e,null),r=!0},p(i,s){if(l!==(l=Pe)){if(t){R();const f=t;w(f.$$.fragment,1,0,()=>{V(f,1)}),B()}l?(t=new l(o()),D(t.$$.fragment),p(t.$$.fragment,1),N(t,e,null)):t=null}},i(i){r||(t&&p(t.$$.fragment,i),r=!0)},o(i){t&&w(t.$$.fragment,i),r=!1},d(i){i&&M(e),t&&V(t)}}}function gn(n){let e,t,r,l,o,i,s,f,c,a,u,_,v,C,d,h,S,x,j,A,k,L,J,G,F,ce,ge;const ee=[dn,mn],K=[];function _e(b,q){return b[2]?0:1}l=_e(n),o=K[l]=ee[l](n);var Q=Ue;function he(b){return{}}Q&&(u=new Q(he())),S=new Me({props:{icon:qt,detail:"Salary",value:n[4],svgSize:"w-[0.8rem]"}}),j=new Me({props:{icon:Kt,detail:"Rank",value:n[5],svgSize:"w-[1.4rem]"}}),k=new Me({props:{icon:Yt,detail:"Active",value:n[7],svgSize:"w-[1.1rem]"}});let O=!n[10]&&Fe(n),H=n[10]&&Ke(n);return{c(){e=y("main"),t=y("div"),r=y("div"),o.c(),i=T(),s=y("p"),f=W(n[0]),c=T(),a=y("div"),u&&D(u.$$.fragment),_=T(),v=y("p"),C=W(n[3]),d=T(),h=y("div"),D(S.$$.fragment),x=T(),D(j.$$.fragment),A=T(),D(k.$$.fragment),L=T(),J=y("div"),O&&O.c(),G=T(),H&&H.c(),m(r,"class","w-6 text-[var(--color-green)]"),m(s,"class","text-xl tracking-wide capitalize"),m(a,"class","w-7 text-[var(--color-darkblue)] cursor-pointer ml-auto hover:text-[var(--color-orange)]"),m(t,"class","flex flex-row items-center gap-2 text-center"),m(v,"class","text-sm text-[var(--color-lightestgrey)]"),m(h,"class","job-details flex gap-[12px] justify-stretch"),m(J,"class","mt-2"),m(e,"class","job w-full flex flex-col gap-4 mb-[30px] b-rd-[10px] px-[22px] py-5 relative select-none bg-[var(--color-darkerblue)] border border-[var(--color-darkblue)]")},m(b,q){z(b,e,q),g(e,t),g(t,r),K[l].m(r,null),g(t,i),g(t,s),g(s,f),g(t,c),g(t,a),u&&N(u,a,null),g(e,_),g(e,v),g(v,C),g(e,d),g(e,h),N(S,h,null),g(h,x),N(j,h,null),g(h,A),N(k,h,null),g(e,L),g(e,J),O&&O.m(J,null),g(J,G),H&&H.m(J,null),F=!0,ce||(ge=Y(a,"click",n[28]),ce=!0)},p(b,q){let Se=l;if(l=_e(b),l===Se?K[l].p(b,q):(R(),w(K[Se],1,1,()=>{K[Se]=null}),B(),o=K[l],o?o.p(b,q):(o=K[l]=ee[l](b),o.c()),p(o,1),o.m(r,null)),(!F||q[0]&1)&&ne(f,b[0]),Q!==(Q=Ue)){if(u){R();const He=u;w(He.$$.fragment,1,0,()=>{V(He,1)}),B()}Q?(u=new Q(he()),D(u.$$.fragment),p(u.$$.fragment,1),N(u,a,null)):u=null}(!F||q[0]&8)&&ne(C,b[3]);const Je={};q[0]&16&&(Je.value=b[4]),S.$set(Je);const Ee={};q[0]&32&&(Ee.value=b[5]),j.$set(Ee);const Oe={};q[0]&128&&(Oe.value=b[7]),k.$set(Oe),b[10]?O&&(R(),w(O,1,1,()=>{O=null}),B()):O?(O.p(b,q),q[0]&1024&&p(O,1)):(O=Fe(b),O.c(),p(O,1),O.m(J,G)),b[10]?H?(H.p(b,q),q[0]&1024&&p(H,1)):(H=Ke(b),H.c(),p(H,1),H.m(J,null)):H&&(R(),w(H,1,1,()=>{H=null}),B())},i(b){F||(p(o),u&&p(u.$$.fragment,b),p(S.$$.fragment,b),p(j.$$.fragment,b),p(k.$$.fragment,b),p(O),p(H),F=!0)},o(b){w(o),u&&w(u.$$.fragment,b),w(S.$$.fragment,b),w(j.$$.fragment,b),w(k.$$.fragment,b),w(O),w(H),F=!1},d(b){b&&M(e),K[l].d(),u&&V(u),V(S),V(j),V(k),O&&O.d(),H&&H.d(),ce=!1,ge()}}}function ze(n){return n?"On Duty":"Off Duty"}function Xe(n){return n?"Selected":"Unselect"}function _n(n,e,t){let r,l,o,{name:i}=e,{nuiName:s}=e,{icon:f=""}=e,{description:c=""}=e,{salary:a}=e,{rank:u}=e,{nuiRank:_}=e,{active:v}=e,{category:C}=e;const{activeJob:d,onDuty:h,setActiveJob:S,toggleDuty:x,unSetActiveJob:j,deleteJob:A}=Le;X(n,d,b=>t(27,o=b)),X(n,h,b=>t(9,l=b));let k=!1,L=!1,J=!1,G=!1;function F(){t(16,r=ze(!l)),t(11,L=!0)}function ce(){t(16,r=ze(l)),t(11,L=!1),t(12,J=!1),t(13,G=!1)}function ge(){l?(t(13,G=!0),t(12,J=!1)):(t(12,J=!0),t(13,G=!1)),x()}let ee="selected",K=!1;function _e(){t(14,ee=Xe(!1)),t(15,K=!0)}function Q(){t(14,ee=Xe(!0)),t(15,K=!1)}function he(){j(),t(15,K=!1),t(14,ee="selected")}const O=()=>A(s,_,C),H=()=>S(s,s,_);return n.$$set=b=>{"name"in b&&t(0,i=b.name),"nuiName"in b&&t(1,s=b.nuiName),"icon"in b&&t(2,f=b.icon),"description"in b&&t(3,c=b.description),"salary"in b&&t(4,a=b.salary),"rank"in b&&t(5,u=b.rank),"nuiRank"in b&&t(6,_=b.nuiRank),"active"in b&&t(7,v=b.active),"category"in b&&t(8,C=b.category)},n.$$.update=()=>{n.$$.dirty[0]&134217730&&t(10,k=o==s),n.$$.dirty[0]&512&&t(16,r=ze(l))},[i,s,f,c,a,u,_,v,C,l,k,L,J,G,ee,K,r,d,h,S,A,F,ce,ge,_e,Q,he,o,O,H]}class hn extends I{constructor(e){super(),U(this,e,_n,gn,P,{name:0,nuiName:1,icon:2,description:3,salary:4,rank:5,nuiRank:6,active:7,category:8},null,[-1,-1])}}function Ze(n,e,t){const r=n.slice();return r[2]=e[t],r}function et(n,e){let t,r,l;return r=new hn({props:{name:e[2].label,nuiName:e[2].name,nuiRank:e[2].grade,icon:e[2].icon,description:e[2].description,salary:e[2].salary,rank:e[2].gradeLabel,active:e[2].active,category:e[1]}}),{key:n,first:null,c(){t=je(),D(r.$$.fragment),this.first=t},m(o,i){z(o,t,i),N(r,o,i),l=!0},p(o,i){e=o;const s={};i&1&&(s.name=e[2].label),i&1&&(s.nuiName=e[2].name),i&1&&(s.nuiRank=e[2].grade),i&1&&(s.icon=e[2].icon),i&1&&(s.description=e[2].description),i&1&&(s.salary=e[2].salary),i&1&&(s.rank=e[2].gradeLabel),i&1&&(s.active=e[2].active),i&2&&(s.category=e[1]),r.$set(s)},i(o){l||(p(r.$$.fragment,o),l=!0)},o(o){w(r.$$.fragment,o),l=!1},d(o){o&&M(t),V(r,o)}}}function pn(n){let e,t,r,l,o,i,s,f,c,a=[],u=new Map,_,v=n[0];const C=d=>d[2].name;for(let d=0;d<v.length;d+=1){let h=Ze(n,v,d),S=C(h);u.set(S,a[d]=et(S,h))}return{c(){e=y("main"),t=y("div"),r=y("p"),r.textContent="CATEGORY",l=T(),o=y("p"),i=W(n[1]),s=W(" Jobs"),f=T(),c=y("div");for(let d=0;d<a.length;d+=1)a[d].c();m(r,"class","category svelte-164hciw"),m(o,"class","category-name text-white block mt-[-5px] font-medium capitalize svelte-164hciw"),m(t,"class","text-white px-[28px] pb-4"),m(c,"class","max-h-screen overflow-y-auto px-[28px] pb-20"),m(e,"class","w-[380px] min-h-screen block pt-[20px] select-none svelte-164hciw")},m(d,h){z(d,e,h),g(e,t),g(t,r),g(t,l),g(t,o),g(o,i),g(o,s),g(e,f),g(e,c);for(let S=0;S<a.length;S+=1)a[S].m(c,null);_=!0},p(d,[h]){(!_||h&2)&&ne(i,d[1]),h&3&&(v=d[0],R(),a=Bt(a,h,C,1,d,v,u,c,Rt,et,null,Ze),B())},i(d){if(!_){for(let h=0;h<v.length;h+=1)p(a[h]);_=!0}},o(d){for(let h=0;h<a.length;h+=1)w(a[h]);_=!1},d(d){d&&M(e);for(let h=0;h<a.length;h+=1)a[h].d()}}}function vn(n,e,t){let{jobArray:r=[]}=e,{panelName:l=""}=e;return n.$$set=o=>{"jobArray"in o&&t(0,r=o.jobArray),"panelName"in o&&t(1,l=o.panelName)},[r,l]}class yt extends I{constructor(e){super(),U(this,e,vn,pn,P,{jobArray:0,panelName:1})}}function bn(n){let e,t,r,l,o,i,s;var f=n[0];function c(a){return{props:{color:a[1]?"var(--color-green)":"var(--color-grey)"}}}return f&&(r=new f(c(n))),{c(){e=y("div"),t=y("div"),r&&D(r.$$.fragment),m(t,"class","icon svelte-1jmblc8"),m(e,"class",l=Be("navitem w-full h-[60px] flex justify-center items-center cursor-pointer duration-200 "+(n[3]=="left"?"border-l-4 ":"border-r-4 ")+(n[1]?n[3]=="left"?"border-l-[var(--color-green)] bg-[var(--color-darkestblue)] ":"border-r-[var(--color-green)] bg-[var(--color-darkestblue)] ":n[3]=="left"?"border-l-transparent ":"border-r-transparent "))+" svelte-1jmblc8")},m(a,u){z(a,e,u),g(e,t),r&&N(r,t,null),o=!0,i||(s=Y(e,"click",n[5]),i=!0)},p(a,[u]){const _={};if(u&2&&(_.color=a[1]?"var(--color-green)":"var(--color-grey)"),f!==(f=a[0])){if(r){R();const v=r;w(v.$$.fragment,1,0,()=>{V(v,1)}),B()}f?(r=new f(c(a)),D(r.$$.fragment),p(r.$$.fragment,1),N(r,t,null)):r=null}else f&&r.$set(_);(!o||u&10&&l!==(l=Be("navitem w-full h-[60px] flex justify-center items-center cursor-pointer duration-200 "+(a[3]=="left"?"border-l-4 ":"border-r-4 ")+(a[1]?a[3]=="left"?"border-l-[var(--color-green)] bg-[var(--color-darkestblue)] ":"border-r-[var(--color-green)] bg-[var(--color-darkestblue)] ":a[3]=="left"?"border-l-transparent ":"border-r-transparent "))+" svelte-1jmblc8"))&&m(e,"class",l)},i(a){o||(r&&p(r.$$.fragment,a),o=!0)},o(a){r&&w(r.$$.fragment,a),o=!1},d(a){a&&M(e),r&&V(r),i=!1,s()}}}function wn(n,e,t){let{icon:r}=e,{isActive:l}=e,{name:o}=e,{side:i}=e;function s(c){l?le.setActive(""):le.setActive(c)}const f=()=>s(o);return n.$$set=c=>{"icon"in c&&t(0,r=c.icon),"isActive"in c&&t(1,l=c.isActive),"name"in c&&t(2,o=c.name),"side"in c&&t(3,i=c.side)},[r,l,o,i,s,f]}class yn extends I{constructor(e){super(),U(this,e,wn,bn,P,{icon:0,isActive:1,name:2,side:3})}}function tt(n,e,t){const r=n.slice();return r[5]=e[t],r}function nt(n){let e,t;return e=new yn({props:{name:n[5].name,isActive:n[5].name==n[2],icon:n[5].icon,side:n[0]}}),{c(){D(e.$$.fragment)},m(r,l){N(e,r,l),t=!0},p(r,l){const o={};l&2&&(o.name=r[5].name),l&6&&(o.isActive=r[5].name==r[2]),l&2&&(o.icon=r[5].icon),l&1&&(o.side=r[0]),e.$set(o)},i(r){t||(p(e.$$.fragment,r),t=!0)},o(r){w(e.$$.fragment,r),t=!1},d(r){V(e,r)}}}function Cn(n){let e,t,r,l,o=n[1],i=[];for(let f=0;f<o.length;f+=1)i[f]=nt(tt(n,o,f));const s=f=>w(i[f],1,1,()=>{i[f]=null});return{c(){e=y("nav"),t=y("div"),r=T();for(let f=0;f<i.length;f+=1)i[f].c();m(t,"class","ps-logo w-full h-[80px]"),m(e,"class","w-[80px] min-h-screen nav flex flex-col z-10 svelte-zpuozb")},m(f,c){z(f,e,c),g(e,t),g(e,r);for(let a=0;a<i.length;a+=1)i[a].m(e,null);l=!0},p(f,[c]){if(c&7){o=f[1];let a;for(a=0;a<o.length;a+=1){const u=tt(f,o,a);i[a]?(i[a].p(u,c),p(i[a],1)):(i[a]=nt(u),i[a].c(),p(i[a],1),i[a].m(e,null))}for(R(),a=o.length;a<i.length;a+=1)s(a);B()}},i(f){if(!l){for(let c=0;c<o.length;c+=1)p(i[c]);l=!0}},o(f){i=i.filter(Boolean);for(let c=0;c<i.length;c+=1)w(i[c]);l=!1},d(f){f&&M(e),xt(i,f)}}}function kn(n,e,t){let r,l,{side:o}=e;const{panelActive:i,panels:s}=le;return X(n,i,f=>t(2,l=f)),X(n,s,f=>t(1,r=f)),n.$$set=f=>{"side"in f&&t(0,o=f.side)},[o,r,l,i,s]}class Ct extends I{constructor(e){super(),U(this,e,kn,Cn,P,{side:0})}}function $n(){function n(e){switch(e.data.action){case"sendjobs":Le.receiveOpenMessage(e.data),le.setShow(!0);break;case"updatejob":Le.recieveUpdateJob(e.data);break}}Dt(()=>window.addEventListener("message",n)),Jt(()=>window.removeEventListener("message",n))}function rt(n){let e,t,r,l,o;const i=[jn,Ln],s=[];function f(c,a){return c[1]=="right"?0:1}return t=f(n),r=s[t]=i[t](n),{c(){e=y("main"),r.c(),m(e,"class",l="min-h-screen flex"+(n[1]=="right"?" justify-end ":" ")+"bg-transparent")},m(c,a){z(c,e,a),s[t].m(e,null),o=!0},p(c,a){let u=t;t=f(c),t===u?s[t].p(c,a):(R(),w(s[u],1,1,()=>{s[u]=null}),B(),r=s[t],r?r.p(c,a):(r=s[t]=i[t](c),r.c()),p(r,1),r.m(e,null)),(!o||a&2&&l!==(l="min-h-screen flex"+(c[1]=="right"?" justify-end ":" ")+"bg-transparent"))&&m(e,"class",l)},i(c){o||(p(r),o=!0)},o(c){w(r),o=!1},d(c){c&&M(e),s[t].d()}}}function Ln(n){let e,t,r,l;e=new Ct({props:{side:n[1]}});let o=n[2]!=""&<(n);return{c(){D(e.$$.fragment),t=T(),o&&o.c(),r=je()},m(i,s){N(e,i,s),z(i,t,s),o&&o.m(i,s),z(i,r,s),l=!0},p(i,s){const f={};s&2&&(f.side=i[1]),e.$set(f),i[2]!=""?o?(o.p(i,s),s&4&&p(o,1)):(o=lt(i),o.c(),p(o,1),o.m(r.parentNode,r)):o&&(R(),w(o,1,1,()=>{o=null}),B())},i(i){l||(p(e.$$.fragment,i),p(o),l=!0)},o(i){w(e.$$.fragment,i),w(o),l=!1},d(i){V(e,i),i&&M(t),o&&o.d(i),i&&M(r)}}}function jn(n){let e,t,r,l=n[2]!=""&&it(n);return t=new Ct({props:{side:n[1]}}),{c(){l&&l.c(),e=T(),D(t.$$.fragment)},m(o,i){l&&l.m(o,i),z(o,e,i),N(t,o,i),r=!0},p(o,i){o[2]!=""?l?(l.p(o,i),i&4&&p(l,1)):(l=it(o),l.c(),p(l,1),l.m(e.parentNode,e)):l&&(R(),w(l,1,1,()=>{l=null}),B());const s={};i&2&&(s.side=o[1]),t.$set(s)},i(o){r||(p(l),p(t.$$.fragment,o),r=!0)},o(o){w(l),w(t.$$.fragment,o),r=!1},d(o){l&&l.d(o),o&&M(e),V(t,o)}}}function lt(n){let e,t,r,l,o;return t=new yt({props:{jobArray:n[3][n[2]]||[],panelName:n[2]}}),{c(){e=y("div"),D(t.$$.fragment)},m(i,s){z(i,e,s),N(t,e,null),o=!0},p(i,s){const f={};s&12&&(f.jobArray=i[3][i[2]]||[]),s&4&&(f.panelName=i[2]),t.$set(f)},i(i){o||(p(t.$$.fragment,i),i&&re(()=>{l&&l.end(1),r=bt(e,ke,{x:-500,duration:500}),r.start()}),o=!0)},o(i){w(t.$$.fragment,i),r&&r.invalidate(),i&&(l=wt(e,ke,{x:-500,duration:500})),o=!1},d(i){i&&M(e),V(t),i&&l&&l.end()}}}function it(n){let e,t,r,l,o;return t=new yt({props:{jobArray:n[3][n[2]]||[],panelName:n[2]}}),{c(){e=y("div"),D(t.$$.fragment)},m(i,s){z(i,e,s),N(t,e,null),o=!0},p(i,s){const f={};s&12&&(f.jobArray=i[3][i[2]]||[]),s&4&&(f.panelName=i[2]),t.$set(f)},i(i){o||(p(t.$$.fragment,i),i&&re(()=>{l&&l.end(1),r=bt(e,ke,{x:500,duration:500}),r.start()}),o=!0)},o(i){w(t.$$.fragment,i),r&&r.invalidate(),i&&(l=wt(e,ke,{x:500,duration:500})),o=!1},d(i){i&&M(e),V(t),i&&l&&l.end()}}}function Sn(n){let e,t,r=n[0]&&rt(n);return{c(){r&&r.c(),e=je()},m(l,o){r&&r.m(l,o),z(l,e,o),t=!0},p(l,[o]){l[0]?r?(r.p(l,o),o&1&&p(r,1)):(r=rt(l),r.c(),p(r,1),r.m(e.parentNode,e)):r&&(R(),w(r,1,1,()=>{r=null}),B())},i(l){t||(p(r),t=!0)},o(l){w(r),t=!1},d(l){r&&r.d(l),l&&M(e)}}}function xn(n,e,t){let r,l,o,i;const{panelActive:s,show:f,side:c}=le;X(n,s,u=>t(2,o=u)),X(n,f,u=>t(0,r=u)),X(n,c,u=>t(1,l=u));const{jobManifest:a}=Le;return X(n,a,u=>t(3,i=u)),$n(),document.onkeyup=le.handleKeyUp,[r,l,o,i,s,f,c,a]}class Mn extends I{constructor(e){super(),U(this,e,xn,Sn,P,{})}}new Mn({target:document.getElementById("app")});
|