@plitzi/plitzi-sdk 0.39.7 → 0.39.9
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/CHANGELOG.md +38 -0
- package/dist/plitzi-sdk.js +2 -2
- package/dist/plitzi-sdk.js.gz +0 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @plitzi/plitzi-sdk
|
|
2
2
|
|
|
3
|
+
## 0.39.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f04c646: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
8
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
9
|
+
- Updated dependencies [f04c646]
|
|
10
|
+
- @plitzi/sdk-auth@0.39.9
|
|
11
|
+
- @plitzi/sdk-dev-tools@0.39.9
|
|
12
|
+
- @plitzi/sdk-elements@0.39.9
|
|
13
|
+
- @plitzi/sdk-event-bridge@0.39.9
|
|
14
|
+
- @plitzi/sdk-interactions@0.39.9
|
|
15
|
+
- @plitzi/sdk-navigation@0.39.9
|
|
16
|
+
- @plitzi/sdk-plugins@0.39.9
|
|
17
|
+
- @plitzi/sdk-schema@0.39.9
|
|
18
|
+
- @plitzi/sdk-shared@0.39.9
|
|
19
|
+
- @plitzi/sdk-style@0.39.9
|
|
20
|
+
- @plitzi/sdk-variables@0.39.9
|
|
21
|
+
|
|
22
|
+
## 0.39.8
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- fd14ce2: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
27
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
28
|
+
- Updated dependencies [fd14ce2]
|
|
29
|
+
- @plitzi/sdk-auth@0.39.8
|
|
30
|
+
- @plitzi/sdk-dev-tools@0.39.8
|
|
31
|
+
- @plitzi/sdk-elements@0.39.8
|
|
32
|
+
- @plitzi/sdk-event-bridge@0.39.8
|
|
33
|
+
- @plitzi/sdk-interactions@0.39.8
|
|
34
|
+
- @plitzi/sdk-navigation@0.39.8
|
|
35
|
+
- @plitzi/sdk-plugins@0.39.8
|
|
36
|
+
- @plitzi/sdk-schema@0.39.8
|
|
37
|
+
- @plitzi/sdk-shared@0.39.8
|
|
38
|
+
- @plitzi/sdk-style@0.39.8
|
|
39
|
+
- @plitzi/sdk-variables@0.39.8
|
|
40
|
+
|
|
3
41
|
## 0.39.7
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/dist/plitzi-sdk.js
CHANGED
|
@@ -18,7 +18,7 @@ import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Pro
|
|
|
18
18
|
/* @vite-ignore */
|
|
19
19
|
/* webpackIgnore: true */
|
|
20
20
|
URL.createObjectURL(n)))}catch(e){return void console.error(e)}})(e).finally(()=>{Pc.delete(e)});Pc.set(e,{promise:t,timestamp:Date.now()})}let o=await(Pc.get(e)?.promise),[{default:a},{default:s},{nestedInject:l}]=await Promise.all([Promise.resolve().then(()=>cp),Promise.resolve().then(()=>Jm),Promise.resolve().then(()=>fj)]);if(!o)return{default:s};let{type:c,pluginSettings:u}=vc(o,"default",{}),{version:d,initialItems:p,plugins:h}=o;if(!c)return{default:s};let f=o.default;return r||(f=a(o.default)),f.version=d,f.origin="remote",f.type=c,f.initialItems=p,f.pluginSettings=u,f.plugins=l(h,"remote"),n&&t(f),i&&i!==c?{default:(r?h?.[i]:f.plugins[i])??s}:{default:f}})(e,s,r,i,t)),[e,t]);if(!l)return null;let p=i?{plitziJsxSkipHOC:i,...o}:$c;/* @__PURE__ */
|
|
21
|
-
return _(a,{children:/* @__PURE__ */_(u,{internalProps:n,...p})})},nu=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=vc(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??vc(r,"0.params.src","")}},ru=({key:e,type:t,internalProps:n,components:r,plugins:i})=>{let o=r.notFound?/* @__PURE__ */_(r.notFound,{internalProps:n},e):void 0;if(!t)return o;let a=r[t];if(a)/* @__PURE__ */return _(a,{internalProps:n,extraProps:a.extraProps},e);let s=nu({type:t,plugins:i});return s?/* @__PURE__ */_(tu,{url:s.url,type:t,internalProps:n},e):o},iu=ga("ElementParentContext",void 0),ou=(e,t)=>{if("string"!=typeof t)return t;if("number"==typeof e){let e=Number(t.trim());return""!==t.trim()&&Number.isFinite(e)?e:t}return"boolean"!=typeof e||"true"!==t&&"false"!==t?t:"true"===t},au=(e,t)=>{if("function"!=typeof e||!("content"in e)||!ut(e.content))return t;let n=e.content.attributes;if(!ut(n))return t;let r=!1,i={...t};for(let[o,a]of Object.entries(t)){let e=ou(n[o],a);e!==a&&(i[o]=e,r=!0)}return r?i:t},su=e=>!1!==e&&"false"!==e,lu=(e,t)=>{let n={};for(let r of Object.keys(e))t.includes(r)||(n[r]=e[r]);return n},cu=typeof window>"u",uu=cu?e=>e():x,du=cu?e=>e:m,pu=typeof window>"u",hu=pu?(e,t)=>t.map(t=>e.getPath(t)):(e,t)=>{let[n]=qs(t,{store:e});return n},fu=pu?(e,t)=>e.getPath(t):(e,t)=>{let[n]=qs(t,{store:e});return n},mu=({source:e,transformers:t,when:n})=>{let r=e?[e]:[];for(let{action:i,params:o}of t??[])"twigTemplate"===i&&"string"==typeof o.template&&o.template&&r.push(...Br(o.template).filter(e=>"source"!==e&&!e.startsWith("source.")));return n&&r.push(...$r(n)),r},gu=(e,t)=>{let n=new Set(t??[]);for(let r of Object.values(e??{}))if(Array.isArray(r))for(let e of r)for(let t of mu(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},yu=e=>`runtime.sources.${e}`,bu=(e,t)=>{let n={};return e.forEach((e,r)=>{void 0!==t[r]&&((e,t,n)=>{let r=t.split("."),i=e;for(let o of r.slice(0,-1)){let e=i[o],t=ut(e)?e:{};i[o]=t,i=t}i[r[r.length-1]]=n})(n,e,t[r])}),n},vu={},wu=ga("LayoutBodyContext",void 0),ku=()=>{},xu=({bodies:e,children:t})=>{let[n]=T(()=>({current:e,listeners:/* @__PURE__ */new Set}));return k(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */_(wu,{value:n,children:t})},Su=typeof window>"u"?e=>{let t=f(wu);return void 0!==e&&t?t.current[e]:void 0}:e=>{let t=f(wu),n=m(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):ku,[e,t]),r=m(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return C(n,r,r)};"captureStackTrace"in Error&&Error,(jc=globalThis).__zod_globalConfig??(jc.__zod_globalConfig={});var Tu,Cu,Eu,Au=globalThis.__zod_globalConfig,Ou=()=>globalThis.trustedTypes,_u=()=>{if(void 0!==Cu)return Cu;let e=Ou();if(!e)return Cu=null;if(Cu=e.createPolicy("plitzi-html",{createHTML:e=>e}),!e.defaultPolicy)try{e.createPolicy("default",{createHTML:e=>"<script><\/script>"===e||(e=>!e.includes("<"))(e)?e:null,createScript:e=>(e=>{try{return JSON.parse(e),!0}catch{return!1}})(e)?e:null,createScriptURL:e=>(e=>{if(typeof location>"u")return!1;if(e.startsWith(`blob:${location.origin}/`))return!0;try{return new URL(e,location.href).origin===location.origin}catch{return!1}})(e)?e:null})}catch{}return Cu},Iu=/* @__PURE__ */new Map,Nu=e=>{let t=_u();if(!t)return e;let n=Iu.get(e);if(n)return n;let r=t.createHTML(e);return Iu.size<500&&Iu.set(e,r),r},Mu=(e=(()=>{if(typeof document>"u")return;let e=document.documentElement.dataset.plitziScriptPolicy;return"report-only"===e||"enforce"===e?e:void 0})())=>{var t;typeof window<"u"&&(Tu=e,(e=>{Ma=e})(!e&&void 0),e&&(t={jitless:!0})&&Object.assign(Au,t),_u())},Pu=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Lu=({id:e,frozen:t,children:n})=>{let[r]=T(()=>{if(!t||typeof document>"u")return null;let n=document.querySelector(`[data-rsc-id="${e}"]`);if(!n)return null;let r={};for(let e=0;e<n.attributes.length;e++){let{name:t,value:i}=n.attributes[e];"class"!==t&&"style"!==t&&"data-rsc-id"!==t&&(r[t]=i)}let i=n.getAttribute("style");return{tag:n.tagName.toLowerCase(),className:n.className,style:i?Pu(i):void 0,attrs:r,html:n.innerHTML}});return r&&t?c(r.tag,{"data-rsc-id":e,className:r.className||void 0,style:r.style,...r.attrs,dangerouslySetInnerHTML:{__html:Nu(r.html)}}):n},Ru="[A-Za-z_][A-Za-z0-9_]*",Du=RegExp(`^${Ru}$`),$u=(/* @__PURE__ */RegExp(`^!?${Ru}$`),new Set(["__proto__","constructor","prototype"])),ju=e=>Du.test(e)&&!$u.has(e),zu=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},Fu=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},Bu=(e,t)=>{let n=zu(e),r=(e=>Object.entries(e).filter(([e])=>ju(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},qu=ga("PluginsContext",{plugins:{},registerCustomAssets:()=>{},unregisterCustomAssets:()=>{}}),Hu=ga("PluginAssetsContext",{assets:{}}),Uu=ga("ElementRegistryContext",void 0),Wu=typeof window>"u",Vu=()=>()=>{},Gu=()=>!0,Ku=()=>!1,Yu=e=>{if(e)return e.get();let{components:t,componentDefinitions:n}=f(eu);return{components:t,componentDefinitions:n,plugins:f(qu).plugins}},Ju=(e,t,n,r,i)=>{let o=t.current[e.type],a=e.loadStrategy??o?.definition.loadStrategy??"eager";return!n||"eager"===a||r||"lazy"===a&&i},Xu=e=>e?`${e.type}:${e.rootId}:${e.slots.join(",")}`:"",Zu=/* @__PURE__ */new WeakMap,Qu=(e,t,n,r)=>{let i=Zu.get(e);if(i&&i.id===t&&i.rootId===n&&i.plitziElementLayout===r)return i;let o={id:t,rootId:n,plitziElementLayout:r};return Zu.set(e,o),o},ed=({items:e,itemElements:t,flags:n,plitziElementLayout:r,children:o,previewMode:a,rscEnabled:s,mounted:l,layoutKeyIdentifier:c,isSlot:d,layoutBody:p,registered:h,installed:f})=>{let m=(e??[]).map((e,n)=>({itemId:e,el:t[n]})).filter(e=>{let{el:t}=e;if(!t||!Er(t.definition.flag,n))return!1;if(!a||!s)return!0;let r=t.definition.runtime??"shared";return!(!l&&"client"===r)}).map(({itemId:e,el:t})=>{let{rootId:n,type:i,runtime:o}=t.definition,u=r?r.rootId:n,d=i in h.current||!!nu({type:i,plugins:f}),p=ru({key:!a&&r?`${e}_${c}`:e,type:i,internalProps:Qu(t,e,u,r),components:h.current,plugins:f});return s&&"server"===o&&!Wu&&a?/* @__PURE__ */_(Lu,{id:e,frozen:!(l&&d),children:p},e):p});if(d&&m.push(/* @__PURE__ */_(i,{children:p},"#layout-body")),Array.isArray(o)?m.push(...o.filter(u)):u(o)&&m.push(/* @__PURE__ */_(i,{children:o},"#children")),e)return 1===m.length?m[0]:m},td=Wu?({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:o,previewMode:a,visible:s=!0})=>{let{items:l}=r,c=f(Uu),{components:u,componentDefinitions:d,plugins:p}=Yu(!0===a?c:void 0),h=i?.slots.includes(e)??!1,m=Su(h?e:void 0);if((i||o||l?.length)&&Ju(r,d,a,s,s))return ed({items:l,itemElements:(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),flags:n,plitziElementLayout:i,children:o,previewMode:a,rscEnabled:!0===t.getPath("rsc.enabled"),mounted:!1,layoutKeyIdentifier:Xu(i),isSlot:h,layoutBody:m,registered:u,installed:p})}:({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:o,previewMode:a,visible:s=!0})=>{let{items:l}=r,c=(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),u=S(c);((e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]))(u.current,c)||(u.current=c);let d=u.current,p=!0===t.getPath("rsc.enabled"),h=f(Uu),m=!0===a?h:void 0,g=void 0!==m,y=d.map(e=>e?.definition.type??"").join("|"),b=()=>m?((e,{components:t,plugins:n})=>e.split("|").map(e=>""===e?"":`${e in t.current?"c":""}${e in n?"p":""}`).join("|"))(y,m.get()):"",v=C(m?m.subscribe:Vu,b,b),{components:w,componentDefinitions:k,plugins:T}=Yu(m),E=i||o||l?.length,A=S(!1);s&&(A.current=!0);let O=Ju(r,k,a,s,A.current),_=Xu(i),I=!0===a&&p&&d.some(e=>"client"===e?.definition.runtime||"server"===e?.definition.runtime),N=C(Vu,I?Gu:Ku,Ku),M=i?.slots.includes(e)??!1,P=Su(M?e:void 0),L=S({components:w,plugins:T});return L.current={components:w,plugins:T},x(()=>{if(!E||!O)return;let{components:e,plugins:t}=L.current;return ed({items:l,itemElements:d,flags:n,plitziElementLayout:i,children:o,previewMode:a,rscEnabled:p,mounted:N,layoutKeyIdentifier:_,isSlot:M,layoutBody:P,registered:e,installed:t})},[E,O,l,n,i,o,d,a,p,N,_,g?v:w,g?v:T,M,P])},nd={},rd=()=>{let e=Rs(),[t=nd]=qs("runtime.sources.flags",{store:e});return{store:e,flags:t}},id=/* @__PURE__ */new Map,od=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[o,a]of Object.entries(e)){let e=Rn(a,{...t,computed:{...r}}),s=n?.[o],l=void 0!==n&&Object.hasOwn(n,o)&&(s===e||Rc(s,e));r[o]=l?s:e,i&&=l}return i&&n?n:r},ad=(e,t,n)=>{let r=Rr.map(e=>t[e]);if(Eu?.definitions===e&&Eu.state===n&&Eu.globals.every((e,t)=>e===r[t]))return Eu.computed;let i=od(e,{...Object.fromEntries(Rr.map((e,t)=>[e,r[t]])),state:n},Eu?.definitions===e?Eu.computed:void 0);return Eu={definitions:e,state:n,globals:r,computed:i},i},sd=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:o}=n;if(!Array.isArray(o)||0===o.length)return{...e,[r]:i};let a=o.find(e=>vr(e.when,t));return{...e,[r]:a?a.value:i}},{}):{},ld={settled:/* @__PURE__ */new Set([at])},cd=e=>Object.keys(e).length>0,ud=/* @__PURE__ */new WeakMap,dd=(e,t)=>{let n=ud.get(e);if(n?.type===t)return n.keys;let r=fa[t]??[],i=Object.keys(e).filter(t=>{let n=e[t];return"string"==typeof n&&oe(n)&&!r.includes(t)});return ud.set(e,{type:t,keys:i}),i},pd=/* @__PURE__ */new WeakMap,hd=(e,t,n={},r={})=>{let i,{attributes:o,definition:a}=e,{rootId:s,plitziElementLayout:l}=t,c=lu(t,["id","rootId","attributes","definition","plitziElementLayout"]);t.attributes&&(o={...o,...t.attributes});let u=o;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(a.bindings)){let t=oo(n,{...e,attributes:o},i);({attributes:o,definition:a,style:i}=t)}else i={};let d=dd(u,a.type).filter(e=>o[e]===u[e]);d.length>0&&(o=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:o={},origin:a="",navigation:s,...l}=n,c={...o,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:a}},u={...e};for(let d of t)u[d]=Mn(e[d],c,ld);return u})(o,d,n));let p=Object.keys(r).length>0;return p&&(o={...o,...lu(r,["visibility","styleSelectors"])}),a=((e,t,n)=>{let r=n&&void 0===t,i=r?pd.get(e):void 0;if(i)return i;let o={...e,styleSelectors:{...e.styleSelectors,...e.initialState?.styleSelectors,...t}};return o.styleSelectors=(e=>{let t=e.initialState?.styleVariant,n=void 0!==t&&Object.keys(t).length>0;return Object.fromEntries(Object.entries(e.styleSelectors).map(([r,i])=>{let o="base"===r?`plitzi__${e.type}`:`plitzi__${e.type}-${r}`;if("string"!=typeof i)return[r,i];if(!n)return[r,i?`${o} ${i}`:o];!(e=>{let t=id.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),id.set(e,t)),t})(e.type).test(i)&&t[e.type]?.[r]&&(i=i?`${e.type} ${i}`:e.type);let a=i.replace(/\S+/g,n=>{let i=t[n]?.[r];if(!i)return n;let o=Array.isArray(i)?i:[i];return n===e.type&&"base"===r?o.map(e=>`${n}--${e}`).join(" "):n===e.type&&"base"!==r?o.map(e=>`${n}-${r}--${e}`).join(" "):`${n} ${o.map(e=>`${n}--${e}`).join(" ")}`});return a?[r,`${o} ${a}`]:[r,o]}))})(o),r&&pd.set(e,o),o})(a,r.styleSelectors,a===e.definition),{...t,rootId:l?l.rootId:s,attributes:p&&!cd(c)?o:{...o,...c},definition:a,elementState:p?{...a.initialState,...r}:{...a.initialState},style:i}},fd=(e,t)=>e?dd(e,t).map(t=>e[t]):[],md=/* @__PURE__ */new WeakMap,gd={},yd=[],bd=/* @__PURE__ */new WeakMap,vd=["navigation.routeParams","navigation.queryParams","navigation.origin"],wd={},kd=({store:e,element:t,children:n,internalProps:r,previewMode:i=!1,parentVisible:o=!0})=>{let{id:a}=r,{path:s,setElementState:l}=(({store:e,id:t,bindings:n,previewMode:r})=>{let{scopePath:i}=e,o=uu(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(t,i),[t,i]),a=e.setState,s=du(e=>{if(!r)return!1;let t=(n?.attributes&&Array.isArray(n.attributes)?n.attributes:[]).filter(e=>!1!==e.enabled).map(e=>vc(e,"to",""));return a(o,n=>{if(!e)return{};let r="function"==typeof e?e(n??vu):e;return t.length&&(r=Cc(r,t)),r}),!0},[n,o,r,a]);return y(()=>{if(r&&i)return()=>a(o,void 0)},[r,i,o,a,t]),{path:o,setElementState:s}})({store:e,id:a,bindings:t.definition.bindings,previewMode:i}),{type:c,bindings:u,items:d}=t.definition,p=uu(()=>((e,t,n)=>{let r=t?void 0:md.get(e);if(r?.type===n)return r.sources;let i=[...fd(e,n),...fd(t,n)],o=i.length>0?(e=>["variables",...new Set(e.flatMap(e=>Br(e)))])(i):void 0;return t||md.set(e,{type:n,sources:o}),o})(t.attributes,r.attributes,c),[t.attributes,r.attributes,c]),h=(d?.length??0)>0,f=uu(()=>((e,{sourcePaths:t,storePaths:n},r,i)=>({paths:[e,...r?vd:[],...n,...i?["runtime.sources.flags"]:[]],sourcePaths:t,navigation:r,flags:i}))(s,((e,t)=>{let n=e??gd,r=t??yd,i=bd.get(n)??/* @__PURE__ */new WeakMap;bd.set(n,i);let o=i.get(r);if(o)return o;let a=gu(e,t),s={sourcePaths:a,storePaths:a.map(e=>yu(e))};return i.set(r,s),s})(u,p),void 0!==p,h),[s,u,p,h]),m=hu(e,f.paths),g=m[0]??vu,b=1+(f.navigation?vd.length:0),[v,w,k]=f.navigation?m.slice(1,b):[void 0,void 0,void 0],x=f.flags?m[m.length-1]??wd:wd,T=m.slice(b,b+f.sourcePaths.length),C=S(T);((e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])))(C.current,T)||(C.current=T);let E=C.current,A=uu(()=>bu(f.sourcePaths,E),[f,E]),{internalPropsParsed:O,customProps:_}=uu(()=>{let e=hd(t,r,{...A,routeParams:v,queryParams:w,origin:k},g);return{internalPropsParsed:Object.assign(e,{setElementState:l}),customProps:lu(r,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"])}},[t,r,A,v,w,k,g,l]);return{internalProps:O,customProps:_,children:td({id:a,store:e,flags:x,definition:O.definition,plitziElementLayout:O.plitziElementLayout,children:n,previewMode:i,visible:o&&su(O.elementState.visibility)})}},xd=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */_("div",{children:"Something broke! Please refresh and try again."}):e}},Sd="data-plitzi-devtools",Td=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:o=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||o&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){Reflect.deleteProperty(this.events[e],t);let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),Reflect.deleteProperty(this.events,e))}}async emit(e,t=[],...n){let r;this.debugMode&&bl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let o=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),o}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){e?this.events[e]&&(Reflect.deleteProperty(this.events,e),this.counts.delete(e)):(this.events={},this.counts.clear())}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},Cd=ga("EventBridgeContext",{}),Ed=({children:e,debugMode:t,onInit:n})=>{let r=x(()=>new Td({debugMode:t}),[t]);y(()=>()=>{r.clear()},[r]);let i=x(()=>({eventBridge:r}),[r]);return y(()=>{n?.(i)},[n,i]),/* @__PURE__ */_(Cd,{value:i,children:e})},Ad=Object.freeze({}),Od=Object.freeze({}),_d=Td,Id="data-plitzi-fonts",Nd=ga("PlitziContext",{}),Md=()=>{let e=f(Nd);if(void 0===e)throw Error("The Plitzi context is undefined. Render the element inside a PlitziProvider.");return e},Pd=e=>{let{children:t,value:n}=e;/* @__PURE__ */
|
|
21
|
+
return _(a,{children:/* @__PURE__ */_(u,{internalProps:n,...p})})},nu=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=vc(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??vc(r,"0.params.src","")}},ru=({key:e,type:t,internalProps:n,components:r,plugins:i})=>{let o=r.notFound?/* @__PURE__ */_(r.notFound,{internalProps:n},e):void 0;if(!t)return o;let a=r[t];if(a)/* @__PURE__ */return _(a,{internalProps:n,extraProps:a.extraProps},e);let s=nu({type:t,plugins:i});return s?/* @__PURE__ */_(tu,{url:s.url,type:t,internalProps:n},e):o},iu=ga("ElementParentContext",void 0),ou=(e,t)=>{if("string"!=typeof t)return t;if("number"==typeof e){let e=Number(t.trim());return""!==t.trim()&&Number.isFinite(e)?e:t}return"boolean"!=typeof e||"true"!==t&&"false"!==t?t:"true"===t},au=(e,t)=>{if("function"!=typeof e||!("content"in e)||!ut(e.content))return t;let n=e.content.attributes;if(!ut(n))return t;let r=!1,i={...t};for(let[o,a]of Object.entries(t)){let e=ou(n[o],a);e!==a&&(i[o]=e,r=!0)}return r?i:t},su=e=>!1!==e&&"false"!==e,lu=(e,t)=>{let n={};for(let r of Object.keys(e))t.includes(r)||(n[r]=e[r]);return n},cu=typeof window>"u",uu=cu?e=>e():x,du=cu?e=>e:m,pu=typeof window>"u",hu=pu?(e,t)=>t.map(t=>e.getPath(t)):(e,t)=>{let[n]=qs(t,{store:e});return n},fu=pu?(e,t)=>e.getPath(t):(e,t)=>{let[n]=qs(t,{store:e});return n},mu=({source:e,transformers:t,when:n})=>{let r=e?[e]:[];for(let{action:i,params:o}of t??[])"twigTemplate"===i&&"string"==typeof o.template&&o.template&&r.push(...Br(o.template).filter(e=>"source"!==e&&!e.startsWith("source.")));return n&&r.push(...$r(n)),r},gu=(e,t)=>{let n=new Set(t??[]);for(let r of Object.values(e??{}))if(Array.isArray(r))for(let e of r)for(let t of mu(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},yu=e=>`runtime.sources.${e}`,bu=(e,t)=>{let n={};return e.forEach((e,r)=>{void 0!==t[r]&&((e,t,n)=>{let r=t.split("."),i=e;for(let o of r.slice(0,-1)){let e=i[o],t=ut(e)?e:{};i[o]=t,i=t}i[r[r.length-1]]=n})(n,e,t[r])}),n},vu={},wu=ga("LayoutBodyContext",void 0),ku=()=>{},xu=({bodies:e,children:t})=>{let[n]=T(()=>({current:e,listeners:/* @__PURE__ */new Set}));return k(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */_(wu,{value:n,children:t})},Su=typeof window>"u"?e=>{let t=f(wu);return void 0!==e&&t?t.current[e]:void 0}:e=>{let t=f(wu),n=m(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):ku,[e,t]),r=m(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return C(n,r,r)};"captureStackTrace"in Error&&Error,(jc=globalThis).__zod_globalConfig??(jc.__zod_globalConfig={});var Tu,Cu,Eu,Au=globalThis.__zod_globalConfig,Ou=()=>globalThis.trustedTypes,_u=()=>{if(void 0!==Cu)return Cu;let e=Ou();if(!e)return Cu=null;if(Cu=e.createPolicy("plitzi-html",{createHTML:e=>e}),!e.defaultPolicy)try{e.createPolicy("default",{createHTML:e=>"<script><\/script>"===e||(e=>!e.includes("<"))(e)?e:null,createScript:e=>(e=>{try{return JSON.parse(e),!0}catch{return!1}})(e)?e:null,createScriptURL:e=>(e=>{if(typeof location>"u")return!1;if(e.startsWith(`blob:${location.origin}/`))return!0;try{return new URL(e,location.href).origin===location.origin}catch{return!1}})(e)?e:null})}catch{}return Cu},Iu=/* @__PURE__ */new Map,Nu=e=>{let t=_u();if(!t)return e;let n=Iu.get(e);if(n)return n;let r=t.createHTML(e);return Iu.size<500&&Iu.set(e,r),r},Mu=(e=(()=>{if(typeof document>"u")return;let e=document.documentElement.dataset.plitziScriptPolicy;return"report-only"===e||"enforce"===e?e:void 0})())=>{var t;typeof window<"u"&&(Tu=e,(e=>{Ma=e})(!e&&void 0),e&&(t={jitless:!0})&&Object.assign(Au,t),_u())},Pu=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Lu=({id:e,frozen:t,children:n})=>{let[r]=T(()=>{if(!t||typeof document>"u")return null;let n=document.querySelector(`[data-rsc-id="${e}"]`);if(!n)return null;let r={};for(let e=0;e<n.attributes.length;e++){let{name:t,value:i}=n.attributes[e];"class"!==t&&"style"!==t&&"data-rsc-id"!==t&&(r[t]=i)}let i=n.getAttribute("style");return{tag:n.tagName.toLowerCase(),className:n.className,style:i?Pu(i):void 0,attrs:r,html:n.innerHTML}});return r&&t?c(r.tag,{"data-rsc-id":e,className:r.className||void 0,style:r.style,...r.attrs,dangerouslySetInnerHTML:{__html:Nu(r.html)}}):n},Ru="[A-Za-z_][A-Za-z0-9_]*",Du=RegExp(`^${Ru}$`),$u=(/* @__PURE__ */RegExp(`^!?${Ru}$`),new Set(["__proto__","constructor","prototype"])),ju=e=>Du.test(e)&&!$u.has(e),zu=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},Fu=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},Bu=(e,t)=>{let n=zu(e),r=(e=>Object.entries(e).filter(([e])=>ju(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},qu=ga("PluginsContext",{plugins:{},registerCustomAssets:()=>{},unregisterCustomAssets:()=>{}}),Hu=ga("PluginAssetsContext",{assets:{}}),Uu=ga("ElementRegistryContext",void 0),Wu=typeof window>"u",Vu=()=>()=>{},Gu=()=>!0,Ku=()=>!1,Yu=e=>{if(e)return e.get();let{components:t,componentDefinitions:n}=f(eu);return{components:t,componentDefinitions:n,plugins:f(qu).plugins}},Ju=(e,t,n,r,i)=>{let o=t.current[e.type],a=e.loadStrategy??o?.definition.loadStrategy??"eager";return!n||"eager"===a||r||"lazy"===a&&i},Xu=e=>e?`${e.type}:${e.rootId}:${e.slots.join(",")}`:"",Zu=/* @__PURE__ */new WeakMap,Qu=(e,t,n,r)=>{let i=Zu.get(e);if(i&&i.id===t&&i.rootId===n&&i.plitziElementLayout===r)return i;let o={id:t,rootId:n,plitziElementLayout:r};return Zu.set(e,o),o},ed=({items:e,itemElements:t,flags:n,plitziElementLayout:r,children:o,previewMode:a,rscEnabled:s,mounted:l,layoutKeyIdentifier:c,isSlot:d,layoutBody:p,registered:h,installed:f})=>{let m=(e??[]).map((e,n)=>({itemId:e,el:t[n]})).filter(e=>{let{el:t}=e;if(!t||!Er(t.definition.flag,n))return!1;if(!a||!s)return!0;let r=t.definition.runtime??"shared";return!(!l&&"client"===r)}).map(({itemId:e,el:t})=>{let{rootId:n,type:i,runtime:o}=t.definition,l=r?r.rootId:n,u=i in h.current||!!nu({type:i,plugins:f}),d=ru({key:!a&&r?`${e}_${c}`:e,type:i,internalProps:Qu(t,e,l,r),components:h.current,plugins:f});return s&&"server"===o&&!Wu&&a?/* @__PURE__ */_(Lu,{id:e,frozen:!u,children:d},e):d});if(d&&m.push(/* @__PURE__ */_(i,{children:p},"#layout-body")),Array.isArray(o)?m.push(...o.filter(u)):u(o)&&m.push(/* @__PURE__ */_(i,{children:o},"#children")),e)return 1===m.length?m[0]:m},td=Wu?({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:o,previewMode:a,visible:s=!0})=>{let{items:l}=r,c=f(Uu),{components:u,componentDefinitions:d,plugins:p}=Yu(!0===a?c:void 0),h=i?.slots.includes(e)??!1,m=Su(h?e:void 0);if((i||o||l?.length)&&Ju(r,d,a,s,s))return ed({items:l,itemElements:(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),flags:n,plitziElementLayout:i,children:o,previewMode:a,rscEnabled:!0===t.getPath("rsc.enabled"),mounted:!1,layoutKeyIdentifier:Xu(i),isSlot:h,layoutBody:m,registered:u,installed:p})}:({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:o,previewMode:a,visible:s=!0})=>{let{items:l}=r,c=(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),u=S(c);((e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]))(u.current,c)||(u.current=c);let d=u.current,p=!0===t.getPath("rsc.enabled"),h=f(Uu),m=!0===a?h:void 0,g=void 0!==m,y=d.map(e=>e?.definition.type??"").join("|"),b=()=>m?((e,{components:t,plugins:n})=>e.split("|").map(e=>""===e?"":`${e in t.current?"c":""}${e in n?"p":""}`).join("|"))(y,m.get()):"",v=C(m?m.subscribe:Vu,b,b),{components:w,componentDefinitions:k,plugins:T}=Yu(m),E=i||o||l?.length,A=S(!1);s&&(A.current=!0);let O=Ju(r,k,a,s,A.current),_=Xu(i),I=!0===a&&p&&d.some(e=>"client"===e?.definition.runtime),N=C(Vu,I?Gu:Ku,Ku),M=i?.slots.includes(e)??!1,P=Su(M?e:void 0),L=S({components:w,plugins:T});return L.current={components:w,plugins:T},x(()=>{if(!E||!O)return;let{components:e,plugins:t}=L.current;return ed({items:l,itemElements:d,flags:n,plitziElementLayout:i,children:o,previewMode:a,rscEnabled:p,mounted:N,layoutKeyIdentifier:_,isSlot:M,layoutBody:P,registered:e,installed:t})},[E,O,l,n,i,o,d,a,p,N,_,g?v:w,g?v:T,M,P])},nd={},rd=()=>{let e=Rs(),[t=nd]=qs("runtime.sources.flags",{store:e});return{store:e,flags:t}},id=/* @__PURE__ */new Map,od=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[o,a]of Object.entries(e)){let e=Rn(a,{...t,computed:{...r}}),s=n?.[o],l=void 0!==n&&Object.hasOwn(n,o)&&(s===e||Rc(s,e));r[o]=l?s:e,i&&=l}return i&&n?n:r},ad=(e,t,n)=>{let r=Rr.map(e=>t[e]);if(Eu?.definitions===e&&Eu.state===n&&Eu.globals.every((e,t)=>e===r[t]))return Eu.computed;let i=od(e,{...Object.fromEntries(Rr.map((e,t)=>[e,r[t]])),state:n},Eu?.definitions===e?Eu.computed:void 0);return Eu={definitions:e,state:n,globals:r,computed:i},i},sd=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:o}=n;if(!Array.isArray(o)||0===o.length)return{...e,[r]:i};let a=o.find(e=>vr(e.when,t));return{...e,[r]:a?a.value:i}},{}):{},ld={settled:/* @__PURE__ */new Set([at])},cd=e=>Object.keys(e).length>0,ud=/* @__PURE__ */new WeakMap,dd=(e,t)=>{let n=ud.get(e);if(n?.type===t)return n.keys;let r=fa[t]??[],i=Object.keys(e).filter(t=>{let n=e[t];return"string"==typeof n&&oe(n)&&!r.includes(t)});return ud.set(e,{type:t,keys:i}),i},pd=/* @__PURE__ */new WeakMap,hd=(e,t,n={},r={})=>{let i,{attributes:o,definition:a}=e,{rootId:s,plitziElementLayout:l}=t,c=lu(t,["id","rootId","attributes","definition","plitziElementLayout"]);t.attributes&&(o={...o,...t.attributes});let u=o;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(a.bindings)){let t=oo(n,{...e,attributes:o},i);({attributes:o,definition:a,style:i}=t)}else i={};let d=dd(u,a.type).filter(e=>o[e]===u[e]);d.length>0&&(o=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:o={},origin:a="",navigation:s,...l}=n,c={...o,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:a}},u={...e};for(let d of t)u[d]=Mn(e[d],c,ld);return u})(o,d,n));let p=Object.keys(r).length>0;return p&&(o={...o,...lu(r,["visibility","styleSelectors"])}),a=((e,t,n)=>{let r=n&&void 0===t,i=r?pd.get(e):void 0;if(i)return i;let o={...e,styleSelectors:{...e.styleSelectors,...e.initialState?.styleSelectors,...t}};return o.styleSelectors=(e=>{let t=e.initialState?.styleVariant,n=void 0!==t&&Object.keys(t).length>0;return Object.fromEntries(Object.entries(e.styleSelectors).map(([r,i])=>{let o="base"===r?`plitzi__${e.type}`:`plitzi__${e.type}-${r}`;if("string"!=typeof i)return[r,i];if(!n)return[r,i?`${o} ${i}`:o];!(e=>{let t=id.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),id.set(e,t)),t})(e.type).test(i)&&t[e.type]?.[r]&&(i=i?`${e.type} ${i}`:e.type);let a=i.replace(/\S+/g,n=>{let i=t[n]?.[r];if(!i)return n;let o=Array.isArray(i)?i:[i];return n===e.type&&"base"===r?o.map(e=>`${n}--${e}`).join(" "):n===e.type&&"base"!==r?o.map(e=>`${n}-${r}--${e}`).join(" "):`${n} ${o.map(e=>`${n}--${e}`).join(" ")}`});return a?[r,`${o} ${a}`]:[r,o]}))})(o),r&&pd.set(e,o),o})(a,r.styleSelectors,a===e.definition),{...t,rootId:l?l.rootId:s,attributes:p&&!cd(c)?o:{...o,...c},definition:a,elementState:p?{...a.initialState,...r}:{...a.initialState},style:i}},fd=(e,t)=>e?dd(e,t).map(t=>e[t]):[],md=/* @__PURE__ */new WeakMap,gd={},yd=[],bd=/* @__PURE__ */new WeakMap,vd=["navigation.routeParams","navigation.queryParams","navigation.origin"],wd={},kd=({store:e,element:t,children:n,internalProps:r,previewMode:i=!1,parentVisible:o=!0})=>{let{id:a}=r,{path:s,setElementState:l}=(({store:e,id:t,bindings:n,previewMode:r})=>{let{scopePath:i}=e,o=uu(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(t,i),[t,i]),a=e.setState,s=du(e=>{if(!r)return!1;let t=(n?.attributes&&Array.isArray(n.attributes)?n.attributes:[]).filter(e=>!1!==e.enabled).map(e=>vc(e,"to",""));return a(o,n=>{if(!e)return{};let r="function"==typeof e?e(n??vu):e;return t.length&&(r=Cc(r,t)),r}),!0},[n,o,r,a]);return y(()=>{if(r&&i)return()=>a(o,void 0)},[r,i,o,a,t]),{path:o,setElementState:s}})({store:e,id:a,bindings:t.definition.bindings,previewMode:i}),{type:c,bindings:u,items:d}=t.definition,p=uu(()=>((e,t,n)=>{let r=t?void 0:md.get(e);if(r?.type===n)return r.sources;let i=[...fd(e,n),...fd(t,n)],o=i.length>0?(e=>["variables",...new Set(e.flatMap(e=>Br(e)))])(i):void 0;return t||md.set(e,{type:n,sources:o}),o})(t.attributes,r.attributes,c),[t.attributes,r.attributes,c]),h=(d?.length??0)>0,f=uu(()=>((e,{sourcePaths:t,storePaths:n},r,i)=>({paths:[e,...r?vd:[],...n,...i?["runtime.sources.flags"]:[]],sourcePaths:t,navigation:r,flags:i}))(s,((e,t)=>{let n=e??gd,r=t??yd,i=bd.get(n)??/* @__PURE__ */new WeakMap;bd.set(n,i);let o=i.get(r);if(o)return o;let a=gu(e,t),s={sourcePaths:a,storePaths:a.map(e=>yu(e))};return i.set(r,s),s})(u,p),void 0!==p,h),[s,u,p,h]),m=hu(e,f.paths),g=m[0]??vu,b=1+(f.navigation?vd.length:0),[v,w,k]=f.navigation?m.slice(1,b):[void 0,void 0,void 0],x=f.flags?m[m.length-1]??wd:wd,T=m.slice(b,b+f.sourcePaths.length),C=S(T);((e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])))(C.current,T)||(C.current=T);let E=C.current,A=uu(()=>bu(f.sourcePaths,E),[f,E]),{internalPropsParsed:O,customProps:_}=uu(()=>{let e=hd(t,r,{...A,routeParams:v,queryParams:w,origin:k},g);return{internalPropsParsed:Object.assign(e,{setElementState:l}),customProps:lu(r,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"])}},[t,r,A,v,w,k,g,l]);return{internalProps:O,customProps:_,children:td({id:a,store:e,flags:x,definition:O.definition,plitziElementLayout:O.plitziElementLayout,children:n,previewMode:i,visible:o&&su(O.elementState.visibility)})}},xd=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */_("div",{children:"Something broke! Please refresh and try again."}):e}},Sd="data-plitzi-devtools",Td=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:o=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||o&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){Reflect.deleteProperty(this.events[e],t);let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),Reflect.deleteProperty(this.events,e))}}async emit(e,t=[],...n){let r;this.debugMode&&bl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let o=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),o}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){e?this.events[e]&&(Reflect.deleteProperty(this.events,e),this.counts.delete(e)):(this.events={},this.counts.clear())}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},Cd=ga("EventBridgeContext",{}),Ed=({children:e,debugMode:t,onInit:n})=>{let r=x(()=>new Td({debugMode:t}),[t]);y(()=>()=>{r.clear()},[r]);let i=x(()=>({eventBridge:r}),[r]);return y(()=>{n?.(i)},[n,i]),/* @__PURE__ */_(Cd,{value:i,children:e})},Ad=Object.freeze({}),Od=Object.freeze({}),_d=Td,Id="data-plitzi-fonts",Nd=ga("PlitziContext",{}),Md=()=>{let e=f(Nd);if(void 0===e)throw Error("The Plitzi context is undefined. Render the element inside a PlitziProvider.");return e},Pd=e=>{let{children:t,value:n}=e;/* @__PURE__ */
|
|
22
22
|
return _(Nd,{value:n,children:t})},Ld=ga("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"}),Rd=e=>{let t=S(e);return t.current!==e&&!Rc(t.current,e)&&(t.current=e),t.current},Dd=e=>{if(void 0===e)return"undefined";if(null===e)return"null";let t=typeof e;if("function"===t)return"ƒ";if("string"===t){let t=e;return JSON.stringify(t.length>40?`${t.slice(0,40)}…`:t)}return"symbol"===t?e.toString():"number"===t||"boolean"===t||"bigint"===t?`${e}`:Array.isArray(e)?0===e.length?"[]":`[…${e.length}]`:"$$typeof"in e?"<ReactElement>":"{…}"},$d=e=>{if("object"!=typeof e||!e)return Dd(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(Dd).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${Dd(t[e])}`).join(", ")}${n.length>4?", …":""} }`},jd=(e,t)=>{if(Object.is(e,t))return!0;if(null===e||null===t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.is(e[n],t[n]))},zd=os({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),Fd=((e={})=>{let{max:t=100,enabled:n}=e,r=new es,i=[],o=0,a=()=>{r.forEach(e=>e())},s=e=>{o+=1;let n={seq:o,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},r=i.length>=t?i.slice(i.length-t+1):i.slice();r.push(n),i=r,a()};return{middleware:e=>{if(!Ds(n,e.getState()))return{onChange:s}},record:s,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>o,subscribe:e=>r.add(e),clear:()=>{i=[],a()}}})({max:30}),Bd=[],qd=/* @__PURE__ */new Map,Hd=/* @__PURE__ */new Map,Ud=/* @__PURE__ */new Map,Wd=/* @__PURE__ */new Map,Vd=!0,Gd=/* @__PURE__ */new Map,Kd=/* @__PURE__ */new Map,Yd=0,Jd=/* @__PURE__ */new Map,Xd=/* @__PURE__ */new Map,Zd=!1,Qd=!1,ep=0,tp=!1,np=!1,rp="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},ip=()=>{Vd&&(Vd=!1,zd.setState("tree",(()=>{let e={};for(let[t,n]of Wd)e[t]={parentId:Hd.get(t),baseDuration:n,elementId:Ud.get(t)??t,mountedAt:Gd.get(t),unmountedAt:Kd.get(t)};return e})())),zd.setState("hydrated",np),zd.setState("commits",Bd)},op=e=>{Xd.delete(e),Hd.delete(e),Ud.delete(e),Wd.delete(e),Gd.delete(e),Kd.delete(e),Vd=!0},ap=()=>{if(tp=!1,qd.size>0){let e=[...qd.values()].sort((e,t)=>e.timestamp-t.timestamp);qd.clear(),(Bd=[...Bd,...e]).length>200&&(Bd=Bd.slice(Bd.length-200)),(e=>{for(let[t,n]of Kd)n<=e&&op(t)})(Bd[0].commitId)}Qd&&ip()},sp=()=>{let e=Fd.entriesSince(Yd);Yd=Fd.lastSeq();let t=/* @__PURE__ */new Map;for(let n of e){if(void 0===n.path)continue;let e=t.get(n.path);e?e.next=n.nextValue:t.set(n.path,{prev:n.prevValue,next:n.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${$d(t.prev)} → ${$d(t.next)}`}))},lp={onRender:(e,t,n,r,i,o)=>{Zd||(Zd=!0,zd.setState("enabled",!0));let a=!Wd.has(e);Wd.set(e,r);let s,l=Jd.get(e);Jd.delete(e),l&&(s=((e,t)=>{if(!e)return[];let n=[],r=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r){let r=e[i],o=t[i];if(!Object.is(r,o)&&(n.push({key:i,prev:$d(r),next:$d(o),ref:jd(r,o)}),n.length>=12))break}return n})(Xd.get(e),l),Xd.set(e,l));let c={id:e,elementId:Ud.get(e)??e,parentId:Hd.get(e),phase:a?"mount":t,actualDuration:n,baseDuration:r,changedProps:s},u=qd.get(o);u?(u.elements.push(c),u.elementCount+=1,u.duration=Math.max(u.duration,n)):(ep+=1,qd.set(o,{commitId:ep,timestamp:o,duration:n,elementCount:1,elements:[c],causes:sp()})),a&&(Gd.set(e,qd.get(o)?.commitId??ep),Vd=!0),tp||(tp=!0,rp(ap))},lastCommitId:()=>ep,commitsSince:e=>{let t=[...qd.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...Bd,...t].filter(t=>t.commitId>e)},linkParent:(e,t,n)=>{Hd.has(e)&&Hd.get(e)===t||(Vd=!0),Hd.size>=2e4&&!Hd.has(e)&&(Hd.clear(),Ud.clear(),Wd.clear(),Gd.clear(),Kd.clear(),Vd=!0),Hd.set(e,t),Ud.set(e,n)},markMounted:e=>{Kd.delete(e)&&(Vd=!0)},markUnmounted:e=>{Wd.has(e)?(Kd.set(e,ep),Vd=!0,tp||(tp=!0,rp(ap))):op(e)},recordInputs:(e,t)=>{Jd.set(e,t)},recordStoreChange:e=>{Fd.record(e)},setHydrated:()=>{np||(np=!0,Qd&&zd.setState("hydrated",!0))},start:()=>{Qd=!0,ap(),ip()},stop:()=>{Qd=!1},clear:()=>{Bd=[],qd.clear(),Yd=Fd.lastSeq(),Jd.clear(),ep=0;for(let e of[...Kd.keys()])op(e);Gd.clear(),Vd=!0,ip()}},cp=/* @__PURE__ */F({default:()=>pp}),up=typeof window>"u",dp=up?()=>{}:(e,t,n,r)=>{y(()=>{if(n)return lp.markMounted(t),()=>lp.markUnmounted(t)},[n,t]),((e,t=Ad,n=Od,r=Cd,i=!1)=>{let{eventBridge:o}=f(r);y(()=>{if(i||!o||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&o.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&o.off(e,t,n)}},[e,t,o,n,i])})("element",x(()=>({[`${e}_setState`]:r}),[e,r]))},pp=e=>{let t=e.displayName||e.name,n=(t,{ref:n,traceId:r,parentTraceId:i,parentVisible:a})=>{let{id:s,rootId:l}=t.internalProps,{settings:{previewMode:c,debugMode:u},root:{baseElementId:d}}=Md(),p=Rs(),h=fu(p,`schema.flat.${s}`);if(!h)throw Error(`Element ${s} not found, Page ${d}`);let{internalProps:f,customProps:m,children:g}=kd({store:p,element:h,internalProps:t.internalProps,children:t.children,previewMode:c,parentVisible:a}),{attributes:y,definition:b,style:v,plitziElementLayout:w,elementState:k,setElementState:x}=f;dp(s,r,!!u,x);let S=a&&su(k.visibility),T=uu(()=>({id:s,rootId:l,visible:S,traceId:r,attributes:y,definition:b,plitziElementLayout:w,style:v,elementState:k,setElementState:x}),[y,b,k,s,w,l,v,x,S,r]),C=uu(()=>({visible:S,traceId:r}),[S,r]),E=uu(()=>{let r={...au(e,f.attributes),...t.extraProps,...m,...lu(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return g&&(r={...r,children:g}),up?/* @__PURE__ */_(e,{...r,ref:n}):/* @__PURE__ */_(xd,{children:/* @__PURE__ */_(e,{...r,ref:n})})},[f.attributes,t,m,g,n]),A=up?/* @__PURE__ */_(ba,{value:T,children:E}):/* @__PURE__ */_(iu,{value:C,children:/* @__PURE__ */_(ba,{value:T,children:E})});if(u){lp.linkParent(r,i,s);let e={internalProps:t.internalProps,visible:S,attributes:y,definition:b,style:v,elementState:k,plitziElementLayout:w,children:g,...m,...t.extraProps,...lu(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return lp.recordInputs(r,e),/* @__PURE__ */_(o,{id:r,onRender:lp.onRender,children:A})}return A},r=p(({element:e,traceId:t,parentTraceId:r,parentVisible:i})=>{let o=S(void 0);return n(e,{ref:o,traceId:t,parentTraceId:r,parentVisible:i})},(e,t)=>e.traceId===t.traceId&&e.parentTraceId===t.parentTraceId&&e.parentVisible===t.parentVisible&&((e,t)=>{let n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(n=>Object.hasOwn(e,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))})(e.element,t.element));r.displayName=`withElement(${t}).resolved`;let i=({element:t,parentVisible:n,traceId:r})=>{let{id:i,rootId:o}=t.internalProps,a=x(()=>({id:i,rootId:o,visible:n,traceId:r,plitziJsxSkipHOC:!0}),[i,o,n,r]),s=x(()=>({visible:n,traceId:r}),[n,r]),l=/* @__PURE__ */_(ba,{value:a,children:/* @__PURE__ */_(e,{...t})});/* @__PURE__ */
|
|
23
23
|
return _(iu,{value:s,children:l})},a=up?t=>{let{id:r,rootId:i}=t.internalProps,o=f(ba),a=o?.visible??!0,s=`${r}${v()}`;if(t.plitziJsxSkipHOC)/* @__PURE__ */
|
|
24
24
|
return _(ba,{value:{id:r,rootId:i,visible:a,traceId:o?.traceId??s,plitziJsxSkipHOC:!0},children:/* @__PURE__ */_(e,{...t})});let l=S(void 0);return n(t,{ref:l,traceId:s,parentTraceId:o?.traceId,parentVisible:a})}:e=>{let{id:t}=e.internalProps,n=f(iu),o=n?.visible??!0,a=`${t}${v()}`;return e.plitziJsxSkipHOC?/* @__PURE__ */_(i,{element:e,parentVisible:o,traceId:n?.traceId??a}):/* @__PURE__ */_(r,{element:e,traceId:a,parentTraceId:n?.traceId,parentVisible:o})};return a.displayName=`withElement(${t})`,a},hp=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:o,params:a,serverMarker:s,motion:l,testMarker:u,events:d,children:p})=>""===e?p:c(e,{ref:t,style:n,className:r,...i,...o?{id:o}:{},...a,...l,...d,...s,...u},p),fp=(e,t)=>n=>{let{category:r}=n;return"attribute"===r?Object.keys(e).map(e=>({value:e,label:e})):"state"===r?[{value:"visibility",label:"Visibility"},...Object.keys(t.styleSelectors).map(e=>({value:`styleSelectors.${e}`,label:`Selector - ${e}`}))]:[]},mp=Symbol.for("immer-nothing"),gp=Symbol.for("immer-draftable"),yp=Symbol.for("immer-state");function bp(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var vp=Object,wp=vp.getPrototypeOf,kp="constructor",xp="prototype",Sp="configurable",Tp="enumerable",Cp="writable",Ep="value",Ap=e=>!!e&&!!e[yp];function Op(e){return!!e&&(Np(e)||$p(e)||!!e[gp]||!!e[kp]?.[gp]||jp(e)||zp(e))}var _p=vp[xp][kp].toString(),Ip=/* @__PURE__ */new WeakMap;function Np(e){if(!e||!Fp(e))return!1;const t=wp(e);if(null===t||t===vp[xp])return!0;const n=vp.hasOwnProperty.call(t,kp)&&t[kp];if(n===Object)return!0;if(!Bp(n))return!1;let r=Ip.get(n);return void 0===r&&(r=Function.toString.call(n),Ip.set(n,r)),r===_p}function Mp(e,t,n=!0){0===Pp(e)?(n?Reflect.ownKeys(e):vp.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Pp(e){const t=e[yp];return t?t.type_:$p(e)?1:jp(e)?2:zp(e)?3:0}var Lp=(e,t,n=Pp(e))=>2===n?e.has(t):vp[xp].hasOwnProperty.call(e,t),Rp=(e,t,n=Pp(e))=>2===n?e.get(t):e[t],Dp=(e,t,n,r=Pp(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},$p=Array.isArray,jp=e=>e instanceof Map,zp=e=>e instanceof Set,Fp=e=>"object"==typeof e,Bp=e=>"function"==typeof e,qp=e=>"boolean"==typeof e,Hp=e=>e.copy_||e.base_,Up=e=>e.modified_?e.copy_:e.base_;function Wp(e,t){if(jp(e))return new Map(e);if(zp(e))return new Set(e);if($p(e))return Array[xp].slice.call(e);const n=Np(e);if(!0===t||"class_only"===t&&!n){const t=vp.getOwnPropertyDescriptors(e);delete t[yp];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[Cp]&&(o[Cp]=!0,o[Sp]=!0),(o.get||o.set)&&(t[i]={[Sp]:!0,[Cp]:!0,[Tp]:o[Tp],[Ep]:e[i]})}return vp.create(wp(e),t)}{const t=wp(e);if(null!==t&&n)return{...e};const r=vp.create(t);return vp.assign(r,e)}}function Vp(e,t=!1){return Kp(e)||Ap(e)||!Op(e)||(Pp(e)>1&&vp.defineProperties(e,{set:Gp,add:Gp,clear:Gp,delete:Gp}),vp.freeze(e),t&&Mp(e,(e,t)=>{Vp(t,!0)},!1)),e}var Gp={[Ep]:function(){bp(2)}};function Kp(e){return null===e||!Fp(e)||vp.isFrozen(e)}var Yp="MapSet",Jp="Patches",Xp="ArrayMethods",Zp={};function Qp(e){const t=Zp[e];return t||bp(0),t}var eh,th=e=>!!Zp[e],nh=()=>eh;function rh(e,t){t&&(e.patchPlugin_=Qp(Jp),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ih(e){oh(e),e.drafts_.forEach(sh),e.drafts_=null}function oh(e){e===eh&&(eh=e.parent_)}var ah=e=>eh={drafts_:[],parent_:eh,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:th(Yp)?Qp(Yp):void 0,arrayMethodsPlugin_:th(Xp)?Qp(Xp):void 0};function sh(e){const t=e[yp];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function lh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[yp].modified_&&(ih(t),bp(4)),Op(e)&&(e=ch(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[yp].base_,e,t)}else e=ch(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vp(t,n)}(t,e,!0),ih(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mp?e:void 0}function ch(e,t){if(Kp(t))return t;const n=t[yp];if(!n)return mh(t,e.handledSet_,e);if(!dh(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);fh(n,e)}return n.copy_}function uh(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dh=(e,t)=>e.scope_===t,ph=[];function hh(e,t,n,r){const i=Hp(e),o=e.type_;if(void 0!==r&&Rp(i,r,o)===t)return void Dp(i,r,n,o);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;Mp(i,(e,n)=>{if(Ap(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??ph;for(const s of a)Dp(i,s,n,o)}function fh(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}uh(e)}}function mh(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ap(e)||t.has(e)||!Op(e)||Kp(e)||(t.add(e),Mp(e,(r,i)=>{if(Ap(i)){const t=i[yp];dh(t,n)&&(Dp(e,r,Up(t),e.type_),uh(t))}else Op(i)&&mh(i,t,n)})),e}var gh={get(e,t){if(t===yp)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Hp(e);if(!Lp(i,t,e.type_))return function(e,t,n){const r=vh(t,n);return r?Ep in r?r[Ep]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!Op(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===bh(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||!Op(n)||n[yp])&&e.baseRefs_.has(n)}(e,0,o)){kh(e);const n=1===e.type_?+t:t,r=xh(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in Hp(e),ownKeys:e=>Reflect.ownKeys(Hp(e)),set(e,t,n){const r=vh(Hp(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=bh(Hp(e),t),i=r?.[yp];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Lp(e.base_,t,e.type_)))return!0;kh(e),wh(e)}return e.copy_[t]===n&&(void 0!==n||Lp(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(Ap(n)){const i=n[yp];dh(i,r)&&i.callbacks_.push(function(){kh(e),hh(e,n,Up(i),t)})}else Op(n)&&e.callbacks_.push(function(){const i=Hp(e);3===e.type_?i.has(n)&&mh(n,r.handledSet_,r):Rp(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&mh(Rp(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(kh(e),void 0!==bh(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),wh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Hp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Cp]:!0,[Sp]:1!==e.type_||"length"!==t,[Tp]:r[Tp],[Ep]:n[t]}:r},defineProperty(){bp(11)},getPrototypeOf:e=>wp(e.base_),setPrototypeOf(){bp(12)}},yh={};for(let Qj in gh){let e=gh[Qj];yh[Qj]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function bh(e,t){const n=e[yp];return(n?Hp(n):e)[t]}function vh(e,t){if(!(t in e))return;let n=wp(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=wp(n)}}function wh(e){e.modified_||(e.modified_=!0,e.parent_&&wh(e.parent_))}function kh(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=Wp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function xh(e,t,n,r){const[i,o]=jp(t)?Qp(Yp).proxyMap_(t,n):zp(t)?Qp(Yp).proxySet_(t,n):function(e,t){const n=$p(e),r={type_:n?1:0,scope_:t?t.scope_:nh(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=gh;n&&(i=[r],o=yh);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??nh()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!dh(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=Up(i);hh(e,i.draft_??i,o,n),fh(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function Sh(e){if(!Op(e)||Kp(e))return e;const t=e[yp];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wp(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Wp(e,!0);const i=n;return zp(n)&&(n=/* @__PURE__ */new Set),Mp(i,(e,t)=>{Dp(n,e,Sh(t))},r),t&&(t.finalized_=!1),n}yh.deleteProperty=function(e,t){return yh.set.call(this,e,t,void 0)},yh.set=function(e,t,n){return gh.set.call(this,e[0],t,n,e[0])},globalThis.Iterator;var Th=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Bp(e)&&!Bp(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(Bp(t)||bp(6),void 0===n||Bp(n)||bp(7),Op(e)){const i=ah(this),o=xh(0,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?ih(i):oh(i)}return rh(i,n),lh(r,i)}if(!e||!Fp(e)){if(r=t(e),void 0===r&&(r=e),r===mp&&(r=void 0),this.autoFreeze_&&Vp(r,!0),n){const t=[],i=[];Qp(Jp).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}bp(1)},this.produceWithPatches=(e,t)=>{if(Bp(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},qp(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);const t=e?.useStrictShallowCopy;(qp(t)||"class_only"===t)&&this.setUseStrictShallowCopy(t),qp(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Op(e)||bp(8),Ap(e)&&(Ap(t=e)||bp(10),e=Sh(t));const n=ah(this),r=xh(0,e,void 0);return r[yp].isManual_=!0,oh(n),r}finishDraft(e,t){const n=e&&e[yp];n&&n.isManual_||bp(9);const{scope_:r}=n;return rh(r,t),lh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Qp(Jp).applyPatches_;return Ap(e)?r(e,t):this.produce(e,e=>r(e,t))}},Ch=Th.produce,Eh=e=>{if("string"!=typeof e)return e;let t=e.toLowerCase();return"true"===t||"false"===t||"yes"===t||"no"===t?"true"===t||"yes"===t:e},Ah='input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Oh={desktop:1024,tablet:768,mobile:0},_h=e=>0===Oh[e]?"0":`${String(Oh[e]/16)}rem`,Ih=e=>e<=Oh.tablet?"mobile":e<=Oh.desktop?"tablet":"desktop",Nh="plitzi-sdk-runtime",Mh=e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{}),Ph="https://fonts.googleapis.com",Lh={woff2:"font/woff2",woff:"font/woff"},Rh=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},Dh=e=>{try{return new URL(e).origin}catch{return}},$h={"<":"\\3c ",">":"\\3e "},jh=e=>`"${e.replace(/[\\"<>]/g,e=>$h[e]??`\\${e}`)}"`,zh=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,Fh=e=>encodeURIComponent(e).replace(/%20/g,"+"),Bh=(e,t)=>["@font-face{",`font-family:${jh(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${jh(t.url)}) format(${jh(t.format)});`,t.unicodeRange&&zh.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),qh="plitzi-style",Hh="plitzi-component--hidden",Uh=({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:o,elementState:a})=>{let{items:s}=o,l="component"===i?.type&&i.slots.includes(e),c=Su(l?e:void 0),u=l&&!0===n&&0===(s??[]).length&&null===c,d=su(a.visibility)&&!u;return uu(()=>Zo(t,{[Hh]:!d,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i?.slots.includes(e)},o.styleSelectors.base),[t,d,n,i,s,r,e,o.styleSelectors.base])},Wh=e=>ae.find(t=>t===e)??"smooth",Vh=(e,t)=>se.find(t=>t===e)??t,Gh=ga("InteractionsContext",{}),Kh=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:o}=f(Gh);y(()=>{if(e)return o.subscribe(e),()=>{o.unsubscribe(e)}},[e,o]),y(()=>{e&&o.update(e,t,n,r,i)},[e,t,n,r,i,o])},Yh=(e,t)=>"function"==typeof e.type?e.type(t):e.type,Jh=(e,t)=>{if("string"!=typeof t)return t;if("number"===e){let e=t.trim();if(""===e)return;let n=Number(e);return Number.isFinite(n)?n:t}return"boolean"!==e||"true"!==t&&"false"!==t?t:"true"===t},Xh=(e,t)=>{if(!e)return t;let n="function"==typeof e?e(t):e,r={...t};for(let[i,o]of Object.entries(n))Object.hasOwn(t,i)&&(r[i]=Jh(Yh(o,t),t[i]));return r},Zh=K("copyToClipboard",{title:"Copy To Clipboard",type:"utility",strictParams:!0,params:{text:{type:"text",description:"The words to copy — a template reads the page: {{ navigation.href }} is its address.",default:"",label:"Text",required:!0}}},async({text:e})=>{let t=Xc();if(!t)throw Error("This page has no clipboard to write to: the browser offers none here (a page not on https?)");await t(e)}),Qh={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"number"}},preview:{},callback:({time:e},t)=>new Promise(n=>{let r=t?.signal;if(r?.aborted)return void n(void 0);let i=()=>{clearTimeout(o),r?.removeEventListener("abort",i),n(void 0)},o=setTimeout(i,e);r?.addEventListener("abort",i,{once:!0})})},ef={action:"twigTemplate",title:"Twig Template",type:"utility",params:{returnMode:{label:"Mode",canBind:!1,type:"select",defaultValue:"text",options:[{label:"Text",value:"text"},{label:"Json Text",value:"json"},{label:"Json Object",value:"jsonObject"}]},template:{label:"Template",canBind:!1,defaultValue:"",type:e=>{let{returnMode:t}=e;return"text"===t?"codemirror-text":"codemirror-json"}}},preview:e=>{let{template:t,returnMode:n}=e;if("jsonObject"===n)try{let n=JSON.parse(Mn(t,e));if(n&&"object"==typeof n)return{template:"",content:zc(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Mn(t,e)}catch(e){console.error(e)}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(e){console.error(e)}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},tf={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},nf=(e,t=()=>!0)=>({invalidateQueries:{type:"select",description:"What to refresh once the write succeeded, so the page shows the new data: the requests to the same site, every provider on the page, only the api containers named in `invalidateElements`, or none for a step that only reads. Server-driven containers are refreshed too, asking the server past its cache. Containers on screen ask again at once; the rest when they are shown.",default:e[0],options:[...e],optionLabels:Object.fromEntries(e.map(e=>[e,tf[e]])),label:"Refresh cached requests",canBind:!1,when:t},invalidateElements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id.",default:[],label:"Containers (ids)",when:e=>t(e)&&"elements"===e.invalidateQueries}}),rf=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},of={title:"Webhook",type:"utility",strictParams:!0,params:{url:{type:"text",description:"The URL to call.",default:"",label:"Url"},method:{type:"select",description:"HTTP method.",default:"get",options:["get","post","put","delete","patch","head"],canBind:!1},body:{type:"json",description:'Request body: an object of fields (sent as JSON, or as form data when one of them is a file). Pass a real object, with templates for its values — `{ email: "{{ submitted.values.email }}" }`.',default:"",builderType:"textarea"},authorizationToken:{type:"text",description:"Value sent as the Authorization header.",default:""},headers:{type:"json",description:'Headers of the request, as an object of name to value, with templates for the values like the body: `{ "x-api-key": "{{ apiKey }}" }`. Authorization is set by `authorizationToken` and the content type follows the body, so neither is set here.',default:"",builderType:"textarea"},credentials:{type:"select",description:"fetch credentials mode.",default:"same-origin",options:["include","omit","same-origin"],optionLabels:{"same-origin":"Same Origin"}},cache:{type:"boolean",description:"Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",default:!1,label:"Cache response",when:rf},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>rf(e)&&(!0===e.cache||"true"===e.cache)},...nf(["origin","all","elements","none"],e=>!rf(e))},preview:{response:{status:"",data:""}}},af=["missing","malformed","expired","mismatch"],sf=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),lf=e=>"object"==typeof e&&!!e&&"string"==typeof e.origin&&"string"==typeof e.cookie,cf=/* @__PURE__ */new Map,uf=async(e,t,n)=>{let r=await e(`${n}${t.path}`,{credentials:"include"});if(!r.ok)return;let i=await r.json();return"string"==typeof i.token?(cf.set(n,i.token),i.token):void 0},df=(e,t)=>{let n=new Headers(e.headers);return n.set("x-csrf-token",t),{...e,headers:n}},pf=async(e,t={},n=globalThis.fetch)=>{let r=(e=>{let t=(e??(typeof document>"u"?void 0:document))?.querySelector('meta[name="plitzi-csrf"]')?.getAttribute("content");if(t)try{let e=JSON.parse(t);return(e=>{if("object"!=typeof e||!e)return!1;let{apis:t,path:n}=e;return Array.isArray(t)&&t.every(lf)&&"string"==typeof n})(e)?e:void 0}catch{return}})(),i=((e,t,n)=>{if(!e||"include"!==n.credentials||!sf.has((n.method??"GET").toUpperCase()))return;let r=((e,t)=>{try{return new URL(e,t).origin}catch{return}})(t,typeof location>"u"?void 0:location.href);return e.apis.find(e=>e.origin===r)})(r,e,t);if(!r||!i)return n(e,t);let o=(e=>((e,t)=>{for(let n of e.split(";")){let e=n.indexOf("=");if(-1!==e&&n.slice(0,e).trim()===t)return decodeURIComponent(n.slice(e+1).trim())}})(typeof document>"u"?"":document.cookie,e.cookie)??cf.get(e.origin))(i)??await uf(n,r,i.origin),a=await n(e,o?df(t,o):t);if(!(await(async e=>{if(403!==e.status)return!1;let t=await e.clone().json().catch(()=>{});return af.includes(t?.reason)})(a)))return a;let s=await uf(n,r,i.origin);return s?n(e,df(t,s)):a},hf=3e5,ff=e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)},mf=e=>`entries.${ff(e)}`,gf=new class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=os({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(mf(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(mf(e))}usage(e){let t=this.runtimes.get(ff(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(ff(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=hf){let n=this.ensure(e);return n.gcTime=t,n.holds++,this.cancelGc(n),()=>{n.holds--,this.scheduleGc(n)}}observe(e,t){let n=this.ensure(e),{isCacheable:r}=t,i={meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))};return n.observers.add(i),this.cancelGc(n),(!this.hasAnswer(e)||this.store.isStale(mf(e)))&&this.fetch(n,i),()=>{n.observers.delete(i),this.scheduleGc(n)}}async fetchQuery(e,t){let n=this.ensure(e);if(void 0!==t.gcTime&&(n.gcTime=t.gcTime),this.hasAnswer(e)&&!this.store.isStale(mf(e)))return this.scheduleGc(n),this.getEntry(e)?.data;let{isCacheable:r}=t;await this.fetch(n,{meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))});let i=this.getEntry(e)?.data;return this.scheduleGc(n),i}cancel(e){let t=this.runtimes.get(ff(e));if(!t?.controller)return!1;t.controller.abort(),t.controller=void 0,t.inFlight=void 0;let n=mf(e);return this.getEntry(e)?this.store.setState(`${n}.isFetching`,!1):this.markUnasked(t),!0}refetch(e){let t=this.runtimes.get(ff(e));return t?this.invalidateOne(t):Promise.resolve()}invalidate(e){let t=[];return this.runtimes.forEach(n=>{let r=this.getEntry(n.key);!r||e&&!e({url:r.url,tags:r.tags})||t.push(this.invalidateOne(n))}),Promise.all(t).then(()=>{})}reset({refetch:e=!0}={}){if(this.epochValue++,this.runtimes.forEach(e=>{e.version++,e.inFlight=void 0,e.controller?.abort(),e.controller=void 0}),this.store.setState("entries",{}),!e)return this.runtimes.forEach(e=>this.markUnasked(e)),Promise.resolve();let t=[];return this.runtimes.forEach(e=>t.push(this.fetchActive(e))),Promise.all(t).then(()=>{})}markUnasked(e){let t=e.observers.values().next();if(t.done)return;let n={key:e.key,url:t.value.meta.url,tags:[...e.tags],isFetching:!1};this.store.setState(mf(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(mf(e.key)).length&&e.version++,this.fetchActive(e)}onExpired(e){let t=this.runtimes.get(e.slice(8).split(".")[0]);t&&(t.version++,this.fetchActive(t))}fetchActive(e){let t=e.observers.values().next();return t.done?Promise.resolve():this.fetch(e,t.value)}fetch(e,t){if(e.inFlight)return e.inFlight;let{key:n}=e,{url:r}=t.meta;t.meta.tags?.forEach(t=>e.tags.add(t));let i=[...e.tags],o=mf(n);this.getEntry(n)?this.store.setState(`${o}.isFetching`,!0):this.store.setState(o,{key:n,url:r,tags:i,isFetching:!0});let a=this.epochValue,s=e.version,l=new AbortController,c=c=>{if(a!==this.epochValue||this.runtimes.get(ff(n))!==e||e.controller!==l)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let u=s!==e.version;if("error"in c){let e=this.getEntry(n);this.store.setState(o,{key:n,url:r,tags:i,data:e?.data,error:c.error,isFetching:!1},{ttl:0})}else{let a=!u&&(t.isCacheable?.(c.data)??!0);this.store.setState(o,{key:n,url:r,tags:i,data:c.data,isFetching:!1},{ttl:a?this.ttlOf(e,t):0})}return u?this.fetchActive(e):Promise.resolve()};return e.controller=l,e.inFlight=t.fetcher(l.signal).then(e=>c({data:e}),e=>c({error:e})),e.inFlight}ttlOf(e,t){let n=e.observers.size>0?1/0:t.staleTime;return e.observers.forEach(e=>{n=Math.min(n,e.staleTime)}),n}ensure(e){let t=ff(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){e.holds>0||e.observers.size>0||(this.cancelGc(e),e.gcTime<=0?this.collect(e):(e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)))}collect(e){let t=ff(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(mf(e.key),void 0,{unmount:!0}))}},yf=/* @__PURE__ */new Set,bf=e=>Promise.allSettled([...yf].filter(t=>!e||e(t)).map(e=>e.refresh())).then(()=>{}),{useStore:vf}=Ls(),wf=()=>typeof location>"u"?void 0:location.href,kf=e=>{try{return new URL(e,wf()).origin}catch{return}},xf=(e,t)=>({id:n,url:r})=>(!t||void 0!==r)&&e({url:r??"",tags:[n]}),Sf=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim()):"string"==typeof e?e.split(",").map(e=>e.trim()).filter(Boolean):[],Tf=e=>{try{return new URL(e,wf()).href}catch{return e}},Cf=(e={})=>{let t=e.url||e.elements?.length?(({url:e,elements:t})=>{let n=e?Tf(e):void 0;return e=>(void 0===n||Tf(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))})(e):void 0;return Promise.all([gf.invalidate(t),bf(t&&xf(t,!!e.url))]).then(()=>{})},Ef=({method:e,url:t,credentials:n,headers:r})=>JSON.stringify([e.toLowerCase(),t,n,Object.entries(r).filter(([e])=>"content-type"!==e.toLowerCase()).sort(([e],[t])=>e<t?-1:+(e>t))]),Af=({mode:e,fallback:t,elements:n,url:r})=>{let i="origin"===e||"all"===e||"elements"===e||"none"===e?e:t;if("none"===i)return Promise.resolve();if("elements"===i){let e=Sf(n);return e.length>0?Cf({elements:e}):Promise.resolve()}return"origin"===i&&r?(e=>{let t=kf(e);if(!t)return Promise.resolve();let n=e=>kf(e.url)===t;return Promise.all([gf.invalidate(n),bf(xf(n,!0))]).then(()=>{})})(r):Cf()},Of=/* @__PURE__ */new Set(["GET","HEAD"]),_f=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),If=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(of.params.staleTime.default))},Nf=e=>e?{Authorization:`Bearer ${e}`}:{},Mf=/* @__PURE__ */new Set(["authorization","content-type"]),Pf=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||Mf.has(e.toLowerCase())?[]:[[e,String(t)]])):{},Lf=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},o,a)=>{let s=(e=>"object"==typeof e&&e?e:{})(r),l=Object.values(s).some(e=>e instanceof Blob),c={method:o,headers:{...Pf(n),...l?{}:{"Content-Type":"application/json"},...Nf(t)},credentials:i,...a?{signal:a}:{}};if(!_f.has(o))if(l){let e=new FormData;Object.entries(s).forEach(([t,n])=>{e.append(t,n)}),c.body=e}else c.body=JSON.stringify(s);let u=await pf(e,c).catch(t=>{throw Error(`${o} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),d="";try{d=await u.json()}catch{}return{status:u.status,data:d}},Rf=K("webHook",of,async(e,t)=>{let n=(e.method||"get").toUpperCase();if(Of.has(n)){if(!0!==e.cache&&"true"!==e.cache)return{response:await Lf(e,n,t?.signal)};let r=Ef({method:n,url:e.url,credentials:e.credentials,headers:{...Pf(e.headers),...Nf(e.authorizationToken)}});return{response:await gf.fetchQuery(r,{meta:{url:e.url},fetcher:()=>Lf(e,n),staleTime:If(e.staleTime),isCacheable:e=>e.status<400})}}let r=await Lf(e,n,t?.signal);return r.status>=200&&r.status<300&&Af({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:r}}),Df={copyToClipboard:Zh,delayTime:Qh,twigTemplate:ef,webHook:Rf},$f=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let o={...n,...r},a=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=((e,t)=>{let n=e,r=5;for((e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e))(n)&&!oe(e)&&(n=$n(e,t),r--);"string"==typeof n&&oe(n)&&r>0;)n=$n(n,t),r--;return{value:n,unresolved:"string"==typeof n&&oe(n)}})(e,o);return r&&bl.warning("interactions",/* @__PURE__ */I("span",{children:["Twig token resolution exceeded ",5," passes for ",
|
|
@@ -192,4 +192,4 @@ return I(HR,{className:Zo(e,t&&"system"!==r&&r),"data-hydrated":i?"":void 0,chil
|
|
|
192
192
|
return _(eu,{value:p,children:n})},Sj=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),Tj={Button:PM,ContentEditable:Fv,Input:iP,Heading:ZM,ContainerResizable:HM,ContainerCollapsable:BM,Text:lP,ContainerTabs:JM},Cj=({className:e,children:t,webKey:r="",server:o,renderMode:a=el.renderMode,routing:s="browser",debugMode:l=!1,themeScope:c,theme:d,scheme:p,state:h,forcedFlags:g,...b})=>{const v=x(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}let n=Number(ir(t,"sub",0));return Number.isInteger(n)&&n>0?n:0}(r),[r]),w=f(ya),k=c??(w?"container":"document"),C=w&&"raw"===a?"widget":a,E=e??(w?void 0:"min-h-screen"),A=S(h).current,O=x(()=>({runtime:{sources:{},state:A??{}},render:{...el,ownsHead:!w,enclosed:w}}),[A,w]),I=x(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[N,M]=T(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(I)),P=l&&N,[L]=T(()=>g||!l||"undefined"==typeof window?g:((e,t)=>(e=>e?Object.fromEntries(e.split(",").map(e=>e.split(":")).filter(([e,t])=>ju(e)&&("1"===t||"0"===t)).map(([e,t])=>[e,"1"===t])):{})(wl(e,zu(t))))(kl(),window.location.host)),R=x(()=>Sj(o),[o]);y(()=>{},[]);const D=m(()=>{const e=!N;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(I,e),M(e)},[I,N]);(({authorized:e,onToggle:t})=>{const n=m(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);y(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:l,onToggle:D}),y(()=>{},[l,N,I]),y(()=>{if(P)return window.plitziTracing={lastCommitId:lp.lastCommitId,commitsSince:lp.commitsSince},()=>{delete window.plitziTracing}},[P]),y(()=>{b.isHydrating&&lp.setHydrated()},[b.isHydrating]);const $=S({}),j=x(()=>{const e={};n.forEach(t,t=>{if(!u(t))return;if(t.type!==e$)return;const{renderType:n,component:r,assets:i=[],...o}=t.props;if(!n||!r)return;const a=r;a.type=n,a.assets=i,a.extraProps=o,e[n]=a});const r=$.current,i=Object.keys(e);return i.length===Object.keys(r).length&&i.every(t=>r[t]===e[t])?r:($.current=e,e)},[t]);"undefined"==typeof window&&R.requestUrl;const z="widget"===C?i:"undefined"==typeof window?sR:"memory"===s?IL:eR,F="widget"===C?{}:{..."memory"===s&&"undefined"!=typeof window?{}:{basename:vc(R,"basePath","/"),location:"undefined"==typeof window?R.requestUrl??"":void 0}};/* @__PURE__ */
|
|
193
193
|
return _(ya,{value:!0,children:/* @__PURE__ */_(Is,{value:O,middlewares:[il(vl("sdk")),$l(v),...P?[()=>({onChange:e=>lp.recordStoreChange(e)}),Bs({shouldRecord:e=>!(e?.startsWith("runtime.elements")||e?.startsWith("rsc")||e?.startsWith("theme")||e?.startsWith("flags"))})]:[]],children:/* @__PURE__ */_(dj,{scope:k,theme:d,scheme:p,children:/* @__PURE__ */_(sP,{components:Tj,applyColorModeClass:!1,children:/* @__PURE__ */_(hj,{scoped:"container"===k,className:Zo("plitzi-sdk","flex",E,{"sdk-debug-mode":P}),children:/* @__PURE__ */_(J_,{children:/* @__PURE__ */_(z,{...F,children:/* @__PURE__ */_(xj,{localCustomComponents:j,localComponents:Aj,children:/* @__PURE__ */_(uj,{server:R,webKey:r,renderMode:C,debugMode:P,webId:v,forcedFlags:L,...b})})})})})})})})})},Ej=pp(({ref:e,className:t,spaceKey:n,environment:r="main",offlineData:i})=>{const{settings:{previewMode:o}}=Md(),{server:a}=f(Ld),s=x(()=>void 0===i?void 0:(e=>{if(!ut(e))return{problem:"The documents cannot be drawn: they are not an object with `schema` and `style`."};const t=["schema","style"].filter(t=>void 0===e[t]);return t.length>0?{waiting:t}:(e=>void 0===_M(e.schema,e.style))(e)?{documents:e}:{problem:`The documents cannot be drawn: ${_M(e.schema,e.style)??"their shape is unknown"}.`}})(i),[i]),l=s&&"problem"in s?s.problem:void 0,c=s&&"waiting"in s?s.waiting:void 0,u=s&&"documents"in s?s.documents:void 0,d=void 0!==s&&!!n;return y(()=>{l&&console.error(`[plitziSdk] ${l}`)},[l]),y(()=>{d&&console.warn("[plitziSdk] Both `offlineData` and `spaceKey` are set: the documents are drawn, the key is not.")},[d]),/* @__PURE__ */I(Ym,{ref:e,className:Zo("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!o}),children:[u&&/* @__PURE__ */_(Cj,{offlineMode:!0,offlineData:u,environment:r,renderMode:"widget",className:"h-full w-full"}),!s&&n&&/* @__PURE__ */_(Cj,{webKey:n,environment:r,server:a,renderMode:"widget",className:"h-full w-full"}),l&&!o&&/* @__PURE__ */_("p",{className:"plitzi-sdk__problem",children:l}),c&&!o&&/* @__PURE__ */I("p",{className:"plitzi-sdk__waiting",children:["Waiting for ",c.map(e=>`\`${e}\``).join(" and ")," to be bound."]})]})}),Aj={plitziSdk:Object.assign(Ej,{...Se,content:{...Se.content,market:{...Se.content.market,icon:/* @__PURE__ */_(q,{})}}})},Oj=class extends Error{stage;log;constructor(e,t){super(`${"link"===e?"program failed to link":`${e} shader failed`}: ${t.trim()||"no log given"}`),this.name="ShaderError",this.stage=e,this.log=t}},_j=(e,t,n)=>{let r=e.createShader("vertex"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(!r)throw new Oj(t,"the context made no shader (it is lost)");if(e.shaderSource(r,n),e.compileShader(r),!0!==e.getShaderParameter(r,e.COMPILE_STATUS)){let n=e.getShaderInfoLog(r)??"";throw e.deleteShader(r),new Oj(t,n)}return r},Ij=(e,{vertex:t,fragment:n})=>{let r=_j(e,"vertex",t),i=_j(e,"fragment",n),o=e.createProgram();if(e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.deleteShader(r),e.deleteShader(i),!0!==e.getProgramParameter(o,e.LINK_STATUS)){let t=e.getProgramInfoLog(o)??"";throw e.deleteProgram(o),new Oj("link",t)}return o},Nj="(prefers-reduced-motion: reduce)",Mj=()=>"function"==typeof window.matchMedia&&window.matchMedia(Nj).matches||document.documentElement.classList.contains("plitzi-reduced-motion"),Pj=e=>{let t="function"==typeof window.matchMedia?window.matchMedia(Nj):void 0;t?.addEventListener("change",e);let n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t?.removeEventListener("change",e),n.disconnect()}},Lj=()=>C(Pj,Mj,()=>!1),Rj=e=>(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),Dj=()=>"hidden"!==document.visibilityState,$j=(e,{paused:t=!1,fps:n,target:r}={})=>{let i=Md().settings.previewMode??!0,o=Lj(),a=C(Rj,Dj,()=>!1),s=(e=>{let[t,n]=T(!0);return y(()=>{let t=e?.current;if(!t||typeof IntersectionObserver>"u")return;let r=new IntersectionObserver(e=>n(e.some(e=>e.isIntersecting)));return r.observe(t),()=>r.disconnect()},[e]),t})(r),l=i&&!o&&!t&&a&&s,c=S(e);y(()=>{c.current=e},[e]);let u=S({time:0,frame:0});return y(()=>{if(!l)return;let e,t=n&&n>0?1e3/n:0,r=0,i=0,o=n=>{let a=void 0===e?0:n-e;if(e=n,i+=a,i>=t){let e=t>0?i:a;i=t>0?i%t:0,u.current={time:u.current.time+e,frame:u.current.frame+1},c.current({...u.current,delta:e})}r=requestAnimationFrame(o)};return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[l,n]),{running:l}},jj=(e,{setup:t,draw:n,maxPixelRatio:r=2,paused:i,fps:o})=>{let a=(e=>`[plugin ${e?.definition?.type??"canvas"}${e?.id?` "${e.id}"`:""}]`)(f(ba)),s=S(null),[l,c]=T(null),[u,d]=T({width:0,height:0,pixelRatio:1}),[p,h]=T(),[g,b]=T(!1),[v,w]=T(0),k=S(null),x=S({acquire:e,setup:t,draw:n});y(()=>{x.current={acquire:e,setup:t,draw:n}},[e,t,n]);let C=m(e=>{let t=e instanceof Error?e.message:String(e);console.error(`${a} ${t}`),h(t)},[a]),E=m(e=>{s.current=e,c(e)},[]);y(()=>{if(!l)return;let e=()=>{let e=l.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,r);l.width=Math.max(1,Math.round(e.width*t)),l.height=Math.max(1,Math.round(e.height*t)),d({width:e.width,height:e.height,pixelRatio:t})};if(e(),typeof ResizeObserver>"u")return;let t=new ResizeObserver(e);return t.observe(l),()=>t.disconnect()},[l,r]),y(()=>{if(!l)return;let e=e=>{e.preventDefault(),k.current=null,b(!1)},t=()=>w(e=>e+1);return l.addEventListener("webglcontextlost",e),l.addEventListener("webglcontextrestored",t),()=>{l.removeEventListener("webglcontextlost",e),l.removeEventListener("webglcontextrestored",t)}},[l]),y(()=>{if(l&&0!==u.width&&void 0===p)try{let e=x.current.acquire(l);if(!e)return void C(/* @__PURE__ */Error("the browser gave no drawing context (WebGL may be off)"));e.prepare(u);let t=x.current.setup?x.current.setup(e.context,u):void 0;k.current={handle:e,state:t}}catch(Oj){C(Oj)}},[l,u,v,p,C]);let A=m(e=>{let t=k.current;if(t&&void 0===p)try{t.handle.prepare(u),x.current.draw(t.handle.context,{...e,...u,state:t.state}),b(!0)}catch(e){k.current=null,C(e)}},[u,p,C]),{running:O}=$j(A,{paused:i||void 0!==p,fps:o,target:s});return y(()=>{!O&&u.width>0&&A({time:0,delta:0,frame:0})},[O,u,v,A]),{ref:E,ready:g,error:p,running:O}},zj=({attributes:e,...t})=>jj(m(t=>{let n=t.getContext("2d",e);return n&&{context:n,prepare:({pixelRatio:e})=>n.setTransform(e,0,0,e,0,0)}},[e]),t),Fj=({attributes:e,...t})=>jj(m(t=>{let n=t.getContext("webgl",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),Bj=({attributes:e,...t})=>jj(m(t=>{let n=t.getContext("webgl2",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),qj=e=>{const t=f(tm);return m(async(n,r={})=>{if(!t)return console.warn(`[plitzi] useServerAction: nothing on this page runs server actions, so "${e}" was skipped`),{ok:!1,runId:"",reason:"skipped"};const i=await t({actionId:e,input:n,...r});return"completed"!==i.status?{ok:!1,runId:i.runId,reason:i.reason??i.status,...i.error?{error:i.error}:{}}:{ok:!0,runId:i.runId,output:i.output}},[e,t])},Hj=(e,t)=>new Promise(n=>{const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.dataset.plitziPlugin=t,r.onload=()=>n(),r.onerror=()=>n(),document.head.append(r)}),Uj=(e,{load:t,css:n,declaration:r})=>{let i;const o=(r,{content:s,version:l,initialItems:c,plugins:u})=>{const p=d(async()=>({default:r.reduce((t,n)=>{const r=t.plugins?.[n];if(!r)throw new Error(`[plitzi] plugin "${e}" was loaded without the "${n}" it declared`);return r},await(i??=Promise.all([t(),n?Hj(n,e):void 0]).then(([e])=>e.default)))})),h=e=>/* @__PURE__ */_(a,{fallback:null,children:/* @__PURE__ */_(p,{...e})});return h.displayName=`Deferred(${r.at(-1)??e})`,Object.assign(h,{content:s,version:l,initialItems:c,plugins:u?Object.fromEntries(Object.entries(u).map(([e,t])=>[e,o([...r,e],t)])):void 0})};return o([],r)},Wj=e=>{try{return JSON.stringify({...e},(e,t)=>"function"==typeof t?void 0:t)}catch{return}},Vj=e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map;return{plugins:Object.fromEntries(Object.entries(e).map(([e,i])=>{t.set(e,i.component);const o=((e,r)=>{const i=(e=>t=>{const r=n.get(e)??/* @__PURE__ */new Set;return r.add(t),n.set(e,r),()=>{r.delete(t)}})(e),o=()=>t.get(e)??r,a=e=>{const t=C(i,o,o);/* @__PURE__ */
|
|
194
194
|
return _(t,{...e})};return a.displayName=`Hot(${r.displayName??r.name})`,Object.assign(a,r)})(e,i.component);return r.set(e,o),[e,{...i,component:o}]})),replace:(e,i)=>{const o=t.get(e),a=r.get(e);return!(!o||!a||Wj(o)!==Wj(i)||(t.set(e,i),n.get(e)?.forEach(e=>{e()}),0))}}};Promise.resolve({ });var Gj=e=>Object.values(e?.schema.flat??{}).some(e=>"server"===e.definition.runtime);function Kj(e,t={},n={},r=!1,i=!1,{hotPlugins:o=!1}={}){const a=Object.fromEntries(Object.entries(n).map(([e,t])=>{if("component"in t)return[e,t];const{load:n,css:r,declaration:i,...o}=t;return[e,{...o,component:Uj(e,{load:n,css:r,declaration:i})}]})),s=o?Vj(a):void 0,l=s?.plugins??a,{actionRuns:c,...u}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=Sj(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),d="undefined"!=typeof document?document.getElementById(e):void 0,p=u.debugMode??r;p&&c?.length&&pl(c);let f,g=u.offlineData;const b=({isHydrating:e=!1})=>{const[t,n]=T(u.offlineData);y(()=>(f=n,()=>{f=void 0}),[]);const[r,i]=T(!e);y(()=>i(!0),[]);const o=Object.keys(l).filter(e=>r||!l[e].clientOnly);p||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const a=m(e=>{G$=e},[]),s=m(e=>{K$=e},[]);/* @__PURE__ */
|
|
195
|
-
return _(Cj,{...u,offlineData:t,debugMode:p,isHydrating:e,onInitStateManager:a,onInitEventBridge:s,children:o.filter(e=>!!l[e].component).map(e=>/* @__PURE__ */_(o$.Plugin,{renderType:e,component:l[e].component,...l[e].props},e))})};if(!d)return;Mu(u.server?.scriptPolicy);const v=i?((e,t)=>{let n;if(h(()=>{n=A(e,t)}),!n)throw new Error("hydrateRoot did not run inside startTransition");return n})(d,/* @__PURE__ */_(b,{isHydrating:!0})):E(d);return i||v.render(/* @__PURE__ */_(b,{})),{unmount:()=>v.unmount(),replacePlugin:(e,t)=>s?.replace(e,t)??!1,replaceSpace:e=>!(!f||!u.offlineMode||Gj(g)||Gj(e)||(g=e,f(e),0))}}var Yj=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:o=el.renderMode,...a})=>/* @__PURE__ */_(Cj,{...a,isHydrating:t,renderMode:o,debugMode:e,webKey:r,environment:i,children:n});Yj.Plugin=o$.Plugin;var Jj="0.39.
|
|
195
|
+
return _(Cj,{...u,offlineData:t,debugMode:p,isHydrating:e,onInitStateManager:a,onInitEventBridge:s,children:o.filter(e=>!!l[e].component).map(e=>/* @__PURE__ */_(o$.Plugin,{renderType:e,component:l[e].component,...l[e].props},e))})};if(!d)return;Mu(u.server?.scriptPolicy);const v=i?((e,t)=>{let n;if(h(()=>{n=A(e,t)}),!n)throw new Error("hydrateRoot did not run inside startTransition");return n})(d,/* @__PURE__ */_(b,{isHydrating:!0})):E(d);return i||v.render(/* @__PURE__ */_(b,{})),{unmount:()=>v.unmount(),replacePlugin:(e,t)=>s?.replace(e,t)??!1,replaceSpace:e=>!(!f||!u.offlineMode||Gj(g)||Gj(e)||(g=e,f(e),0))}}var Yj=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:o=el.renderMode,...a})=>/* @__PURE__ */_(Cj,{...a,isHydrating:t,renderMode:o,debugMode:e,webKey:r,environment:i,children:n});Yj.Plugin=o$.Plugin;var Jj="0.39.9",Xj=()=>G$,Zj=()=>K$;export{Nu as A,Fs as B,gf as C,eu as ComponentContext,xj as ComponentProvider,Sd as D,zd as E,wc as F,ka as G,ws as H,vc as I,Gi as J,Qm as JsxManager,Zo as K,ml as L,Zc as M,$c as N,Fu as O,Ac as P,Pd as PlitziProvider,Wy as PluginManager,tu as PluginRemote,xM as PluginSource,qu as PluginsContext,ul as R,Vy as ReplicaProvider,Ym as RootElement,tw as S,Oj as ShaderError,lp as T,ms as U,Ts as V,gs as W,ut as X,Vi as Y,ct as Z,WM as _,W$ as a,OO as b,M$ as c,Ij as createShaderProgram,x$ as d,Yj as default,TM as elementChildren,v$ as f,XM as g,Zj as getEventBridge,Xj as getStateManager,oP as h,U$ as i,Qc as j,Bu as k,E$ as l,d$ as m,X$ as n,P$ as o,b$ as p,ko as q,V$ as r,Kj as render,N$ as s,Aj as sdkComponents,nj as t,mR as track,w$ as u,$j as useAnimationFrame,zj as useCanvas2d,yN as useChannel,wI as useDisplayMode,va as useElement,kI as useElementSize,EM as useElementVisible,kM as useFlag,wM as useJob,jD as useNotify,Md as usePlitzi,mc as usePluginRoute,AM as usePluginTrigger,Lj as useReducedMotion,gc as useRscData,fc as useRscRefresh,qj as useServerAction,Vs as useStore,Fj as useWebGL,Bj as useWebGL2,qM as v,Jj as version,Ih as w,pp as withElement,aw as x,LM as y,qs as z};
|
package/dist/plitzi-sdk.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/plitzi-sdk",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.9",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
34
34
|
"@plitzi/nexus": "^1.5.1",
|
|
35
35
|
"@plitzi/plitzi-ui": "^1.6.40",
|
|
36
|
-
"@plitzi/sdk-auth": "0.39.
|
|
37
|
-
"@plitzi/sdk-dev-tools": "0.39.
|
|
38
|
-
"@plitzi/sdk-elements": "0.39.
|
|
39
|
-
"@plitzi/sdk-event-bridge": "0.39.
|
|
40
|
-
"@plitzi/sdk-interactions": "0.39.
|
|
41
|
-
"@plitzi/sdk-navigation": "0.39.
|
|
42
|
-
"@plitzi/sdk-plugins": "0.39.
|
|
43
|
-
"@plitzi/sdk-schema": "0.39.
|
|
44
|
-
"@plitzi/sdk-shared": "0.39.
|
|
45
|
-
"@plitzi/sdk-style": "0.39.
|
|
46
|
-
"@plitzi/sdk-variables": "0.39.
|
|
36
|
+
"@plitzi/sdk-auth": "0.39.9",
|
|
37
|
+
"@plitzi/sdk-dev-tools": "0.39.9",
|
|
38
|
+
"@plitzi/sdk-elements": "0.39.9",
|
|
39
|
+
"@plitzi/sdk-event-bridge": "0.39.9",
|
|
40
|
+
"@plitzi/sdk-interactions": "0.39.9",
|
|
41
|
+
"@plitzi/sdk-navigation": "0.39.9",
|
|
42
|
+
"@plitzi/sdk-plugins": "0.39.9",
|
|
43
|
+
"@plitzi/sdk-schema": "0.39.9",
|
|
44
|
+
"@plitzi/sdk-shared": "0.39.9",
|
|
45
|
+
"@plitzi/sdk-style": "0.39.9",
|
|
46
|
+
"@plitzi/sdk-variables": "0.39.9",
|
|
47
47
|
"clsx": "^2.1.1",
|
|
48
48
|
"react-router-dom": "^7.18.5"
|
|
49
49
|
},
|