@liip/liipgpt 3.14.0-rc.8 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat/{chat-logic.svelte-ZWeWjJUU.js → chat-logic.svelte-hd47X3w3.js} +1 -1
- package/chat/{chat-panel-C3-EMtq_.js → chat-panel-CnJITRAx.js} +2 -2
- package/chat/{context-menu-D5odUEca.js → context-menu-DH67dP8S.js} +1 -1
- package/chat/{embed-buttons-BeVL-8y6.js → embed-buttons-CmtERkFx.js} +1 -1
- package/chat/{embed-combobox-4CAsoOjC.js → embed-combobox-Bhc2kelu.js} +1 -1
- package/chat/{fake-typing-html-DPkuXOHm.js → fake-typing-html-tsXUPRbS.js} +1 -1
- package/chat/liipgpt-chat.iife.js +2 -2
- package/chat/liipgpt-chat.js +3 -3
- package/chat/{menu-trigger-Cuu5xtMu.js → menu-trigger-Cfd-RPvo.js} +1 -1
- package/chat/{selectors-DvEzt7TH.js → selectors-CW0sK2NE.js} +1 -1
- package/chat/{transition-C-GmcvBc.js → transition-ntZQtJY1.js} +1 -1
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/3-PKoknK.js +1 -0
- package/configurator/_app/immutable/chunks/{YOH2G2iz.js → B-Biam5E.js} +1 -1
- package/configurator/_app/immutable/chunks/{DVoW2IJZ2.js → B90HPtFX2.js} +1 -1
- package/configurator/_app/immutable/chunks/{DPuwLy6I.js → C57s_a4s.js} +2 -2
- package/configurator/_app/immutable/chunks/C6zVetzL2.js +2 -0
- package/configurator/_app/immutable/chunks/{C4l7RRn2.js → CCRsz3Cq.js} +1 -1
- package/configurator/_app/immutable/chunks/{DgswhBqn2.js → CKQKer202.js} +1 -1
- package/configurator/_app/immutable/chunks/{Djmbd3Ed.js → C_Kt29nP.js} +1 -1
- package/configurator/_app/immutable/chunks/{CW8c3Z5e2.js → Cihuaehn2.js} +1 -1
- package/configurator/_app/immutable/chunks/{Dk8xIq6p2.js → D-QExoGk2.js} +1 -1
- package/configurator/_app/immutable/chunks/D0mVOhkG.js +1 -0
- package/configurator/_app/immutable/chunks/{CWG30fYe.js → D8Mbx1aL.js} +1 -1
- package/configurator/_app/immutable/chunks/{D5b1xIAm.js → D96zbh9g.js} +1 -1
- package/configurator/_app/immutable/chunks/{BMivt9VD2.js → DgBOADWO2.js} +1 -1
- package/configurator/_app/immutable/chunks/{Cqa89i-_.js → DwtB5Nu2.js} +1 -1
- package/configurator/_app/immutable/chunks/{BoRo9o--.js → otcMOlHV.js} +1 -1
- package/configurator/_app/immutable/chunks/{B4ROOhtb2.js → q5EYe7vB2.js} +3 -3
- package/configurator/_app/immutable/entry/{app.CcuvgSxg.js → app.CqMp7M7Z.js} +2 -2
- package/configurator/_app/immutable/entry/start.IPJ3KCZ_.js +1 -0
- package/configurator/_app/immutable/nodes/{0.B1FQTCsu.js → 0.C3BS1E4u.js} +1 -1
- package/configurator/_app/immutable/nodes/{1.Ck6Ov61G.js → 1.BI0jtTlM.js} +1 -1
- package/configurator/_app/immutable/nodes/{2.CGZBQn_E.js → 2.D4p-rkZA.js} +3 -3
- package/configurator/_app/immutable/nodes/{3.D-z5IVuY.js → 3._lyZCdqa.js} +1 -1
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +6 -6
- package/configurator/sidebar.html +6 -6
- package/package.json +1 -1
- package/configurator/_app/immutable/chunks/D8-gl1YT.js +0 -1
- package/configurator/_app/immutable/chunks/DV_97jct2.js +0 -2
- package/configurator/_app/immutable/chunks/DoBOh2hq.js +0 -1
- package/configurator/_app/immutable/entry/start.uMPWJBuj.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunks/DC2Dub5y.js";import{n as e,s as t}from"../chunks/3-PKoknK.js";import"../chunks/CNhGYG1q.js";export{t as load_css,e as start};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{J as e,L as t,Lt as n,Mt as r,Rt as i,Xt as a,Y as o,i as s,o as c,xt as l}from"../chunks/DC2Dub5y.js";import"../chunks/D1hYfEew.js";import{r as u}from"../chunks/BKiCq6Wi.js";import{n as d,r as f,s as p,t as m,u as h}from"../chunks/
|
|
1
|
+
import{J as e,L as t,Lt as n,Mt as r,Rt as i,Xt as a,Y as o,i as s,o as c,xt as l}from"../chunks/DC2Dub5y.js";import"../chunks/D1hYfEew.js";import{r as u}from"../chunks/BKiCq6Wi.js";import{n as d,r as f,s as p,t as m,u as h}from"../chunks/DwtB5Nu2.js";import"../chunks/DW2dEcyF.js";import"../chunks/DXq2v1Et.js";import"../chunks/K3i7Gwu8.js";var g=async e=>await(await e(`https://liipgpt.dev.cluster.liipgpt.ch/configurator/api/all-org-names`)).json(),_=[`baselcitygpt`],v=async e=>{let t=await g(e).catch(e=>(console.error(`Error fetching org names:`,e),[]));t.push(`liipgpt`);let n=t.map(e=>_.includes(e)?[e,{dev:`https://${e}-dev-api.gpt.liip.ch/${e}`,prod:`https://${e}-api.gpt.liip.ch/${e}`}]:[e,{dev:`https://${e}.dev.cluster.liipgpt.ch/${e}`,prod:`https://${e}.prod.cluster.liipgpt.ch/${e}`}]);return Object.fromEntries(n)},y=`/**
|
|
2
2
|
* @type {import('@liip/liipgpt/config').ChatConfig} ChatConfig
|
|
3
3
|
*/
|
|
4
4
|
const CHAT_CONFIG_OVERRIDE = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Gt as e,J as t,K as n,Lt as r,Rt as i,St as a,X as o,bt as s,i as c,l,mt as u,xt as d}from"../chunks/DC2Dub5y.js";import"../chunks/
|
|
1
|
+
import{Gt as e,J as t,K as n,Lt as r,Rt as i,St as a,X as o,bt as s,i as c,l,mt as u,xt as d}from"../chunks/DC2Dub5y.js";import"../chunks/3-PKoknK.js";import"../chunks/CNhGYG1q.js";import"../chunks/D1hYfEew.js";import"../chunks/CPmPuHTy.js";import{t as f}from"../chunks/D8Mbx1aL.js";var p=o(`<h1> </h1> <p> </p>`,1);function m(o,c){i(c,!1),l();var m=p(),h=d(m),g=s(h,!0);e(h);var _=a(h,2),v=s(_,!0);e(_),u(()=>{n(g,f.status),n(v,f.error?.message)}),t(o,m),r()}c(m,{},[],[],{mode:`open`});export{m as component};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/
|
|
2
|
-
import{A as e,At as t,B as n,D as r,Dt as i,E as a,Gt as o,H as s,J as c,Jt as l,K as u,Lt as d,Mt as f,N as p,Rt as m,St as h,T as g,Tt as _,U as v,V as y,Wt as b,X as x,Y as S,b as C,bt as w,c as T,dt as E,ht as D,i as O,j as k,k as A,kt as j,lt as M,mt as N,o as P,ot as F,rt as ee,s as I,u as L,v as R,vt as z,xt as B,z as te}from"../chunks/DC2Dub5y.js";import{t as V}from"../chunks/
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/D-QExoGk2.js","../chunks/DC2Dub5y.js","../chunks/ilVrIKNs2.js","../chunks/DW2dEcyF.js","../chunks/DXq2v1Et.js","../chunks/Cdf5zcPh2.js","../chunks/Dgo1hEZl.js","../chunks/C8mohMXa.js","../chunks/jIxBZpXH.js","../chunks/Cac-usFo.js","../chunks/BTi0ccO8.js","../chunks/Ddu6Runs.js","../chunks/CIHI5AgE.js","../chunks/BDb7ndb6.js","../chunks/acNkS6u92.js","../chunks/BZxH-3SJ2.js","../chunks/D1hYfEew.js","../chunks/C6zVetzL2.js","../chunks/BLitziHG2.js","../chunks/mvBHTO00.js","../chunks/B5cw-CPP2.js","../chunks/BO1z8i0R2.js","../chunks/TJW2RdJ02.js","../chunks/BG3QC97Q.js","../chunks/CNhGYG1q.js","../chunks/K3i7Gwu8.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{A as e,At as t,B as n,D as r,Dt as i,E as a,Gt as o,H as s,J as c,Jt as l,K as u,Lt as d,Mt as f,N as p,Rt as m,St as h,T as g,Tt as _,U as v,V as y,Wt as b,X as x,Y as S,b as C,bt as w,c as T,dt as E,ht as D,i as O,j as k,k as A,kt as j,lt as M,mt as N,o as P,ot as F,rt as ee,s as I,u as L,v as R,vt as z,xt as B,z as te}from"../chunks/DC2Dub5y.js";import{t as V}from"../chunks/3-PKoknK.js";import"../chunks/CNhGYG1q.js";import{t as H}from"../chunks/C8mohMXa.js";import"../chunks/D1hYfEew.js";import{c as ne,i as U,l as W,o as G}from"../chunks/DwtB5Nu2.js";import"../chunks/DW2dEcyF.js";import"../chunks/DXq2v1Et.js";import"../chunks/jIxBZpXH.js";import"../chunks/K3i7Gwu8.js";import"../chunks/CPmPuHTy.js";import{t as re}from"../chunks/D8Mbx1aL.js";import{t as K}from"../chunks/CCRsz3Cq.js";import"../chunks/BG3QC97Q.js";import{t as q}from"../chunks/D0mVOhkG.js";import"../chunks/Dgo1hEZl.js";import{t as J}from"../chunks/BDb7ndb6.js";import{C as Y,S as ie,a as ae,b as X,d as oe,i as se,n as ce,o as le,r as ue,s as de,t as fe,w as pe,x as me}from"../chunks/C57s_a4s.js";import{t as Z}from"../chunks/5LTQietD.js";import{t as he}from"../chunks/mvBHTO00.js";import{t as ge}from"../chunks/D96zbh9g.js";import{n as Q,t as _e}from"../chunks/ilVrIKNs2.js";var ve=x(`<div class="swatch svelte-1inuijp"><div class="swatch__color svelte-1inuijp"></div> <div class="swatch__label svelte-1inuijp"> </div></div>`),ye={hash:`svelte-1inuijp`,code:`.swatch {display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:100%;overflow:hidden;border:1px solid var(--base-line-color);border-radius:var(--card-border-radius);&:hover .swatch__label.svelte-1inuijp {opacity:1;}}.swatch__color.svelte-1inuijp {aspect-ratio:1;width:100%;}.swatch__label.svelte-1inuijp {display:none;width:100%;padding:6px;background:white;color:black;font-size:10px;transition:opacity 0.2s ease;
|
|
3
3
|
|
|
4
4
|
@media (min-width: 768px) {display:block;
|
|
5
5
|
}}`};function be(t,n){m(n,!1),e(t,ye);let r=P(n,`name`,12),i=P(n,`key`,12),a=P(n,`value`,12);var s={get name(){return r()},set name(e){r(e),f()},get key(){return i()},set key(e){i(e),f()},get value(){return a()},set value(e){a(e),f()}},l=ve(),p=w(l),_=h(p,2),v=w(_,!0);return o(_),o(l),N(()=>{R(l,`title`,`Color ${i()}: ${a()}`),g(p,`background-color: var(--color-${r()??``}-${i()??``});`),u(v,i())}),c(t,l),d(s)}O(be,{name:{},key:{},value:{}},[],[],{mode:`open`});var xe=x(`<ol><li class="toast" data-type="error"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Error notification</div></div></li> <li class="toast" data-type="warning"><div data-icon=""><svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg></div> <div data-content=""><div data-title="">Warning notification</div></div></li> <li class="toast" data-type="success"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon="" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Success notification</div></div></li> <li class="toast" data-type="info"><div data-icon=""><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg></div> <div data-content=""><div data-title="">Info notification</div></div></li></ol>`);function Se(e){c(e,xe())}O(Se,{},[],[],{mode:`open`});var Ce=x(`<h1>Title h1</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <em>Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque lacus.</em> <strong>Sed sed enim in elit vulputate finibus ac in arcu. Donec venenatis tempus facilisis.</strong></p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque lacus. <a href="https://www.google.com">Check it on google</a> . Sed sed enim in elit vulputate finibus ac in arcu. Donec venenatis tempus facilisis.</p> <p class="text-sm svelte-4x0tmq">Text-sm: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis suscipit nisl at varius. Fusce vitae pellentesque
|
|
@@ -47,4 +47,4 @@ CH-4001 Basel`,phone:`+41 61 200 20 20`,email:`rathaus@bs.ch`,coords:{lat:47.559
|
|
|
47
47
|
|
|
48
48
|
/* Keep widget hidden until the component marks itself ready (avoids barebone/unthemed flash) */liipgpt-search-summary .search-summary:not(.search-summary--ready) {opacity:0;}#chat-wrapper.has-bg-image.svelte-1uha8ag,
|
|
49
49
|
#chat-wrapper.svelte-1uha8ag:has(#preview-form:where(.svelte-1uha8ag)) {
|
|
50
|
-
/* stylelint-disable-next-line property-disallowed-list */container-type:inline-size;height:auto;min-height:100%;}.preview-bg-image.svelte-1uha8ag {display:block;width:100%;height:auto;pointer-events:none;user-select:none;}`};function We(n,l){m(l,!0),e(n,Ue);let u=I(l,[`$$slots`,`$$events`,`$$legacy`,`$$host`]),f=j(()=>l.data);D(()=>{window.onmessage=function(e){typeof e.data==`string`&&e.data.startsWith(`liipgpt-url:`)&&V(`?`+new URLSearchParams(e.data.replace(`liipgpt-url:`,``)).toString(),{replaceState:!0})}});let p=e=>F(f).options?.esm?.value?`/build/${e}/liipgpt-${e}.js`:`/build/${e}/liipgpt-${e}.iife.js`,g=e=>/\.(png|jpe?g|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(e),y=async e=>{e===`build`&&(await H(()=>import(p(`chat`)),[],import.meta.url),await H(()=>import(p(`button`)),[],import.meta.url),await H(()=>import(p(`search-summary`)),[],import.meta.url)),e===`dev`&&(await H(()=>import(`../chunks/
|
|
50
|
+
/* stylelint-disable-next-line property-disallowed-list */container-type:inline-size;height:auto;min-height:100%;}.preview-bg-image.svelte-1uha8ag {display:block;width:100%;height:auto;pointer-events:none;user-select:none;}`};function We(n,l){m(l,!0),e(n,Ue);let u=I(l,[`$$slots`,`$$events`,`$$legacy`,`$$host`]),f=j(()=>l.data);D(()=>{window.onmessage=function(e){typeof e.data==`string`&&e.data.startsWith(`liipgpt-url:`)&&V(`?`+new URLSearchParams(e.data.replace(`liipgpt-url:`,``)).toString(),{replaceState:!0})}});let p=e=>F(f).options?.esm?.value?`/build/${e}/liipgpt-${e}.js`:`/build/${e}/liipgpt-${e}.iife.js`,g=e=>/\.(png|jpe?g|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(e),y=async e=>{e===`build`&&(await H(()=>import(p(`chat`)),[],import.meta.url),await H(()=>import(p(`button`)),[],import.meta.url),await H(()=>import(p(`search-summary`)),[],import.meta.url)),e===`dev`&&(await H(()=>import(`../chunks/D-QExoGk2.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),await H(()=>import(`../chunks/BO1z8i0R2.js`),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20]),import.meta.url),await H(()=>import(`../chunks/TJW2RdJ02.js`),__vite__mapDeps([22,1,7,2,23,4,8,18,16,24,25]),import.meta.url)),e===`server`&&(H(()=>import(G(l.data.options,`chat`)),[],import.meta.url),H(()=>import(G(l.data.options,`button`)),[],import.meta.url),H(()=>import(G(l.data.options,`search-summary`)),[],import.meta.url))},x=j(()=>l.data.options?.[`preview-mode`]?.value??`server`);D(()=>{y(F(x))});let C=`./sidebar${re.url.search}`,O=i(void 0),A=i(void 0),M=(e,t)=>{let n=document.createElement(`script`),r=document.createTextNode(`{${t}}`);n.appendChild(r),e.replaceChildren(n)};D(()=>{F(O)&&M(F(O),F(f).options.CHAT_CONFIG_OVERRIDE.value||``)}),D(()=>{F(A)&&F(f).embedTab===`chat`?M(F(A),F(f).options.onclosechat.value||``):F(A)&&F(A).replaceChildren()});let P=j(()=>F(f)&&F(f).options[`preview-components`].value),ee=j(()=>F(f).embedTab===`chat`),q=j(()=>F(f).embedTab===`search-summary`);D(()=>{if(!F(q)){W();return}let e=F(f).options[`use-chat-config`]?.value?``:F(f).options[`host-css`]?.value??``;e?ne(e):W()});var J=He();k(`1uha8ag`,e=>{var t=S(),n=B(t),r=e=>{E(()=>{z.title=`LiipGPT Configurator | Components`})},i=e=>{E(()=>{z.title=`LiipGPT Configurator`})};v(n,e=>{F(f).options[`preview-components`].value?e(r,1):e(i,-1)}),c(e,t)});var Y=w(J);let ie;var ae=w(Y),X=e=>{var t=Re();N(()=>R(t,`src`,C)),c(e,t)};v(ae,e=>{F(f).options[`hide-sidebar`].value||e(X)}),o(Y);var oe=h(Y,2),se=e=>{K(e,{mode:`show`})};v(oe,e=>{F(f).options[`hide-sidebar`].value&&e(se)}),s(h(oe,2),()=>F(f),e=>{var n=S(),r=B(n),i=e=>{var n=S();t(B(n),{onerror:e=>console.error(`Rendering error of components`,e)},e=>{$(e,T(()=>u))}),c(e,n)},s=e=>{var t=Ve();let n;var r=w(t),i=e=>{var t=ze(),n=h(w(t),6),r=w(n),i=h(w(r),6),a=h(w(i),2),s=h(w(a),14),l=h(w(s),2),u=w(l);u.value=u.__value=``;var d=h(u);d.value=d.__value=`ch`;var f=h(d);f.value=f.__value=`de`;var p=h(f);p.value=p.__value=`at`,o(l),o(s);var m=h(s,12),g=h(w(m),2),_=w(g);_.value=_.__value=``;var v=h(_);v.value=v.__value=`a`;var y=h(v);y.value=y.__value=`b`;var x=h(y);x.value=x.__value=`c`,o(g),o(m),b(2),o(a),o(i),b(16),o(r),b(2),o(n),o(t),c(e,t)};v(r,e=>{F(ee)&&F(f).options.flyout.value&&F(f).options[`preview-form`].value&&e(i)});var s=h(r,2),l=e=>{var t=S(),n=B(t),r=e=>{var t=Be();N(()=>R(t,`src`,F(f).options[`preview-background`].value)),c(e,t)},i=j(()=>g(F(f).options[`preview-background`].value));v(n,e=>{F(i)&&e(r)}),c(e,t)};v(s,e=>{F(ee)&&F(f).options.flyout.value&&F(f).options[`preview-background`].value&&e(l)});var u=h(s,2);L(u,e=>_(O,e),()=>F(O));var d=h(u,2);te(d,()=>U(F(f).options,F(f).embedTab,!1,!0)),L(h(d,2),e=>_(A,e),()=>F(A)),o(t),N(e=>n=a(t,1,`svelte-1uha8ag`,null,n,e),[()=>({"has-bg-image":F(f).options.flyout.value&&F(f).options[`preview-background`].value&&g(F(f).options[`preview-background`].value),"search-summary-preview":F(q)})]),c(e,t)};v(r,e=>{F(P)?e(i):e(s,-1)}),c(e,n)}),o(J),N(()=>{a(J,1,r([{"components-preview":F(P)}]),`svelte-1uha8ag`),ie=a(Y,1,`sidebar-slot svelte-1uha8ag`,null,ie,{"sidebar-slot--hidden":F(f).options[`hide-sidebar`].value})}),c(n,J),d()}O(We,{},[],[],{mode:`open`});export{We as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,B as t,C as n,Ct as r,Dt as i,E as a,Gt as o,J as s,K as c,Lt as l,Mt as u,Rt as d,St as f,Tt as p,U as m,V as h,Wt as g,X as _,Y as v,_ as y,_t as b,bt as x,c as S,et as C,ht as w,i as T,j as ee,k as E,kt as D,mt as O,nt as k,o as A,ot as j,rt as M,s as N,tt as P,u as F,v as I,w as te,x as ne,xt as re,y as ie}from"../chunks/DC2Dub5y.js";import"../chunks/
|
|
1
|
+
import{A as e,B as t,C as n,Ct as r,Dt as i,E as a,Gt as o,J as s,K as c,Lt as l,Mt as u,Rt as d,St as f,Tt as p,U as m,V as h,Wt as g,X as _,Y as v,_ as y,_t as b,bt as x,c as S,et as C,ht as w,i as T,j as ee,k as E,kt as D,mt as O,nt as k,o as A,ot as j,rt as M,s as N,tt as P,u as F,v as I,w as te,x as ne,xt as re,y as ie}from"../chunks/DC2Dub5y.js";import"../chunks/3-PKoknK.js";import"../chunks/CNhGYG1q.js";import"../chunks/D1hYfEew.js";import{n as ae,t as oe}from"../chunks/BKiCq6Wi.js";import{a as se,i as ce}from"../chunks/DwtB5Nu2.js";import"../chunks/DW2dEcyF.js";import"../chunks/DXq2v1Et.js";import"../chunks/jIxBZpXH.js";import"../chunks/K3i7Gwu8.js";import"../chunks/D8Mbx1aL.js";import{n as le,r as ue,t as de}from"../chunks/CCRsz3Cq.js";import"../chunks/Dgo1hEZl.js";import"../chunks/BDb7ndb6.js";import"../chunks/ilVrIKNs2.js";import"../chunks/C6zVetzL2.js";import"../chunks/Cdf5zcPh2.js";import"../chunks/BZxH-3SJ2.js";import"../chunks/acNkS6u92.js";(()=>{var e=`4.2.2`;function t(e){let t=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t.push(n+1);function n(e){let n=0,r=t.length;for(;r>0;){let i=(r|0)>>1,a=n+i;t[a]<=e?(n=a+1,r=r-i-1):r=i}--n;let i=e-t[n];return{line:n+1,column:i}}function r({line:e,column:n}){--e,e=Math.min(Math.max(e,0),t.length-1);let r=t[e],i=t[e+1]??r;return Math.min(Math.max(r+n,0),i)}return{find:n,findOffset:r}}var n=92,r=47,i=42,a=34,o=39,s=58,c=59,l=10,u=13,d=32,f=9,p=123,m=125,h=40,g=41,_=91,v=93,y=45,b=64,x=33,S=class e extends Error{loc;constructor(n,r){if(r){let e=r[0],i=t(e.code).find(r[1]);n=`${e.file}:${i.line}:${i.column+1}: ${n}`}super(n),this.name=`CssSyntaxError`,this.loc=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function C(e,t){let C=t?.from?{file:t.from,code:e}:null;e[0]===``&&(e=` `+e.slice(1));let E=[],D=[],O=[],k=null,A=null,j=``,M=``,N=0,P;for(let t=0;t<e.length;t++){let F=e.charCodeAt(t);if(!(F===u&&(P=e.charCodeAt(t+1),P===l)))if(F===n)j===``&&(N=t),j+=e.slice(t,t+2),t+=1;else if(F===r&&e.charCodeAt(t+1)===i){let a=t;for(let a=t+2;a<e.length;a++)if(P=e.charCodeAt(a),P===n)a+=1;else if(P===i&&e.charCodeAt(a+1)===r){t=a+1;break}let o=e.slice(a,t+1);if(o.charCodeAt(2)===x){let e=ve(o.slice(2,-2));D.push(e),C&&(e.src=[C,a,t+1],e.dst=[C,a,t+1])}}else if(F===o||F===a){let n=ee(e,t,F,C);j+=e.slice(t,n+1),t=n}else{if((F===d||F===l||F===f)&&(P=e.charCodeAt(t+1))&&(P===d||P===l||P===f||P===u&&(P=e.charCodeAt(t+2))&&P==l))continue;if(F===l){if(j.length===0)continue;P=j.charCodeAt(j.length-1),P!==d&&P!==l&&P!==f&&(j+=` `)}else if(F===y&&e.charCodeAt(t+1)===y&&j.length===0){let l=``,u=t,d=-1;for(let f=t+2;f<e.length;f++)if(P=e.charCodeAt(f),P===n)f+=1;else if(P===o||P===a)f=ee(e,f,P,C);else if(P===r&&e.charCodeAt(f+1)===i){for(let t=f+2;t<e.length;t++)if(P=e.charCodeAt(t),P===n)t+=1;else if(P===i&&e.charCodeAt(t+1)===r){f=t+1;break}}else if(d===-1&&P===s)d=j.length+f-u;else if(P===c&&l.length===0){j+=e.slice(u,f),t=f;break}else if(P===h)l+=`)`;else if(P===_)l+=`]`;else if(P===p)l+=`}`;else if((P===m||e.length-1===f)&&l.length===0){t=f-1,j+=e.slice(u,f);break}else (P===g||P===v||P===m)&&l.length>0&&e[f]===l[l.length-1]&&(l=l.slice(0,-1));let f=T(j,d);if(!f)throw new S(`Invalid custom property, expected a value`,C?[C,u,t]:null);C&&(f.src=[C,u,t],f.dst=[C,u,t]),k?k.nodes.push(f):E.push(f),j=``}else if(F===c&&j.charCodeAt(0)===b)A=w(j),C&&(A.src=[C,N,t],A.dst=[C,N,t]),k?k.nodes.push(A):E.push(A),j=``,A=null;else if(F===c&&M[M.length-1]!==`)`){let e=T(j);if(!e){if(j.length===0)continue;throw new S(`Invalid declaration: \`${j.trim()}\``,C?[C,N,t]:null)}C&&(e.src=[C,N,t],e.dst=[C,N,t]),k?k.nodes.push(e):E.push(e),j=``}else if(F===p&&M[M.length-1]!==`)`)M+=`}`,A=H(j.trim()),C&&(A.src=[C,N,t],A.dst=[C,N,t]),k&&k.nodes.push(A),O.push(k),k=A,j=``,A=null;else if(F===m&&M[M.length-1]!==`)`){if(M===``)throw new S(`Missing opening {`,C?[C,t,t]:null);if(M=M.slice(0,-1),j.length>0)if(j.charCodeAt(0)===b)A=w(j),C&&(A.src=[C,N,t],A.dst=[C,N,t]),k?k.nodes.push(A):E.push(A),j=``,A=null;else{let e=j.indexOf(`:`);if(k){let n=T(j,e);if(!n)throw new S(`Invalid declaration: \`${j.trim()}\``,C?[C,N,t]:null);C&&(n.src=[C,N,t],n.dst=[C,N,t]),k.nodes.push(n)}}let e=O.pop()??null;e===null&&k&&E.push(k),k=e,j=``,A=null}else if(F===h)M+=`)`,j+=`(`;else if(F===g){if(M[M.length-1]!==`)`)throw new S(`Missing opening (`,C?[C,t,t]:null);M=M.slice(0,-1),j+=`)`}else{if(j.length===0&&(F===d||F===l||F===f))continue;j===``&&(N=t),j+=String.fromCharCode(F)}}}if(j.charCodeAt(0)===b){let t=w(j);C&&(t.src=[C,N,e.length],t.dst=[C,N,e.length]),E.push(t)}if(M.length>0&&k){if(k.kind===`rule`)throw new S(`Missing closing } at ${k.selector}`,k.src?[k.src[0],k.src[1],k.src[1]]:null);if(k.kind===`at-rule`)throw new S(`Missing closing } at ${k.name} ${k.params}`,k.src?[k.src[0],k.src[1],k.src[1]]:null)}return D.length>0?D.concat(E):E}function w(e,t=[]){let n=e,r=``;for(let t=5;t<e.length;t++){let i=e.charCodeAt(t);if(i===d||i===f||i===h){n=e.slice(0,t),r=e.slice(t);break}}return V(n.trim(),r.trim(),t)}function T(e,t=e.indexOf(`:`)){if(t===-1)return null;let n=e.indexOf(`!important`,t+1);return U(e.slice(0,t).trim(),e.slice(t+1,n===-1?e.length:n).trim(),n!==-1)}function ee(e,t,r,i=null){let a;for(let o=t+1;o<e.length;o++)if(a=e.charCodeAt(o),a===n)o+=1;else{if(a===r)return o;if(a===c&&(e.charCodeAt(o+1)===l||e.charCodeAt(o+1)===u&&e.charCodeAt(o+2)===l))throw new S(`Unterminated string: ${e.slice(t,o+1)+String.fromCharCode(r)}`,i?[i,t,o+1]:null);if(a===l||a===u&&e.charCodeAt(o+1)===l)throw new S(`Unterminated string: ${e.slice(t,o)+String.fromCharCode(r)}`,i?[i,t,o+1]:null)}return t}function E(e){if(arguments.length===0)throw TypeError("`CSS.escape` requires an argument.");let t=String(e),n=t.length,r=-1,i,a=``,o=t.charCodeAt(0);if(n===1&&o===45)return`\\`+t;for(;++r<n;){if(i=t.charCodeAt(r),i===0){a+=`�`;continue}if(i>=1&&i<=31||i===127||r===0&&i>=48&&i<=57||r===1&&i>=48&&i<=57&&o===45){a+=`\\`+i.toString(16)+` `;continue}if(i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122){a+=t.charAt(r);continue}a+=`\\`+t.charAt(r)}return a}function D(e){return e.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,e=>e.length>2?String.fromCodePoint(Number.parseInt(e.slice(1).trim(),16)):e[1])}var O=new Map([[`--font`,[`--font-weight`,`--font-size`]],[`--inset`,[`--inset-shadow`,`--inset-ring`]],[`--text`,[`--text-color`,`--text-decoration-color`,`--text-decoration-thickness`,`--text-indent`,`--text-shadow`,`--text-underline-offset`]],[`--grid-column`,[`--grid-column-start`,`--grid-column-end`]],[`--grid-row`,[`--grid-row-start`,`--grid-row-end`]]]);function k(e,t){return(O.get(t)??[]).some(t=>e===t||e.startsWith(`${t}-`))}var A=class{constructor(e=new Map,t=new Set([])){this.values=e,this.keyframes=t}prefix=null;get size(){return this.values.size}add(e,t,n=0,r){if(e.endsWith(`-*`)){if(t!==`initial`)throw Error(`Invalid theme value \`${t}\` for namespace \`${e}\``);e===`--*`?this.values.clear():this.clearNamespace(e.slice(0,-2),0)}if(n&4){let t=this.values.get(e);if(t&&!(t.options&4))return}t===`initial`?this.values.delete(e):this.values.set(e,{value:t,options:n,src:r})}keysInNamespaces(e){let t=[];for(let n of e){let e=`${n}-`;for(let r of this.values.keys())r.startsWith(e)&&r.indexOf(`--`,2)===-1&&(k(r,n)||t.push(r.slice(e.length)))}return t}get(e){for(let t of e){let e=this.values.get(t);if(e)return e.value}return null}hasDefault(e){return(this.getOptions(e)&4)==4}getOptions(e){return e=D(this.#e(e)),this.values.get(e)?.options??0}entries(){return this.prefix?Array.from(this.values,e=>(e[0]=this.prefixKey(e[0]),e)):this.values.entries()}prefixKey(e){return this.prefix?`--${this.prefix}-${e.slice(2)}`:e}#e(e){return this.prefix?`--${e.slice(3+this.prefix.length)}`:e}clearNamespace(e,t){let n=O.get(e)??[];e:for(let r of this.values.keys())if(r.startsWith(e)){if(t!==0&&(this.getOptions(r)&t)!==t)continue;for(let e of n)if(r.startsWith(e))continue e;this.values.delete(r)}}#t(e,t){for(let n of t){let t=e===null?n:`${n}-${e}`;if(!this.values.has(t))if(e!==null&&e.includes(`.`)){if(t=`${n}-${e.replaceAll(`.`,`_`)}`,!this.values.has(t))continue}else continue;if(!k(t,n))return t}return null}#n(e){let t=this.values.get(e);if(!t)return null;let n=null;return t.options&2&&(n=t.value),`var(${E(this.prefixKey(e))}${n?`, ${n}`:``})`}markUsedVariable(e){let t=D(this.#e(e)),n=this.values.get(t);if(!n)return!1;let r=n.options&16;return n.options|=16,!r}resolve(e,t,n=0){let r=this.#t(e,t);if(!r)return null;let i=this.values.get(r);return(n|i.options)&1?i.value:this.#n(r)}resolveValue(e,t){let n=this.#t(e,t);return n?this.values.get(n).value:null}resolveWith(e,t,n=[]){let r=this.#t(e,t);if(!r)return null;let i={};for(let e of n){let t=`${r}${e}`,n=this.values.get(t);n&&(n.options&1?i[e]=n.value:i[e]=this.#n(t))}let a=this.values.get(r);return a.options&1?[a.value,i]:[this.#n(r),i]}namespace(e){let t=new Map,n=`${e}-`;for(let[r,i]of this.values)r===e?t.set(null,i.value):r.startsWith(`${n}-`)?t.set(r.slice(e.length),i.value):r.startsWith(n)&&t.set(r.slice(n.length),i.value);return t}addKeyframes(e){this.keyframes.add(e)}getKeyframes(){return Array.from(this.keyframes)}},j=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e,this),this.set(e,t)),t}};function M(e){return{kind:`word`,value:e}}function N(e,t){return{kind:`function`,value:e,nodes:t}}function P(e){return{kind:`separator`,value:e}}function F(e){let t=``;for(let n of e)switch(n.kind){case`word`:case`separator`:t+=n.value;break;case`function`:t+=n.value+`(`+F(n.nodes)+`)`}return t}var I=92,te=41,ne=58,re=44,ie=34,ae=61,oe=62,se=60,ce=10,le=40,ue=39,de=47,fe=32,pe=9;function L(e){e=e.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`);let t=[],n=[],r=null,i=``,a;for(let o=0;o<e.length;o++){let s=e.charCodeAt(o);switch(s){case I:i+=e[o]+e[o+1],o++;break;case de:{if(i.length>0){let e=M(i);r?r.nodes.push(e):t.push(e),i=``}let n=M(e[o]);r?r.nodes.push(n):t.push(n);break}case ne:case re:case ae:case oe:case se:case ce:case fe:case pe:{if(i.length>0){let e=M(i);r?r.nodes.push(e):t.push(e),i=``}let n=o,s=o+1;for(;s<e.length&&(a=e.charCodeAt(s),!(a!==ne&&a!==re&&a!==ae&&a!==oe&&a!==se&&a!==ce&&a!==fe&&a!==pe));s++);o=s-1;let c=P(e.slice(n,s));r?r.nodes.push(c):t.push(c);break}case ue:case ie:{let t=o;for(let t=o+1;t<e.length;t++)if(a=e.charCodeAt(t),a===I)t+=1;else if(a===s){o=t;break}i+=e.slice(t,o+1);break}case le:{let e=N(i,[]);i=``,r?r.nodes.push(e):t.push(e),n.push(e),r=e;break}case te:{let e=n.pop();if(i.length>0){let t=M(i);e?.nodes.push(t),i=``}r=n.length>0?n[n.length-1]:null;break}default:i+=String.fromCharCode(s)}}return i.length>0&&t.push(M(i)),t}var me=(e=>(e[e.Continue=0]=`Continue`,e[e.Skip=1]=`Skip`,e[e.Stop=2]=`Stop`,e[e.Replace=3]=`Replace`,e[e.ReplaceSkip=4]=`ReplaceSkip`,e[e.ReplaceStop=5]=`ReplaceStop`,e))(me||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function z(e,t){typeof t==`function`?he(e,t):he(e,t.enter,t.exit)}function he(e,t=()=>R.Continue,n=()=>R.Continue){let r={value:[e,0,null],prev:null},i={parent:null,depth:0,path(){let e=[],t=r;for(;t;){let n=t.value[2];n&&e.push(n),t=t.prev}return e.reverse(),e}};for(;r!==null;){let e=r.value,a=e[0],o=e[1],s=e[2];if(o>=a.length){r=r.prev,--i.depth;continue}if(i.parent=s,o>=0){let n=a[o],s=t(n,i)??R.Continue;switch(s.kind){case 0:n.nodes&&n.nodes.length>0&&(i.depth+=1,r={value:[n.nodes,0,n],prev:r}),e[1]=~o;continue;case 2:return;case 1:e[1]=~o;continue;case 3:a.splice(o,1,...s.nodes);continue;case 5:a.splice(o,1,...s.nodes);return;case 4:a.splice(o,1,...s.nodes),e[1]+=s.nodes.length;continue;default:throw Error(`Invalid \`WalkAction.${me[s.kind]??`Unknown(${s.kind})`}\` in enter.`)}}let c=~o,l=a[c],u=n(l,i)??R.Continue;switch(u.kind){case 0:e[1]=c+1;continue;case 2:return;case 3:a.splice(c,1,...u.nodes),e[1]=c+u.nodes.length;continue;case 5:a.splice(c,1,...u.nodes);return;case 4:a.splice(c,1,...u.nodes),e[1]=c+u.nodes.length;continue;default:throw Error(`Invalid \`WalkAction.${me[u.kind]??`Unknown(${u.kind})`}\` in exit.`)}}}function ge(e){let t=[];return z(L(e),e=>{if(!(e.kind!==`function`||e.value!==`var`))return z(e.nodes,e=>{e.kind!==`word`||e.value[0]!==`-`||e.value[1]!==`-`||t.push(e.value)}),R.Skip}),t}var _e=64;function B(e,t=[]){return{kind:`rule`,selector:e,nodes:t}}function V(e,t=``,n=[]){return{kind:`at-rule`,name:e,params:t,nodes:n}}function H(e,t=[]){return e.charCodeAt(0)===_e?w(e,t):B(e,t)}function U(e,t,n=!1){return{kind:`declaration`,property:e,value:t,important:n}}function ve(e){return{kind:`comment`,value:e}}function ye(e,t){return{kind:`context`,context:e,nodes:t}}function W(e){return{kind:`at-root`,nodes:e}}function be(e){switch(e.kind){case`rule`:return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(be),src:e.src,dst:e.dst};case`at-rule`:return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(be),src:e.src,dst:e.dst};case`at-root`:return{kind:e.kind,nodes:e.nodes.map(be),src:e.src,dst:e.dst};case`context`:return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(be),src:e.src,dst:e.dst};case`declaration`:return{kind:e.kind,property:e.property,value:e.value,important:e.important,src:e.src,dst:e.dst};case`comment`:return{kind:e.kind,value:e.value,src:e.src,dst:e.dst};default:throw Error(`Unknown node kind: ${e.kind}`)}}function xe(e){return{depth:e.depth,get context(){let t={};for(let n of e.path())n.kind===`context`&&Object.assign(t,n.context);return Object.defineProperty(this,`context`,{value:t}),t},get parent(){let e=this.path().pop()??null;return Object.defineProperty(this,`parent`,{value:e}),e},path(){return e.path().filter(e=>e.kind!==`context`)}}}function Se(e,t,n=3){let r=[],i=new Set,a=new j(()=>new Set),o=new j(()=>new Set),s=new Set,c=new Set,l=[],u=[],d=new j(()=>new Set);function f(e,p,m={},h=0){if(e.kind===`declaration`){if(e.property===`--tw-sort`||e.value===void 0||e.value===null)return;if(m.theme&&e.property[0]===`-`&&e.property[1]===`-`){if(e.value===`initial`){e.value=void 0;return}m.keyframes||a.get(p).add(e)}if(e.value.includes(`var(`))if(m.theme&&e.property[0]===`-`&&e.property[1]===`-`)for(let t of ge(e.value))d.get(t).add(e.property);else t.trackUsedVariables(e.value);if(e.property===`animation`)for(let t of Ee(e.value))c.add(t);n&2&&e.value.includes(`color-mix(`)&&!m.supportsColorMix&&!m.keyframes&&o.get(p).add(e),p.push(e)}else if(e.kind===`rule`){let t=[];for(let n of e.nodes)f(n,t,m,h+1);let n={},r=new Set;for(let e of t){if(e.kind!==`declaration`)continue;let t=`${e.property}:${e.value}:${e.important}`;n[t]??=[],n[t].push(e)}for(let e in n)for(let t=0;t<n[e].length-1;++t)r.add(n[e][t]);if(r.size>0&&(t=t.filter(e=>!r.has(e))),t.length===0)return;e.selector===`&`?p.push(...t):p.push({...e,nodes:t})}else if(e.kind===`at-rule`&&e.name===`@property`&&h===0){if(i.has(e.params))return;if(n&1){let t=e.params,n=null,r=!1;for(let t of e.nodes)t.kind===`declaration`&&(t.property===`initial-value`?n=t.value:t.property===`inherits`&&(r=t.value===`true`));let i=U(t,n??`initial`);i.src=e.src,r?l.push(i):u.push(i)}i.add(e.params);let t={...e,nodes:[]};for(let n of e.nodes)f(n,t.nodes,m,h+1);p.push(t)}else if(e.kind===`at-rule`){e.name===`@keyframes`?m={...m,keyframes:!0}:e.name===`@supports`&&e.params.includes(`color-mix(`)&&(m={...m,supportsColorMix:!0});let t={...e,nodes:[]};for(let n of e.nodes)f(n,t.nodes,m,h+1);e.name===`@keyframes`&&m.theme&&s.add(t),(t.nodes.length>0||t.name===`@layer`||t.name===`@charset`||t.name===`@custom-media`||t.name===`@namespace`||t.name===`@import`)&&p.push(t)}else if(e.kind===`at-root`)for(let t of e.nodes){let e=[];f(t,e,m,0);for(let t of e)r.push(t)}else if(e.kind===`context`){if(e.context.reference)return;for(let t of e.nodes)f(t,p,{...m,...e.context},h)}else e.kind===`comment`&&p.push(e)}let p=[];for(let t of e)f(t,p,{},0);e:for(let[e,n]of a)for(let r of n){if(Te(r.property,t.theme,d)){if(r.property.startsWith(t.theme.prefixKey(`--animate-`)))for(let e of Ee(r.value))c.add(e);continue}let n=e.indexOf(r);if(e.splice(n,1),e.length===0){let t=we(p,t=>t.kind===`rule`&&t.nodes===e);if(!t||t.length===0)continue e;t.unshift({kind:`at-root`,nodes:p});do{let e=t.pop();if(!e)break;let n=t[t.length-1];if(!n||n.kind!==`at-root`&&n.kind!==`at-rule`)break;let r=n.nodes.indexOf(e);if(r===-1)break;n.nodes.splice(r,1)}while(!0);continue e}}for(let e of s)if(!c.has(e.params)){let t=r.indexOf(e);r.splice(t,1)}if(p=p.concat(r),n&2)for(let[e,n]of o)for(let r of n){let n=e.indexOf(r);if(n===-1||r.value==null)continue;let i=L(r.value),a=!1;if(z(i,e=>{if(e.kind!==`function`||e.value!==`color-mix`)return;let n=!1,r=!1;if(z(e.nodes,e=>{if(e.kind==`word`&&e.value.toLowerCase()===`currentcolor`){r=!0,a=!0;return}let i=e,o=null,s=new Set;do{if(i.kind!==`function`||i.value!==`var`)return;let e=i.nodes[0];if(!e||e.kind!==`word`)return;let c=e.value;if(s.has(c)){n=!0;return}if(s.add(c),a=!0,o=t.theme.resolveValue(null,[e.value]),!o){n=!0;return}if(o.toLowerCase()===`currentcolor`){r=!0;return}i=o.startsWith(`var(`)?L(o)[0]:null}while(i);return R.Replace({kind:`word`,value:o})}),n||r){let t=e.nodes.findIndex(e=>e.kind===`separator`&&e.value.trim().includes(`,`));if(t===-1)return;let n=e.nodes.length>t?e.nodes[t+1]:null;return n?R.Replace(n):void 0}else if(a){let t=e.nodes[2];t.kind===`word`&&(t.value===`oklab`||t.value===`oklch`||t.value===`lab`||t.value===`lch`)&&(t.value=`srgb`)}}),!a)continue;let o={...r,value:F(i)},s=H(`@supports (color: color-mix(in lab, red, red))`,[r]);s.src=r.src,e.splice(n,1,o,s)}if(n&1){let e=[];if(l.length>0){let t=H(`:root, :host`,l);t.src=l[0].src,e.push(t)}if(u.length>0){let t=H(`*, ::before, ::after, ::backdrop`,u);t.src=u[0].src,e.push(t)}if(e.length>0){let t=p.findIndex(e=>!(e.kind===`comment`||e.kind===`at-rule`&&(e.name===`@charset`||e.name===`@import`))),n=V(`@layer`,`properties`,[]);n.src=e[0].src,p.splice(t<0?p.length:t,0,n);let r=H(`@layer properties`,[V(`@supports`,`((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))`,e)]);r.src=e[0].src,r.nodes[0].src=e[0].src,p.push(r)}}return p}function Ce(e,t){let n=0,r={file:null,code:``};function i(e,a=0){let o=``,s=` `.repeat(a);if(e.kind===`declaration`){if(o+=`${s}${e.property}: ${e.value}${e.important?` !important`:``};
|
|
4
4
|
`,t){n+=s.length;let t=n;n+=e.property.length,n+=2,n+=e.value?.length??0,e.important&&(n+=11);let i=n;n+=2,e.dst=[r,t,i]}}else if(e.kind===`rule`){if(o+=`${s}${e.selector} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1789555561549"}
|
package/configurator/index.html
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<link rel="icon" href="./favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<link href="./_app/immutable/entry/start.
|
|
7
|
+
<link href="./_app/immutable/entry/start.IPJ3KCZ_.js" rel="modulepreload">
|
|
8
8
|
<link href="./_app/immutable/chunks/DC2Dub5y.js" rel="modulepreload">
|
|
9
|
-
<link href="./_app/immutable/chunks/
|
|
9
|
+
<link href="./_app/immutable/chunks/3-PKoknK.js" rel="modulepreload">
|
|
10
10
|
<link href="./_app/immutable/chunks/CNhGYG1q.js" rel="modulepreload">
|
|
11
|
-
<link href="./_app/immutable/entry/app.
|
|
11
|
+
<link href="./_app/immutable/entry/app.CqMp7M7Z.js" rel="modulepreload">
|
|
12
12
|
<link href="./_app/immutable/chunks/C8mohMXa.js" rel="modulepreload">
|
|
13
13
|
<link href="./_app/immutable/chunks/D1hYfEew.js" rel="modulepreload">
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div style="display: contents">
|
|
18
18
|
<script>
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
__sveltekit_13vmif1 = {
|
|
21
21
|
base: new URL(".", location).pathname.slice(0, -1),
|
|
22
22
|
assets: "/configurator"
|
|
23
23
|
};
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
const element = document.currentScript.parentElement;
|
|
26
26
|
|
|
27
27
|
Promise.all([
|
|
28
|
-
import("./_app/immutable/entry/start.
|
|
29
|
-
import("./_app/immutable/entry/app.
|
|
28
|
+
import("./_app/immutable/entry/start.IPJ3KCZ_.js"),
|
|
29
|
+
import("./_app/immutable/entry/app.CqMp7M7Z.js")
|
|
30
30
|
]).then(([kit, app]) => {
|
|
31
31
|
kit.start(app, element);
|
|
32
32
|
});
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<link rel="icon" href="./favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<link href="./_app/immutable/entry/start.
|
|
7
|
+
<link href="./_app/immutable/entry/start.IPJ3KCZ_.js" rel="modulepreload">
|
|
8
8
|
<link href="./_app/immutable/chunks/DC2Dub5y.js" rel="modulepreload">
|
|
9
|
-
<link href="./_app/immutable/chunks/
|
|
9
|
+
<link href="./_app/immutable/chunks/3-PKoknK.js" rel="modulepreload">
|
|
10
10
|
<link href="./_app/immutable/chunks/CNhGYG1q.js" rel="modulepreload">
|
|
11
|
-
<link href="./_app/immutable/entry/app.
|
|
11
|
+
<link href="./_app/immutable/entry/app.CqMp7M7Z.js" rel="modulepreload">
|
|
12
12
|
<link href="./_app/immutable/chunks/C8mohMXa.js" rel="modulepreload">
|
|
13
13
|
<link href="./_app/immutable/chunks/D1hYfEew.js" rel="modulepreload">
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div style="display: contents">
|
|
18
18
|
<script>
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
__sveltekit_13vmif1 = {
|
|
21
21
|
base: new URL(".", location).pathname.slice(0, -1),
|
|
22
22
|
assets: "/configurator"
|
|
23
23
|
};
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
const element = document.currentScript.parentElement;
|
|
26
26
|
|
|
27
27
|
Promise.all([
|
|
28
|
-
import("./_app/immutable/entry/start.
|
|
29
|
-
import("./_app/immutable/entry/app.
|
|
28
|
+
import("./_app/immutable/entry/start.IPJ3KCZ_.js"),
|
|
29
|
+
import("./_app/immutable/entry/app.CqMp7M7Z.js")
|
|
30
30
|
]).then(([kit, app]) => {
|
|
31
31
|
kit.start(app, element);
|
|
32
32
|
});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e,Dt as t,Ft as n,Ht as r,It as i,Tt as a,Yt as o,Zt as s,ct as c,ft as l,gt as u,ht as d,it as f,jt as p,kt as m,lt as h,ot as g,zt as _}from"./DC2Dub5y.js";import{t as v}from"./C8mohMXa.js";import{i as y}from"./DW2dEcyF.js";import{a as b,n as ee,o as x,t as te}from"./jIxBZpXH.js";import{a as ne,d as S,f as re,h as ie,m as ae,n as C,o as oe,p as se}from"./BG3QC97Q.js";import{i as w,n as ce,r as le,s as ue,t as de}from"./Dgo1hEZl.js";import{t as T}from"./BDb7ndb6.js";var fe={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pe(e,t,n){e||={};let r=e.random??e.rng?.()??re();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return se(r)}function E(e,t,n){return fe.randomUUID&&!t&&!e?fe.randomUUID():pe(e,t,n)}var me=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}));function he(...e){return e.filter(Boolean).join(` `)}var ge=typeof document<`u`,D=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function _e(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=D,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=p(e=>{let n=f(t,`focusin`,e),r=f(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?_e(this.#e):null}};function ve(e){return typeof e==`function`}var O=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return i(this.#t)}get(){let e=n(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=n(this.#t);return t===void 0?e:t}set(e){return _(this.#t,e)}};function ye(e,t){switch(e){case`post`:d(t);break;case`pre`:u(t);break}}function k(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;ye(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=h(()=>n(t,o));return o=t,r})}function A(e,t,n){let r=l(()=>{let i=!1;k(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});d(()=>r)}function j(e,t,n){k(e,`post`,t,n)}function be(e,t,n){k(e,`pre`,t,n)}j.pre=be;function xe(e,t){A(e,`post`,t)}function Se(e,t){A(e,`pre`,t)}xe.pre=Se;function M(e){return ve(e)?e():e}var Ce=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=m(()=>(g(this.#s)?.(),this.getSize().width));#o=m(()=>(g(this.#s)?.(),this.getSize().height));#s=m(()=>{let e=M(this.#r);if(e)return p(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??D,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=M(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return g(this.#s)?.(),this.getSize()}get width(){return g(this.#a)}get height(){return g(this.#o)}},we=class{#e=()=>void 0;#t=m(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return g(this.#t)}};function Te(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function Ee(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function N(n,r,i={},o){let{lazy:s=!1,once:c=!1,initialValue:l,debounce:u,throttle:d}=i,f=t(e(l)),p=t(!1),m=t(void 0),h=t(e([])),_=()=>{g(h).forEach(e=>e()),a(h,[],!0)},v=e=>{a(h,[...g(h),e],!0)},y=async(e,t,n=!1)=>{try{a(p,!0),a(m,void 0),_();let i=new AbortController;v(()=>i.abort());let o=await r(e,t,{data:g(f),refetching:n,onCleanup:v,signal:i.signal});return a(f,o,!0),o}catch(e){e instanceof DOMException&&e.name===`AbortError`||a(m,e,!0);return}finally{a(p,!1)}},b=u?Te(y,u):d?Ee(y,d):y,ee=Array.isArray(n)?n:[n],x;return o((e,t)=>{c&&x||(x=e,b(Array.isArray(n)?e:e[0],Array.isArray(n)?t:t?.[0]))},{lazy:s}),{get current(){return g(f)},get loading(){return g(p)},get error(){return g(m)},mutate:e=>{a(f,e,!0)},refetch:e=>{let t=ee.map(e=>e());return b(Array.isArray(n)?t:t[0],Array.isArray(n)?t:t[0],e??!0)}}}function De(e,t,n){return N(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];j(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function Oe(e,t,n){return N(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];j.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}De.pre=Oe,new O(`richColorsContext`);var ke=new O(`<Toaster/>`),Ae=0;function P(e){return typeof e?.id==`number`||typeof e?.id==`string`&&e.id.length>0?e.id:Ae++}var je=class{#e=t(e([]));get toasts(){return g(this.#e)}set toasts(e){a(this.#e,e,!0)}#t=t(e([]));get heights(){return g(this.#t)}set heights(e){a(this.#t,e,!0)}#n=new Map;#r=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};#i=e=>this.heights.findIndex(t=>t.toastId===e);addToast=e=>{ge&&this.toasts.unshift(e)};updateToast=({id:e,data:t,type:n,message:r})=>{let i=this.toasts.findIndex(t=>t.id===e),a=this.toasts[i];this.toasts[i]={...a,...t,id:e,title:r,type:n,dismiss:!1,delete:!1,updated:!0}};markDismissed=e=>{let t=this.#r(e);if(t===null)return;let n=this.toasts[t];n&&(!n.dismiss||!n.delete)&&(this.toasts[t]={...n,dismiss:!0,delete:!0})};scheduleRemoval=(e,t)=>{this.cancelRemoval(e),this.#n.set(e,setTimeout(()=>{this.#n.delete(e),this.remove(e)},t))};cancelRemoval=e=>{let t=this.#n.get(e);t!==void 0&&(clearTimeout(t),this.#n.delete(e))};create=e=>{let{message:t,...n}=e,r=P(e),i=e.dismissible===void 0?e.dismissable===void 0?!0:e.dismissable:e.dismissible,a=e.type===void 0?`default`:e.type;return h(()=>{this.cancelRemoval(r);let o=this.toasts.find(e=>e.id===r);o?.dismiss||o?.delete?(this.remove(r),this.addToast({...n,id:r,title:t,dismissible:i,type:a,updated:!0})):o?this.updateToast({id:r,data:e,type:a,message:t,dismissible:i}):this.addToast({...n,id:r,title:t,dismissible:i,type:a})}),r};dismiss=e=>(h(()=>{if(e===void 0){this.toasts=this.toasts.map(e=>e.dismiss?e:{...e,dismiss:!0});return}let t=this.toasts.findIndex(t=>t.id===e);this.toasts[t]&&(this.toasts[t]={...this.toasts[t],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}let t=this.#r(e);if(t!==null)return this.toasts.splice(t,1),e};message=(e,t)=>this.create({...t,type:`default`,message:e});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:typeof t.loading==`string`?t.loading:t.loading()}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(e=>{if(typeof e==`object`&&e&&`ok`in e&&typeof e.ok==`boolean`&&!e.ok){i=!1;let t=Me(e);this.create({id:n,type:`error`,message:t})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?t.success(e):t.success;this.create({id:n,type:`success`,message:r})}}).catch(e=>{if(t.error!==void 0){i=!1;let r=typeof t.error==`function`?t.error(e):t.error;this.create({id:n,type:`error`,message:r})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),n};custom=(e,t)=>{let n=P(t);return this.create({component:e,...t,id:n}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{h(()=>{let t=this.#i(e.toastId);if(t!==-1){this.heights[t]=e;return}let n=new Map(this.toasts.map((e,t)=>[e.id,t])),r=n.get(e.toastId)??-1,i=this.heights.findIndex(e=>(n.get(e.toastId)??1/0)>r);i===-1?this.heights.push(e):this.heights.splice(i,0,e)})};reset=()=>{this.toasts=[],this.heights=[],this.#n.forEach(e=>clearTimeout(e)),this.#n.clear()}};function Me(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var F=new je;function Ne(e,t){return F.message(e,t)}var Pe=class{#e=m(()=>F.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}},I=Object.assign(Ne,{success:F.success,info:F.info,warning:F.warning,error:F.error,custom:F.custom,message:F.message,promise:F.promise,dismiss:F.dismiss,loading:F.loading,getActiveToasts:()=>F.toasts.filter(e=>!e.dismiss)}),Fe=e=>{let t=new Set;Object.getOwnPropertyNames(e).forEach(e=>t.add(e));let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)},Ie=(e,t)=>{let n={};return t.forEach(t=>{n[t]=e[t]}),n},Le=console.warn,Re=()=>{},L=(e,t)=>h(()=>{console.warn=Re;let n=r(t?Ie(e,t):e);return console.warn=Le,n}),ze=e=>e&&typeof e.then==`function`,Be=class{config;self;devtools;stateKeys;constructor(e,t){this.config=e,this.self=t,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&(this.stateKeys=Fe(this.config.state),this.devtools=window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:this.config.name??`updatelogic`}),this.devtools.init(this.createStateSnapshot()),this.devtools.subscribe(e=>{e.type===`DISPATCH`&&e.state}))}createStateSnapshot(){return L(this.config.state,this.stateKeys)}sendStart(e,t){this.devtools.send({type:`→ ${e}`,args:t},this.createStateSnapshot())}sendError(e,t,n){this.devtools.send({type:`❌ ${e}`,args:t,error:n},this.createStateSnapshot())}sendSuccess(e,t,n){this.devtools.send({type:`✓ ${e}`,args:t,return:n},this.createStateSnapshot())}isIncluded(e){return this.config.excludeInDevTools?!this.config.excludeInDevTools.includes(e):!0}createProxyFunction(e,t){let n=this.devtools&&this.isIncluded(e);return typeof t==`function`?(...r)=>{if(!n)return h(()=>t.call(this.self,...r));let i=L(r);this.sendStart(e,i);try{let n=h(()=>t.call(this.self,...r));return ze(n)?n.then(t=>(this.sendSuccess(e,i,t),t),t=>{throw this.sendError(e,i,t),t}):(this.sendSuccess(e,i,n),n)}catch(t){throw this.sendError(e,i,t),t}}:t}},Ve=(e,t)=>{let n={},r=new Be(e,n);return Object.keys(t).forEach(e=>{if(e===`state`||e===`name`)return;let i=t[e];n[e]=r.createProxyFunction(e,i)}),n};async function He(){if(typeof navigator>`u`||!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return!1;try{return(await navigator.mediaDevices.enumerateDevices()).some(e=>e.kind===`audioinput`)}catch(e){return console.error(`Error checking for microphone:`,e),!1}}function R(){return typeof window>`u`||!window.MediaRecorder?null:MediaRecorder.isTypeSupported(`audio/mp4`)?`audio/mp4`:MediaRecorder.isTypeSupported(`audio/webm`)?`audio/webm`:MediaRecorder.isTypeSupported(`audio/wav`)?`audio/wav`:null}function z(){return typeof window>`u`?!1:!!(window.MediaRecorder&&R())}function Ue(){if(typeof window>`u`)return!1;if(`ontouchstart`in window||navigator.maxTouchPoints>0)return!0;let e=navigator.msMaxTouchPoints;return!!(`msMaxTouchPoints`in navigator&&e&&e>0)}function We(){return typeof window>`u`?!1:!!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||Ue())}var B=class{mediaRecorder=null;audioChunks=[];started=!1;starting=!1;stream=null;options;audioContext=null;analyser=null;dataArray=null;volumeUpdateInterval=null;constructor(e={}){this.options=e}async start(){if(this.started||this.starting){console.warn(`AudioRecorder: Start already in progress or already started`);return}if(!z()||!navigator.mediaDevices){let e=Error(`MediaRecorder not supported or no microphone access`);throw this.options.onError?.(e),e}try{if(this.starting=!0,this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1}),!this.starting){this.stopStream(this.stream);return}this.mediaRecorder&&this.mediaRecorder.state!==`inactive`&&(console.warn(`AudioRecorder: MediaRecorder already active, stopping previous recording`),this.mediaRecorder.stop(),this.cleanup()),this.started=!0,this.starting=!1;let e=R();if(!e)throw Error(`No supported media type found`);let t={mimeType:e};this.mediaRecorder=new MediaRecorder(this.stream,t),this.audioChunks=[],this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.audioChunks.push(e.data)},this.mediaRecorder.onstop=async()=>{let t=this.audioChunks.length>0?new Blob(this.audioChunks,{type:e}):null;await this.options.onDataAvailable?.(t),this.options.onStop?.(),this.cleanup()},this.mediaRecorder.onerror=e=>{let t=Error(`MediaRecorder error: ${e}`);this.options.onError?.(t),this.cleanup()},this.mediaRecorder.start(),this.setupVolumeAnalysis(this.stream),this.options.onStart?.()}catch(e){this.started=!1,this.starting=!1;let t=e instanceof Error?e:Error(String(e));throw this.options.onError?.(t),t}}stop(){this.started=!1,this.starting=!1,this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.mediaRecorder&&this.mediaRecorder.state!==`inactive`?this.mediaRecorder.stop():(this.stream&&this.stopStream(this.stream),this.cleanup())}setupVolumeAnalysis(e){if(this.options.onVolumeChange)try{this.audioContext=new AudioContext,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256,this.analyser.smoothingTimeConstant=.8;let t=this.analyser.frequencyBinCount;this.dataArray=new Uint8Array(t),this.audioContext.createMediaStreamSource(e).connect(this.analyser),this.startVolumeMonitoring()}catch(e){console.warn(`Failed to set up volume analysis:`,e)}}startVolumeMonitoring(){!this.analyser||!this.dataArray||!this.options.onVolumeChange||(this.volumeUpdateInterval=window.setInterval(()=>{if(!this.analyser||!this.dataArray||!this.started)return;this.analyser.getByteFrequencyData(this.dataArray);let e=0;for(let t=0;t<this.dataArray.length;t++)e+=this.dataArray[t]*this.dataArray[t];let t=Math.sqrt(e/this.dataArray.length)/255;t=(t*3)**.7;let n=Math.min(100,Math.max(0,Math.round(t*100)));this.options.onVolumeChange?.(n)},100))}get recording(){return this.started&&this.mediaRecorder?.state===`recording`}get isStarting(){return this.starting}stopStream(e){e.getTracks().forEach(e=>e.stop())}cleanup(){this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.audioContext&&=(this.audioContext.close().catch(console.warn),null),this.analyser=null,this.dataArray=null,this.stream&&=(this.stopStream(this.stream),null),this.mediaRecorder=null,this.audioChunks=[],this.started=!1,this.starting=!1}static isSupported(){return z()}static getSupportedMediaType(){return R()}},Ge=ie(),Ke=(e,t)=>{if(e instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement){t.textContent=e.value;return}if(e instanceof HTMLSelectElement&&t instanceof HTMLSelectElement){Array.from(e.options).forEach((e,n)=>{t.options[n]&&(t.options[n].selected=e.selected)});return}e instanceof HTMLInputElement&&t instanceof HTMLInputElement&&(t.setAttribute(`value`,e.value),(e.type===`checkbox`||e.type===`radio`)&&(e.checked?t.setAttribute(`checked`,`checked`):t.removeAttribute(`checked`)))},qe=e=>{let t=e.cloneNode(!0);if(!(t instanceof Element))return``;let n=`input, textarea, select`,r=e.querySelectorAll(n),i=t.querySelectorAll(n);return r.forEach((e,t)=>{let n=i[t];n&&Ke(e,n)}),Ge.sanitize(t.outerHTML,{FORBID_TAGS:[`style`,`script`],FORBID_ATTR:[`style`,`class`]})},Je=e=>{if(!e?.length)return[];let t=e.join(`,`),n=document.querySelectorAll(t);return Array.from(n,qe)},Ye=`liipgpt:context`,Xe=()=>localStorage.getItem(Ye),V=`liipgpt:selectorValues`,H=`liipgpt:selectorKnownDefaults`,U=()=>{try{let e=S.getItem(V),t=S.getItem(H);return e?{values:JSON.parse(e),knownDefaults:t?JSON.parse(t):{}}:null}catch{return null}},Ze=e=>{let t={};for(let n of e)t[n.settingName]=n.defaultValues??(n.allowEmpty?[]:[n.values[0]]).filter(Boolean);return t},W=(e,t)=>{try{let n=Ze(t);S.setItem(V,JSON.stringify(e)),S.setItem(H,JSON.stringify(n))}catch(e){console.error(`Failed to save selector values:`,e)}},Qe=e=>{try{let t=U();if(!t)return;delete t.values[e],delete t.knownDefaults[e],S.setItem(V,JSON.stringify(t.values)),S.setItem(H,JSON.stringify(t.knownDefaults))}catch(e){console.error(`Failed to clear selector saved state:`,e)}},$e=e=>{let t=U(),n=e.map(e=>{let n=e.defaultValues??(e.allowEmpty?[]:[e.values[0]]).filter(Boolean);if(!t?.values[e.settingName])return[e.settingName,n];let r=t.values[e.settingName],i=t.knownDefaults[e.settingName]||[],a=r.filter(t=>e.values.includes(t)),o=i.filter(e=>!n.includes(e)),s=a.filter(e=>!o.includes(e)),c=n.filter(e=>!i.includes(e)&&!s.includes(e)),l=[...s,...c];return l.length===0&&!e.allowEmpty?[e.settingName,n]:[e.settingName,l]});return Object.fromEntries(n)},G=class extends Error{constructor(e){super(e),this.name=`UnreachableError`}},et=s(y(),1),tt=s(me(),1),K=(e,t)=>{if(!e)return;let n=t.find(t=>t.id===e);return n||console.warn(`autofire-predefined-question-id="${e}" did not match any loaded predefined question. Falling back to default routing.`),n},q=(e,t,n,r,i)=>{if(e&&!t)return{name:`consent-page`};let a=new URLSearchParams(window.location.search),o=a.get(`q`),s=a.get(`id`)??void 0,c=a.get(`sid`)??void 0;return o?{name:`chat-page`,query:o,predefinedQuestionId:s,switchQuestionId:c}:i?{name:`chat-page`,query:i}:r?{name:`chat-page`,query:r.question,predefinedQuestionId:r.id}:n?{name:`chat-page`}:{name:`start-page`}},J=`follow-up-q`,nt=e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e),rt=()=>{let e=new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`cID`)??void 0;return{cID:e&&nt(e)?e:void 0,followUpQuestion:new URLSearchParams(window.location.search).get(J)?.trim()||void 0}},it=()=>{let e=new URLSearchParams(window.location.search);if(!e.has(J))return;e.delete(J);let t=e.toString();history.replaceState(null,``,`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`)},Y=e=>{if(e)try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t;console.warn(`additional-start-parameters must be a JSON object. Received: ${e}`);return}catch(t){console.warn(`Failed to parse additional-start-parameters as JSON: ${e}`,t);return}},at=e=>{let t=Y(e);return t?(e=>Array.isArray(e)?e.map(String):typeof e==`string`?e.split(`,`).map(e=>e.trim()).filter(Boolean):[])(t.scopeAvailableSlugs).length===1:!1},X=e=>e?e.map(e=>({id:E(),...e})):[],Z,Q,ot,$=new Set,st=async e=>{if($.has(e))return;let t=(await w([e]))[e];if(t){let n=T.data.chatConfig.translations[e]??{};T.data.chatConfig.translations[e]=(0,et.default)(t,n)}$.add(e)},ct=Ve({name:`chat-logic`,state:T,excludeInDevTools:[`onInput`]},{async init(e){Q=e;let t=Q.speechRecognitionApiKey||void 0;Z=new oe({apiUrl:Q.apiUrl,apiKey:Q.apiKey,speechRecognitionApiKey:t,strict:!0,startParameters:Y(Q.additionalStartParameters)});try{let e=await Z.getChatConfig();window.CHAT_CONFIG_OVERRIDE&&Object.assign(e,window.CHAT_CONFIG_OVERRIDE);let t=(await Z.getMetadata()).mode===`maintenance`;t&&this.showErrorToast(`maintenance`);let n=ee(Q.lang,x(e.supportedLanguages));$.add(n);let r=ue(e,await w([n]));Q.inlineLayout!==void 0&&(r.inlineLayout=Q.inlineLayout),Q.forceChatPage!==void 0&&(r.forceChatPage=Q.forceChatPage);let i=n;b(i,T.targets.mainElement);let a=await this.getPredefinedQuestions(i),o=r.translations[i]?.ariaOpensInNewTab;o&&Z.setNewTabSrText(o);let s=[];if(r.renderKatex){let e=await v(()=>import(`https://esm.sh/marked-katex-extension@5.1.5`),[],import.meta.url).catch(e=>{console.error(`Couldn't load marked-katex-extension:`,e)});e&&(Z.setMarkedExtensions(e.default({nonStandard:!0,output:`mathml`})),s.push(`https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css`))}let c=Object.keys(r.fullTheme),l=!1;if(r.forceConsent)try{l=S.getItem(`liipgpt:termsAccepted`)===`true`}catch(e){console.warn(`Failed to load terms acceptance from storage:`,e)}let u=K(Q.autofirePredefinedQuestionId,a);T.data={currentConversationState:`idle`,chatConfig:r,language:i,predefinedQuestions:a,isInMaintenance:t,history:X(r.messageAdditions.init),selectedColorScheme:ce(),has2ColorSchemes:c.length===2,currentColorScheme:de(c),conversationFeedbackId:void 0,conversationFeedbackIsOpen:!1,answerFormMessageId:void 0,openedPopup:void 0,props:Q,flyoutIsOpen:!1,questionHasPii:void 0,chatInputValue:``,selectorValues:$e(r.selectorsConfig),selectorsIsOpen:!1,predefinedQuestionId:void 0,switchQuestionId:void 0,currentReferencesAsideId:void 0,ariaLiveStatusMessage:void 0,ariaLiveStatusMessageClearingTimeout:void 0,wasReferencesAsideClosed:!1,isAsideMobile:!0,route:q(r.forceConsent??!1,l,r.forceChatPage??!1,u,Q.question),additionalStylesheets:s,hasOpenedOverlays:!1,isInlineLayoutContained:!1,termsAccepted:l,selectedTopic:void 0},window.LIIPGPT_LISTENERS?.route?.(T.data.route),window.LIIPGPT_LISTENERS?.conversation?.(T.data.currentConversationState),T.data.selectorsIsOpen=T.data.chatConfig.showExpandedSelectors??!1,T.initialized=!0,this.checkForOpenedPopup(),window.addEventListener(`hashchange`,()=>{this.checkForOpenedPopup()}),await this.startFromHandoverOrRoute(()=>this.goto(q(r.forceConsent??!1,l,r.forceChatPage??!1,u,Q.question),!0))}catch(e){throw I.error(e instanceof Error?e.message:`Failed to load the chatbot. Please reload the page.`,{duration:1e4,unstyled:!0,classes:{toast:`toast`}}),e}},setTarget(e,t){T.targets[e]=t},goto(e,t=!1){if(!(!t&&(0,tt.default)(T.data.route,e)))switch(T.data.route=e,window.LIIPGPT_LISTENERS?.route?.(e),e.name){case`consent-page`:break;case`start-page`:e.prefill&&(T.data.chatInputValue=e.prefill);break;case`chat-page`:if(T.data.chatInputValue=e.query??``,T.data.predefinedQuestionId=e.predefinedQuestionId,T.data.switchQuestionId=e.switchQuestionId,e.query&&(this.onSubmit(),T.data.chatConfig.addQueryToUrlParams)){let t=new URLSearchParams(window.location.search);t.set(`q`,e.query),e.predefinedQuestionId?t.set(`id`,e.predefinedQuestionId):t.delete(`id`),e.switchQuestionId?t.set(`sid`,e.switchQuestionId):t.delete(`sid`),history.pushState(null,``,`?${t.toString()}${window.location.hash}`)}break}},getSelectorConfig(e){let t=T.data.chatConfig.selectorsConfig.find(t=>t.settingName===e);if(!t)throw Error(`Setting ${e} not found`);return t},getPrettifiedSelectorValues(){let e=Object.entries(T.data.selectorValues).map(([e,t])=>{let n;try{n=this.getSelectorConfig(e)}catch(t){console.error(`Error getting selector config for ${e}: ${t}`);return}return n.type===`single-select`?[e,t[0]]:[e,t]}).filter(e=>!!e);return Object.fromEntries(e)},setSelectorValue(e,t){let n=this.getSelectorConfig(e);if(!n){console.warn(`Trying to set setting ${e} but it is not defined in the chat config`);return}if(n.type===`single-select`&&t.length>1){console.warn(`Trying to set multiple values for single-select setting ${e}`);return}T.data.selectorValues[e]=t,W(T.data.selectorValues,T.data.chatConfig.selectorsConfig)},resetSelectorToDefaults(e){let t=this.getSelectorConfig(e);if(!t){console.warn(`Trying to reset setting ${e} but it is not defined in the chat config`);return}let n=t.defaultValues??(t.allowEmpty?[]:[t.values[0]]).filter(Boolean);return Qe(e),T.data.selectorValues[e]=n,W(T.data.selectorValues,T.data.chatConfig.selectorsConfig),n},async getPredefinedQuestions(e){if(Q?.hidePredefinedQuestions)return[];try{return Z.getPredefinedQuestions({url:window.location.origin+window.location.pathname,language:e})}catch(e){return console.warn(`Failed to load predefined questions:`,e),[]}},setColorScheme(e){T.data.selectedColorScheme=e,T.data.currentColorScheme=le(e),this.setAriaLiveStatusMessage(e===`dark`?T.t.ariaDarkSelected:T.t.ariaLightSelected)},async abort(){await ot?.abort()},changeConversationState(e){T.data.currentConversationState=e,window.LIIPGPT_LISTENERS?.conversation?.(e)},onInput(e){T.data.chatConfig.blockPII&&(T.data.questionHasPii=C(e)),T.data.chatInputValue=e,T.data.predefinedQuestionId=void 0,T.data.switchQuestionId=void 0},onSubmit(e=!1,t,n=!1){let r=Je(T.data.chatConfig.parentPageContext?.extractSelectors);if(T.data.questionHasPii){console.warn(`Question contains PII, not submitting:`,T.data.questionHasPii);return}let i=T.data.chatConfig.questionPrefix?`${T.data.chatConfig.questionPrefix} ${T.data.chatInputValue}`:T.data.chatInputValue;n||(T.data.history.push(...X(T.data.chatConfig.messageAdditions.user.before)),T.data.history.push({type:`user`,time:new Date().toISOString(),message:T.data.chatInputValue}),T.data.history.push(...X(T.data.chatConfig.messageAdditions.user.after)));let a=T.data.history.push(...X(T.data.chatConfig.messageAdditions.bot.before));T.data.history.push({id:`UNRESOLVED`,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]}});let o=!1,s=!1,c={features:Q.features?Q.features.trim().split(`,`):[`formatting`],mode:Q.mode||void 0,cache:Q.cache||void 0,onError:(e,t)=>{this.showErrorToast(e,t),window.LIIPGPT_LISTENERS?.error?.(e,t),(e===`pii-detected`||e===`blocked`)&&this.editLatestQuestion()},onMessage:e=>{e.type===`topic-selected`&&(T.data.selectedTopic={label:e.label,placeholder:e.placeholder,locked:at(Q.additionalStartParameters)}),e.type===`state`&&e.state!==`history-entry-initialized`&&!s&&(s=!0,this.setAriaLiveStatusMessage(T.t.ariaQuestionSent))},lang:T.data.language,selectorValues:{...this.getPrettifiedSelectorValues(),context:Xe(),...t},predefinedQuestionId:T.data.predefinedQuestionId,switchQuestionId:T.data.switchQuestionId,onEmbed:e=>{let t=T.data.history[a];t&&t.type===`bot`&&!t.message.markdown?(T.data.history[a]={...e,id:t.id??E()},o=!0):T.data.history.push({...e,id:E()})}};T.data.predefinedQuestionId=void 0,T.data.switchQuestionId=void 0,r.length&&(c.selectorValues.parentPageContextHtml=r),c.referrer=ne(T.data.chatConfig.sendReferrer,{embedded:!!T.data.props.flyout}),T.data.props.source?c.source=T.data.props.source:T.data.props.flyout&&(c.source=`flyout`),T.data.currentConversationId||(T.data.currentConversationId=Z.createConversationId());let l=Z.chat(T.data.currentConversationId,i,c);ot=l,T.data.lastChatResponseId=l.id,T.data.currentConversationState!==`searching`&&this.changeConversationState(`searching`);let u=!1,d,f=!!T.data.currentReferencesAsideId;(e&&f||!e&&T.data.chatConfig.showReferencesByDefault)&&(T.data.isAsideMobile||this.openReferencesAside(l.id)),l.subscribe(e=>{if(!o&&T.data.history[a]&&(T.data.history[a]={question:T.data.chatInputValue,...e}),T.data.chatConfig.addRetrievalQuestionToUrlParams&&e.retrievalQuestion){let t=new URLSearchParams(window.location.search);t.get(`search`)!==e.retrievalQuestion&&(t.set(`search`,e.retrievalQuestion),history.replaceState(null,``,`?${t.toString()}${window.location.hash}`))}T.data.chatConfig.showReferencesByDefault&&!T.data.wasReferencesAsideClosed&&T.data.currentReferencesAsideId!==e.id&&!T.data.isAsideMobile&&this.openReferencesAside(e.id),e.state===`streaming`&&T.data.currentConversationState!==`answering`&&this.changeConversationState(`answering`),e.state===`done`&&(this.changeConversationState(`idle`),u||(u=!0,this.setAriaLiveStatusMessage(`${T.t.ariaAnswerReady} ... ${e.message.text} ... ${T.data.selectedTopic?T.t.ariaAnswerFinishedWithSelectedTopic:T.t.ariaAnswerFinished}`),T.data.history.push(...X(T.data.chatConfig.messageAdditions.bot.after))),T.data.currentReferencesAsideId&&e.references.used.length>0?(clearTimeout(d),d=setTimeout(()=>{this.openReferencesAside(e.id)},100)):this.closeReferencesAside())}),T.data.chatInputValue=``},async onStartSpeechRecognition(){try{if(!await He()){this.showErrorToast(`speech-not-supported`);return}if(await navigator.mediaDevices.getUserMedia({audio:!0}),B.isSupported())T.data.chatInputValue=``,T.currentAudioRecorder=new B({onDataAvailable:async e=>{T.isTranscribing=!0,await this.handleTranscription(e)},onError:()=>{this.showErrorToast(`speech-microphone-access-denied`),T.currentAudioRecorder=null,T.isTranscribing=!1},onVolumeChange:e=>{T.currentAudioVolume=e}}),T.currentAudioRecorder.start();else{this.showErrorToast(`speech-not-supported`);return}}catch(e){throw this.showErrorToast(`speech-microphone-access-denied`),T.currentAudioRecorder=null,T.isTranscribing=!1,e}},editLatestQuestion(){let e=T.data.history.findLastIndex(e=>e?.type===`user`);if(e===-1){console.error(`No last user question, available`);return}let t=T.data.history.splice(e)[0];T.data.chatInputValue=t.message},onStopSpeechRecognition(){if(T.currentAudioRecorder){let e=T.currentAudioRecorder;T.currentAudioRecorder=null,e.stop()}T.currentAudioVolume=0},async handleTranscription(e){if(!e){console.warn(`No audio data received`);return}try{let t=await Z.transcribeAudio(e,{lang:T.data.language});if(t.error){this.showErrorToast(`speech-transcription-failed`);return}if(t.transcript.trim()){if(T.data.chatConfig.blockPII&&(T.data.questionHasPii=C(t.transcript.trim()),T.data.questionHasPii))return;T.data.chatInputValue=t.transcript.trim()}else this.showErrorToast(`speech-no-text-detected`)}catch(e){console.error(`Speech transcription error:`,e),this.showErrorToast(`speech-transcription-failed`)}finally{T.currentAudioRecorder=null,T.isTranscribing=!1,T.currentAudioVolume=0}},async startFromHandoverOrRoute(e){let{cID:t,followUpQuestion:n}=rt();if(!t){e();return}let r=await this.rehydrateFromSearchSummaryHandover(t);n?(T.data.route={name:`chat-page`},T.data.chatInputValue=n,this.onSubmit(!0)):r||e(),it()},async rehydrateFromSearchSummaryHandover(e){T.data.currentConversationId=e;let t=await Z.getMetadata(),n=t.mode===`ready`?t.userId:void 0,r=n?await Z.getChatHistory(e,n):[];if(r.length===0)return T.data.currentConversationId=void 0,!1;let i={all:[],used:[],unused:[]},a=new ae({newTabSrText:T.t.ariaOpensInNewTab}),o=[];for(let{question:e,answer:t}of r)o.push({type:`user`,time:new Date().toISOString(),message:e,id:E()}),o.push({id:E(),state:`done`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:t,html:a.toHTML(t,i),text:t},references:{all:[],used:[],unused:[]}});return T.data.history=[...X(T.data.chatConfig.messageAdditions.init),...o],T.data.route={name:`chat-page`},!0},async onStartConversation(e,t,n){await this.abort(),T.data.history=X(T.data.chatConfig.messageAdditions.init),T.data.currentConversationId=Z.createConversationId(),this.goto({name:`chat-page`,query:e,predefinedQuestionId:t,switchQuestionId:n})},async onNewConversation(){await this.abort();let e=T.data.currentConversationId;if(T.data.currentConversationId=void 0,T.data.currentReferencesAsideId=void 0,T.data.history=X(T.data.chatConfig.messageAdditions.init),T.data.predefinedQuestionId=void 0,T.data.switchQuestionId=void 0,T.data.selectedTopic=void 0,T.data.chatConfig.addQueryToUrlParams){let e=new URLSearchParams(window.location.search);e.delete(`q`),e.delete(`id`),e.delete(`sid`),history.pushState(null,``,`?${e.toString()}${window.location.hash}`)}this.goto({name:`start-page`}),e&&Z.userAction(`newDiscussion`,{conversationId:e,lang:T.data.language}).catch(e=>{console.error(`Failed to notify backend of new discussion:`,e)})},async onChangeTopic(){let e=T.data.chatConfig.selectedTopicResetPredefinedQuestionId;if(!e){console.warn("No selectedTopicResetPredefinedQuestionId available to reset the selected topic. Set it in the `Config DB` in the backend, in a `generalConfig` default set.");return}await this.abort(),T.data.selectedTopic=void 0,T.data.predefinedQuestionId=e,T.data.switchQuestionId=void 0,T.data.chatInputValue=``,this.onSubmit(!0,void 0,!0)},showSuccessToast(e){I.success(T.t[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},showErrorToast(e,t){let n=t?.trim()?t:T.errorTranslations[e];I.error(n,{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},async submitFeedback(e){try{let t=T.data.conversationFeedbackId||T.data.lastChatResponseId;if(!t)throw new G(`Tried to give feedback with no id.`);let n=T.data.history.find(e=>e.type===`bot`&&e.id===t);await Z.feedback(t,n?.question??``,e),setTimeout(()=>{this.showSuccessToast(`thankYouForFeedback`)},500)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},toggleReferencesAside(e){T.data.currentReferencesAsideId===e?this.closeReferencesAside():this.openReferencesAside(e)},openReferencesAside(e){T.data.chatConfig.referencesLayout!==`inline`&&(T.data.currentReferencesAsideId=e,this.setOpenOverlay(!0))},closeReferencesAside(){T.data.currentReferencesAsideId=void 0,T.data.wasReferencesAsideClosed=!0,this.setOpenOverlay(!1)},setAsideMobile(e){T.data.isAsideMobile=e},openFlyout(){T.data.flyoutIsOpen=!0},closeFlyout(){T.data.flyoutIsOpen=!1},openConversationFeedback(){T.data.conversationFeedbackIsOpen=!0,this.setOpenOverlay(!0)},openMessageFeedback(e){T.data.conversationFeedbackId=e},closeFeedback(){T.data.conversationFeedbackIsOpen=!1,T.data.conversationFeedbackId=void 0,this.setOpenOverlay(!1)},openAnswerForm(e){T.data.answerFormMessageId=e,this.setOpenOverlay(!0)},closeAnswerForm(){T.data.answerFormMessageId=void 0,this.setOpenOverlay(!1)},async submitAnswerForm(e){try{let t=T.data.chatConfig.answerForm,n=T.data.answerFormMessageId;if(!t)throw new G(`Tried to submit the answer form with no answerForm config.`);if(!n)throw new G(`Tried to submit the answer form with no message id.`);let r=T.data.history.findIndex(e=>e.type===`bot`&&e.id===n),i=r===-1?void 0:T.data.history[r],a=T.data.history.slice(0,r===-1?void 0:r).findLast(e=>e.type===`user`)?.message,o=i?.question||a||(i?.type===`bot`?i.retrievalQuestion??``:``);await Z.submitAnswerForm({receiverEmail:t.receiverEmail,fields:t.fields.map(t=>({name:t.name,value:e[t.name]??``})),question:o,answer:i?.type===`bot`?i.message.text:``,requestId:n,lang:T.data.language}),setTimeout(()=>{this.showSuccessToast(`answerFormThankYou`)},500)}catch(e){console.error(`Answer form submission failed:`,e),this.showErrorToast(`answer-form-failed`)}},setOpenOverlay(e){T.data.hasOpenedOverlays=e},setAriaLiveStatusMessage(e){T.data.ariaLiveStatusMessage=e,clearTimeout(T.data.ariaLiveStatusMessageClearingTimeout),T.data.ariaLiveStatusMessageClearingTimeout=setTimeout(()=>{T.data.ariaLiveStatusMessage=``},T.ariaLiveMessagesClearingTimeoutDuration)},closePopup(){window.location.hash=``},checkForOpenedPopup(){let e=window.location.hash.slice(1),t=T.t.popups?.find(t=>t.hash===e);t?T.data.openedPopup=t:T.data.openedPopup=void 0},async thumbs(e,t){try{let n=T.data.history.find(t=>t.type===`bot`&&t.id===e),r=n?.type===`bot`?n:void 0;if(r?.feedback===t)return;t===`up`?await Z.thumbsUp(e,n?.question??``):await Z.thumbsDown(e,n?.question??``);let i=!r?.feedback;r&&(r.feedback=t),i&&this.showSuccessToast(`thankYouForFeedback`)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},async onLanguageChange(e){let t=te(e,T.data.chatConfig.supportedLanguages);if(await st(t),T.data.language=t,b(T.data.language,T.targets.mainElement),T.data.predefinedQuestions=await this.getPredefinedQuestions(T.data.language),this.setAriaLiveStatusMessage(T.t.ariaLanguageChanged),T.data.chatConfig.reflectLanguageInPath){let e=new URL(window.location.href);e.pathname=`/${T.data.language}`,window.history.replaceState({},``,e.toString())}},async acceptTerms(){T.data.termsAccepted=!0;try{S.setItem(`liipgpt:termsAccepted`,`true`)}catch(e){console.warn(`Failed to save terms acceptance to storage:`,e)}this.closePopup(),await c(),this.goto(q(T.data.chatConfig.forceConsent??!1,!0,T.data.chatConfig.forceChatPage??!1,K(T.data.props.autofirePredefinedQuestionId,T.data.predefinedQuestions),T.data.props.question))},updateChatInput(e){T.data.chatInputValue=e}});export{F as a,Ce as c,he as d,E as f,Pe as i,j as l,B as n,ke as o,We as r,we as s,ct as t,O as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BoRo9o--.js","./DC2Dub5y.js","./DW2dEcyF.js","./DXq2v1Et.js","./BG3QC97Q.js","./jIxBZpXH.js","./D8-gl1YT.js","./C8mohMXa.js","./Dgo1hEZl.js","./Cac-usFo.js","./BTi0ccO8.js","./Ddu6Runs.js","./CIHI5AgE.js","./BDb7ndb6.js","./CNhGYG1q.js","./B4ROOhtb2.js","./Djmbd3Ed.js","./DPuwLy6I.js","./BLitziHG2.js","./5LTQietD.js","./Bx9o1FGt.js","./mvBHTO00.js","./D1hYfEew.js","./CPmPuHTy.js","./C_FBLGnD2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{A as e,B as t,D as n,Dt as r,E as i,Gt as a,I as o,J as s,L as c,Lt as l,Mt as u,N as d,R as f,Rt as p,St as m,T as h,Tt as g,U as _,V as v,W as y,X as b,Y as x,bt as S,c as ee,ht as C,i as w,j as T,k as E,kt as D,lt as O,mt as k,o as A,ot as j,rt as te,s as ne,u as re,v as M,xt as N,yt as P}from"./DC2Dub5y.js";import{t as F}from"./C8mohMXa.js";import{t as I}from"./BDb7ndb6.js";import{t as ie}from"./mvBHTO00.js";import{o as L}from"./BLitziHG2.js";import{n as R,t as z}from"./ilVrIKNs2.js";import{n as B,t as ae}from"./Cdf5zcPh2.js";var oe=()=>F(()=>import(`./BoRo9o--.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),V=b(`<div class="loader-container svelte-6xtyn8"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>`),H={hash:`svelte-6xtyn8`,code:`.loader-container.svelte-6xtyn8 {display:flex;z-index:var(--z-index-loader);position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}`};function U(t,n){p(n,!0),e(t,H);let r=A(n,`color`,7),i=A(n,`background`,7);var o={get color(){return r()},set color(e){r(e),u()},get background(){return i()},set background(e){i(e),u()}},c=V(),d=S(c);return a(c),k(()=>{h(c,i()?`background: ${i()};`:``),M(d,`fill`,r()??`rgba(127, 127, 127, 0.3)`)}),s(t,c),l(o)}w(U,{color:{},background:{}},[],[],{mode:`open`});var W=()=>F(()=>import(`./B4ROOhtb2.js`),__vite__mapDeps([15,1,7,16,4,3,5,6,2,8,9,10,11,12,13,17,18,19,20,21,22,23,14,24]),import.meta.url),G=b(`<div class="chat-app__container"><div class="chat-app__loader-container"><!></div></div>`);function K(e,t){p(t,!0);let n=e=>{var t=G(),n=S(t);U(S(n),{get background(){return i()},get color(){return c()}}),a(n),a(t),s(e,t)},r=A(t,`onCloseChat`,7),i=A(t,`loaderBackground`,7),c=A(t,`loaderColor`,7);var d={get onCloseChat(){return r()},set onCloseChat(e){r(e),u()},get loaderBackground(){return i()},set loaderBackground(e){i(e),u()},get loaderColor(){return c()},set loaderColor(e){c(e),u()}},f=x(),m=N(f),h=e=>{n(e)},g=e=>{var t=x();y(N(t),()=>F(()=>import(`./B4ROOhtb2.js`),__vite__mapDeps([15,1,7,16,4,3,5,6,2,8,9,10,11,12,13,17,18,19,20,21,22,23,14,24]),import.meta.url),e=>{n(e)},(e,t)=>{var n=D(()=>{var{default:e}=j(t);return{ChatPanel:e}}),i=D(()=>j(n).ChatPanel),a=x();o(N(a),()=>j(i),(e,t)=>{t(e,{get onCloseChat(){return r()}})}),s(e,a)}),s(e,t)};return _(m,e=>{I.initialized?e(g,-1):e(h)}),s(e,f),l(d)}w(K,{onCloseChat:{},loaderBackground:{},loaderColor:{}},[],[],{mode:`open`});function q(e,{delay:t=0,duration:n=200,easing:r=e=>e,baseScale:i=0,transformOrigin:a=`bottom right`,scaleDirection:o=`scale`}={}){if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return{delay:0,duration:0,css:()=>`opacity: 1; transform: ${o}(1); transform-origin: ${a};`};let s=getComputedStyle(e),c=+s.opacity,l=s.transform.match(/scale[XY]?\(([0-9.]+)\)/),u=l?+l[1]:1,d=1-i;return{delay:t,duration:n,css:e=>{let t=r(e),n=t*u*d+i;return`opacity: ${t*c}; transform: ${o}(${n}); transform-origin: ${a};`}}}var J=b(`<div class="flyout__backdrop"></div>`),Y=b(`<div class="flyout__content"><!></div>`),se=b(`<div><!> <div class="flyout__body"><!> <div><!></div></div></div>`),ce=b(`<div class="chat-app__container"><div class="chat-app__loader-container"><!></div></div>`);function X(e,t){p(t,!0);let o=A(t,`children`,7),v=A(t,`loaderColor`,7),y=A(t,`loaderBackground`,7),b=A(t,`flyout`,7),w=A(t,`flyoutClass`,7),T=A(t,`flyoutStyle`,7),O=A(t,`onCloseChat`,7),F=A(t,`onActivate`,7),R=A(t,`onPrefetch`,7),z=A(t,`activating`,7,!1),B=A(t,`onError`,7),oe=ne(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`loaderColor`,`loaderBackground`,`flyout`,`flyoutClass`,`flyoutStyle`,`onCloseChat`,`onActivate`,`onPrefetch`,`activating`,`onError`]),V=D(()=>I.theme?.components?.flyout?.custom??{}),H=D(()=>({enabled:I.data?.chatConfig?.enableBackdrop??!1,delayIn:Number(j(V).backdropDelayIn??0),durationIn:Number(j(V).backdropDurationIn??200),delayOut:Number(j(V).backdropDelayOut??0),durationOut:Number(j(V).backdropDurationOut??200),baseScaleIn:Number(j(V).backdropBaseScaleIn??1),baseScaleOut:Number(j(V).backdropBaseScaleOut??1),transformOrigin:String(j(V).backdropTransformOrigin??`center`),scaleDirection:String(j(V).backdropScaleDirection??`scale`)})),W=D(()=>({in:{delay:j(H).delayIn,duration:j(H).durationIn,baseScale:j(H).baseScaleIn,transformOrigin:j(H).transformOrigin,scaleDirection:j(H).scaleDirection},out:{delay:j(H).delayOut,duration:j(H).durationOut,baseScale:j(H).baseScaleOut,transformOrigin:j(H).transformOrigin,scaleDirection:j(H).scaleDirection}})),G,K=e=>{C(()=>{let t=e=>{G=e};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t),G=void 0}})},X=e=>{C(()=>{let t=()=>R()?.();return e.addEventListener(`pointerenter`,t,{once:!0}),e.addEventListener(`focusin`,t,{once:!0}),()=>{e.removeEventListener(`pointerenter`,t),e.removeEventListener(`focusin`,t)}})},Z=`flyout`,Q=r(void 0),$=D(()=>I.data.flyoutIsOpen),le=r(!1),ue=D(()=>I.initialized),de=D(()=>I.data.hasOpenedOverlays),fe=D(()=>j($)||z());C(()=>{!I.data.flyoutIsOpen&&j(le)&&(j(Q)?.querySelector(`button`))?.focus({preventScroll:!0}),g(le,j($),!0)}),C(()=>{if(j(ue)&&j($)){let e=e=>{e.key===`Escape`&&(j(de)||O()())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}}});var pe={get children(){return o()},set children(e){o(e),u()},get loaderColor(){return v()},set loaderColor(e){v(e),u()},get loaderBackground(){return y()},set loaderBackground(e){y(e),u()},get flyout(){return b()},set flyout(e){b(e),u()},get flyoutClass(){return w()},set flyoutClass(e){w(e),u()},get flyoutStyle(){return T()},set flyoutStyle(e){T(e),u()},get onCloseChat(){return O()},set onCloseChat(e){O(e),u()},get onActivate(){return F()},set onActivate(e){F(e),u()},get onPrefetch(){return R()},set onPrefetch(e){R(e),u()},get activating(){return z()},set activating(e=!1){z(e),u()},get onError(){return B()},set onError(e){B(e),u()}},me=x();te(`click`,P,e=>{e!==G&&b()&&O()()});var he=N(me),ge=e=>{var t=se(),r=S(t),l=e=>{var t=J();d(1,t,()=>q,()=>({...j(W).in,easing:L})),d(2,t,()=>q,()=>({...j(W).out,easing:L})),s(e,t)};_(r,e=>{j(fe)&&j(H).enabled&&e(l)});var u=m(r,2);M(u,`id`,Z);var f=S(u),p=e=>{var t=Y();c(S(t),o),a(t),d(1,t,()=>q,()=>({delay:0,duration:500,easing:L,baseScale:.3})),d(2,t,()=>q,()=>({delay:100,duration:300,easing:L,baseScale:.7})),s(e,t)};_(f,e=>{j(fe)&&e(p)});var v=m(f,2);ae(S(v),ee({get onError(){return B()},onclick:e=>{e.stopPropagation(),F()?.()},flyoutId:Z,get flyoutIsOpen(){return j($)},buttonClass:`flyout__open-button`},()=>oe)),a(v),re(v,e=>g(Q,e),()=>j(Q)),E(v,e=>X?.(e)),a(u),E(u,e=>K?.(e)),a(t),k(()=>{h(t,T()),i(t,1,n([`flyout`,w()]))}),s(e,t)},_e=e=>{var n=x(),r=N(n),i=e=>{var n=ce(),r=S(n);f(S(r),t,`loader`,{},e=>{U(e,{get background(){return y()},get color(){return v()}})}),a(r),a(n),d(2,n,()=>ie,()=>({duration:200,delay:300})),s(e,n)},l=e=>{var t=x();c(N(t),o),s(e,t)};_(r,e=>{I.initialized?e(l,-1):e(i)}),s(e,n)};return _(he,e=>{b()?e(ge):e(_e,-1)}),s(e,me),l(pe)}w(X,{children:{},loaderColor:{},loaderBackground:{},flyout:{},flyoutClass:{},flyoutStyle:{},onCloseChat:{},onActivate:{},onPrefetch:{},activating:{},onError:{}},[`loader`],[],{mode:`open`});var Z=`@layer components{:where(.flyout){z-index:var(--z-index-flyout);pointer-events:none;width:570px;max-width:100cqw;height:960px;max-height:100cqh;padding:10px;display:block;position:fixed;bottom:0;right:0}.flyout__backdrop{background-color:color-mix(in srgb, var(--flyout-backdrop-color,transparent) calc(var(--flyout-backdrop-opacity) * 100%), transparent);position:fixed;inset:0}.flyout__body{pointer-events:none;place-content:end flex-end;place-items:end;width:100%;height:100%;display:block;position:relative}.flyout__body:has(.flyout__content){pointer-events:auto}.flyout__content{width:100%;height:100%;display:block}.flyout__open-button{z-index:var(--z-index-local-overlay);pointer-events:auto;position:absolute;bottom:0;right:0}.flyout__content{filter:drop-shadow(0 0 8px #0003);border-radius:4px;overflow:clip}.flyout--defaults{right:var(--spacer-r-16);bottom:var(--spacer-r-16);width:200px;height:200px;display:block;position:fixed}}`,Q=b(`<link rel="stylesheet"/>`),$=b(`<link rel="stylesheet"/>`),le=b(`<!> <!> <!>`,1),ue=b(`<link rel="stylesheet"/>`),de=b(`<!> <!>`,1),fe=b(`<div><!> <!> <!> <!> <!></div>`);function pe(e,o){p(o,!0);let c=A(o,`host`,7),d=A(o,`onError`,7),f=ne(o,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`]),y=()=>({forceTheme:o.forceTheme,apiUrl:o.apiUrl,apiKey:o.apiKey,speechRecognitionApiKey:o.speechRecognitionApiKey,lang:o.lang,features:o.features,loaderBackground:o.loaderBackground,loaderColor:o.loaderColor,flyout:o.flyout,flyoutStyle:o.flyoutStyle,flyoutClass:o.flyoutClass,chatClass:o.chatClass,inlineLayout:o.inlineLayout,forceChatPage:o.forceChatPage,hidePredefinedQuestions:o.hidePredefinedQuestions,autofirePredefinedQuestionId:o.autofirePredefinedQuestionId,additionalStartParameters:o.additionalStartParameters,question:o.question,mode:o.mode,source:o.source,cache:o.cache}),b,w=()=>(b||(b=oe().then(async e=>(await e.logic.init(y()),e)),b.catch(e=>d()(e))),b);C(()=>{o.flyout||O(()=>w())});let E=r(!1),te=()=>{w(),W()},re=async()=>{g(E,!0);try{(await w()).logic.openFlyout()}catch{}finally{g(E,!1)}},P=()=>{b?.then(e=>e.logic.closeFlyout()).catch(()=>{}),c().dispatchEvent(new CustomEvent(`closechat`))};C(()=>{I.initialized&&I.data?.chatConfig&&c().dispatchEvent(new CustomEvent(`configloaded`,{detail:I.data.chatConfig}))});let F=D(()=>o.flyout),ie=D(()=>I.data?.chatConfig?.inlineLayout&&!o.flyout);C(()=>{j(L)&&j(F)&&(c().setAttribute(`role`,`region`),O(()=>{c().setAttribute(`aria-label`,I.t.ariaFlyoutRegion)}))});let L=D(()=>I.initialized);var ae={get host(){return c()},set host(e){c(e),u()},get onError(){return d()},set onError(e){d(e),u()}},V=fe();T(`3hann0`,e=>{var n=x(),r=N(n),i=e=>{var n=le(),r=N(n);t(r,17,()=>I.themeBase.fontURLs??[],v,(e,t)=>{var n=Q();k(()=>M(n,`href`,j(t))),s(e,n)});var i=m(r,2);t(i,17,()=>I.data.additionalStylesheets,v,(e,t)=>{var n=$();k(()=>M(n,`href`,j(t))),s(e,n)}),R(m(i,2),{id:`font-css`,get css(){return I.themeBase.fontCSS}}),s(e,n)};_(r,e=>{I.initialized&&e(i)}),s(e,n)});let H;var U=S(V),G=e=>{{let t=D(()=>z(I.theme));R(e,{id:`theme-css`,get css(){return j(t)}})}};_(U,e=>{I.initialized&&e(G)});var q=m(U,2);{let e=D(()=>B+Z);R(q,{id:`app-css`,get css(){return j(e)}})}var J=m(q,2);R(J,{id:`panel-css`,get css(){return I.panelCss}});var Y=m(J,2),se=e=>{var n=de(),r=N(n);R(r,{id:`custom-css`,get css(){return I.themeBase.customCSS}}),t(m(r,2),17,()=>I.data.additionalStylesheets,v,(e,t)=>{var n=ue();k(()=>M(n,`href`,j(t))),s(e,n)}),s(e,n)};return _(Y,e=>{I.initialized&&e(se)}),X(m(Y,2),ee({onCloseChat:P,onActivate:re,onPrefetch:te,get activating(){return j(E)},get onError(){return d()}},()=>f,{children:(e,t)=>{K(e,{onCloseChat:P,get loaderBackground(){return o.loaderBackground},get loaderColor(){return o.loaderColor}})},$$slots:{default:!0}})),a(V),k(()=>{i(V,1,n([`chat-app`,o.chatClass])),M(V,`role`,!j(F)&&!j(ie)?`main`:void 0),H=h(V,``,H,{"color-scheme":I.colorScheme||`light`})}),s(e,V),l(ae)}w(pe,{host:{},onError:{}},[],[],{mode:`open`});export{pe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dt as e,Nt as t,Tt as n,ct as r,ot as i,r as a,st as o,t as s}from"./DC2Dub5y.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,`searchParams`,{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder,new TextDecoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var ee=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),ee(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=_(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function te(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var ne=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function re(e){let t=[];return{pattern:e===`/`?/^\/$/:RegExp(`^${ae(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=ne.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_za26ky?.base??`/configurator`,de=globalThis.__sveltekit_za26ky?.assets??x??``,fe=`1789245350577`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...w,"":w.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let n=t(e),r=!0;function i(){r=!0,n.update(e=>e)}function a(e){r=!1,n.set(e)}function o(e){let t;return n.subscribe(n=>{(t===void 0||r&&n!==t)&&e(t=n)})}return{notify:i,set:a,subscribe:o}}var Ce={v:()=>{}};function we(){let{set:e,subscribe:n}=t(!1);async function r(){clearTimeout(void 0);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==fe;return n&&(e(!0),Ce.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:n,check:r}}function O(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ee,`entries`]);var De=new Set([...Ee]);new Set([...De,`actions`,`entries`]);function Oe(e){return e.filter(e=>e!=null)}function ke(e){return e instanceof c||e instanceof u?e.status:500}function Ae(e){return e instanceof u?e.text:`Internal Error`}var k,A,j,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},A={current:null},j={current:!1}):(k=new class{#e=e({});get data(){return i(this.#e)}set data(e){n(this.#e,e)}#t=e(null);get form(){return i(this.#t)}set form(e){n(this.#t,e)}#n=e(null);get error(){return i(this.#n)}set error(e){n(this.#n,e)}#r=e({});get params(){return i(this.#r)}set params(e){n(this.#r,e)}#i=e({id:null});get route(){return i(this.#i)}set route(e){n(this.#i,e)}#a=e({});get state(){return i(this.#a)}set state(e){n(this.#a,e)}#o=e(-1);get status(){return i(this.#o)}set status(e){n(this.#o,e)}#s=e(new URL(Me));get url(){return i(this.#s)}set url(e){n(this.#s,e)}},A=new class{#e=e(null);get current(){return i(this.#e)}set current(e){n(this.#e,e)}},j=new class{#e=e(!1);get current(){return i(this.#e)}set current(e){n(this.#e,e)}},Ce.v=()=>j.current=!0);function Ne(e){Object.assign(k,e)}var Pe={spanContext(){return Fe},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Fe={traceId:``,spanId:``,traceFlags:0},{onMount:Ie,tick:Le}=s,Re=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=le(`sveltekit:scroll`)??{},P=le(`sveltekit:snapshot`)??{},F={url:Se({}),page:Se({}),navigating:t(null),updated:we()};function ze(e){N[e]=T()}function Be(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function Ve(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}function He(){}var Ue,We,L,R,Ge,z,B=[],V=[],H=null;function Ke(){H?.fork?.then(e=>e?.discard()),H=null}var U=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,K=!1,Xe=!0,q=!1,J=!1,Ze=!1,Qe=!1,$e,Y,X,Z,et=new Set,tt=new Map;async function nt(e,t,n){globalThis.__sveltekit_za26ky?.data&&globalThis.__sveltekit_za26ky.data,document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Ue=ce(e),R=document.documentElement,Ge=t,We=e.nodes[0],L=e.nodes[1],We(),L(),Y=history.state?.[S],X=history.state?.[C],Y||(Y=X=Date.now(),history.replaceState({...history.state,[S]:Y,[C]:X},``));let r=N[Y];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await jt(Ge,n)):(await Q({type:`enter`,url:_e(z.hash?Lt(new URL(location.href)):location.href),replace_state:!0}),i()),At()}function rt(){B.length=0,Qe=!1}function it(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function at(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function ot(){ze(Y),ue(me,N),it(X),ue(pe,P)}async function st(e,t,n,i){let a;t.invalidateAll&&Ke(),await Q({type:`goto`,url:_e(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:i,accept:()=>{t.invalidateAll&&(Qe=!0,a=[...tt.keys()]),t.invalidate&&t.invalidate.forEach(kt)}}),t.invalidateAll&&r().then(r).then(()=>{tt.forEach(({resource:e},t)=>{a?.includes(t)&&e.refresh?.()})})}async function ct(e){if(e.id!==H?.id){Ke();let t={};et.add(t),H={id:e.id,token:t,promise:vt({...e,preload:t}).then(e=>(et.delete(t),e.type===`loaded`&&e.state.error&&Ke(),e)),fork:null}}return H.promise}async function lt(e){let t=(await St(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ut(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};G={...e.state,nav:r};let i=document.querySelector(`style[data-sveltekit]`);if(i&&i.remove(),Object.assign(k,e.props.page),$e=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),at(X),n){let e={from:null,to:{...r,scroll:N[Y]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}K=!0}async function dt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Oe(n).map(e=>e.node.component),page:It(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function ft({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Pe,current:Pe},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:h(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},z.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=pt(t,r,n);return s&&e(i.href),a},setHeaders:()=>{},depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function pt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:K?te(r,i.href,t):y(r,t)}}function mt(e,t,n,r,i,a){if(Qe)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function ht(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function gt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function _t({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:It(k),constructors:[]}}}async function vt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return et.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(()=>{})),d.forEach(e=>e?.[1]().catch(()=>{}));let f=G.url?e!==wt(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=gt(G.url,n),h=!1,g=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!mt(h,p,f,m,a.universal?.uses,r)?a:(h=!0,ft({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:ht(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(()=>{});let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(et.has(a))return _t({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=ke(t),u;if((void 0)?.includes(t))s=t.status??s,u=t.error;else if(t instanceof c)u=t.body;else{if(await F.updated.check())return await Ve(),await I(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await yt(e,_,o);return d?dt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Et(n,{id:i.id},u,s)}else _.push(void 0);return dt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function yt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function bt({status:e,error:t,url:n,route:r}){let i={};try{return dt({url:n,params:i,branch:[await ft({loader:We,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:ht(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return st(new URL(e.location,location.href),{},0);throw e}}async function xt(e){let t=e.href;if(U.has(t))return U.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>pt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();U.set(t,r),n=await r}catch{U.delete(t);return}return n}async function St(e,t){if(e&&!O(e,x,z.hash)){let n=await xt(e);if(!n)return;let r=Ct(n);for(let n of Ue){let i=n.exec(r);if(i)return{id:wt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Ct(e){return f(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function wt(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Tt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Ft(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return q||qe.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:t,popped:n,keepfocus:i,noscroll:a,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=He,block:p=He,event:m}){let h=Z;Z=d;let g=await St(t,!1),_=e===`enter`?Ft(G,g,t,e):Tt({url:t,type:e,delta:n?.delta,intent:g,scroll:n?.scroll,event:m});if(!_){p(),Z===d&&(Z=h);return}let ee=Y,v=X;f(),q=!0,K&&_.navigation.type!==`enter`&&F.navigating.set(A.current=_.navigation);let y=g&&await vt(g);if(!y){if(O(t,x,z.hash))return await I(t,s);y=await Et(t,{id:null},await $(new u(404,`Not Found`,`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=g?.url||t,Z!==d)return _.reject(Error(`navigation aborted`)),!1;if(y.type===`redirect`){if(l<20){await Q({type:e,url:new URL(y.location,t),popped:n,keepfocus:i,noscroll:a,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}y=await bt({status:500,error:await $(Error(`Redirect loop`),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else y.props.page.status>=400&&await F.updated.check()&&(await Ve(),await I(t,s));if(rt(),ze(ee),it(v),y.props.page.url.pathname!==t.pathname&&(t.pathname=y.props.page.url.pathname),c=n?n.state:c,!n){let e=s?0:1,n={[S]:Y+=e,[C]:X+=e,[he]:c};(s?history.replaceState:history.pushState).call(history,n,``,t),s||Be(Y,X)}let te=g&&H?.id===g.id?H.fork:null;H=null,y.props.page.state=c;let b;if(K){let e=(await Promise.all(Array.from(Je,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{W.delete(e)})}e.push(t),e.forEach(e=>{W.add(e)})}let n=_.navigation.to;G={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=t);let r=te&&await te;r?b=r.commit():(M=null,$e.$set(y.props),M&&Object.assign(y.props.page,M),Ne(y.props.page),b=o?.()),Ze=!0}else await ut(y,Ge,!1);let{activeElement:ne}=document;await b,await r(),await r();let re=null;if(Xe){let e=n?n.scroll:a?T():null;e?scrollTo(e.x,e.y):(re=t.hash&&document.getElementById(Rt(t)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!i&&!ie&&Pt(t,!re),Xe=!0,y.props.page&&(M&&Object.assign(y.props.page,M),Object.assign(k,y.props.page)),q=!1,e===`popstate`&&at(X),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),W.forEach(e=>e(_.navigation)),F.navigating.set(A.current=null)}async function Et(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await bt({status:r,error:n,url:e,route:t}):await I(e,i)}function Dt(){let e,t={element:void 0,href:void 0},n;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,w.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],w.tap)}R.addEventListener(`mousedown`,r),R.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(lt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=be(e,R),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=xe(i,x,z.hash);if(s||c)return;let l=D(i),u=o&&wt(G.url)===wt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=w.tap;let e=await St(o,!1);if(!e)return;ct(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,lt(o))}function o(){i.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:r}=xe(e,x,z.hash);if(n||r)continue;let a=D(e);a.reload||(a.preload_code===w.viewport&&i.observe(e),a.preload_code===w.eager&<(t))}}W.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=ke(e),r=Ae(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Ot(e,t={}){return e=new URL(_e(e)),e.origin===ge?st(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function kt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function At(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ot(),!q){let e=Ft(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ot()}),navigator.connection?.saveData||Dt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,x,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Tt({url:r,type:`link`,event:t})?q=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(J=!0,ze(Y),e(r),!s.replace_state)return;J=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,x,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Nt)if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Z={},n===Y)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=G.url?m(location)===m(G.url):!1;if(o===X&&(Ze||s)){i!==k.state&&(k.state=i),e(a),N[Y]=T(),r&&scrollTo(r.x,r.y),Y=n;return}let c=n-Y;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{Y=n,X=o},block:()=>{history.go(-c)},nav_token:Z,event:t})}else J||(e(new URL(location.href)),z.hash&&location.reload())}),addEventListener(`hashchange`,()=>{J&&(J=!1,history.replaceState({...history.state,[S]:++Y,[C]:X},``,location.href))});for(let e of document.querySelectorAll(`link`))Re.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(A.current=null)});function e(e){G.url=k.url=e,F.page.set(It(k)),F.page.notify()}}async function jt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await St(u,!1)||{}),d=Ue.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Mt(r.uses)),ft({loader:z.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:ht(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await dt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l){await I(new URL(t.location,location.href));return}f=await bt({status:ke(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await ut(f,e,p)}function Mt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Nt=!1;function Pt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=Rt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Nt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Nt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Ft(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function It(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Lt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Rt(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{k as a,A as i,nt as n,j as o,F as r,Te as s,Ot as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/DC2Dub5y.js";import{n as e,s as t}from"../chunks/DoBOh2hq.js";import"../chunks/CNhGYG1q.js";export{t as load_css,e as start};
|