forked from Simnation/Main
74 lines
177 KiB
JavaScript
74 lines
177 KiB
JavaScript
![]() |
var _s=Object.defineProperty;var ms=(t,e,r)=>e in t?_s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var bt=(t,e,r)=>(ms(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))n(p);new MutationObserver(p=>{for(const b of p)if(b.type==="childList")for(const T of b.addedNodes)T.tagName==="LINK"&&T.rel==="modulepreload"&&n(T)}).observe(document,{childList:!0,subtree:!0});function r(p){const b={};return p.integrity&&(b.integrity=p.integrity),p.referrerPolicy&&(b.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?b.credentials="include":p.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function n(p){if(p.ep)return;p.ep=!0;const b=r(p);fetch(p.href,b)}})();function Q(){}const Nr=t=>t;function Yr(t){return t()}function Ht(){return Object.create(null)}function Re(t){t.forEach(Yr)}function Et(t){return typeof t=="function"}function de(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let at;function Ut(t,e){return t===e?!0:(at||(at=document.createElement("a")),at.href=e,t===at.href)}function vs(t){return Object.keys(t).length===0}function gs(t,...e){if(t==null){for(const n of e)n(void 0);return Q}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function fe(t,e,r){t.$$.on_destroy.push(gs(e,r))}function Ae(t){return t??""}function qt(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Fr=typeof window<"u";let ys=Fr?()=>window.performance.now():()=>Date.now(),It=Fr?t=>requestAnimationFrame(t):Q;const Xe=new Set;function Xr(t){Xe.forEach(e=>{e.c(t)||(Xe.delete(e),e.f())}),Xe.size!==0&&It(Xr)}function bs(t){let e;return Xe.size===0&&It(Xr),{promise:new Promise(r=>{Xe.add(e={c:t,f:r})}),abort(){Xe.delete(e)}}}function A(t,e){t.appendChild(e)}function Hr(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function ks(t){const e=B("style");return e.textContent="/* empty */",ws(Hr(t),e),e.sheet}function ws(t,e){return A(t.head||t,e),e.sheet}function q(t,e,r){t.insertBefore(e,r||null)}function U(t){t.parentNode&&t.parentNode.removeChild(t)}function Me(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}function B(t){return document.createElement(t)}function kt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function re(t){return document.createTextNode(t)}function G(){return re(" ")}function dt(){return re("")}function Se(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function _t(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Z(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function Ss(t){return Array.from(t.childNodes)}function ce(t,e){e=""+e,t.data!==e&&(t.data=e)}function te(t,e,r,n){r==null?t.style.removeProperty(e):t.style.setProperty(e,r,n?"important":"")}function Ur(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}const ut=new Map;let ct=0;function Ts(t){let e=5381,r=t.length;for(;r--;)e=(e<<5)-e^t.charCodeAt(r);return e>>>0}function Ps(t,e){const r={stylesheet:ks(e),rules:{}};return ut.set(t,r),r}function Vt(t,e,r,n,p,b,T,w=0){const d=16.666/n;let m=`{
|
|||
|
`;for(let y=0;y<=1;y+=d){const a=e+(r-e)*b(y);m+=y*100+`%{${T(a,1-a)}}
|
|||
|
`}const k=m+`100% {${T(r,1-r)}}
|
|||
|
}`,g=`__svelte_${Ts(k)}_${w}`,s=Hr(t),{stylesheet:l,rules:o}=ut.get(s)||Ps(s,t);o[g]||(o[g]=!0,l.insertRule(`@keyframes ${g} ${k}`,l.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${g} ${n}ms linear ${p}ms 1 both`,ct+=1,g}function Cs(t,e){const r=(t.style.animation||"").split(", "),n=r.filter(e?b=>b.indexOf(e)<0:b=>b.indexOf("__svelte")===-1),p=r.length-n.length;p&&(t.style.animation=n.join(", "),ct-=p,ct||Ms())}function Ms(){It(()=>{ct||(ut.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&U(e)}),ut.clear())})}let tt;function et(t){tt=t}function Rt(){if(!tt)throw new Error("Function called outside component initialization");return tt}function Oe(t){Rt().$$.on_mount.push(t)}function qr(t){Rt().$$.on_destroy.push(t)}function mt(){const t=Rt();return(e,r,{cancelable:n=!1}={})=>{const p=t.$$.callbacks[e];if(p){const b=Ur(e,r,{cancelable:n});return p.slice().forEach(T=>{T.call(t,b)}),!b.defaultPrevented}return!0}}const Fe=[],Ct=[];let He=[];const Gt=[],Os=Promise.resolve();let Mt=!1;function Ds(){Mt||(Mt=!0,Os.then(Vr))}function Ue(t){He.push(t)}const wt=new Set;let Ne=0;function Vr(){if(Ne!==0)return;const t=tt;do{try{for(;Ne<Fe.length;){const e=Fe[Ne];Ne++,et(e),xs(e.$$)}}catch(e){throw Fe.length=0,Ne=0,e}for(et(null),Fe.length=0,Ne=0;Ct.length;)Ct.pop()();for(let e=0;e<He.length;e+=1){const r=He[e];wt.has(r)||(wt.add(r),r())}He.length=0}while(Fe.length);for(;Gt.length;)Gt.pop()();Mt=!1,wt.clear(),et(t)}function xs(t){if(t.fragment!==null){t.update(),Re(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ue)}}function Es(t){const e=[],r=[];He.forEach(n=>t.indexOf(n)===-1?e.push(n):r.push(n)),r.forEach(n=>n()),He=e}let Je;function Is(){return Je||(Je=Promise.resolve(),Je.then(()=>{Je=null})),Je}function St(t,e,r){t.dispatchEvent(Ur(`${e?"intro":"outro"}${r}`))}const ot=new Set;let Ie;function me(){Ie={r:0,c:[],p:Ie}}function ve(){Ie.r||Re(Ie.c),Ie=Ie.p}function F(t,e){t&&t.i&&(ot.delete(t),t.i(e))}function H(t,e,r,n){if(t&&t.o){if(ot.has(t))return;ot.add(t),Ie.c.push(()=>{ot.delete(t),n&&(r&&t.d(1),n())}),t.o(e)}else n&&n()}const Rs={duration:0};function ht(t,e,r,n){let b=e(t,r,{direction:"both"}),T=n?0:1,w=null,d=null,m=null,k;function g(){m&&Cs(t,m)}function s(o,h){const y=o.b-T;return h*=Math.abs(y),{a:T,b:o.b,d:y,duration:h,start:o.start,end:o.start+h,group:o.group}}function l(o){const{delay:h=0,duration:y=300,easing:a=Nr,tick:f=Q,css:_}=b||Rs,u={start:ys()+h,b:o};o||(u.group=Ie,Ie.r+=1),"inert"in t&&(o?k!==void 0&&(t.inert=k):(k=t.inert,t.inert=!0)),w||d?d=u:(_&&(g(),m=Vt(t,T,o,y,h,a,_)),o&&f(0,1),w=s(u,y),Ue(()=>St(t,o,"start")),bs(S=>{if(d&&S>d.start&&(w=s(d,y),d=null,St(t,w.b,"start"),_&&(g(),m=Vt(t,T,w.b,w.duration,0,a,b.css))),w){if(S>=w.end)f(T=w.b,1-T),St(t,w.b,"end"),d||(w.b?g():--w.group.r||Re(w.group.c)),w=null;else if(S>=w.start){const I=S-w.start;T=w.a+w.d*a(I/w.duration),f(T,1-T)}}return!!(w||d)}))}return{run(o){Et(b)?Is().then(()=>{b=b({direction:o?"in":"out"}),l(o)}):l(o)},end(){g(),w=d=null}}}function le(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function ue(t){t&&t.c()}function ae(t,e,r){const{fragment:n,after_update:p}=t.$$;n&&n.m(e,r),Ue(()=>{const b=t.$$.on_mount.map(Yr).filter(Et);t.$$.on_destroy?t.$$.on_destroy.push(...b):Re(b),t.$$.on_mount=[]}),p.forEach(Ue)}function oe(t,e){const r=t.$$;r.fragment!==null&&(Es(r.after_update),Re(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function Zs(t,e){t.$$.dirty[0]===-1&&(Fe.push(t),Ds(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ge(t,e,r,n,p,b,T=null,w=[-1]){const d=tt;et(t);const m=t.$$={fragment:null,ctx:[],props:b,update:Q,not_equal:p,bound:Ht(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:Ht(),dirty:w,skip_bound:!1,root:e.target||d.$$.root};T&&T(m.root);let k=!1;if(m.ctx=r?r(t,e.props||{},(g,s,...l)=>{const o=l.length?l[0]:s;return m.ctx&&p(m.ctx[g],m.ctx[g]=o)&&(!m.skip_bound&&m.bound[g]&&m.bound[g](o),k&&Zs
|
|||
|
transform: ${m} translate(${(1-h)*g}${s}, ${(1-h)*l}${o});
|
|||
|
opacity: ${d-k*y}`}}const Ye=[];function Te(t,e=Q){let r;const n=new Set;function p(w){if(de(t,w)&&(t=w,r)){const d=!Ye.length;for(const m of n)m[1](),Ye.push(m,t);if(d){for(let m=0;m<Ye.length;m+=2)Ye[m][0](Ye[m+1]);Ye.length=0}}}function b(w){p(w(t))}function T(w,d=Q){const m=[w,d];return n.add(m),n.size===1&&(r=e(p,b)||Q),w(t),()=>{n.delete(m),n.size===0&&r&&(r(),r=null)}}return{set:p,update:b,subscribe:T}}var ee=(t=>(t.StatusBar="StatusBar",t.Menu="Menu",t.Input="Input",t.Game="Game",t.MemoryGame="MemoryGame",t.Image="ShowImage",t.DrawText="DrawText",t.Notification="Notify",t.None="hideUi",t))(ee||{}),_e=(t=>(t.Scrambler="Scramber",t.NumberMaze="NumberMaze",t.Memory="MemoryGame",t.NumberPuzzle="NumberPuzzle",t))(_e||{}),$e=(t=>(t.Connecting="CONNECTING TO INTERFACE",t.Connected="CONNECTED. GET READY.",t))($e||{});async function Pe(t,e={}){const r={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(e)},p=(()=>{try{return window.GetParentResourceName()}catch{return"ps-ui"}})();try{return await(await fetch(`https://${p}/${t}`,r)).json()}catch{}}const xe=Te({game:"",gameName:"",gameDescription:"",amountOfAnswers:0,gameTime:0,maxAnswersIncorrect:0}),Ze=Te(),Be=Te(),Le=Te(),Tt=Te(!0);function Ls(t){const e=t;switch(Be.set(e),e.game){case _e.Memory:{we.set(ee.Game),Ze.set(_e.Memory),Le.set($e.Connecting),xe.set({game:_e.Memory,gameName:e.gameName,gameDescription:e.gameDescription,gameTime:e.gameTime||2,amountOfAnswers:e.amountOfAnswers||15,maxAnswersIncorrect:e.maxAnswersIncorrect||2});break}case _e.Scrambler:{we.set(ee.Game),Ze.set(_e.Scrambler),Le.set($e.Connecting),xe.set({game:_e.Scrambler,gameName:e.gameName,gameDescription:e.gameDescription,gameTime:e.gameTime||2,amountOfAnswers:e.amountOfAnswers||4,maxAnswersIncorrect:e.maxAnswersIncorrect||0});break}case _e.NumberMaze:{we.set(ee.Game),Ze.set(_e.NumberMaze),Le.set($e.Connecting),xe.set({game:_e.NumberMaze,gameName:e.gameName,gameDescription:e.gameDescription,gameTime:e.gameTime||2,amountOfAnswers:e.amountOfAnswers||4,maxAnswersIncorrect:e.maxAnswersIncorrect||0});break}case _e.NumberPuzzle:{we.set(ee.Game),Ze.set(_e.NumberPuzzle),Le.set($e.Connecting),xe.set({game:_e.NumberPuzzle,gameName:e.gameName,gameDescription:e.gameDescription,gameTime:e.gameTime||2,amountOfAnswers:e.amountOfAnswers||4,maxAnswersIncorrect:e.maxAnswersIncorrect||0});break}}}function vt(t){Pe("minigame:callback",t),Gr()}function Gr(){rt(),Ze.set(null),Be.set(null),xe.set({game:"",gameName:"",gameDescription:"",amountOfAnswers:0,gameTime:0,maxAnswersIncorrect:0})}const we=Te(),De=Te(),Bs=!1;function rt(){De.set(!1),we.set(void 0),Ze.set(void 0)}function pe(t,e){return Math.floor(Math.random()*(e-t)+t)}function Jt(t){return document.documentElement.clientWidth*t/100}function zs(t){let e,r,n;return{c(){e=kt("svg"),r=kt("g"),n=kt("path"),Z(n,"d",`M230.3,455.7c-8.3,0-16.6,0-25,0c-8.5-3.1-17.2-5.7-25.4-9.4c-21.9-9.8-42.1-22.2-58.1-40.4c-10-11.3-16.2-24.2-15.6-39.9\r
|
|||
|
c0.5-13.5,0.1-27,0.1-40.5c0-2-0.2-3.2-2.5-4.1c-24.3-9.4-38-29.4-38.1-55.6c-0.1-24.7-0.3-49.4,0.1-74.1c0.2-9.7,0.9-19.6,3.2-29\r
|
|||
|
c12.1-47.6,42.8-78.7,87.9-96.4c21.1-8.3,43.3-10.3,65.8-10c33.5,0.4,64.5,8.9,91.8,28.7c35.8,26,56,60.8,56.8,105.6\r
|
|||
|
c0.5,25.3,0.2,50.7,0,76c-0.2,25.5-14.4,45.8-37.8,54.6c-2.4,0.9-2.8,2.1-2.8,4.3c0.1,14.3-0.1,28.6,0.1,42.9\r
|
|||
|
c0.2,11.1-3.6,20.9-9.8,29.8c-10,14.4-23.5,24.8-38.1,34C266.6,442.5,249.2,450.7,230.3,455.7z M165.8,219.1\r
|
|||
|
c-4.7,0.4-9.3,0.5-14,1.1c-12.7,1.5-22,8-26.3,20.1c-4.1,11.4-2.3,22.9,2.4,33.7c3.9,8.9,13.3,13.7,22.6,10.8c9-2.8,17.7-7.2,26-12\r
|
|||
|
c8.6-5,15.2-12.4,19.6-21.6c5.8-12,2.3-22.3-9.5-28.3C180,219.5,173,218.9,165.8,219.1z M274.1,218.4c-5.8,1-11.9,1.4-17.5,3.2\r
|
|||
|
c-14.4,4.7-19.2,16.8-12.3,30.2c1.7,3.3,3.8,6.5,6.2,9.4c9.1,11.3,21.8,17.4,34.8,22.6c11.9,4.8,24.3-0.9,28.1-13.1\r
|
|||
|
c1.9-6.2,2.5-13,2.9-19.5c0.7-12.6-7.2-24.7-19.2-28.7C289.9,220.2,282,219.7,274.1,218.4z M212.6,371.3c-0.5-6.4-2.3-9-6.2-9.2\r
|
|||
|
c-3.9-0.2-5.8,2.4-6.9,8.9c-4,0-7.9,0-12.1,0c0.3-4.2-0.8-7.4-4.8-8.6c-4.1-1.2-6.5,1.3-8.5,4.6c-3.7-2-5.4-4.9-5.4-8.9\r
|
|||
|
c0-5.8,0-11.7,0-17.5c0-6.9-0.8-8.1-7.2-10.2c-9.7-3.3-19.4-6.5-29.2-9.7c-1.3-0.4-2.7-0.9-4.1-1c-3-0.2-5.1,1.3-6,4\r
|
|||
|
c-1,2.7-0.2,5.2,2.2,6.9c1.2,0.9,2.8,1.4,4.2,1.9c8.4,2.8,16.7,5.7,25.1,8.4c2,0.6,2.6,1.6,2.6,3.6c-0.1,4.7,0,9.4,0,14\r
|
|||
|
c0,7,2.8,12.6,8.2,16.9c8.1,6.6,17.7,8.5,27.7,8.5c17,0.1,34.1,0.3,51.1-0.1c6.8-0.2,13.7-1.2,20.3-3c9.4-2.7,15.9-8.8,16.8-19.2\r
|
|||
|
c0.5-5.4,0.7-10.9,0.6-16.3c0-2.6,0.7-3.9,3.3-4.7c8.7-2.7,17.2-5.7,25.8-8.8c4.8-1.7,6.3-6.8,3.1-10.2c-2.4-2.6-5.3-2.2-8.3-1.2\r
|
|||
|
c-10.3,3.5-20.6,7-31,10.4c-3.8,1.2-5.4,3.6-5.3,7.5c0.1,6,0.2,12,0,17.9c-0.1,4.8-1.2,9.3-6.5,11.3c-1.1-3.4-3.1-5.9-6.7-5.4\r
|
|||
|
c-5.1,0.6-5.4,4.8-5.7,9c-4.2,0-8.1,0-12.1,0c-0.5-6.3-2.3-8.9-6.2-9.1c-3.8-0.2-5.8,2.4-6.9,9.2\r
|
|||
|
C220.6,371.3,216.7,371.3,212.6,371.3z M218,331C218,331,218,331,218,331c3.9,0,7.8,0.2,11.7-0.1c5.6-0.3,8.7-3,9.4-8.6\r
|
|||
|
c0.4-3.4,0.3-7-0.1-10.5c-1.6-11.9-4.4-23.5-11.1-33.7c-5.3-8.2-13.3-8.9-18.6-1.1c-9,13.3-12.5,28.4-12.3,44.3\r
|
|||
|
c0.1,5.9,3.9,9.2,9.8,9.5C210.4,331.2,214.2,331,218,331z`),Z(e,"version","1.1"),Z(e,"id","Layer_1"),Z(e,"xmlns","http://www.w3.org/2000/svg"),Z(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),Z(e,"x","0px"),Z(e,"y","0px"),Z(e,"viewBox","0 0 437.3 512"),te(e,"enable-background","new 0 0 437.3 512"),Z(e,"xml:space","preserve"),Z(e,"fill",t[0])},m(p,b){q(p,e,b),A(e,r),A(r,n)},p(p,[b]){b&1&&Z(e,"fill",p[0])},i:Q,o:Q,d(p){p&&U(e)}}}function js(t,e,r){let{color:n=""}=e;return t.$$set=p=>{"color"in p&&r(0,n=p.color)},[n]}class Zt extends ye{constructor(e){super(),ge(this,e,js,zs,de,{color:0})}}function Qt(t,e,r){const n=t.slice();return n[22]=e[r],n}function er(t){let e,r,n,p,b;function T(){return t[7](t[22])}return{c(){e=B("div"),Z(e,"id",r="each-cube-"+t[22].cubeIndex),te(e,"width","0px"),te(e,"height","0px"),te(e,"border","0px"),Z(e,"class",n="each-cube "+(t[1]?"cursor-pointer":"cursor-default")+" "+(t[1]?t[22].isClicked&&t[22].isCorrectAnswer?"ps-bg-green-cube":t[22].isClicked&&!t[22].isCorrectAnswer?"ps-bg-wrong-cube":"":t[22].isCorrectAnswer?"ps-bg-green-cube":"")+" svelte-1k21utl")},m(w,d){q(w,e,d),p||(b=Se(e,"click",T),p=!0)},p(w,d){t=w,d&4&&r!==(r="each-cube-"+t[22].cubeIndex)&&Z(e,"id",r),d&6&&n!==(n="each-cube "+(t[1]?"cursor-pointer":"cursor-default")+" "+(t[1]?t[22].isClicked&&t[22].isCorrectAnswer?"ps-bg-green-cube":t[22].isClicked&&!t[22].isCorrectAnswer?"ps-bg-wrong-cube":"":t[22].isCorrectAnswer?"ps-bg-green-cube":"")+" svelte-1k21utl")&&Z(e,"class",n)},d(w){w&&U(e),p=!1,b()}}}function Ns(t){let e,r,n,p,b,T,w,d,m,k,g,s,l=le(t[2]),o=[];for(let h=0;h<l.length;h+=1)o[h]=er(Qt(t,l,h));return{c(){e=B("div"),r=B("div"),n=B("i"),p=G(),b=B("p"),T=re(t[0]),d=re(" time remaining"),m=G(),k=B("div");for(let h=0;h<o.length;h+=1)o[h].c();Z(n,"class","fa-solid fa-clock ps-text-lightgrey clock-icon svelte-1k21utl"),Z(b,"class",w=Ae(t[0]!==0?"game-timer-var":"mr-1")+" svelte-1k21utl"),Z(r,"class","time-left svelte-1k21utl"),Z(k,"id","memory-game-container"),Z(k,"class","memory-game-container svelte-1k21utl"),te(k,"gap","13px"),Z(e,"class","memory-game-base svelte-1k21utl")},m(h,y){q(h,e,y),A(e,r),A(r,n),A(r,p),A(r,b),A(b,T),A(r,d),A(e,m),A(e,k);for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(k,null);g||(s=Se(window,"keydown",_t(t[4])),g=!0)},p(h,[y]){if(y&1&&ce(T,h[0]),y&1&&w!==(w=Ae(h[0]!==0?"game-timer-var":"mr-1")+" svelte-1k21utl")&&Z(b,"class",w),y&14){l=le(h[2]);let a;for(a=0;a<l.length;a+=1){const f=Qt(h,l,a);o[a]?o[a].p(f,y):(o[a]=er(f),o[a].c(),o[a].m(k,null))}for(;a<o.length;a+=1)o[a].d(1);o.length=l.length}},i:Q,o:Q,d(h){h&&U(e),Me(o,h),g=!1,s()}}}function Ys(t,e,r){let n,p;fe(t,Be,c=>r(10,n=c)),fe(t,xe,c=>r(11,p=c));const b=mt();let T=[{numberOfRowCol:5,cubeSize:"4.2vw",gap:"1vw"},{numberOfRowCol:6,cubeSize:"3.7vw",gap:"0.8vw"},{numberOfRowCol:7,cubeSize:"2.9vw",gap:"1vw"},{numberOfRowCol:8,cubeSize:"2.6vw",gap:"0.9vw"},{numberOfRowCol:9,cubeSize:"2.4vw",gap:"0.75vw"},{numberOfRowCol:10,cubeSize:"2.1vw",gap:"0.75vw"}],w=0,d=p.amountOfAnswers,m=p.gameTime*100,k=p.maxAnswersIncorrect,g=[],s=n.displayInitialAnswersFor*1e3,l,o=!1,h=!1,y=!1,a=n.gridSize*n.gridSize,f=[];Oe(()=>{for(;g.length<d;){const C=Math.floor(Math.random()*a);g.indexOf(C)===-1&&g.push(C)}for(let C=0;C<a;C++){const E={cubeIndex:C,isCorrectAnswer:g.includes(C),isClicked:!1};f.push(E),r(2,f)}let c=T.filter(C=>C.numberOfRowCol===n.gridSize)[0];setTimeout(()=>{f.forEach(C=>{const E=document.getElementById("memory-game-container");E&&(E.style.gap=c.gap);const $=document.getElementById("each-cube-"+C.cubeIndex);$&&($.style.width=c.cubeSize,$.style.height=c.cubeSize,$.style.border="2px solid var(--color-green)")})},1500),setTimeout(()=>{r(1,o=!0),l=setInterval(_,10)},s+1500)});function _(){if(m<=0){r(5,h=!0),r(6,y=u()),clearInterval(l);return}m--,r(0,w=m/100)}function u(){let c=!1;f.map($=>{$.isCorrectAnswer&&$.isClicked&&(c=!0),$.isCorrectAnswer&&!$.isClicked&&(c=!1)});const E=S().length<k;return c&&E}function S(){return f.filter(c=>c.isClicked&&!c.isCorrectAnswer)}function I(c){if(!h){const C=f.findIndex(L=>L.cubeIndex===c.cubeIndex);let E=c;E.isClicked=!0,r(2,
|
|||
|
@mojs/core – The motion graphics toolbelt for the web
|
|||
|
Oleg Solomka @legomushroom 2023 MIT
|
|||
|
1.7.1
|
|||
|
*/(function(t,e){var r;r=()=>(()=>{var n={50:(w,d,m)=>{m.d(d,{Z:()=>s});var k=m(2),g={_sample:function(l){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4,h=(0,k.Z)(o),y={};if(h==="number"){var a=0,f=Math.pow(10,o),_=1/f;y[0]=l(0);for(var u=0;u<f-1;u++)a+=_,y[parseFloat(a.toFixed(o))]=l(a);y[1]=l(1),y.base=o}else h==="object"?y=o:h==="string"&&(y=JSON.parse(o));return g._sample._proximate(y)},_proximate:function(l){var o=l.base,h=1/Math.pow(10,o),y=function(a){var f,_,u=function(D,O){O=+O||0;var c=Math.pow(10,O);return Math.round(D*c)/c}(a,o),S=l[u.toString()];if(Math.abs(a-u)<h)return S;var I=(_=a>u?l[f=u+h]:l[f=u-h])-S;return I<h?S:S+(a-u)/(f-u)*(_>S?-1:1)*I};return y.getSamples=function(){return l},y}};g._sample._proximate=g._proximate;const s=g._sample},973:(w,d,m)=>{m.d(d,{Z:()=>h});var k=m(2),g=m(671),s=m(144),l=m(52),o=m.n(l);const h=function(){function y(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,g.Z)(this,y),this._o=a,this._index=this._o.index||0,this._arrayPropertyMap={strokeDashoffset:1,strokeDasharray:1,origin:1},this._skipPropsDelta={timeline:1,prevChainModule:1,callbacksContext:1},this._declareDefaults(),this._extendDefaults(),this._vars(),this._render()}return(0,s.Z)(y,[{key:"_declareDefaults",value:function(){this._defaults={}}},{key:"_vars",value:function(){this._progress=0,this._strokeDasharrayBuffer=[]}},{key:"_render",value:function(){}},{key:"_setProp",value:function(a,f){if((0,k.Z)(a)==="object")for(var _ in a)this._assignProp(_,a[_]);else this._assignProp(a,f)}},{key:"_assignProp",value:function(a,f){this._props[a]=f}},{key:"_show",value:function(){var a=this._props;this.el&&(a.isSoftHide?this._showByTransform():this.el.style.display="block",this._isShown=!0)}},{key:"_hide",value:function(){this.el&&(this._props.isSoftHide?o().setPrefixedStyle(this.el,"transform","scale(0)"):this.el.style.display="none",this._isShown=!1)}},{key:"_showByTransform",value:function(){}},{key:"_parseOptionString",value:function(a){return typeof a=="string"&&a.match(/stagger/)&&(a=o().parseStagger(a,this._index)),typeof a=="string"&&a.match(/rand/)&&(a=o().parseRand(a)),a}},{key:"_parsePositionOption",value:function(a,f){return o().unitOptionMap[a]&&(f=o().parseUnit(f).string),f}},{key:"_parseStrokeDashOption",value:function(a,f){var _=f;if(this._arrayPropertyMap[a])switch(_=[],(0,k.Z)(f)){case"number":_.push(o().parseUnit(f));break;case"string":for(var u=f.split(" "),S=0;S<u.length;S++)_.push(o().parseUnit(u[S]))}return _}},{key:"_isDelta",value:function(a){var f=o().isObject(a);return!(!(f=f&&!a.unit)||o().isArray(a)||o().isDOM(a))}},{key:"_getDelta",value:function(a,f){var _;if(a!=="left"&&a!=="top"||this._o.ctx||o().warn(`Consider to animate x/y properties instead of left/top,
|
|||
|
as it would be much more performant`,f),!this._skipPropsDelta||!this._skipPropsDelta[a]){(_=o().parseDelta(a,f,this._index)).type!=null&&(this._deltas[a]=_);var u=(0,k.Z)(_.end)==="object"?_.end.value===0?0:_.end.string:_.end;this._props[a]=u}}},{key:"_extendDefaults",value:function(){for(var a in this._props={},this._deltas={},this._defaults){var f=this._o[a]!=null?this._o[a]:this._defaults[a];this._parseOption(a,f)}}},{key:"_tuneNewOptions",value:function(a){for(var f in this._hide(),a)a&&delete this._deltas[f],this._o[f]=a[f],this._parseOption(f,a[f])}},{key:"_parseOption",value:function(a,f){if(this._isDelta(f)&&!this._skipPropsDelta[a]){this._getDelta(a,f);var _=o().getDeltaEnd(f);return this._assignProp(a,this._parseProperty(a,_))}this._assignProp(a,this._parseProperty(a,f))}},{key:"_parsePreArrayProperty",value:function(a,f){return f=this._parseOptionString(f),this._parsePositionOption(a,f)}},{key:"_parseProperty",value:function(a,f){return a==="parent"?o().parseEl(f):(f=this._parsePreArrayProperty(a,f),this._parseStrokeDashOption(a,f))}},{key:"_parseDeltaValues",value:function(a,f){var _={};for(var u in f){var S=f[u],I=this._parsePreArrayProperty(a,S);_[this._parsePreArrayProperty(a,u)]=I}return _}},{key:"_preparsePropValue",value:function(a,f){return this._isDelta(f)?this._parseDeltaValues(a,f):this._parsePreArrayProperty(a,f)}},{key:"_calcCurrentProps",value:function(a,f){for(var _ in this._deltas){var u=this._deltas[_],S=!!u.curve,I=u.easing==null||S?a:u.easing(f);if(u.type==="array"){var D;o().isArray(this._props[_])?(D=this._props[_]).length=0:D=[];for(var O=S?u.curve(f):null,c=0;c<u.delta.length;c++){var C=u.delta[c],E=S?O*(u.start[c].value+f*C.value):u.start[c].value+I*C.value;D.push({string:"".concat(E).concat(C.unit),value:E,unit:C.unit})}this._props[_]=D}else if(u.type==="number")this._props[_]=S?u.curve(f)*(u.start+f*u.delta):u.start+I*u.delta;else if(u.type==="unit"){var $=S?u.curve(f)*(u.start.value+f*u.delta):u.start.value+I*u.delta;this._props[_]="".concat($).concat(u.end.unit)}else if(u.type==="color"){var L,j,V,se;if(S){var ie=u.curve(f);L=parseInt(ie*(u.start.r+f*u.delta.r),10),j=parseInt(ie*(u.start.g+f*u.delta.g),10),V=parseInt(ie*(u.start.b+f*u.delta.b),10),se=parseFloat(ie*(u.start.a+f*u.delta.a))}else L=parseInt(u.start.r+I*u.delta.r,10),j=parseInt(u.start.g+I*u.delta.g,10),V=parseInt(u.start.b+I*u.delta.b,10),se=parseFloat(u.start.a+I*u.delta.a);this._props[_]="rgba(".concat(L,",").concat(j,",").concat(V,",").concat(se,")")}}}},{key:"_setProgress",value:function(a,f){this._progress=a,this._calcCurrentProps(a,f)}}]),y}()},623:(w,d,m)=>{m.d(d,{Z:()=>_});var k=m(2),g=m(671),s=m(144),l=m(340),o=m(963),h=m(120),y=m(52),a=m.n(y);function f(u){var S=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var I,D=(0,h.Z)(u);if(S){var O=(0,h.Z)(this).constructor;I=Reflect.construct(D,arguments,O)}else I=D.apply(this,arguments);return(0,o.Z)(this,I)}}const _=function(u){(0,l.Z)(I,u);var S=f(I);function I(){return(0,g.Z)(this,I),S.apply(this,arguments)}return(0,s.Z)(I,[{key:"_declareDefaults",value:function(){this._defaults={ns:"http://www.w3.org/2000/svg",tag:"ellipse",parent:document.body,ratio:1,radius:50,radiusX:null,radiusY:null,stroke:"hotpink","stroke-dasharray":"","stroke-dashoffset":"","stroke-linecap":"","stroke-width":2,"stroke-opacity":1,fill:"transparent","fill-opacity":1,width:0,height:0},this._drawMap=["stroke","stroke-width","stroke-opacity","stroke-dasharray","fill","stroke-dashoffset","stroke-linecap","fill-opacity","transform"]}},{key:"_vars",value:function(){this._state={},this._drawMapLength=this._drawMap.length}},{key:"_render",value:function(){this._isRendered||(this._isRendered=!0,this._createSVGCanvas(),this._setCanvasSize(),this._props.parent.appendChild(this._canvas))}},{key:"_createSVGCanvas",value:function(){var D=this._props;this._canvas=document.createElementNS(D.ns,"svg"
|
|||
|
style="visibility:hidden; width:0px; height:0px">
|
|||
|
<filter id="${this.filterID}" y="-20" x="-20" width="40" height="40">
|
|||
|
<feOffset
|
|||
|
id="blur-offset" in="SourceGraphic"
|
|||
|
dx="0" dy="0" result="offset2"></feOffset>
|
|||
|
<feGaussianblur
|
|||
|
id="blur" in="offset2"
|
|||
|
stdDeviation="0,0" result="blur2"></feGaussianblur>
|
|||
|
<feMerge>
|
|||
|
<feMergeNode in="SourceGraphic"></feMergeNode>
|
|||
|
<feMergeNode in="blur2"></feMergeNode>
|
|||
|
</feMerge>
|
|||
|
</filter>
|
|||
|
</svg>`,f=a.querySelector(`#svg-${this.filterID}`),this.filter=f.querySelector("#blur"),this.filterOffset=f.querySelector("#blur-offset"),document.body.insertBefore(f,document.body.firstChild),this.el.style.filter=`url(#${this.filterID})`,this.el.style[`${l.prefix.css}filter`]=`url(#${this.filterID})`}parseEl(a){return typeof a=="string"?document.querySelector(a):a instanceof HTMLElement?a:a._setProp!=null?(this.isModule=!0,a):void 0}getPath(){return l.parsePath(this.props.path)||(this.props.path.x||this.props.path.y?this.curveToPath({start:{x:0,y:0},shift:{x:this.props.path.x||0,y:this.props.path.y||0},curvature:{x:this.props.curvature.x||this.defaults.curvature.x,y:this.props.curvature.y||this.defaults.curvature.y}}):void 0)}getScaler(){var a,f,_;switch(this.cSize={width:this.container.offsetWidth||0,height:this.container.offsetHeight||0},_=this.path.getPointAtLength(0),a=this.path.getPointAtLength(this.len),f={},this.scaler={},f.width=a.x>=_.x?a.x-_.x:_.x-a.x,f.height=a.y>=_.y?a.y-_.y:_.y-a.y,this.fillRule){case"all":return this.calcWidth(f),this.calcHeight(f);case"width":return this.calcWidth(f),this.scaler.y=this.scaler.x;case"height":return this.calcHeight(f),this.scaler.x=this.scaler.y}}calcWidth(a){return this.scaler.x=this.cSize.width/a.width,!isFinite(this.scaler.x)&&(this.scaler.x=1)}calcHeight(a){return this.scaler.y=this.cSize.height/a.height,!isFinite(this.scaler.y)&&(this.scaler.y=1)}run(a){var f,_;if(a){for(f in this.history[0],a)_=a[f],l.callbacksMap[f]||l.tweenOptionMap[f]?(l.warn(`the property "${f}" property can not be overridden on run yet`),delete a[f]):this.history[0][f]=_;this.tuneOptions(a)}return this.startTween()}createTween(){return this.tween=new s({duration:this.props.duration,delay:this.props.delay,yoyo:this.props.yoyo,repeat:this.props.repeat,easing:this.props.easing,onStart:()=>{var a;return(a=this.props.onStart)!=null?a.apply(this):void 0},onComplete:()=>{var a;return this.props.motionBlur&&this.setBlur({blur:{x:0,y:0},offset:{x:0,y:0}}),(a=this.props.onComplete)!=null?a.apply(this):void 0},onUpdate:a=>this.setProgress(a),onFirstUpdate:(a,f)=>{if(!a)return this.history.length>1&&this.tuneOptions(this.history[0])}}),this.timeline=new g,this.timeline.add(this.tween),!this.props.isRunLess&&this.startTween(),this.props.isPresetPosition&&this.setProgress(0,!0)}startTween(){return setTimeout(()=>{var a;return(a=this.timeline)!=null?a.play():void 0},1)}setProgress(a,f){var _,u,S,I;return _=this.startLen+(this.props.isReverse?(1-a)*this.slicedLen:a*this.slicedLen),S=(u=this.path.getPointAtLength(_)).x+this.props.offsetX,I=u.y+this.props.offsetY,this._getCurrentRotation(u,_,a),this._setTransformOrigin(a),this._setTransform(S,I,a,f),this.props.motionBlur&&this.makeMotionBlur(S,I)}setElPosition(a,f,_){var u;return u=`translate(${a}px,${f}px) ${this.rotate!==0?`rotate(${this.rotate}deg)`:""} ${this.props.isCompositeLayer&&l.is3d?"translateZ(0)":""}`,l.setPrefixedStyle(this.el,"transform",u)}setModulePosition(a,f){return this.el._setProp({shiftX:`${a}px`,shiftY:`${f}px`,rotate:this.rotate}),this.el._draw()}_getCurrentRotation(a,f,_){var u,S,I,D,O;return S=typeof this.props.transformOrigin=="function",this.props.isRotation||this.props.rotationOffset!=null||S?(I=this.path.getPointAtLength(f-1),D=a.y-I.y,O=a.x-I.x,u=Math.atan(D/O),!isFinite(u)&&(u=0),this.rotate=u*l.RAD_TO_DEG,typeof this.props.rotationOffset!="function"?this.rotate+=this.props.rotationOffset||0:this.rotate=this.props.rotationOffset.call(this,this.rotate,_)):this.rotate=0}_setTransform(a,f,_,u){var S;return this.scaler&&(a*=this.scaler.x,f*=this.scaler.y),S=null,u||(S=typeof this.onUpdate=="function"?this.onUpdate(_,{x:a,y:f,rotate:this.rotate}):void 0),this.isModule?this.setModulePosition(a,f):typeof S!="string"?this.setElPosition(a,f,_):l.setPrefixedStyle(this.el,"transform",S)}_setTransformOrigin(a){var f;if(this.props.transformOrigin)return f=typeof this.props.transformOrigin=="function"?this.props.transformOrigin(this.rotate,a):this.props.transformOrigin,l.setPrefixedStyle(this.el,"transform-origin",f)}makeMotionBlur(a,f){var _,u,
|
|||
|
@keyframes hide-statusbar {
|
|||
|
from {
|
|||
|
opacity: 1;
|
|||
|
}
|
|||
|
to {
|
|||
|
opacity: 0;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
.status-bar-wrapper {
|
|||
|
-moz-animation: 2s hide-statusbar;
|
|||
|
-webkit-animation: 2s hide-statusbar;
|
|||
|
animation: 2s hide-statusbar;
|
|||
|
}
|
|||
|
`,d.appendChild(m),setTimeout(()=>{De.set(!1),we.set(null),lt.set({title:"",description:"",items:[],icon:""}),Ot.set(!1)},500)}}return t.$$.update=()=>{t.$$.dirty&4&&T&&w()},[p,b,T]}class on extends ye{constructor(e){super(),ge(this,e,an,nn,de,{})}}function Cr(t,e,r){const n=t.slice();return n[7]=e[r],n}function Mr(t){let e,r=t[7].value+"",n;return{c(){e=B("p"),n=re(r),te(e,"color",t[7].color),Z(e,"class","svelte-1y14yon")},m(p,b){q(p,e,b),A(e,n)},p(p,b){b&2&&r!==(r=p[7].value+"")&&ce(n,r),b&2&&te(e,"color",p[7].color)},d(p){p&&U(e)}}}function ln(t){let e,r,n,p,b,T,w,d;p=new it({props:{icon:t[0].icon,styleColor:t[2]}});let m=le(t[1]),k=[];for(let g=0;g<m.length;g+=1)k[g]=Mr(Cr(t,m,g));return{c(){e=B("div"),r=B("div"),n=B("div"),ue(p.$$.fragment),b=G(),T=B("div"),w=B("p");for(let g=0;g<k.length;g+=1)k[g].c();Z(n,"class","icon svelte-1y14yon"),Z(w,"class","title-description svelte-1y14yon"),Z(T,"class","title-info svelte-1y14yon"),Z(r,"class","draw-text-title-wrapper svelte-1y14yon"),Z(e,"id","draw-text-wrapper"),Z(e,"class","draw-text-wrapper svelte-1y14yon"),te(e,"margin-left",ss)},m(g,s){q(g,e,s),A(e,r),A(r,n),ae(p,n,null),A(r,b),A(r,T),A(T,w);for(let l=0;l<k.length;l+=1)k[l]&&k[l].m(w,null);d=!0},p(g,[s]){const l={};if(s&1&&(l.icon=g[0].icon),s&4&&(l.styleColor=g[2]),p.$set(l),s&2){m=le(g[1]);let o;for(o=0;o<m.length;o+=1){const h=Cr(g,m,o);k[o]?k[o].p(h,s):(k[o]=Mr(h),k[o].c(),k[o].m(w,null))}for(;o<k.length;o+=1)k[o].d(1);k.length=m.length}},i(g){d||(F(p.$$.fragment,g),d=!0)},o(g){H(p.$$.fragment,g),d=!1},d(g){g&&U(e),oe(p),Me(k,g)}}}let ss="2%";function un(t,e,r){let n={};Dt.subscribe(k=>r(0,n=k));let p=!1;xt.subscribe(k=>{r(3,p=k)});let b=[],T="";Oe(()=>{w(),d()});function w(){switch(n.color){case"primary":r(2,T="#0275d8");break;case"error":r(2,T="#d9534f");break;case"success":r(2,T="#5cb85c");break;case"warning":r(2,T="#f0ad4e");break;case"info":r(2,T="#5bc0de");break;case"mint":r(2,T="#a1f8c7");break;default:r(2,T="var(--color-green)");break}}function d(){let k=n.keys.match(/\[(.*?)\]/);if(k){let g=k[0],s=n.keys.split(g);r(1,b=[{value:s[0],color:"var(--color-lightgrey)"},{value:g,color:T},{value:s[1],color:"var(--color-lightgrey)"}])}else r(1,b=[{value:n.keys,color:"var(--color-lightgrey)"}])}function m(){const k=document.getElementById("draw-text-wrapper");if(k){k.style.animation="2s slide-left";let g=document.createElement("style");g.innerHTML=`
|
|||
|
@keyframes slide-left {
|
|||
|
from {
|
|||
|
margin-left: `+ss+`;
|
|||
|
}
|
|||
|
to {
|
|||
|
margin-left: -20%;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
.draw-text-wrapper {
|
|||
|
-moz-animation: 2s slide-left;
|
|||
|
-webkit-animation: 2s slide-left;
|
|||
|
animation: 2s slide-left;
|
|||
|
}
|
|||
|
`,k.appendChild(g),setTimeout(()=>{De.set(!1),we.set(null),Dt.set({icon:"",keys:"",color:""}),xt.set(!1)},500)}}return t.$$.update=()=>{t.$$.dirty&9&&(p&&m(),n&&d())},[n,b,T,p]}class cn extends ye{constructor(e){super(),ge(this,e,un,ln,de,{})}}function Or(t,e,r){const n=t.slice();return n[16]=e[r],n[18]=r,n}function Dr(t,e,r){const n=t.slice();return n[16]=e[r],n[18]=r,n}function hn(t){let e,r,n,p,b,T,w=le(t[1]),d=[];for(let k=0;k<w.length;k+=1)d[k]=Er(Or(t,w,k));const m=k=>H(d[k],1,1,()=>{d[k]=null});return{c(){e=B("div"),e.innerHTML='<i class="fa-solid fa-chevron-left left-chevron svelte-9n4mvt"></i> <p class="main-menu svelte-9n4mvt">Main Menu</p>',r=G(),n=B("div");for(let k=0;k<d.length;k+=1)d[k].c();Z(e,"class","submenu-header-slot svelte-9n4mvt"),Z(n,"class","screen-body svelte-9n4mvt")},m(k,g){q(k,e,g),q(k,r,g),q(k,n,g);for(let s=0;s<d.length;s+=1)d[s]&&d[s].m(n,null);p=!0,b||(T=Se(e,"click",t[11]),b=!0)},p(k,g){if(g&198){w=le(k[1]);let s;for(s=0;s<w.length;s+=1){const l=Or(k,w,s);d[s]?(d[s].p(l,g),F(d[s],1)):(d[s]=Er(l),d[s].c(),F(d[s],1),d[s].m(n,null))}for(me(),s=w.length;s<d.length;s+=1)m(s);ve()}},i(k){if(!p){for(let g=0;g<w.length;g+=1)F(d[g]);p=!0}},o(k){d=d.filter(Boolean);for(let g=0;g<d.length;g+=1)H(d[g]);p=!1},d(k){k&&(U(e),U(r),U(n)),Me(d,k),b=!1,T()}}}function pn(t){let e,r,n,p,b=le(t[4]),T=[];for(let d=0;d<b.length;d+=1)T[d]=Ir(Dr(t,b,d));const w=d=>H(T[d],1,1,()=>{T[d]=null});return{c(){e=B("div"),e.innerHTML='<img src="./images/ps-logo.png" alt="ps-logo" class="svelte-9n4mvt"/>',r=G(),n=B("div");for(let d=0;d<T.length;d+=1)T[d].c();Z(e,"class","header-slot svelte-9n4mvt"),te(e,"border","3px solid var(--color-green)"),Z(n,"class","screen-body svelte-9n4mvt")},m(d,m){q(d,e,m),q(d,r,m),q(d,n,m);for(let k=0;k<T.length;k+=1)T[k]&&T[k].m(n,null);p=!0},p(d,m){if(m&184){b=le(d[4]);let k;for(k=0;k<b.length;k+=1){const g=Dr(d,b,k);T[k]?(T[k].p(g,m),F(T[k],1)):(T[k]=Ir(g),T[k].c(),F(T[k],1),T[k].m(n,null))}for(me(),k=b.length;k<T.length;k+=1)w(k);ve()}},i(d){if(!p){for(let m=0;m<b.length;m+=1)F(T[m]);p=!0}},o(d){T=T.filter(Boolean);for(let m=0;m<T.length;m+=1)H(T[m]);p=!1},d(d){d&&(U(e),U(r),U(n)),Me(T,d)}}}function xr(t){let e,r=t[16].text+"",n;return{c(){e=B("p"),n=re(r),Z(e,"class","text svelte-9n4mvt"),te(e,"color",t[2].id===t[18]?t[2].color:"var(--color-lightgrey)")},m(p,b){q(p,e,b),A(e,n)},p(p,b){b&2&&r!==(r=p[16].text+"")&&ce(n,r),b&4&&te(e,"color",p[2].id===p[18]?p[2].color:"var(--color-lightgrey)")},d(p){p&&U(e)}}}function Er(t){let e,r,n,p,b,T,w=t[16].header+"",d,m,k=t[16].hasOwnProperty("text"),g,s,l,o;n=new it({props:{icon:t[16].icon,styleColor:t[2].id===t[18]?t[2].color:t[16].color||"var(--color-green)"}});let h=k&&xr(t);function y(){return t[12](t[18],t[16])}function a(){return t[13](t[18],t[16])}function f(){return t[14](t[16])}return{c(){e=B("div"),r=B("div"),ue(n.$$.fragment),p=G(),b=B("div"),T=B("p"),d=re(w),m=G(),h&&h.c(),g=G(),Z(r,"id","menu-icon-"+t[18]),Z(r,"class","menu-icon svelte-9n4mvt"),Z(T,"class","header svelte-9n4mvt"),te(T,"color",t[2].id===t[18]?t[2].color:"var(--color-white)"),Z(b,"class","menu-details svelte-9n4mvt"),Z(e,"id","sub-menu-"+t[18]),Z(e,"class","each-panel svelte-9n4mvt")},m(_,u){q(_,e,u),A(e,r),ae(n,r,null),A(e,p),A(e,b),A(b,T),A(T,d),A(b,m),h&&h.m(b,null),A(e,g),s=!0,l||(o=[Se(e,"mouseenter",y),Se(e,"mouseleave",a),Se(e,"click",f)],l=!0)},p(_,u){t=_;const S={};u&2&&(S.icon=t[16].icon),u&6&&(S.styleColor=t[2].id===t[18]?t[2].color:t[16].color||"var(--color-green)"),n.$set(S),(!s||u&2)&&w!==(w=t[16].header+"")&&ce(d,w),(!s||u&4)&&te(T,"color",t[2].id===t[18]?t[2].color:"var(--color-white)"),u&2&&(k=t[16].hasOwnProperty("text")),k?h?h.p(t,u):(h=xr(t),h.c(),h.m(b,null)):h&&(h.d(1),h=null)},i(_){s||(F(n.$$.fragment,_),s=!0)},o(_){H(n.$$.fragment,_),s=!1},d(_){_&&U(e),oe(n),h&&h.d(),l=!1,Re(o)}}}function fn(t){let e,r=t[16].text+"",n;return{c(){e=B("p"),n=re(r),Z(e,"class","text svelte-9n4mvt"),te(e,"color",t[3].id===t[18]?t[3].color:"var(--color-lightgrey)")},m(p,b){q(p,e,b),A(e,n)},p(p,b){b&8&&te(e,"color",p[3].id===p[18]?p[3].color:"var(--color-lightg
|