@rulecms/widget-svelte 0.3.0 → 0.4.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/dist/index.cjs CHANGED
@@ -1,13 +1,13 @@
1
- "use strict";var Ss=Object.defineProperty;var Lr=e=>{throw TypeError(e)};var Es=(e,t,n)=>t in e?Ss(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>Es(e,typeof t!="symbol"?t+"":t,n),On=(e,t,n)=>t.has(e)||Lr("Cannot "+n);var v=(e,t,n)=>(On(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>t.has(e)?Lr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),J=(e,t,n,r)=>(On(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),j=(e,t,n)=>(On(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zn=require("svelte"),Ts="5";var to;typeof window<"u"&&((to=window.__svelte??(window.__svelte={})).v??(to.v=new Set)).add(Ts);const Is=1,Ds=2,oo=4,Ps=8,ks=16,Ls=1,Rs=2,B=Symbol("uninitialized"),io="http://www.w3.org/1999/xhtml",xs="http://www.w3.org/2000/svg",Ms="@attach",so=!1;var tr=Array.isArray,Ns=Array.prototype.indexOf,fn=Array.prototype.includes,nr=Array.from,Os=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,Ws=Object.getOwnPropertyDescriptors,Fs=Object.prototype,Vs=Array.prototype,lo=Object.getPrototypeOf;function It(e){return typeof e=="function"}const js=()=>{};function Bs(e){for(var t=0;t<e.length;t++)e[t]()}function ao(){var e,t,n=new Promise((r,o)=>{e=r,t=o});return{promise:n,resolve:e,reject:t}}const G=2,wt=4,rr=8,or=1<<24,be=16,pe=32,Be=64,Us=128,ue=512,H=1024,U=2048,we=4096,Z=8192,ce=16384,Et=32768,Rr=1<<25,Ue=65536,dn=1<<17,Ks=1<<18,Sn=1<<19,Hs=1<<20,Ee=1<<25,$e=65536,pn=1<<21,dt=1<<22,Ve=1<<23,pt=Symbol("$state"),Gs=Symbol("legacy props"),Ys=Symbol(""),Wn=Symbol("attributes"),xr=Symbol("class"),Mr=Symbol("style"),rn=Symbol("text"),Xt=new class extends Error{constructor(){super(...arguments);ge(this,"name","StaleReactionError");ge(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var no;const ir=!!((no=globalThis.document)!=null&&no.contentType)&&globalThis.document.contentType.includes("xml");function zs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function qs(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Xs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Zs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Js(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Qs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function $s(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function el(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function tl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nl(){console.warn("https://svelte.dev/e/derived_inert")}function rl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function uo(e){return e===this.v}function ol(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function co(e){return!ol(e,this.v)}let il=!1,fe=null;function hn(e){fe=e}function Me(e,t=!1,n){fe={p:fe,i:!1,c:null,e:null,s:e,x:null,r:R,l:null}}function Ne(e){var t=fe,n=t.e;if(n!==null){t.e=null;for(var r of n)Do(r)}return t.i=!0,fe=t.p,{}}function fo(){return!0}let ut=[];function sl(){var e=ut;ut=[],Bs(e)}function Vt(e){if(ut.length===0){var t=ut;queueMicrotask(()=>{t===ut&&sl()})}ut.push(e)}function ll(e){var t=R;if(t===null)return k.f|=Ve,e;if((t.f&Et)===0&&(t.f&wt)===0)throw e;gn(e,t)}function gn(e,t){if(!(t!==null&&(t.f&ce)!==0)){for(;t!==null;){if((t.f&Us)!==0){if((t.f&Et)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const al=-7169;function V(e,t){e.f=e.f&al|t}function sr(e){(e.f&ue)!==0||e.deps===null?V(e,H):V(e,we)}function po(e){if(e!==null)for(const t of e)(t.f&G)===0||(t.f&$e)===0||(t.f^=$e,po(t.deps))}function ul(e,t,n){(e.f&U)!==0?t.add(e):(e.f&we)!==0&&n.add(e),po(e.deps),V(e,H)}function cl(e,t){if(t){const n=document.body;e.autofocus=!0,Vt(()=>{document.activeElement===n&&e.focus()})}}function Zt(e){var t=k,n=R;Ie(null),He(null);try{return e()}finally{Ie(t),He(n)}}function ho(e,t,n,r){const o=lr;var i=e.filter(d=>!d.settled),s=t.map(o);if(n.length===0&&i.length===0){r(s);return}var l=R,u=fl(),c=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((l.f&ce)===0){u();try{r([...s,...d])}catch(y){gn(y,l)}vn()}}var p=go();if(n.length===0){c.then(()=>f([])).finally(p);return}function a(){Promise.all(n.map(d=>dl(d))).then(f).catch(d=>gn(d,l)).finally(p)}c?c.then(()=>{u(),a(),vn()}):a()}function fl(){var e=R,t=k,n=fe,r=L;return function(i=!0){He(e),Ie(t),hn(n),i&&(e.f&ce)===0&&(r==null||r.activate(),r==null||r.apply())}}function vn(e=!0){He(null),Ie(null),hn(null),e&&(L==null||L.deactivate())}function go(){var e=R,t=e.b,n=L,r=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,n),n.increment(r,e),()=>{t==null||t.update_pending_count(-1,n),n.decrement(r,e)}}function lr(e){var t=G|U;return R!==null&&(R.f|=Sn),{ctx:fe,deps:null,effects:null,equals:uo,f:t,fn:e,reactions:null,rv:0,v:B,wv:0,parent:R,ac:null}}const Lt=Symbol("obsolete");function dl(e,t,n){let r=R;r===null&&zs();var o=void 0,i=Bt(B),s=!k,l=new Set;return Dl(()=>{var d,y;var u=R,c=ao();o=c.promise;try{Promise.resolve(e()).then(c.resolve,m=>{m!==Xt&&c.reject(m)}).finally(vn)}catch(m){c.reject(m),vn()}var f=L;if(s){if((u.f&Et)!==0)var p=go();if((d=r.b)!=null&&d.is_rendered())(y=f.async_deriveds.get(u))==null||y.reject(Lt);else for(const m of l.values())m.reject(Lt);l.add(c),f.async_deriveds.set(u,c)}const a=(m,h=void 0)=>{p==null||p(),l.delete(c),h!==Lt&&(f.activate(),h?(i.f|=Ve,Ut(i,h)):((i.f&Ve)!==0&&(i.f^=Ve),Ut(i,m)),f.deactivate())};c.promise.then(a,m=>a(null,m||"unknown"))}),fr(()=>{for(const u of l)u.reject(Lt)}),new Promise(u=>{function c(f){function p(){f===o?u(i):c(o)}f.then(p,p)}c(o)})}function D(e){const t=lr(e);return Oo(t),t}function pl(e){const t=lr(e);return t.equals=co,t}function hl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)de(t[n])}}function ar(e){var t,n=R,r=e.parent;if(!Ke&&r!==null&&e.v!==B&&(r.f&(ce|Z))!==0)return nl(),e.v;He(r);try{e.f&=~$e,hl(e),t=jo(e)}finally{He(n)}return t}function vo(e){var t=ar(e);if(!e.equals(t)&&(e.wv=Fo(),(!(L!=null&&L.is_fork)||e.deps===null)&&(L!==null?(L.capture(e,t,!0),Wt==null||Wt.capture(e,t,!0)):e.v=t,e.deps===null))){V(e,H);return}Ke||(z!==null?(Io()||L!=null&&L.is_fork)&&z.set(e,t):sr(e))}function gl(e){var t;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),n.ac!==null&&Zt(()=>{n.ac.abort(Xt),n.ac=null}),n.fn!==null&&(n.teardown=js),Kt(n,0),pr(n))}function yo(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&At(t)}let Fn=null,lt=null,L=null,Wt=null,z=null,qn=null,Vn=!1,ct=null,sn=null;var Nr=0;let vl=1;var gt,We,qe,vt,yt,mt,Re,_t,Q,Yt,xe,ye,Ae,bt,Xe,x,Xn,Rt,Zn,mo,_o,at,yl,xt;const Cn=class Cn{constructor(){F(this,x);ge(this,"id",vl++);F(this,gt,!1);ge(this,"linked",!0);F(this,We,null);F(this,qe,null);ge(this,"async_deriveds",new Map);ge(this,"current",new Map);ge(this,"previous",new Map);F(this,vt,new Set);F(this,yt,new Set);F(this,mt,0);F(this,Re,new Map);F(this,_t,null);F(this,Q,[]);F(this,Yt,[]);F(this,xe,new Set);F(this,ye,new Set);F(this,Ae,new Map);F(this,bt,new Set);ge(this,"is_fork",!1);F(this,Xe,!1);lt===null?Fn=lt=this:(J(lt,qe,this),J(this,We,lt)),lt=this}skip_effect(t){v(this,Ae).has(t)||v(this,Ae).set(t,{d:[],m:[]}),v(this,bt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=v(this,Ae).get(t);if(r){v(this,Ae).delete(t);for(var o of r.d)V(o,U),n(o);for(o of r.m)V(o,we),n(o)}v(this,bt).add(t)}capture(t,n,r=!1){t.v!==B&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ve)===0&&(this.current.set(t,[n,r]),z==null||z.set(t,n)),this.is_fork||(t.v=n)}activate(){L=this}deactivate(){L=null,z=null}flush(){try{Vn=!0,L=this,j(this,x,Rt).call(this)}finally{Nr=0,qn=null,ct=null,sn=null,Vn=!1,L=null,z=null,Je.clear()}}discard(){var t;for(const n of v(this,yt))n(this);v(this,yt).clear();for(const n of this.async_deriveds.values())n.reject(Lt);j(this,x,xt).call(this),(t=v(this,_t))==null||t.resolve()}register_created_effect(t){v(this,Yt).push(t)}increment(t,n){if(J(this,mt,v(this,mt)+1),t){let r=v(this,Re).get(n)??0;v(this,Re).set(n,r+1)}}decrement(t,n){if(J(this,mt,v(this,mt)-1),t){let r=v(this,Re).get(n)??0;r===1?v(this,Re).delete(n):v(this,Re).set(n,r-1)}v(this,Xe)||(J(this,Xe,!0),Vt(()=>{J(this,Xe,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)v(this,xe).add(r);for(const r of n)v(this,ye).add(r);t.clear(),n.clear()}oncommit(t){v(this,vt).add(t)}ondiscard(t){v(this,yt).add(t)}settled(){return(v(this,_t)??J(this,_t,ao())).promise}static ensure(){if(L===null){const t=L=new Cn;Vn||Vt(()=>{v(t,gt)||t.flush()})}return L}apply(){{z=null;return}}schedule(t){var o;if(qn=t,(o=t.b)!=null&&o.is_pending&&(t.f&(wt|rr|or))!==0&&(t.f&Et)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ct!==null&&n===R&&(k===null||(k.f&G)===0))return;if((r&(Be|pe))!==0){if((r&H)===0)return;n.f^=H}}v(this,Q).push(n)}};gt=new WeakMap,We=new WeakMap,qe=new WeakMap,vt=new WeakMap,yt=new WeakMap,mt=new WeakMap,Re=new WeakMap,_t=new WeakMap,Q=new WeakMap,Yt=new WeakMap,xe=new WeakMap,ye=new WeakMap,Ae=new WeakMap,bt=new WeakMap,Xe=new WeakMap,x=new WeakSet,Xn=function(){if(this.is_fork)return!0;for(const r of v(this,Re).keys()){for(var t=r,n=!1;t.parent!==null;){if(v(this,Ae).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Rt=function(){var u,c,f,p;J(this,gt,!0),Nr++>1e3&&(j(this,x,xt).call(this),ml());for(const a of v(this,xe))v(this,ye).delete(a),V(a,U),this.schedule(a);for(const a of v(this,ye))V(a,we),this.schedule(a);const t=v(this,Q);J(this,Q,[]),this.apply();var n=ct=[],r=[],o=sn=[];for(const a of t)try{j(this,x,Zn).call(this,a,n,r)}catch(d){throw Co(a),j(this,x,Xn).call(this)||this.discard(),d}if(L=null,o.length>0){var i=Cn.ensure();for(const a of o)i.schedule(a)}if(ct=null,sn=null,j(this,x,Xn).call(this)){j(this,x,at).call(this,r),j(this,x,at).call(this,n);for(const[a,d]of v(this,Ae))wo(a,d);o.length>0&&j(u=L,x,Rt).call(u);return}const s=j(this,x,mo).call(this);if(s){j(this,x,at).call(this,r),j(this,x,at).call(this,n),j(c=s,x,_o).call(c,this);return}v(this,xe).clear(),v(this,ye).clear();for(const a of v(this,vt))a(this);v(this,vt).clear(),Wt=this,Or(r),Or(n),Wt=null,(f=v(this,_t))==null||f.resolve();var l=L;if(v(this,mt)===0&&(v(this,Q).length===0||l!==null)&&j(this,x,xt).call(this),v(this,Q).length>0)if(l!==null){const a=l;v(a,Q).push(...v(this,Q).filter(d=>!v(a,Q).includes(d)))}else l=this;l!==null&&j(p=l,x,Rt).call(p)},Zn=function(t,n,r){t.f^=H;for(var o=t.first;o!==null;){var i=o.f,s=(i&(pe|Be))!==0,l=s&&(i&H)!==0,u=l||(i&Z)!==0||v(this,Ae).has(o);if(!u&&o.fn!==null){s?o.f^=H:(i&wt)!==0?n.push(o):$t(o)&&((i&be)!==0&&v(this,ye).add(o),At(o));var c=o.first;if(c!==null){o=c;continue}}for(;o!==null;){var f=o.next;if(f!==null){o=f;break}o=o.parent}}},mo=function(){for(var t=v(this,We);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=v(t,We)}return null},_o=function(t){var r;for(const[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(const[o,i]of t.async_deriveds){const s=this.async_deriveds.get(o);s&&i.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(v(t,xe),v(t,ye));const n=o=>{var i=o.reactions;if(i!==null&&!((o.f&G)!==0&&(o.f&(U|we))===0))for(const u of i){var s=u.f;if((s&G)!==0)n(u);else{var l=u;s&(dt|be)&&!this.async_deriveds.has(l)&&(v(this,ye).delete(l),V(l,U),this.schedule(l))}}};for(const o of this.current.keys())n(o);this.oncommit(()=>t.discard()),j(r=t,x,xt).call(r),L=this,j(this,x,Rt).call(this)},at=function(t){for(var n=0;n<t.length;n+=1)ul(t[n],v(this,xe),v(this,ye))},yl=function(){var p;for(let a=Fn;a!==null;a=v(a,qe)){var t=a.id<this.id,n=[];for(const[d,[y,m]]of this.current){if(a.current.has(d)){var r=a.current.get(d)[0];if(t&&y!==r)a.current.set(d,[y,m]);else continue}n.push(d)}if(t)for(const[d,y]of this.async_deriveds){const m=a.async_deriveds.get(d);m&&y.promise.then(m.resolve).catch(m.reject)}var o=[...a.current.keys()].filter(d=>!a.current.get(d)[1]);if(!(!v(a,gt)||o.length===0)){var i=o.filter(d=>!this.current.has(d));if(i.length===0)t&&a.discard();else if(n.length>0){if(t)for(const d of v(this,bt))a.unskip_effect(d,y=>{var m;(y.f&(be|dt))!==0?a.schedule(y):j(m=a,x,at).call(m,[y])});a.activate();var s=new Set,l=new Map;for(var u of n)bo(u,i,s,l);l=new Map;var c=[...a.current].filter(([d,y])=>{const m=this.current.get(d);return m?m[0]!==y[0]||m[1]!==y[1]:!0}).map(([d])=>d);if(c.length>0)for(const d of v(this,Yt))(d.f&(ce|Z|dn))===0&&ur(d,c,l)&&((d.f&(dt|be))!==0?(V(d,U),a.schedule(d)):v(a,xe).add(d));if(v(a,Q).length>0&&!v(a,Xe)){a.apply();for(var f of v(a,Q))j(p=a,x,Zn).call(p,f,[],[]);J(a,Q,[])}a.deactivate()}}}},xt=function(){if(this.linked){var t=v(this,We),n=v(this,qe);t===null?Fn=n:J(t,qe,n),n===null?lt=t:J(n,We,t),this.linked=!1}};let jt=Cn;function ml(){try{Qs()}catch(e){gn(e,qn)}}let ve=null;function Or(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(ce|Z))===0&&$t(r)&&(ve=new Set,At(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Ro(r),(ve==null?void 0:ve.size)>0)){Je.clear();for(const o of ve){if((o.f&(ce|Z))!==0)continue;const i=[o];let s=o.parent;for(;s!==null;)ve.has(s)&&(ve.delete(s),i.push(s)),s=s.parent;for(let l=i.length-1;l>=0;l--){const u=i[l];(u.f&(ce|Z))===0&&At(u)}}ve.clear()}}ve=null}}function bo(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const o of e.reactions){const i=o.f;(i&G)!==0?bo(o,t,n,r):(i&(dt|be))!==0&&(i&U)===0&&ur(o,t,r)&&(V(o,U),cr(o))}}function ur(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const o of e.deps){if(fn.call(t,o))return!0;if((o.f&G)!==0&&ur(o,t,n))return n.set(o,!0),!0}return n.set(e,!1),!1}function cr(e){L.schedule(e)}function wo(e,t){if(!((e.f&pe)!==0&&(e.f&H)!==0)){(e.f&U)!==0?t.d.push(e):(e.f&we)!==0&&t.m.push(e),V(e,H);for(var n=e.first;n!==null;)wo(n,t),n=n.next}}function Co(e){V(e,H);for(var t=e.first;t!==null;)Co(t),t=t.next}let yn=new Set;const Je=new Map;let Ao=!1;function Bt(e,t){var n={f:0,v:e,reactions:null,equals:uo,rv:0,wv:0};return n}function oe(e,t){const n=Bt(e);return Oo(n),n}function _l(e,t=!1,n=!0){const r=Bt(e);return t||(r.equals=co),r}function W(e,t,n=!1){k!==null&&(!Fe||(k.f&dn)!==0)&&fo()&&(k.f&(G|be|dt|dn))!==0&&(Te===null||!Te.has(e))&&tl();let r=n?ft(t):t;return Ut(e,r,sn)}function Ut(e,t,n=null){if(!e.equals(t)){Je.set(e,Ke?t:e.v);var r=jt.ensure();if(r.capture(e,t),(e.f&G)!==0){const o=e;(e.f&U)!==0&&ar(o),z===null&&sr(o)}e.wv=Fo(),So(e,U,n),R!==null&&(R.f&H)!==0&&(R.f&(pe|Be))===0&&(se===null?Ll([e]):se.push(e)),!r.is_fork&&yn.size>0&&!Ao&&bl()}return t}function bl(){Ao=!1;for(const e of yn){(e.f&H)!==0&&V(e,we);let t;try{t=$t(e)}catch{t=!0}t&&At(e)}yn.clear()}function jn(e){W(e,e.v+1)}function So(e,t,n){var r=e.reactions;if(r!==null)for(var o=r.length,i=0;i<o;i++){var s=r[i],l=s.f,u=(l&U)===0;if(u&&V(s,t),(l&dn)!==0)yn.add(s);else if((l&G)!==0){var c=s;z==null||z.delete(c),(l&$e)===0&&(l&ue&&(R===null||(R.f&pn)===0)&&(s.f|=$e),So(c,we,n))}else if(u){var f=s;(l&be)!==0&&ve!==null&&ve.add(f),n!==null?n.push(f):cr(f)}}}function ft(e){if(typeof e!="object"||e===null||pt in e)return e;const t=lo(e);if(t!==Fs&&t!==Vs)return e;var n=new Map,r=tr(e),o=oe(0),i=Qe,s=l=>{if(Qe===i)return l();var u=k,c=Qe;Ie(null),Vr(i);var f=l();return Ie(u),Vr(c),f};return r&&n.set("length",oe(e.length)),new Proxy(e,{defineProperty(l,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&$s();var f=n.get(u);return f===void 0?s(()=>{var p=oe(c.value);return n.set(u,p),p}):W(f,c.value,!0),!0},deleteProperty(l,u){var c=n.get(u);if(c===void 0){if(u in l){const f=s(()=>oe(B));n.set(u,f),jn(o)}}else W(c,B),jn(o);return!0},get(l,u,c){var d;if(u===pt)return e;var f=n.get(u),p=u in l;if(f===void 0&&(!p||(d=Ot(l,u))!=null&&d.writable)&&(f=s(()=>{var y=ft(p?l[u]:B),m=oe(y);return m}),n.set(u,f)),f!==void 0){var a=g(f);return a===B?void 0:a}return Reflect.get(l,u,c)},getOwnPropertyDescriptor(l,u){var c=Reflect.getOwnPropertyDescriptor(l,u);if(c&&"value"in c){var f=n.get(u);f&&(c.value=g(f))}else if(c===void 0){var p=n.get(u),a=p==null?void 0:p.v;if(p!==void 0&&a!==B)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return c},has(l,u){var a;if(u===pt)return!0;var c=n.get(u),f=c!==void 0&&c.v!==B||Reflect.has(l,u);if(c!==void 0||R!==null&&(!f||(a=Ot(l,u))!=null&&a.writable)){c===void 0&&(c=s(()=>{var d=f?ft(l[u]):B,y=oe(d);return y}),n.set(u,c));var p=g(c);if(p===B)return!1}return f},set(l,u,c,f){var P;var p=n.get(u),a=u in l;if(r&&u==="length")for(var d=c;d<p.v;d+=1){var y=n.get(d+"");y!==void 0?W(y,B):d in l&&(y=s(()=>oe(B)),n.set(d+"",y))}if(p===void 0)(!a||(P=Ot(l,u))!=null&&P.writable)&&(p=s(()=>oe(void 0)),W(p,ft(c)),n.set(u,p));else{a=p.v!==B;var m=s(()=>ft(c));W(p,m)}var h=Reflect.getOwnPropertyDescriptor(l,u);if(h!=null&&h.set&&h.set.call(f,c),!a){if(r&&typeof u=="string"){var _=n.get("length"),A=Number(u);Number.isInteger(A)&&A>=_.v&&W(_,A+1)}jn(o)}return!0},ownKeys(l){g(o);var u=Reflect.ownKeys(l).filter(p=>{var a=n.get(p);return a===void 0||a.v!==B});for(var[c,f]of n)f.v!==B&&!(c in l)&&u.push(c);return u},setPrototypeOf(){el()}})}function Wr(e){try{if(e!==null&&typeof e=="object"&&pt in e)return e[pt]}catch{}return e}function wl(e,t){return Object.is(Wr(e),Wr(t))}var Cl,Al,Sl;function je(e=""){return document.createTextNode(e)}function mn(e){return Al.call(e)}function Jt(e){return Sl.call(e)}function _e(e,t){return mn(e)}function q(e,t=!1){{var n=mn(e);return n instanceof Comment&&n.data===""?Jt(n):n}}function Ct(e,t=1,n=!1){let r=e;for(;t--;)r=Jt(r);return r}function El(e){e.textContent=""}function Eo(){return!1}function To(e,t,n){return t==null||t===io?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Tl(e){R===null&&(k===null&&Js(),Zs()),Ke&&Xs()}function Il(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ge(e,t){var n=R;n!==null&&(n.f&Z)!==0&&(e|=Z);var r={ctx:fe,deps:null,nodes:null,f:e|U|ue,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};L==null||L.register_created_effect(r);var o=r;if((e&wt)!==0)ct!==null?ct.push(r):jt.ensure().schedule(r);else if(t!==null){try{At(r)}catch(s){throw de(r),s}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&Sn)===0&&(o=o.first,(e&be)!==0&&(e&Ue)!==0&&o!==null&&(o.f|=Ue))}if(o!==null&&(o.parent=n,n!==null&&Il(o,n),k!==null&&(k.f&G)!==0&&(e&Be)===0)){var i=k;(i.effects??(i.effects=[])).push(o)}return r}function Io(){return k!==null&&!Fe}function fr(e){const t=Ge(rr,null);return V(t,H),t.teardown=e,t}function dr(e){Tl();var t=R.f,n=!k&&(t&pe)!==0&&fe!==null&&!fe.i;if(n){var r=fe;(r.e??(r.e=[])).push(e)}else return Do(e)}function Do(e){return Ge(wt|Hs,e)}function Po(e){return Ge(wt,e)}function Dl(e){return Ge(dt|Sn,e)}function le(e,t=[],n=[],r=[]){ho(r,t,n,o=>{Ge(rr,()=>{e(...o.map(g))})})}function Qt(e,t=0){var n=Ge(be|t,e);return n}function ko(e,t=0){var n=Ge(or|t,e);return n}function et(e){return Ge(pe|Sn,e)}function Lo(e){var t=e.teardown;if(t!==null){const n=Ke,r=k;Fr(!0),Ie(null);try{t.call(null)}finally{Fr(n),Ie(r)}}}function pr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const o=n.ac;o!==null&&Zt(()=>{o.abort(Xt)});var r=n.next;(n.f&Be)!==0?n.parent=null:de(n,t),n=r}}function Pl(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&pe)===0&&de(t),t=n}}function de(e,t=!0){var n=!1;(t||(e.f&Ks)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(kl(e.nodes.start,e.nodes.end),n=!0),e.f|=Rr,pr(e,t&&!n),Kt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Lo(e),e.f^=Rr,e.f|=ce;var o=e.parent;o!==null&&o.first!==null&&Ro(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function kl(e,t){for(;e!==null;){var n=e===t?null:Jt(e);e.remove(),e=n}}function Ro(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function hr(e,t,n=!0){var r=[];xo(e,r,!0);var o=()=>{n&&de(e),t&&t()},i=r.length;if(i>0){var s=()=>--i||o();for(var l of r)l.out(s)}else o()}function xo(e,t,n){if((e.f&Z)===0){e.f^=Z;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&Be)===0){var s=(o.f&Ue)!==0||(o.f&pe)!==0&&(e.f&be)!==0;xo(o,t,s?n:!1)}o=i}}}function _n(e){Mo(e,!0)}function Mo(e,t){if((e.f&Z)!==0){e.f^=Z,(e.f&H)===0&&(V(e,U),jt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,o=(n.f&Ue)!==0||(n.f&pe)!==0;Mo(n,o?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)(s.is_global||t)&&s.in()}}function No(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var o=n===r?null:Jt(n);t.append(n),n=o}}let ln=!1,Ke=!1;function Fr(e){Ke=e}let k=null,Fe=!1;function Ie(e){k=e}let R=null;function He(e){R=e}let Te=null;function Oo(e){k!==null&&(Te??(Te=new Set)).add(e)}let $=null,ee=0,se=null;function Ll(e){se=e}let Wo=1,Ye=0,Qe=Ye;function Vr(e){Qe=e}function Fo(){return++Wo}function $t(e){var t=e.f;if((t&U)!==0)return!0;if(t&G&&(e.f&=~$e),(t&we)!==0){for(var n=e.deps,r=n.length,o=0;o<r;o++){var i=n[o];if($t(i)&&vo(i),i.wv>e.wv)return!0}(t&ue)!==0&&z===null&&V(e,H)}return!1}function Vo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Te!==null&&Te.has(e)))for(var o=0;o<r.length;o++){var i=r[o];(i.f&G)!==0?Vo(i,t,!1):t===i&&(n?V(i,U):(i.f&H)!==0&&V(i,we),cr(i))}}function jo(e){var m;var t=$,n=ee,r=se,o=k,i=Te,s=fe,l=Fe,u=Qe,c=e.f;$=null,ee=0,se=null,k=(c&(pe|Be))===0?e:null,Te=null,hn(e.ctx),Fe=!1,Qe=++Ye,e.ac!==null&&(Zt(()=>{e.ac.abort(Xt)}),e.ac=null);try{e.f|=pn;var f=e.fn,p=f();e.f|=Et;var a=e.deps,d=L==null?void 0:L.is_fork;if($!==null){var y;if(d||Kt(e,ee),a!==null&&ee>0)for(a.length=ee+$.length,y=0;y<$.length;y++)a[ee+y]=$[y];else e.deps=a=$;if(Io()&&(e.f&ue)!==0)for(y=ee;y<a.length;y++)((m=a[y]).reactions??(m.reactions=[])).push(e)}else!d&&a!==null&&ee<a.length&&(Kt(e,ee),a.length=ee);if(fo()&&se!==null&&!Fe&&a!==null&&(e.f&(G|we|U))===0)for(y=0;y<se.length;y++)Vo(se[y],e);if(o!==null&&o!==e){if(Ye++,o.deps!==null)for(let h=0;h<n;h+=1)o.deps[h].rv=Ye;if(t!==null)for(const h of t)h.rv=Ye;se!==null&&(r===null?r=se:r.push(...se))}return(e.f&Ve)!==0&&(e.f^=Ve),p}catch(h){return ll(h)}finally{e.f^=pn,$=t,ee=n,se=r,k=o,Te=i,hn(s),Fe=l,Qe=u}}function Rl(e,t){let n=t.reactions;if(n!==null){var r=Ns.call(n,e);if(r!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[r]=n[o],n.pop())}}if(n===null&&(t.f&G)!==0&&($===null||!fn.call($,t))){var i=t;(i.f&ue)!==0&&(i.f^=ue,i.f&=~$e),i.v!==B&&sr(i),i.ac!==null&&Zt(()=>{i.ac.abort(Xt),i.ac=null,V(i,U)}),gl(i),Kt(i,0)}}function Kt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Rl(e,n[r])}function At(e){var t=e.f;if((t&ce)===0){V(e,H);var n=R,r=ln;R=e,ln=(t&(pe|Be))===0;try{(t&(be|or))!==0?Pl(e):pr(e),Lo(e);var o=jo(e);e.teardown=typeof o=="function"?o:null,e.wv=Wo;var i;so&&il&&(e.f&U)!==0&&e.deps}finally{ln=r,R=n}}}function g(e){var t=e.f,n=(t&G)!==0;if(k!==null&&!Fe){var r=R!==null&&(R.f&ce)!==0;if(!r&&(Te===null||!Te.has(e))){var o=k.deps;if((k.f&pn)!==0)e.rv<Ye&&(e.rv=Ye,$===null&&o!==null&&o[ee]===e?ee++:$===null?$=[e]:$.push(e));else{k.deps??(k.deps=[]),fn.call(k.deps,e)||k.deps.push(e);var i=e.reactions;i===null?e.reactions=[k]:fn.call(i,k)||i.push(k)}}}if(Ke&&Je.has(e))return Je.get(e);if(n){var s=e;if(Ke){var l=s.v;return((s.f&H)===0&&s.reactions!==null||Uo(s))&&(l=ar(s)),Je.set(s,l),l}var u=(s.f&ue)===0&&!Fe&&k!==null&&(ln||(k.f&ue)!==0),c=(s.f&Et)===0;$t(s)&&(u&&(s.f|=ue),vo(s)),u&&!c&&(yo(s),Bo(s))}if(z!=null&&z.has(e))return z.get(e);if((e.f&Ve)!==0)throw e.v;return e.v}function Bo(e){if(e.f|=ue,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&G)!==0&&(t.f&ue)===0&&(yo(t),Bo(t))}function Uo(e){if(e.v===B)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Je.has(t)||(t.f&G)!==0&&Uo(t))return!0;return!1}const ze=Symbol("events"),xl=new Set,Ml=new Set;function Nl(e,t,n,r={}){function o(i){if(r.capture||Fl.call(t,i),!i.cancelBubble)return Zt(()=>n==null?void 0:n.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Vt(()=>{t.addEventListener(e,o,r)}):t.addEventListener(e,o,r),o}function Ol(e,t,n){(t[ze]??(t[ze]={}))[e]=n}function Wl(e){for(var t=0;t<e.length;t++)xl.add(e[t]);for(var n of Ml)n(e)}let jr=null;function Fl(e){var m,h;var t=this,n=t.ownerDocument,r=e.type,o=((m=e.composedPath)==null?void 0:m.call(e))||[],i=o[0]||e.target;jr=e;var s=0,l=jr===e&&e[ze];if(l){var u=o.indexOf(l);if(u!==-1&&(t===document||t===window)){e[ze]=t;return}var c=o.indexOf(t);if(c===-1)return;u<=c&&(s=u)}if(i=o[s]||e.target,i!==t){Os(e,"currentTarget",{configurable:!0,get(){return i||n}});var f=k,p=R;Ie(null),He(null);try{for(var a,d=[];i!==null&&i!==t;){try{var y=(h=i[ze])==null?void 0:h[r];y!=null&&(!i.disabled||e.target===i)&&y.call(i,e)}catch(_){a?d.push(_):a=_}if(e.cancelBubble)break;s++,i=s<o.length?o[s]:null}if(a){for(let _ of d)queueMicrotask(()=>{throw _});throw a}}finally{e[ze]=t,delete e.currentTarget,Ie(f),He(p)}}}var ro;const Bn=((ro=globalThis==null?void 0:globalThis.window)==null?void 0:ro.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Vl(e){return(Bn==null?void 0:Bn.createHTML(e))??e}function jl(e){var t=To("template");return t.innerHTML=Vl(e.replaceAll("<!>","<!---->")),t.content}function Ht(e,t){var n=R;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Pe(e,t){var n=(t&Ls)!==0,r=(t&Rs)!==0,o,i=!e.startsWith("<!>");return()=>{o===void 0&&(o=jl(i?e:"<!>"+e),n||(o=mn(o)));var s=r||Cl?document.importNode(o,!0):o.cloneNode(!0);if(n){var l=mn(s),u=s.lastChild;Ht(l,u)}else Ht(s,s);return s}}function gr(e=""){{var t=je(e+"");return Ht(t,t),t}}function ie(){var e=document.createDocumentFragment(),t=document.createComment(""),n=je();return e.append(t,n),Ht(t,n),e}function M(e,t){e!==null&&e.before(t)}function Bl(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ul=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Kl(e){return Ul.includes(e)}const Hl={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Gl(e){return e=e.toLowerCase(),Hl[e]??e}function En(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[rn]??(e[rn]=e.nodeValue))&&(e[rn]=n,e.nodeValue=`${n}`)}var me,Se,te,Ze,zt,qt,An;class Tn{constructor(t,n=!0){ge(this,"anchor");F(this,me,new Map);F(this,Se,new Map);F(this,te,new Map);F(this,Ze,new Set);F(this,zt,!0);F(this,qt,t=>{if(v(this,me).has(t)){var n=v(this,me).get(t),r=v(this,Se).get(n);if(r)_n(r),v(this,Ze).delete(n);else{var o=v(this,te).get(n);o&&(_n(o.effect),v(this,Se).set(n,o.effect),v(this,te).delete(n),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),r=o.effect)}for(const[i,s]of v(this,me)){if(v(this,me).delete(i),i===t)break;const l=v(this,te).get(s);l&&(de(l.effect),v(this,te).delete(s))}for(const[i,s]of v(this,Se)){if(i===n||v(this,Ze).has(i))continue;const l=()=>{if(Array.from(v(this,me).values()).includes(i)){var c=document.createDocumentFragment();No(s,c),c.append(je()),v(this,te).set(i,{effect:s,fragment:c})}else de(s);v(this,Ze).delete(i),v(this,Se).delete(i)};v(this,zt)||!r?(v(this,Ze).add(i),hr(s,l,!1)):l()}}});F(this,An,t=>{v(this,me).delete(t);const n=Array.from(v(this,me).values());for(const[r,o]of v(this,te))n.includes(r)||(de(o.effect),v(this,te).delete(r))});this.anchor=t,J(this,zt,n)}ensure(t,n){var r=L,o=Eo();if(n&&!v(this,Se).has(t)&&!v(this,te).has(t))if(o){var i=document.createDocumentFragment(),s=je();i.append(s),v(this,te).set(t,{effect:et(()=>n(s)),fragment:i})}else v(this,Se).set(t,et(()=>n(this.anchor)));if(v(this,me).set(r,t),o){for(const[l,u]of v(this,Se))l===t?r.unskip_effect(u):r.skip_effect(u);for(const[l,u]of v(this,te))l===t?r.unskip_effect(u.effect):r.skip_effect(u.effect);r.oncommit(v(this,qt)),r.ondiscard(v(this,An))}else v(this,qt).call(this,r)}}me=new WeakMap,Se=new WeakMap,te=new WeakMap,Ze=new WeakMap,zt=new WeakMap,qt=new WeakMap,An=new WeakMap;function vr(e,t,...n){var r=new Tn(e);Qt(()=>{const o=t()??null;r.ensure(o,o&&(i=>o(i,...n)))},Ue)}function De(e,t,n=!1){var r=new Tn(e),o=n?Ue:0;function i(s,l){r.ensure(s,l)}Qt(()=>{var s=!1;t((l,u=0)=>{s=!0,i(u,l)}),s||i(-1,null)},o)}function Yl(e,t,n){for(var r=[],o=t.length,i,s=t.length,l=0;l<o;l++){let p=t[l];hr(p,()=>{if(i){if(i.pending.delete(p),i.done.add(p),i.pending.size===0){var a=e.outrogroups;Jn(e,nr(i.done)),a.delete(i),a.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var u=r.length===0&&n!==null&&e.pending.size===0;if(u){var c=n,f=c.parentNode;El(f),f.append(c),e.items.clear()}Jn(e,t,!u)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Jn(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const l of s)r.add(e.items.get(l).e)}for(var o=0;o<t.length;o++){var i=t[o];if(r!=null&&r.has(i)){i.f|=Ee;const s=document.createDocumentFragment();No(i,s)}else de(t[o],n)}}var Br;function bn(e,t,n,r,o,i=null){var s=e,l=new Map,u=(t&oo)!==0;if(u){var c=e;s=c.appendChild(je())}var f=null,p=pl(()=>{var P=n();return tr(P)?P:P==null?[]:nr(P)}),a,d=new Map,y=!0;function m(P){(A.effect.f&ce)===0&&(A.pending.delete(P),A.fallback=f,zl(A,a,s,t,r),f!==null&&(a.length===0?(f.f&Ee)===0?_n(f):(f.f^=Ee,Mt(f,null,s)):hr(f,()=>{f=null})))}function h(P){A.pending.delete(P)}var _=Qt(()=>{a=g(p);for(var P=a.length,C=new Set,w=L,S=Eo(),E=0;E<P;E+=1){var b=a[E],I=r(b,E),T=y?null:l.get(I);T?(T.v&&Ut(T.v,b),T.i&&Ut(T.i,E),S&&w.unskip_effect(T.e)):(T=ql(l,y?s:Br??(Br=je()),b,I,E,o,t,n),y||(T.e.f|=Ee),l.set(I,T)),C.add(I)}if(P===0&&i&&!f&&(y?f=et(()=>i(s)):(f=et(()=>i(Br??(Br=je()))),f.f|=Ee)),P>C.size&&qs(),!y)if(d.set(w,C),S){for(const[N,Y]of l)C.has(N)||w.skip_effect(Y.e);w.oncommit(m),w.ondiscard(h)}else m(w);g(p)}),A={effect:_,items:l,pending:d,outrogroups:null,fallback:f};y=!1}function Dt(e){for(;e!==null&&(e.f&pe)===0;)e=e.next;return e}function zl(e,t,n,r,o){var T,N,Y,O,X,it,tn,Le,st;var i=(r&Ps)!==0,s=t.length,l=e.items,u=Dt(e.effect.first),c,f=null,p,a=[],d=[],y,m,h,_;if(i)for(_=0;_<s;_+=1)y=t[_],m=o(y,_),h=l.get(m).e,(h.f&Ee)===0&&((N=(T=h.nodes)==null?void 0:T.a)==null||N.measure(),(p??(p=new Set)).add(h));for(_=0;_<s;_+=1){if(y=t[_],m=o(y,_),h=l.get(m).e,e.outrogroups!==null)for(const he of e.outrogroups)he.pending.delete(h),he.done.delete(h);if((h.f&Z)!==0&&(_n(h),i&&((O=(Y=h.nodes)==null?void 0:Y.a)==null||O.unfix(),(p??(p=new Set)).delete(h))),(h.f&Ee)!==0)if(h.f^=Ee,h===u)Mt(h,null,n);else{var A=f?f.next:u;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),Oe(e,f,h),Oe(e,h,A),Mt(h,A,n),f=h,a=[],d=[],u=Dt(f.next);continue}if(h!==u){if(c!==void 0&&c.has(h)){if(a.length<d.length){var P=d[0],C;f=P.prev;var w=a[0],S=a[a.length-1];for(C=0;C<a.length;C+=1)Mt(a[C],P,n);for(C=0;C<d.length;C+=1)c.delete(d[C]);Oe(e,w.prev,S.next),Oe(e,f,w),Oe(e,S,P),u=P,f=S,_-=1,a=[],d=[]}else c.delete(h),Mt(h,u,n),Oe(e,h.prev,h.next),Oe(e,h,f===null?e.effect.first:f.next),Oe(e,f,h),f=h;continue}for(a=[],d=[];u!==null&&u!==h;)(c??(c=new Set)).add(u),d.push(u),u=Dt(u.next);if(u===null)continue}(h.f&Ee)===0&&a.push(h),f=h,u=Dt(h.next)}if(e.outrogroups!==null){for(const he of e.outrogroups)he.pending.size===0&&(Jn(e,nr(he.done)),(X=e.outrogroups)==null||X.delete(he));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||c!==void 0){var E=[];if(c!==void 0)for(h of c)(h.f&Z)===0&&E.push(h);for(;u!==null;)(u.f&Z)===0&&u!==e.fallback&&E.push(u),u=Dt(u.next);var b=E.length;if(b>0){var I=(r&oo)!==0&&s===0?n:null;if(i){for(_=0;_<b;_+=1)(tn=(it=E[_].nodes)==null?void 0:it.a)==null||tn.measure();for(_=0;_<b;_+=1)(st=(Le=E[_].nodes)==null?void 0:Le.a)==null||st.fix()}Yl(e,E,I)}}i&&Vt(()=>{var he,nn;if(p!==void 0)for(h of p)(nn=(he=h.nodes)==null?void 0:he.a)==null||nn.apply()})}function ql(e,t,n,r,o,i,s,l){var u=(s&Is)!==0?(s&ks)===0?_l(n,!1,!1):Bt(n):null,c=(s&Ds)!==0?Bt(o):null;return{v:u,i:c,e:et(()=>(i(t,u??n,c??o,l),()=>{e.delete(r)}))}}function Mt(e,t,n){if(e.nodes)for(var r=e.nodes.start,o=e.nodes.end,i=t&&(t.f&Ee)===0?t.nodes.start:n;r!==null;){var s=Jt(r);if(i.before(r),r===o)return;r=s}}function Oe(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Un(e,t,n){var r=new Tn(e);Qt(()=>{var o=t()??null;r.ensure(o,o&&(i=>n(i,o)))},Ue)}function yr(e,t,n,r,o,i){var s=null,l=e,u=new Tn(l,!1);Qt(()=>{const c=t()||null;var f=c==="svg"?xs:void 0;if(c===null){u.ensure(null,null);return}return u.ensure(c,p=>{if(c){if(s=To(c,f),Ht(s,s),r){var a=null,d=s.appendChild(je());r(s,d),a==null||a.remove()}R.nodes.end=s,p.before(s)}}),()=>{}},Ue),fr(()=>{})}function Xl(e,t){var n=void 0,r;ko(()=>{n!==(n=t())&&(r&&(de(r),r=null),n&&(r=et(()=>{Po(()=>n(e))})))})}function Ko(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ko(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ko(e))&&(r&&(r+=" "),r+=t);return r}function Gt(e){return typeof e=="object"?Zl(e):e??""}const Ur=[...`
2
- \r\f \v\uFEFF`];function Jl(e,t,n){var r=e==null?"":""+e;if(n){for(var o of Object.keys(n))if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,s=0;(s=r.indexOf(o,s))>=0;){var l=s+i;(s===0||Ur.includes(r[s-1]))&&(l===r.length||Ur.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function Kr(e,t=!1){var n=t?" !important;":";",r="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(r+=" "+o+": "+i+n)}return r}function Kn(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ql(e,t){if(t){var n="",r,o;if(Array.isArray(t)?(r=t[0],o=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,l=!1,u=[];r&&u.push(...Object.keys(r).map(Kn)),o&&u.push(...Object.keys(o).map(Kn));var c=0,f=-1;const m=e.length;for(var p=0;p<m;p++){var a=e[p];if(l?a==="/"&&e[p-1]==="*"&&(l=!1):i?i===a&&(i=!1):a==="/"&&e[p+1]==="*"?l=!0:a==='"'||a==="'"?i=a:a==="("?s++:a===")"&&s--,!l&&i===!1&&s===0){if(a===":"&&f===-1)f=p;else if(a===";"||p===m-1){if(f!==-1){var d=Kn(e.substring(c,f).trim());if(!u.includes(d)){a!==";"&&p++;var y=e.substring(c,p).trim();n+=" "+y+";"}}c=p+1,f=-1}}}}return r&&(n+=Kr(r)),o&&(n+=Kr(o,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function St(e,t,n,r,o,i){var s=e[xr];if(s!==n||s===void 0){var l=Jl(n,r,i);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e[xr]=n}else if(i&&o!==i)for(var u in i){var c=!!i[u];(o==null||c!==!!o[u])&&e.classList.toggle(u,c)}return i}function Hn(e,t={},n,r){for(var o in n){var i=n[o];t[o]!==i&&(n[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,r))}}function ne(e,t,n,r){var o=e[Mr];if(o!==t){var i=Ql(t,r);i==null?e.removeAttribute("style"):e.style.cssText=i,e[Mr]=t}else r&&(Array.isArray(r)?(Hn(e,n==null?void 0:n[0],r[0]),Hn(e,n==null?void 0:n[1],r[1],"important")):Hn(e,n,r));return r}function Qn(e,t,n=!1){if(e.multiple){if(t==null)return;if(!tr(t))return rl();for(var r of e.options)r.selected=t.includes(Hr(r));return}for(r of e.options){var o=Hr(r);if(wl(o,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function $l(e){var t=new MutationObserver(()=>{"__value"in e&&Qn(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),fr(()=>{t.disconnect()})}function Hr(e){return"__value"in e?e.__value:e.value}const Pt=Symbol("class"),kt=Symbol("style"),Ho=Symbol("is custom element"),Go=Symbol("is html"),ea=ir?"input":"INPUT",ta=ir?"option":"OPTION",na=ir?"select":"SELECT";function ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ht(e,t,n,r){var o=Yo(e);o[t]!==(o[t]=n)&&(t==="loading"&&(e[Ys]=n),n==null?e.removeAttribute(t):typeof n!="string"&&zo(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function oa(e,t,n,r,o=!1,i=!1){var s=Yo(e),l=s[Ho],u=!s[Go],c=t||{},f=e.nodeName===ta;for(var p in t)p in n||(n[p]=null);n.class?n.class=Gt(n.class):n[Pt]&&(n.class=null),n[kt]&&(n.style??(n.style=null));var a=zo(e);if(e.nodeName===ea&&"type"in n&&("value"in n||"__value"in n)){var d=n.type;(d!==c.type||d===void 0&&e.hasAttribute("type"))&&(c.type=d,ht(e,"type",d))}for(const C in n){let w=n[C];if(f&&C==="value"&&w==null){e.value=e.__value="",c[C]=w;continue}if(C==="class"){var y=e.namespaceURI==="http://www.w3.org/1999/xhtml";St(e,y,w,r,t==null?void 0:t[Pt],n[Pt]),c[C]=w,c[Pt]=n[Pt];continue}if(C==="style"){ne(e,w,t==null?void 0:t[kt],n[kt]),c[C]=w,c[kt]=n[kt];continue}var m=c[C];if(!(w===m&&!(w===void 0&&e.hasAttribute(C)))){c[C]=w;var h=C[0]+C[1];if(h!=="$$")if(h==="on"){const S={},E="$$"+C;let b=C.slice(2);var _=Kl(b);if(Bl(b)&&(b=b.slice(0,-7),S.capture=!0),!_&&m){if(w!=null)continue;e.removeEventListener(b,c[E],S),c[E]=null}if(_)Ol(b,e,w),Wl([b]);else if(w!=null){let I=function(T){c[C].call(this,T)};c[E]=Nl(b,e,I,S)}}else if(C==="style")ht(e,C,w);else if(C==="autofocus")cl(e,!!w);else if(!l&&(C==="__value"||C==="value"&&w!=null))e.value=e.__value=w;else if(C==="selected"&&f)ra(e,w);else{var A=C;u||(A=Gl(A));var P=A==="defaultValue"||A==="defaultChecked";if(w==null&&!l&&!P)if(s[C]=null,A==="value"||A==="checked"){let S=e;const E=t===void 0;if(A==="value"){let b=S.defaultValue;S.removeAttribute(A),S.defaultValue=b,S.value=S.__value=E?b:null}else{let b=S.defaultChecked;S.removeAttribute(A),S.defaultChecked=b,S.checked=E?b:!1}}else e.removeAttribute(C);else P||a.includes(A)&&(l||typeof w!="string")?(e[A]=w,A in s&&(s[A]=B)):typeof w!="function"&&ht(e,A,w)}}}return c}function ia(e,t,n=[],r=[],o=[],i,s=!1,l=!1){ho(o,n,r,u=>{var c=void 0,f={},p=e.nodeName===na,a=!1;if(ko(()=>{var y=t(...u.map(g)),m=oa(e,c,y,i,s,l);a&&p&&"value"in y&&Qn(e,y.value);for(let _ of Object.getOwnPropertySymbols(f))y[_]||de(f[_]);for(let _ of Object.getOwnPropertySymbols(y)){var h=y[_];_.description===Ms&&(!c||h!==c[_])&&(f[_]&&de(f[_]),f[_]=et(()=>Xl(e,()=>h))),m[_]=h}c=m}),p){var d=e;Po(()=>{Qn(d,c.value,!0),$l(d)})}a=!0})}function Yo(e){return e[Wn]??(e[Wn]={[Ho]:e.nodeName.includes("-"),[Go]:e.namespaceURI===io})}var Gr=new Map;function zo(e){var t=e.getAttribute("is")||e.nodeName,n=Gr.get(t);if(n)return n;Gr.set(t,n=[]);for(var r,o=e,i=Element.prototype;i!==o;){r=Ws(o);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);o=lo(o)}return n}const sa={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(It(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let o=e.props[r];It(o)&&(o=o());const i=Ot(o,t);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(It(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const o=Ot(r,t);return o&&!o.configurable&&(o.configurable=!0),o}}},has(e,t){if(t===pt||t===Gs)return!1;for(let n of e.props)if(It(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(It(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function Gn(...e){return new Proxy({props:e},sa)}function ae(e,t,n,r){var o=r,i=!0,s=()=>(i&&(i=!1,o=r),o),l;l=e[t],l===void 0&&r!==void 0&&(l=s());var u;return u=()=>{var c=e[t];return c===void 0?s():(i=!0,c)},u}const Tt="default";function mr(e,t){return!(e!=null&&e.length)||e===Tt?t:`${e}/${t}`}const la=`RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-svelte README.`;function Yr(e){if(!e||typeof e!="object")return!1;const t=e;return!!t.manifest&&typeof t.manifest=="object"&&!!t.components&&typeof t.components=="object"&&!Array.isArray(t.components)}function aa(e){if(Yr(e))return e;const t=e;return Yr(t==null?void 0:t.default)?t.default:null}function Yn(e){return e.usesDefaultLibrary?[Tt,...e.libraryIds]:[...e.libraryIds]}function zr({registrations:e,referenced:t}){if(t.usesDefaultLibrary&&!(e!=null&&e[Tt]))throw new Error(la)}function ua(e){const t=[],n=new Set;for(const r of e.values()){if(typeof r.stylesheet!="string")continue;const o=r.stylesheet.trim();!o||n.has(o)||(n.add(o),t.push(o))}return t.length>0?t:void 0}function qo(e){const t={};for(const[r,o]of e){const i=r===Tt;for(const[s,l]of Object.entries(o.components))t[i?s:`${r}/${s}`]=l}const n=ua(e);return n?{components:t,stylesheets:n}:{components:t}}function en(){const e=new Map,t=new Map,n=new Map,r=new Map;let o=0;function i(c,f){var p;e.get(c)!==f&&((p=f.manifest)!=null&&p.id&&f.manifest.id!==c&&console.warn(`RuleCMS widget: component library registered as "${c}" declares manifest id "${f.manifest.id}". The registered id wins for resolution.`),e.set(c,f),o+=1)}function s(c){const f=Yn(c),p=[...f].sort().join("|"),a=r.get(p);if(a&&a.loadedVersion===o)return a.plugin;const d=new Map;for(const m of f){const h=e.get(m);h&&d.set(m,h)}const y=qo(d);return r.set(p,{loadedVersion:o,plugin:y}),y}function l(c){zr(c);const{registrations:f,referenced:p}=c;for(const a of Yn(p)){if(e.has(a)||n.has(a))continue;const d=f==null?void 0:f[a];if(!d){console.error(`RuleCMS widget: no component library registered for libraryId "${a}"; its components will not render.`),n.set(a,new Error(`No registration for libraryId "${a}"`));continue}if(typeof d=="function")return null;i(a,d)}return s(p)}async function u(c){zr(c);const{registrations:f,referenced:p}=c,a=Yn(p);return await Promise.all(a.map(async d=>{if(e.has(d)||n.has(d))return;const y=f==null?void 0:f[d];if(!y){console.error(`RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`),n.set(d,new Error(`No registration for libraryId "${d}"`));return}if(typeof y!="function"){i(d,y);return}let m=t.get(d);m||(m=y().then(h=>{const _=aa(h);if(!_)throw new Error(`Registration for libraryId "${d}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`);i(d,_)}).catch(h=>{n.set(d,h),console.error(`RuleCMS widget: failed to load component library "${d}":`,h)}).finally(()=>{t.delete(d)}),t.set(d,m)),await m})),s(p)}return{resolveSync:l,resolve:u}}const ca={Preview:"Preview",Compose:"Compose",RenderedPage:"RenderedPage"},In={DroppableBox:"droppable-box"},$n={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},fa={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly",Stretch:"stretch"},an="cssAttrArray",da={Phone:"phone",Tablet:"tablet",Desktop:"desktop"},_r={ComposerComponent:"ComposerWidget",Collection:"Collection",MoveComponentHandle:"MoveWidgetHandle"},br=`${_r.Collection}_`,Xo="dev.",Zo="https://rulecms.com",Jo="https://widget-cache.rulecms.com",Qo="/api/v1/c/widget/get",$o="/api/v1/c/dev/widget/get";function tt(e){return typeof e=="string"&&e.startsWith(Xo)}function ei(e,t){return t?t.replace(/\/$/,""):tt(e)?Zo:Jo}function wr({publishedKey:e,token:t,endpoint:n}){const r=tt(t),o=r?$o:Qo,i=r?new URLSearchParams({widgetKey:e,token:t}):new URLSearchParams({publishedKey:e,token:t});return`${ei(t,n)}${o}?${i.toString()}`}const pa=({id:e,prefix:t})=>`${t}_${e}`,ti=e=>{if(!(e!=null&&e.length)||!e.includes("_")){console.error(`Invalid drag item id: ${e}. Type does not exist.`);return}return ni(e)},Cr=e=>e.includes("_"),ni=e=>{const t=e.indexOf("_"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:n,id:r}},Ar=e=>{if(!Cr(e))return;const n=ti(e);return(n==null?void 0:n.prefix)===_r.Collection||console.error("getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."),n==null?void 0:n.id},ha=e=>{if(!(e!=null&&e.length)){console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");return}const t=e.split("$");if(t.length<2){console.error("getNameAndInstanceIdFromWidgetKey: Invalid widget key format");return}const n=t[0];if(!t[1].includes("@"))return{name:n,instanceId:t[1]};const o=t[1].split("@");return{name:n,instanceId:o[0],parentId:o[1]}},ga=e=>{if(!(e!=null&&e.length))return{errorMessage:"getNameFromWidgetKey: Missing widget key"};const t=e.split("$");return t.length<2?{errorMessage:"getNameFromWidgetKey: Invalid widget key format"}:{name:t[0]}},ri=e=>{var o,i,s,l;if(!e)return{error:"getWidgetKeyForCollection: Missing collection"};if(!((o=e.name)!=null&&o.length))return{error:"getWidgetKeyForCollection: Missing collection name"};const t=(i=e.name)==null?void 0:i.trim().toLowerCase();if(!((s=e.id)!=null&&s.length))return{error:"getWidgetKeyForCollection: Missing collection id"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.id}@${e.parentId}`:`${e.id}`;return{data:`${t}$${r}`}},oi=e=>{var o,i,s,l;if(!e)return{error:"getWidgetKeyForPublishedCollection: Missing collection"};if(!((o=e.name)!=null&&o.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection name"};const t=(i=e.name)==null?void 0:i.trim().toLowerCase();if(!((s=e.publishedKey)!=null&&s.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection publishedKey"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.publishedKey}@${e.parentId}`:`${e.publishedKey}`;return{data:`${t}$${r}`}},va=e=>{const t=ri(e);return`${br}${t.data}`},ya=e=>{const t=oi(e);return`${br}${t.data}`},ii="---",si="___";function li(e,t){return`${e}${ii}${t}`}function ma(e,t,n){return`${li(e,t)}${si}${n}`}function _a(e){const t=e.split(".");if(t.length!==3)throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);const n=t[0],r=t[1],o=parseInt(t[2],10);if(isNaN(o))throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);return`${n}.${r}.${o+1}`}function Dn({displayItemList:e,widgetCollections:t}){const n=new Set;let r=!1;const o=i=>{var s,l,u;if((s=i==null?void 0:i.rows)!=null&&s.length){for(const c of i.rows)if((l=c==null?void 0:c.columns)!=null&&l.length)for(const f of c.columns)f.collection&&o(f.collection.collectionRows),!(!f.type||f.type===In.DroppableBox)&&(Cr(f.type)||(!((u=f.libraryId)!=null&&u.length)||f.libraryId===Tt?r=!0:n.add(f.libraryId)))}};o(e);for(const i of Object.values(t??{}))o(i==null?void 0:i.collectionRows);return{libraryIds:Array.from(n),usesDefaultLibrary:r}}const Sr=Symbol("rulecms-widget-context");function ba(){return{token:"",endpoint:void 0,libraries:void 0,libraryRegistry:en()}}function wa(e,t){Me(t,!0);const n=ft(ba());dr(()=>{n.token=t.token,n.endpoint=t.endpoint,n.libraries=t.libraries}),zn.setContext(Sr,n);var r=ie(),o=q(r);vr(o,()=>t.children),M(e,r),Ne()}const ai="1200px",Er="500px",Tr="820px",Ca=ai,ui="rulecms",Aa=1920,Sa={f:"auto",q:"auto",c:"limit"},Ea=/^[A-Za-z0-9][A-Za-z0-9._\-/]*$/,Ta=300,Ia=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,Da=100,Pa=/^https:\/\/[^\s"'()\\<>]+$/,ka=2e3,La=/^[A-Za-z0-9_,.:\-/]*$/,Ra=300,ci=e=>typeof e=="string"&&e.length<=Ta&&Ea.test(e),fi=e=>typeof e=="string"&&e.length<=Da&&Ia.test(e),di=e=>typeof e=="string"&&e.length<=ka&&Pa.test(e),pi=e=>typeof e=="string"&&e.length<=Ra&&La.test(e),xa=e=>Object.entries(e).map(([t,n])=>`${t}_${n}`).join(","),Ma=e=>{const t={};for(const n of e.split(",")){const r=n.trim(),o=r.indexOf("_");o<=0||(t[r.slice(0,o)]=r.slice(o+1))}return t},hi=({publicId:e,cloudName:t=ui,transformations:n,width:r=Aa})=>{const o=typeof n=="string"?Ma(n):n,i={...Sa,...o,w:r};return encodeURI(`https://res.cloudinary.com/${t}/image/upload/${xa(i)}/${e}`)},gi=/^--[A-Za-z0-9_-]+$/,vi=200,Ir=e=>{if(typeof e!="string")return!1;const t=e.trim();return t.length<=vi&&gi.test(t)},Ce=e=>`var(${e.trim()})`,K=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e.cssVariable;if(t!=null)return Ir(t)?t.trim():void 0},ke=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e.cssVariable;return t==null?!1:!Ir(t)},Na=(e,t)=>{const n=K(e);return n?{[t]:Ce(n)}:void 0},yi=e=>{if(typeof e!="object"||e===null||Array.isArray(e)||ke(e))return!1;if(K(e))return!0;const t=e;return t.source==="none"?!0:t.source==="url"?di(t.url):t.source==="cloudinary"?!ci(t.publicId)||t.cloudName!==void 0&&t.cloudName!==null&&!fi(t.cloudName)?!1:t.transformations===void 0||t.transformations===null||pi(t.transformations):!1},mi=["px","%","em","rem","vh","vw"],Pn=["inherit","unset"],_i=["allSides","top","right","bottom","left"],nt=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;return ke(e)?!1:K(e)?!0:n.unit==="auto"?t.allowAuto!==!1:n.unit==="keyword"?t.allowKeywords!==!1&&Pn.includes(n.keyword):mi.includes(n.unit)?typeof n.value!="number"||!Number.isFinite(n.value)?!1:t.allowNegative!==!1||n.value>=0:!1},bi=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;for(const r of _i){const o=n[r];if(o!=null&&!nt(o,t))return!1}return!0},Oa=[...Pn,"transparent","currentColor"],Wa=/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/,kn=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return ke(e)?!1:K(e)?!0:t.unit==="keyword"?Oa.includes(t.keyword):t.unit==="color"?typeof t.value=="string"&&Wa.test(t.value.trim()):!1},Ln=e=>{const t=K(e);return t?Ce(t):"unit"in e?e.unit==="keyword"?e.keyword:e.value.trim():""},wi=(e,t)=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!ke(e)&&!!K(e):typeof e!="string"||!e.length?!1:t.includes(e)?!0:Pn.includes(e),Ci=['system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif','Georgia, "Times New Roman", Times, serif',"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace","Arial, Helvetica, sans-serif",'"Helvetica Neue", Helvetica, Arial, sans-serif',"Verdana, Geneva, sans-serif"],Ai=["normal","bold","100","200","300","400","500","600","700","800","900"],Si=["normal","italic","oblique"],Ei=["left","center","right","justify","start","end"],Ti=["none","underline","line-through","overline"],Ii=["none","uppercase","lowercase","capitalize"],un=["visible","hidden","scroll","auto","clip"],Di=["flex-start","flex-end","center","space-between","space-around","space-evenly"],Pi=["flex-start","flex-end","center","baseline","stretch"],ki=["wrap","nowrap"],Li=["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch"],Ri=["row","row-reverse","column","column-reverse"],xi=["cover","contain","auto"],Mi=["center center","center top","center bottom","left center","left top","left bottom","right center","right top","right bottom"],Ni=["no-repeat","repeat","repeat-x","repeat-y","space","round"],Oi=["justifyContent","alignItems","flexWrap","alignContent","flexDirection"],Wi=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],Fi=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!ke(e)&&!!K(e):Wi.includes(e),Vi=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return ke(e)?!1:K(e)?!0:!(t.width!==void 0&&t.width!==null&&!nt(t.width,{allowAuto:!1,allowNegative:!1})||t.style!==void 0&&t.style!==null&&!Fi(t.style)||t.color!==void 0&&t.color!==null&&!kn(t.color))},Fa={allowAuto:!1,allowKeywords:!1,allowNegative:!0},Va={allowAuto:!1,allowKeywords:!1,allowNegative:!1},ji=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;if(ke(e))return!1;if(K(e))return!0;for(const n of["offsetX","offsetY","spread"]){const r=t[n];if(r!=null&&!nt(r,Fa))return!1}return!(t.blur!==void 0&&t.blur!==null&&!nt(t.blur,Va)||t.color!==void 0&&t.color!==null&&!kn(t.color)||t.inset!==void 0&&t.inset!==null&&typeof t.inset!="boolean")},Bi=e=>e?e.cssVariable!==void 0&&e.cssVariable!==null||e.offsetX!==void 0||e.offsetY!==void 0||e.blur!==void 0||e.spread!==void 0||e.color!==void 0:!1,Ui=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return ke(e)?!1:K(e)?!0:t.unit==="number"?typeof t.value=="number"&&Number.isFinite(t.value)&&t.value>0:nt(e,{allowAuto:!1,allowNegative:!1})},Ki=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!ke(e)&&!!K(e):typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1,Hi=e=>{if(!yi(e))return{};const t=K(e);if(t)return{backgroundImage:Ce(t)};const n=e;return n.source==="none"?{backgroundImage:"none"}:n.source==="url"?{backgroundImage:`url("${n.url}")`}:{backgroundImage:`url("${hi({publicId:n.publicId,cloudName:n.cloudName,transformations:n.transformations})}")`}},rt=e=>{const t=K(e);return t?Ce(t):"unit"in e?e.unit==="auto"?"auto":e.unit==="keyword"?e.keyword:`${e.value}${e.unit}`:""},Gi=e=>{if(!Vi(e))return{};const t=K(e);if(t)return{border:Ce(t)};const n={};if(e.width&&(n.borderWidth=rt(e.width)),e.style){const r=K(e.style);n.borderStyle=r?Ce(r):e.style}return e.color&&(n.borderColor=Ln(e.color)),n},on=e=>e?rt(e):"0px",Yi=e=>{if(!ji(e)||!Bi(e))return{};const t=K(e);if(t)return{boxShadow:Ce(t)};const n=[on(e.offsetX),on(e.offsetY),on(e.blur),on(e.spread)];return e.color&&n.push(Ln(e.color)),e.inset&&n.unshift("inset"),{boxShadow:n.join(" ")}},ja=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,zi=(e,t)=>{if(!bi(e))return{};if(e.allSides)return{[t]:rt(e.allSides)};const n={};for(const r of["top","right","bottom","left"]){const o=e[r];o&&(n[`${t}${ja(r)}`]=rt(o))}return n},qi=(e,t)=>kn(e)?{[t]:Ln(e)}:{},Xi=(e,t,n)=>{if(!wi(e,n))return{};const r=K(e);return r?{[t]:Ce(r)}:{[t]:e}},Zi=(e,t,n={})=>nt(e,n)?{[t]:rt(e)}:{},Ji=e=>{if(!Ui(e))return{};const t=K(e);return t?{lineHeight:Ce(t)}:"unit"in e&&e.unit==="number"?{lineHeight:e.value}:{lineHeight:rt(e)}},Qi=e=>{if(!Ki(e))return{};const t=K(e);return t?{opacity:Ce(t)}:{opacity:e}},Rn={"margin-3-resolutions":{kind:"boxSpacing",cssProperty:"margin"},"padding-3-resolutions":{kind:"boxSpacing",cssProperty:"padding"},"border-3-resolutions":{kind:"border"},"box-shadow-3-resolutions":{kind:"boxShadow"},"border-radius-3-resolutions":{kind:"length",cssProperty:"borderRadius",capabilities:{allowAuto:!1,allowNegative:!1}},"width-3-resolutions":{kind:"length",cssProperty:"width",capabilities:{allowAuto:!0,allowNegative:!1}},"height-3-resolutions":{kind:"length",cssProperty:"height",capabilities:{allowAuto:!0,allowNegative:!1}},"min-width-3-resolutions":{kind:"length",cssProperty:"minWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"max-width-3-resolutions":{kind:"length",cssProperty:"maxWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"min-height-3-resolutions":{kind:"length",cssProperty:"minHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"max-height-3-resolutions":{kind:"length",cssProperty:"maxHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"gap-3-resolutions":{kind:"length",cssProperty:"gap",capabilities:{allowAuto:!1,allowNegative:!1}},"justify-content-3-resolutions":{kind:"enum",cssProperty:"justifyContent",allowedValues:Di},"align-items-3-resolutions":{kind:"enum",cssProperty:"alignItems",allowedValues:Pi},"flex-wrap-3-resolutions":{kind:"enum",cssProperty:"flexWrap",allowedValues:ki},"align-content-3-resolutions":{kind:"enum",cssProperty:"alignContent",allowedValues:Li},"flex-direction-3-resolutions":{kind:"enum",cssProperty:"flexDirection",allowedValues:Ri},"overflow-3-resolutions":{kind:"enum",cssProperty:"overflow",allowedValues:un},"overflow-x-3-resolutions":{kind:"enum",cssProperty:"overflowX",allowedValues:un},"overflow-y-3-resolutions":{kind:"enum",cssProperty:"overflowY",allowedValues:un},"background-color-3-resolutions":{kind:"color",cssProperty:"backgroundColor"},"color-3-resolutions":{kind:"color",cssProperty:"color"},"background-image-3-resolutions":{kind:"backgroundImage"},"background-size-3-resolutions":{kind:"enum",cssProperty:"backgroundSize",allowedValues:xi},"background-position-3-resolutions":{kind:"enum",cssProperty:"backgroundPosition",allowedValues:Mi},"background-repeat-3-resolutions":{kind:"enum",cssProperty:"backgroundRepeat",allowedValues:Ni},"opacity-3-resolutions":{kind:"opacity"},"font-family-3-resolutions":{kind:"enum",cssProperty:"fontFamily",allowedValues:Ci},"font-size-3-resolutions":{kind:"length",cssProperty:"fontSize",capabilities:{allowAuto:!1,allowNegative:!1}},"font-weight-3-resolutions":{kind:"enum",cssProperty:"fontWeight",allowedValues:Ai},"font-style-3-resolutions":{kind:"enum",cssProperty:"fontStyle",allowedValues:Si},"line-height-3-resolutions":{kind:"lineHeight"},"letter-spacing-3-resolutions":{kind:"length",cssProperty:"letterSpacing",capabilities:{allowAuto:!1,allowNegative:!0}},"text-align-3-resolutions":{kind:"enum",cssProperty:"textAlign",allowedValues:Ei},"text-decoration-3-resolutions":{kind:"enum",cssProperty:"textDecoration",allowedValues:Ti},"text-transform-3-resolutions":{kind:"enum",cssProperty:"textTransform",allowedValues:Ii}},$i=(e,t)=>{const n=Rn[e];if(!n)return{};switch(n.kind){case"boxSpacing":return zi(t,n.cssProperty);case"length":return Zi(t,n.cssProperty,n.capabilities);case"border":return Gi(t);case"boxShadow":return Yi(t);case"color":return qi(t,n.cssProperty);case"opacity":return Qi(t);case"enum":return Xi(t,n.cssProperty,n.allowedValues);case"lineHeight":return Ji(t);case"backgroundImage":return Hi(t);default:return{}}},Ba=Object.fromEntries(Object.entries(Rn).filter(([,e])=>e.kind==="boxSpacing").map(([e,t])=>[e,t.cssProperty])),Ua=e=>e!=null&&e!=="",es=e=>e?!Oi.some(n=>Ua(e[n]))||e.display==="flex"?e:{...e,display:"flex"}:{},ts=({dbEntryType:e,libraryId:t,sourceComponentsPlugin:n})=>{if(!(e!=null&&e.length))return;const r=n.components[mr(t,e)];if(!r||!("defaultAttributeValues"in r))return;const i=r.defaultAttributeValues;if(i!=null&&i.length)return i.reduce((s,l)=>({...s,[l.name]:l.defaultValues}),{})},ot=({deviceDisplayType:e,componentAttributes:t})=>{if(!t)return;const n={},r={};for(const[o,i]of Object.entries(t)){if(!o.includes("3-resolutions")||!i)continue;const s=i.all,l=s??i[e.toLowerCase()];r[o]=l,Rn[o]&&Object.assign(n,$i(o,l))}return Object.keys(n).length||Object.keys(r).length?{styles:Object.keys(n).length?n:void 0,componentAttributesSpecificToDeviceType:Object.keys(r).length?r:void 0}:void 0},ns=({defaultAttributes:e,userModifiedAttributes:t})=>e?t?{...e,...t}:e:t;function Ft(e){return e.componentAttributes??e.widgetAttributes}function er({col:e,deviceDisplayType:t,isComposeMode:n,sourceComponentsPlugin:r}){const o=Ft(e),i=ts({dbEntryType:e.type,libraryId:e.libraryId,sourceComponentsPlugin:r})||[],s=ns({defaultAttributes:i,userModifiedAttributes:o}),{styles:l,componentAttributesSpecificToDeviceType:u}=ot({deviceDisplayType:t,componentAttributes:s})||{styles:void 0,componentAttributesSpecificToDeviceType:void 0};let c={};const f={};if(l)for(const[a,d]of Object.entries(l))n&&f[a]||(c={...c,[a]:d});let p=Ft(e);for(const a in u)if(a.includes("3-resolutions")){p={...Ft(e)||{},...u||{}};break}return{componentAttributesBasedOnDevice:p,componentStyles:es(c)}}const rs=e=>{const t=(e==null?void 0:e.rows)||[];for(const n of t)if(((n==null?void 0:n.columns)||[]).length>0)return!0;return(e==null?void 0:e.containerAttributes)&&Object.keys(e.containerAttributes).length>0},os="var(--sl-spacing-x-small)";function is(e){return e!=null&&e.horizontalAlignment||e!=null&&e.verticalAlignment||e!=null&&e.flexWrap||e!=null&&e.gap||e!=null&&e.alignContent?!0:!!(e!=null&&e.rowAttributes&&Object.keys(e.rowAttributes).length>0)}function ss({row:e,deviceDisplayType:t}){var r;const n=ot({deviceDisplayType:t,componentAttributes:e.rowAttributes});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r["hide-component-3-resolutions"])==="true"}function ls({row:e,deviceDisplayType:t,isComposeMode:n}){var d;const r=((d=ot({deviceDisplayType:t,componentAttributes:e.rowAttributes}))==null?void 0:d.styles)||{},o=r.justifyContent??e.horizontalAlignment??$n.Center,i=r.alignItems??e.verticalAlignment??$n.Center,s=r.flexDirection??"row",l=r.gap??e.gap??os,u=n?"nowrap":r.flexWrap??e.flexWrap??"nowrap",c=r.alignContent??e.alignContent??void 0,f=new Set(["justifyContent","alignItems","flexDirection","gap","flexWrap","alignContent","display"]),p={};for(const[y,m]of Object.entries(r))f.has(y)||(p[y]=m);const a={display:"flex",flexDirection:s,gap:l,flexWrap:u,justifyContent:o,alignItems:i,...p};return c!==void 0&&(a.alignContent=c),a}const xn="css-classes-3-resolutions",Ka=500,Ha=/[\x00-\x1f\x7f]/g,Mn=e=>{if(typeof e!="string")return;const t=new Set,n=[];for(const o of e.split(/\s+/)){const i=o.replace(Ha,"");i&&(t.has(i)||(t.add(i),n.push(i)))}if(!n.length)return;let r="";for(const o of n){const i=r?`${r} ${o}`:o;if(i.length>Ka)break;r=i}return r.length?r:void 0},Dr="hide-component-3-resolutions",as=["width-3-resolutions","min-width-3-resolutions","max-width-3-resolutions","height-3-resolutions","min-height-3-resolutions","max-height-3-resolutions","margin-3-resolutions","padding-3-resolutions","border-3-resolutions","border-radius-3-resolutions","box-shadow-3-resolutions","overflow-3-resolutions","overflow-x-3-resolutions","overflow-y-3-resolutions",Dr],Ga=new Set(as);function us({containerAttributes:e,deviceDisplayType:t}){var r;const n=ot({deviceDisplayType:t,componentAttributes:e});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r[Dr])==="true"}function cs({containerAttributes:e,deviceDisplayType:t,isComposeMode:n}){var i;if(!e)return{styles:{}};const r=n?Object.fromEntries(Object.entries(e).filter(([s])=>!Ga.has(s))):e,o=ot({deviceDisplayType:t,componentAttributes:r});return{styles:(o==null?void 0:o.styles)??{},cssClasses:Mn((i=o==null?void 0:o.componentAttributesSpecificToDeviceType)==null?void 0:i[xn])}}function fs(e){return Object.keys(e.styles).length>0||!!e.cssClasses}function re(e){if(!e)return;const t=[];for(const[n,r]of Object.entries(e)){if(r==null||r==="")continue;const o=n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`);t.push(`${o}: ${r}`)}return t.length>0?t.join("; "):void 0}const Nn="/";function ds({componentProps:e,ancestorColumnIds:t,columnId:n}){if(!e||!n)return;const r=[...t??[],n];for(let o=0;o<r.length;o+=1){const i=r.slice(o).join(Nn),s=e[i];if(s)return s}}function ps({displayItemList:e,widgetCollections:t}){const n=[],r=(o,i)=>{var s;if((s=o==null?void 0:o.rows)!=null&&s.length)for(const l of o.rows)for(const u of l.columns){if(!u.id||u.type===In.DroppableBox)continue;const c=Ar(u.type);if(c!=null&&c.length){const f=u.collection??(t==null?void 0:t[c]);f&&!i.includes(u.id)&&r(f.collectionRows,[...i,u.id]);continue}n.push([...i,u.id].join(Nn))}};return r(e,[]),n}function Ya(e,t){const n=`${Nn}${e}`;return t.some(r=>r===e||r.endsWith(n))}function hs({componentProps:e,displayItemList:t,widgetCollections:n}){const r=e?Object.keys(e):[];if(!r.length)return[];const o=ps({displayItemList:t,widgetCollections:n});return r.filter(i=>!Ya(i,o))}function gs({componentProps:e,displayItemList:t,widgetCollections:n,publishedKey:r}){if(process.env.NODE_ENV==="production")return;const o=hs({componentProps:e,displayItemList:t,widgetCollections:n});o.length&&console.warn(`RuleCMSWidget "${r}": componentProps ${o.map(i=>`"${i}"`).join(", ")} ${o.length===1?"matches":"match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`)}function za(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qa(e){if(e.all!==void 0&&e.all!==null)return!1;const t=e.phone,n=e.tablet,r=e.desktop;return t!==n||t!==r||n!==r}function qr(e){var t;if(!((t=e==null?void 0:e.rows)!=null&&t.length))return!1;for(const n of e.rows){if(Xr(n.rowAttributes))return!0;for(const r of n.columns)if(Xr(Ft(r)))return!0}return!1}function Xr(e){if(!e)return!1;for(const[t,n]of Object.entries(e))if(!(!t.includes("3-resolutions")||!za(n))){if(t==="hide-component-3-resolutions"){const r=n,o=i=>i==="true"||i===!0;if(o(r.phone)!==o(r.tablet)||o(r.phone)!==o(r.desktop))return!0;continue}if(qa(n))return!0}return!1}function vs(e,t){if(qr(e))return!0;for(const n of Object.values(t))if(qr(n.collectionRows))return!0;return!1}const ys=parseInt(Er,10),ms=parseInt(Tr,10),Xa=ys+1,Za=ms+1;function Ja(e){const t=`.${e}-phone`,n=`.${e}-tablet`,r=`.${e}-desktop`;return`
1
+ "use strict";var Gs=Object.defineProperty;var Ur=e=>{throw TypeError(e)};var Ys=(e,t,n)=>t in e?Gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var me=(e,t,n)=>Ys(e,typeof t!="symbol"?t+"":t,n),jn=(e,t,n)=>t.has(e)||Ur("Cannot "+n);var v=(e,t,n)=>(jn(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>t.has(e)?Ur("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$=(e,t,n,r)=>(jn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),j=(e,t,n)=>(jn(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qn=require("svelte"),zs="5";var ci;typeof window<"u"&&((ci=window.__svelte??(window.__svelte={})).v??(ci.v=new Set)).add(zs);const qs=1,Xs=2,pi=4,Zs=8,Js=16,Qs=1,$s=2,B=Symbol("uninitialized"),hi="http://www.w3.org/1999/xhtml",el="http://www.w3.org/2000/svg",tl="@attach",gi=!1;var ar=Array.isArray,nl=Array.prototype.indexOf,dn=Array.prototype.includes,ur=Array.from,rl=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,il=Object.getOwnPropertyDescriptors,ol=Object.prototype,sl=Array.prototype,vi=Object.getPrototypeOf;function Dt(e){return typeof e=="function"}const ll=()=>{};function al(e){for(var t=0;t<e.length;t++)e[t]()}function yi(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const G=2,Ct=4,cr=8,fr=1<<24,Ce=16,ge=32,Ue=64,ul=128,fe=512,H=1024,U=2048,Ae=4096,Q=8192,de=16384,Et=32768,Kr=1<<25,Ke=65536,pn=1<<17,cl=1<<18,Tn=1<<19,fl=1<<20,De=1<<25,tt=65536,hn=1<<21,ht=1<<22,je=1<<23,gt=Symbol("$state"),dl=Symbol("legacy props"),pl=Symbol(""),Bn=Symbol("attributes"),Hr=Symbol("class"),Gr=Symbol("style"),sn=Symbol("text"),Jt=new class extends Error{constructor(){super(...arguments);me(this,"name","StaleReactionError");me(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var fi;const dr=!!((fi=globalThis.document)!=null&&fi.contentType)&&globalThis.document.contentType.includes("xml");function hl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function gl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function vl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function yl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ml(e){throw new Error("https://svelte.dev/e/effect_orphan")}function _l(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function bl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Cl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Al(){console.warn("https://svelte.dev/e/derived_inert")}function Sl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function mi(e){return e===this.v}function El(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function _i(e){return!El(e,this.v)}let Tl=!1,pe=null;function gn(e){pe=e}function Ne(e,t=!1,n){pe={p:pe,i:!1,c:null,e:null,s:e,x:null,r:R,l:null}}function Me(e){var t=pe,n=t.e;if(n!==null){t.e=null;for(var r of n)Oi(r)}return t.i=!0,pe=t.p,{}}function bi(){return!0}let ft=[];function Il(){var e=ft;ft=[],al(e)}function Bt(e){if(ft.length===0){var t=ft;queueMicrotask(()=>{t===ft&&Il()})}ft.push(e)}function Dl(e){var t=R;if(t===null)return k.f|=je,e;if((t.f&Et)===0&&(t.f&Ct)===0)throw e;vn(e,t)}function vn(e,t){if(!(t!==null&&(t.f&de)!==0)){for(;t!==null;){if((t.f&ul)!==0){if((t.f&Et)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const Pl=-7169;function V(e,t){e.f=e.f&Pl|t}function pr(e){(e.f&fe)!==0||e.deps===null?V(e,H):V(e,Ae)}function wi(e){if(e!==null)for(const t of e)(t.f&G)===0||(t.f&tt)===0||(t.f^=tt,wi(t.deps))}function kl(e,t,n){(e.f&U)!==0?t.add(e):(e.f&Ae)!==0&&n.add(e),wi(e.deps),V(e,H)}function Ll(e,t){if(t){const n=document.body;e.autofocus=!0,Bt(()=>{document.activeElement===n&&e.focus()})}}function Qt(e){var t=k,n=R;ke(null),Ge(null);try{return e()}finally{ke(t),Ge(n)}}function Ci(e,t,n,r){const i=hr;var o=e.filter(d=>!d.settled),s=t.map(i);if(n.length===0&&o.length===0){r(s);return}var l=R,a=xl(),u=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(d=>d.promise)):null;function f(d){if((l.f&de)===0){a();try{r([...s,...d])}catch(y){vn(y,l)}yn()}}var g=Ai();if(n.length===0){u.then(()=>f([])).finally(g);return}function c(){Promise.all(n.map(d=>Rl(d))).then(f).catch(d=>vn(d,l)).finally(g)}u?u.then(()=>{a(),c(),yn()}):c()}function xl(){var e=R,t=k,n=pe,r=L;return function(o=!0){Ge(e),ke(t),gn(n),o&&(e.f&de)===0&&(r==null||r.activate(),r==null||r.apply())}}function yn(e=!0){Ge(null),ke(null),gn(null),e&&(L==null||L.deactivate())}function Ai(){var e=R,t=e.b,n=L,r=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,n),n.increment(r,e),()=>{t==null||t.update_pending_count(-1,n),n.decrement(r,e)}}function hr(e){var t=G|U;return R!==null&&(R.f|=Tn),{ctx:pe,deps:null,effects:null,equals:mi,f:t,fn:e,reactions:null,rv:0,v:B,wv:0,parent:R,ac:null}}const xt=Symbol("obsolete");function Rl(e,t,n){let r=R;r===null&&hl();var i=void 0,o=Kt(B),s=!k,l=new Set;return Xl(()=>{var d,y;var a=R,u=yi();i=u.promise;try{Promise.resolve(e()).then(u.resolve,m=>{m!==Jt&&u.reject(m)}).finally(yn)}catch(m){u.reject(m),yn()}var f=L;if(s){if((a.f&Et)!==0)var g=Ai();if((d=r.b)!=null&&d.is_rendered())(y=f.async_deriveds.get(a))==null||y.reject(xt);else for(const m of l.values())m.reject(xt);l.add(u),f.async_deriveds.set(a,u)}const c=(m,h=void 0)=>{g==null||g(),l.delete(u),h!==xt&&(f.activate(),h?(o.f|=je,Ht(o,h)):((o.f&je)!==0&&(o.f^=je),Ht(o,m)),f.deactivate())};u.promise.then(c,m=>c(null,m||"unknown"))}),mr(()=>{for(const a of l)a.reject(xt)}),new Promise(a=>{function u(f){function g(){f===i?a(o):u(i)}f.then(g,g)}u(i)})}function D(e){const t=hr(e);return Hi(t),t}function Nl(e){const t=hr(e);return t.equals=_i,t}function Ml(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)he(t[n])}}function gr(e){var t,n=R,r=e.parent;if(!He&&r!==null&&e.v!==B&&(r.f&(de|Q))!==0)return Al(),e.v;Ge(r);try{e.f&=~tt,Ml(e),t=qi(e)}finally{Ge(n)}return t}function Si(e){var t=gr(e);if(!e.equals(t)&&(e.wv=Yi(),(!(L!=null&&L.is_fork)||e.deps===null)&&(L!==null?(L.capture(e,t,!0),Ft==null||Ft.capture(e,t,!0)):e.v=t,e.deps===null))){V(e,H);return}He||(q!==null?(Mi()||L!=null&&L.is_fork)&&q.set(e,t):pr(e))}function Ol(e){var t;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),n.ac!==null&&Qt(()=>{n.ac.abort(Jt),n.ac=null}),n.fn!==null&&(n.teardown=ll),Gt(n,0),br(n))}function Ei(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&At(t)}let Un=null,ut=null,L=null,Ft=null,q=null,$n=null,Kn=!1,dt=null,an=null;var Yr=0;let Wl=1;var vt,Fe,Xe,yt,mt,_t,xe,bt,ee,qt,Re,be,Te,wt,Ze,N,er,Rt,tr,Ti,Ii,ct,Fl,Nt;const Sn=class Sn{constructor(){F(this,N);me(this,"id",Wl++);F(this,vt,!1);me(this,"linked",!0);F(this,Fe,null);F(this,Xe,null);me(this,"async_deriveds",new Map);me(this,"current",new Map);me(this,"previous",new Map);F(this,yt,new Set);F(this,mt,new Set);F(this,_t,0);F(this,xe,new Map);F(this,bt,null);F(this,ee,[]);F(this,qt,[]);F(this,Re,new Set);F(this,be,new Set);F(this,Te,new Map);F(this,wt,new Set);me(this,"is_fork",!1);F(this,Ze,!1);ut===null?Un=ut=this:($(ut,Xe,this),$(this,Fe,ut)),ut=this}skip_effect(t){v(this,Te).has(t)||v(this,Te).set(t,{d:[],m:[]}),v(this,wt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=v(this,Te).get(t);if(r){v(this,Te).delete(t);for(var i of r.d)V(i,U),n(i);for(i of r.m)V(i,Ae),n(i)}v(this,wt).add(t)}capture(t,n,r=!1){t.v!==B&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&je)===0&&(this.current.set(t,[n,r]),q==null||q.set(t,n)),this.is_fork||(t.v=n)}activate(){L=this}deactivate(){L=null,q=null}flush(){try{Kn=!0,L=this,j(this,N,Rt).call(this)}finally{Yr=0,$n=null,dt=null,an=null,Kn=!1,L=null,q=null,Qe.clear()}}discard(){var t;for(const n of v(this,mt))n(this);v(this,mt).clear();for(const n of this.async_deriveds.values())n.reject(xt);j(this,N,Nt).call(this),(t=v(this,bt))==null||t.resolve()}register_created_effect(t){v(this,qt).push(t)}increment(t,n){if($(this,_t,v(this,_t)+1),t){let r=v(this,xe).get(n)??0;v(this,xe).set(n,r+1)}}decrement(t,n){if($(this,_t,v(this,_t)-1),t){let r=v(this,xe).get(n)??0;r===1?v(this,xe).delete(n):v(this,xe).set(n,r-1)}v(this,Ze)||($(this,Ze,!0),Bt(()=>{$(this,Ze,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)v(this,Re).add(r);for(const r of n)v(this,be).add(r);t.clear(),n.clear()}oncommit(t){v(this,yt).add(t)}ondiscard(t){v(this,mt).add(t)}settled(){return(v(this,bt)??$(this,bt,yi())).promise}static ensure(){if(L===null){const t=L=new Sn;Kn||Bt(()=>{v(t,vt)||t.flush()})}return L}apply(){{q=null;return}}schedule(t){var i;if($n=t,(i=t.b)!=null&&i.is_pending&&(t.f&(Ct|cr|fr))!==0&&(t.f&Et)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(dt!==null&&n===R&&(k===null||(k.f&G)===0))return;if((r&(Ue|ge))!==0){if((r&H)===0)return;n.f^=H}}v(this,ee).push(n)}};vt=new WeakMap,Fe=new WeakMap,Xe=new WeakMap,yt=new WeakMap,mt=new WeakMap,_t=new WeakMap,xe=new WeakMap,bt=new WeakMap,ee=new WeakMap,qt=new WeakMap,Re=new WeakMap,be=new WeakMap,Te=new WeakMap,wt=new WeakMap,Ze=new WeakMap,N=new WeakSet,er=function(){if(this.is_fork)return!0;for(const r of v(this,xe).keys()){for(var t=r,n=!1;t.parent!==null;){if(v(this,Te).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Rt=function(){var a,u,f,g;$(this,vt,!0),Yr++>1e3&&(j(this,N,Nt).call(this),Vl());for(const c of v(this,Re))v(this,be).delete(c),V(c,U),this.schedule(c);for(const c of v(this,be))V(c,Ae),this.schedule(c);const t=v(this,ee);$(this,ee,[]),this.apply();var n=dt=[],r=[],i=an=[];for(const c of t)try{j(this,N,tr).call(this,c,n,r)}catch(d){throw ki(c),j(this,N,er).call(this)||this.discard(),d}if(L=null,i.length>0){var o=Sn.ensure();for(const c of i)o.schedule(c)}if(dt=null,an=null,j(this,N,er).call(this)){j(this,N,ct).call(this,r),j(this,N,ct).call(this,n);for(const[c,d]of v(this,Te))Pi(c,d);i.length>0&&j(a=L,N,Rt).call(a);return}const s=j(this,N,Ti).call(this);if(s){j(this,N,ct).call(this,r),j(this,N,ct).call(this,n),j(u=s,N,Ii).call(u,this);return}v(this,Re).clear(),v(this,be).clear();for(const c of v(this,yt))c(this);v(this,yt).clear(),Ft=this,zr(r),zr(n),Ft=null,(f=v(this,bt))==null||f.resolve();var l=L;if(v(this,_t)===0&&(v(this,ee).length===0||l!==null)&&j(this,N,Nt).call(this),v(this,ee).length>0)if(l!==null){const c=l;v(c,ee).push(...v(this,ee).filter(d=>!v(c,ee).includes(d)))}else l=this;l!==null&&j(g=l,N,Rt).call(g)},tr=function(t,n,r){t.f^=H;for(var i=t.first;i!==null;){var o=i.f,s=(o&(ge|Ue))!==0,l=s&&(o&H)!==0,a=l||(o&Q)!==0||v(this,Te).has(i);if(!a&&i.fn!==null){s?i.f^=H:(o&Ct)!==0?n.push(i):tn(i)&&((o&Ce)!==0&&v(this,be).add(i),At(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}},Ti=function(){for(var t=v(this,Fe);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=v(t,Fe)}return null},Ii=function(t){var r;for(const[i,o]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,o);for(const[i,o]of t.async_deriveds){const s=this.async_deriveds.get(i);s&&o.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(v(t,Re),v(t,be));const n=i=>{var o=i.reactions;if(o!==null&&!((i.f&G)!==0&&(i.f&(U|Ae))===0))for(const a of o){var s=a.f;if((s&G)!==0)n(a);else{var l=a;s&(ht|Ce)&&!this.async_deriveds.has(l)&&(v(this,be).delete(l),V(l,U),this.schedule(l))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),j(r=t,N,Nt).call(r),L=this,j(this,N,Rt).call(this)},ct=function(t){for(var n=0;n<t.length;n+=1)kl(t[n],v(this,Re),v(this,be))},Fl=function(){var g;for(let c=Un;c!==null;c=v(c,Xe)){var t=c.id<this.id,n=[];for(const[d,[y,m]]of this.current){if(c.current.has(d)){var r=c.current.get(d)[0];if(t&&y!==r)c.current.set(d,[y,m]);else continue}n.push(d)}if(t)for(const[d,y]of this.async_deriveds){const m=c.async_deriveds.get(d);m&&y.promise.then(m.resolve).catch(m.reject)}var i=[...c.current.keys()].filter(d=>!c.current.get(d)[1]);if(!(!v(c,vt)||i.length===0)){var o=i.filter(d=>!this.current.has(d));if(o.length===0)t&&c.discard();else if(n.length>0){if(t)for(const d of v(this,wt))c.unskip_effect(d,y=>{var m;(y.f&(Ce|ht))!==0?c.schedule(y):j(m=c,N,ct).call(m,[y])});c.activate();var s=new Set,l=new Map;for(var a of n)Di(a,o,s,l);l=new Map;var u=[...c.current].filter(([d,y])=>{const m=this.current.get(d);return m?m[0]!==y[0]||m[1]!==y[1]:!0}).map(([d])=>d);if(u.length>0)for(const d of v(this,qt))(d.f&(de|Q|pn))===0&&vr(d,u,l)&&((d.f&(ht|Ce))!==0?(V(d,U),c.schedule(d)):v(c,Re).add(d));if(v(c,ee).length>0&&!v(c,Ze)){c.apply();for(var f of v(c,ee))j(g=c,N,tr).call(g,f,[],[]);$(c,ee,[])}c.deactivate()}}}},Nt=function(){if(this.linked){var t=v(this,Fe),n=v(this,Xe);t===null?Un=n:$(t,Xe,n),n===null?ut=t:$(n,Fe,t),this.linked=!1}};let Ut=Sn;function Vl(){try{_l()}catch(e){vn(e,$n)}}let _e=null;function zr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|Q))===0&&tn(r)&&(_e=new Set,At(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ji(r),(_e==null?void 0:_e.size)>0)){Qe.clear();for(const i of _e){if((i.f&(de|Q))!==0)continue;const o=[i];let s=i.parent;for(;s!==null;)_e.has(s)&&(_e.delete(s),o.push(s)),s=s.parent;for(let l=o.length-1;l>=0;l--){const a=o[l];(a.f&(de|Q))===0&&At(a)}}_e.clear()}}_e=null}}function Di(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;(o&G)!==0?Di(i,t,n,r):(o&(ht|Ce))!==0&&(o&U)===0&&vr(i,t,r)&&(V(i,U),yr(i))}}function vr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(dn.call(t,i))return!0;if((i.f&G)!==0&&vr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function yr(e){L.schedule(e)}function Pi(e,t){if(!((e.f&ge)!==0&&(e.f&H)!==0)){(e.f&U)!==0?t.d.push(e):(e.f&Ae)!==0&&t.m.push(e),V(e,H);for(var n=e.first;n!==null;)Pi(n,t),n=n.next}}function ki(e){V(e,H);for(var t=e.first;t!==null;)ki(t),t=t.next}let mn=new Set;const Qe=new Map;let Li=!1;function Kt(e,t){var n={f:0,v:e,reactions:null,equals:mi,rv:0,wv:0};return n}function le(e,t){const n=Kt(e);return Hi(n),n}function jl(e,t=!1,n=!0){const r=Kt(e);return t||(r.equals=_i),r}function M(e,t,n=!1){k!==null&&(!Ve||(k.f&pn)!==0)&&bi()&&(k.f&(G|Ce|ht|pn))!==0&&(Pe===null||!Pe.has(e))&&Cl();let r=n?pt(t):t;return Ht(e,r,an)}function Ht(e,t,n=null){if(!e.equals(t)){Qe.set(e,He?t:e.v);var r=Ut.ensure();if(r.capture(e,t),(e.f&G)!==0){const i=e;(e.f&U)!==0&&gr(i),q===null&&pr(i)}e.wv=Yi(),xi(e,U,n),R!==null&&(R.f&H)!==0&&(R.f&(ge|Ue))===0&&(ue===null?Ql([e]):ue.push(e)),!r.is_fork&&mn.size>0&&!Li&&Bl()}return t}function Bl(){Li=!1;for(const e of mn){(e.f&H)!==0&&V(e,Ae);let t;try{t=tn(e)}catch{t=!0}t&&At(e)}mn.clear()}function Hn(e){M(e,e.v+1)}function xi(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,o=0;o<i;o++){var s=r[o],l=s.f,a=(l&U)===0;if(a&&V(s,t),(l&pn)!==0)mn.add(s);else if((l&G)!==0){var u=s;q==null||q.delete(u),(l&tt)===0&&(l&fe&&(R===null||(R.f&hn)===0)&&(s.f|=tt),xi(u,Ae,n))}else if(a){var f=s;(l&Ce)!==0&&_e!==null&&_e.add(f),n!==null?n.push(f):yr(f)}}}function pt(e){if(typeof e!="object"||e===null||gt in e)return e;const t=vi(e);if(t!==ol&&t!==sl)return e;var n=new Map,r=ar(e),i=le(0),o=$e,s=l=>{if($e===o)return l();var a=k,u=$e;ke(null),Zr(o);var f=l();return ke(a),Zr(u),f};return r&&n.set("length",le(e.length)),new Proxy(e,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&bl();var f=n.get(a);return f===void 0?s(()=>{var g=le(u.value);return n.set(a,g),g}):M(f,u.value,!0),!0},deleteProperty(l,a){var u=n.get(a);if(u===void 0){if(a in l){const f=s(()=>le(B));n.set(a,f),Hn(i)}}else M(u,B),Hn(i);return!0},get(l,a,u){var d;if(a===gt)return e;var f=n.get(a),g=a in l;if(f===void 0&&(!g||(d=Wt(l,a))!=null&&d.writable)&&(f=s(()=>{var y=pt(g?l[a]:B),m=le(y);return m}),n.set(a,f)),f!==void 0){var c=p(f);return c===B?void 0:c}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var f=n.get(a);f&&(u.value=p(f))}else if(u===void 0){var g=n.get(a),c=g==null?void 0:g.v;if(g!==void 0&&c!==B)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(l,a){var c;if(a===gt)return!0;var u=n.get(a),f=u!==void 0&&u.v!==B||Reflect.has(l,a);if(u!==void 0||R!==null&&(!f||(c=Wt(l,a))!=null&&c.writable)){u===void 0&&(u=s(()=>{var d=f?pt(l[a]):B,y=le(d);return y}),n.set(a,u));var g=p(u);if(g===B)return!1}return f},set(l,a,u,f){var A;var g=n.get(a),c=a in l;if(r&&a==="length")for(var d=u;d<g.v;d+=1){var y=n.get(d+"");y!==void 0?M(y,B):d in l&&(y=s(()=>le(B)),n.set(d+"",y))}if(g===void 0)(!c||(A=Wt(l,a))!=null&&A.writable)&&(g=s(()=>le(void 0)),M(g,pt(u)),n.set(a,g));else{c=g.v!==B;var m=s(()=>pt(u));M(g,m)}var h=Reflect.getOwnPropertyDescriptor(l,a);if(h!=null&&h.set&&h.set.call(f,u),!c){if(r&&typeof a=="string"){var _=n.get("length"),E=Number(a);Number.isInteger(E)&&E>=_.v&&M(_,E+1)}Hn(i)}return!0},ownKeys(l){p(i);var a=Reflect.ownKeys(l).filter(g=>{var c=n.get(g);return c===void 0||c.v!==B});for(var[u,f]of n)f.v!==B&&!(u in l)&&a.push(u);return a},setPrototypeOf(){wl()}})}function qr(e){try{if(e!==null&&typeof e=="object"&&gt in e)return e[gt]}catch{}return e}function Ul(e,t){return Object.is(qr(e),qr(t))}var Kl,Hl,Gl;function Be(e=""){return document.createTextNode(e)}function _n(e){return Hl.call(e)}function $t(e){return Gl.call(e)}function ae(e,t){return _n(e)}function X(e,t=!1){{var n=_n(e);return n instanceof Comment&&n.data===""?$t(n):n}}function nt(e,t=1,n=!1){let r=e;for(;t--;)r=$t(r);return r}function Yl(e){e.textContent=""}function Ri(){return!1}function Ni(e,t,n){return t==null||t===hi?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function zl(e){R===null&&(k===null&&ml(),yl()),He&&vl()}function ql(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ye(e,t){var n=R;n!==null&&(n.f&Q)!==0&&(e|=Q);var r={ctx:pe,deps:null,nodes:null,f:e|U|fe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};L==null||L.register_created_effect(r);var i=r;if((e&Ct)!==0)dt!==null?dt.push(r):Ut.ensure().schedule(r);else if(t!==null){try{At(r)}catch(s){throw he(r),s}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Tn)===0&&(i=i.first,(e&Ce)!==0&&(e&Ke)!==0&&i!==null&&(i.f|=Ke))}if(i!==null&&(i.parent=n,n!==null&&ql(i,n),k!==null&&(k.f&G)!==0&&(e&Ue)===0)){var o=k;(o.effects??(o.effects=[])).push(i)}return r}function Mi(){return k!==null&&!Ve}function mr(e){const t=Ye(cr,null);return V(t,H),t.teardown=e,t}function _r(e){zl();var t=R.f,n=!k&&(t&ge)!==0&&pe!==null&&!pe.i;if(n){var r=pe;(r.e??(r.e=[])).push(e)}else return Oi(e)}function Oi(e){return Ye(Ct|fl,e)}function Wi(e){return Ye(Ct,e)}function Xl(e){return Ye(ht|Tn,e)}function re(e,t=[],n=[],r=[]){Ci(r,t,n,i=>{Ye(cr,()=>{e(...i.map(p))})})}function en(e,t=0){var n=Ye(Ce|t,e);return n}function Fi(e,t=0){var n=Ye(fr|t,e);return n}function rt(e){return Ye(ge|Tn,e)}function Vi(e){var t=e.teardown;if(t!==null){const n=He,r=k;Xr(!0),ke(null);try{t.call(null)}finally{Xr(n),ke(r)}}}function br(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Qt(()=>{i.abort(Jt)});var r=n.next;(n.f&Ue)!==0?n.parent=null:he(n,t),n=r}}function Zl(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ge)===0&&he(t),t=n}}function he(e,t=!0){var n=!1;(t||(e.f&cl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Jl(e.nodes.start,e.nodes.end),n=!0),e.f|=Kr,br(e,t&&!n),Gt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();Vi(e),e.f^=Kr,e.f|=de;var i=e.parent;i!==null&&i.first!==null&&ji(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Jl(e,t){for(;e!==null;){var n=e===t?null:$t(e);e.remove(),e=n}}function ji(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function wr(e,t,n=!0){var r=[];Bi(e,r,!0);var i=()=>{n&&he(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var l of r)l.out(s)}else i()}function Bi(e,t,n){if((e.f&Q)===0){e.f^=Q;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var o=i.next;if((i.f&Ue)===0){var s=(i.f&Ke)!==0||(i.f&ge)!==0&&(e.f&Ce)!==0;Bi(i,t,s?n:!1)}i=o}}}function bn(e){Ui(e,!0)}function Ui(e,t){if((e.f&Q)!==0){e.f^=Q,(e.f&H)===0&&(V(e,U),Ut.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Ke)!==0||(n.f&ge)!==0;Ui(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const s of o)(s.is_global||t)&&s.in()}}function Ki(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:$t(n);t.append(n),n=i}}let un=!1,He=!1;function Xr(e){He=e}let k=null,Ve=!1;function ke(e){k=e}let R=null;function Ge(e){R=e}let Pe=null;function Hi(e){k!==null&&(Pe??(Pe=new Set)).add(e)}let te=null,oe=0,ue=null;function Ql(e){ue=e}let Gi=1,ze=0,$e=ze;function Zr(e){$e=e}function Yi(){return++Gi}function tn(e){var t=e.f;if((t&U)!==0)return!0;if(t&G&&(e.f&=~tt),(t&Ae)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(tn(o)&&Si(o),o.wv>e.wv)return!0}(t&fe)!==0&&q===null&&V(e,H)}return!1}function zi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Pe!==null&&Pe.has(e)))for(var i=0;i<r.length;i++){var o=r[i];(o.f&G)!==0?zi(o,t,!1):t===o&&(n?V(o,U):(o.f&H)!==0&&V(o,Ae),yr(o))}}function qi(e){var m;var t=te,n=oe,r=ue,i=k,o=Pe,s=pe,l=Ve,a=$e,u=e.f;te=null,oe=0,ue=null,k=(u&(ge|Ue))===0?e:null,Pe=null,gn(e.ctx),Ve=!1,$e=++ze,e.ac!==null&&(Qt(()=>{e.ac.abort(Jt)}),e.ac=null);try{e.f|=hn;var f=e.fn,g=f();e.f|=Et;var c=e.deps,d=L==null?void 0:L.is_fork;if(te!==null){var y;if(d||Gt(e,oe),c!==null&&oe>0)for(c.length=oe+te.length,y=0;y<te.length;y++)c[oe+y]=te[y];else e.deps=c=te;if(Mi()&&(e.f&fe)!==0)for(y=oe;y<c.length;y++)((m=c[y]).reactions??(m.reactions=[])).push(e)}else!d&&c!==null&&oe<c.length&&(Gt(e,oe),c.length=oe);if(bi()&&ue!==null&&!Ve&&c!==null&&(e.f&(G|Ae|U))===0)for(y=0;y<ue.length;y++)zi(ue[y],e);if(i!==null&&i!==e){if(ze++,i.deps!==null)for(let h=0;h<n;h+=1)i.deps[h].rv=ze;if(t!==null)for(const h of t)h.rv=ze;ue!==null&&(r===null?r=ue:r.push(...ue))}return(e.f&je)!==0&&(e.f^=je),g}catch(h){return Dl(h)}finally{e.f^=hn,te=t,oe=n,ue=r,k=i,Pe=o,gn(s),Ve=l,$e=a}}function $l(e,t){let n=t.reactions;if(n!==null){var r=nl.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&G)!==0&&(te===null||!dn.call(te,t))){var o=t;(o.f&fe)!==0&&(o.f^=fe,o.f&=~tt),o.v!==B&&pr(o),o.ac!==null&&Qt(()=>{o.ac.abort(Jt),o.ac=null,V(o,U)}),Ol(o),Gt(o,0)}}function Gt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$l(e,n[r])}function At(e){var t=e.f;if((t&de)===0){V(e,H);var n=R,r=un;R=e,un=(t&(ge|Ue))===0;try{(t&(Ce|fr))!==0?Zl(e):br(e),Vi(e);var i=qi(e);e.teardown=typeof i=="function"?i:null,e.wv=Gi;var o;gi&&Tl&&(e.f&U)!==0&&e.deps}finally{un=r,R=n}}}function p(e){var t=e.f,n=(t&G)!==0;if(k!==null&&!Ve){var r=R!==null&&(R.f&de)!==0;if(!r&&(Pe===null||!Pe.has(e))){var i=k.deps;if((k.f&hn)!==0)e.rv<ze&&(e.rv=ze,te===null&&i!==null&&i[oe]===e?oe++:te===null?te=[e]:te.push(e));else{k.deps??(k.deps=[]),dn.call(k.deps,e)||k.deps.push(e);var o=e.reactions;o===null?e.reactions=[k]:dn.call(o,k)||o.push(k)}}}if(He&&Qe.has(e))return Qe.get(e);if(n){var s=e;if(He){var l=s.v;return((s.f&H)===0&&s.reactions!==null||Zi(s))&&(l=gr(s)),Qe.set(s,l),l}var a=(s.f&fe)===0&&!Ve&&k!==null&&(un||(k.f&fe)!==0),u=(s.f&Et)===0;tn(s)&&(a&&(s.f|=fe),Si(s)),a&&!u&&(Ei(s),Xi(s))}if(q!=null&&q.has(e))return q.get(e);if((e.f&je)!==0)throw e.v;return e.v}function Xi(e){if(e.f|=fe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&G)!==0&&(t.f&fe)===0&&(Ei(t),Xi(t))}function Zi(e){if(e.v===B)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Qe.has(t)||(t.f&G)!==0&&Zi(t))return!0;return!1}const qe=Symbol("events"),ea=new Set,ta=new Set;function na(e,t,n,r={}){function i(o){if(r.capture||oa.call(t,o),!o.cancelBubble)return Qt(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Bt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ra(e,t,n){(t[qe]??(t[qe]={}))[e]=n}function ia(e){for(var t=0;t<e.length;t++)ea.add(e[t]);for(var n of ta)n(e)}let Jr=null;function oa(e){var m,h;var t=this,n=t.ownerDocument,r=e.type,i=((m=e.composedPath)==null?void 0:m.call(e))||[],o=i[0]||e.target;Jr=e;var s=0,l=Jr===e&&e[qe];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[qe]=t;return}var u=i.indexOf(t);if(u===-1)return;a<=u&&(s=a)}if(o=i[s]||e.target,o!==t){rl(e,"currentTarget",{configurable:!0,get(){return o||n}});var f=k,g=R;ke(null),Ge(null);try{for(var c,d=[];o!==null&&o!==t;){try{var y=(h=o[qe])==null?void 0:h[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(_){c?d.push(_):c=_}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(c){for(let _ of d)queueMicrotask(()=>{throw _});throw c}}finally{e[qe]=t,delete e.currentTarget,ke(f),Ge(g)}}}var di;const Gn=((di=globalThis==null?void 0:globalThis.window)==null?void 0:di.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function sa(e){return(Gn==null?void 0:Gn.createHTML(e))??e}function la(e){var t=Ni("template");return t.innerHTML=sa(e.replaceAll("<!>","<!---->")),t.content}function Yt(e,t){var n=R;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ve(e,t){var n=(t&Qs)!==0,r=(t&$s)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=la(o?e:"<!>"+e),n||(i=_n(i)));var s=r||Kl?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=_n(s),a=s.lastChild;Yt(l,a)}else Yt(s,s);return s}}function Cr(e=""){{var t=Be(e+"");return Yt(t,t),t}}function ne(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Be();return e.append(t,n),Yt(t,n),e}function x(e,t){e!==null&&e.before(t)}function aa(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const ua=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ca(e){return ua.includes(e)}const fa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function da(e){return e=e.toLowerCase(),fa[e]??e}function In(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[sn]??(e[sn]=e.nodeValue))&&(e[sn]=n,e.nodeValue=`${n}`)}var we,Ie,se,Je,Xt,Zt,En;class Dn{constructor(t,n=!0){me(this,"anchor");F(this,we,new Map);F(this,Ie,new Map);F(this,se,new Map);F(this,Je,new Set);F(this,Xt,!0);F(this,Zt,t=>{if(v(this,we).has(t)){var n=v(this,we).get(t),r=v(this,Ie).get(n);if(r)bn(r),v(this,Je).delete(n);else{var i=v(this,se).get(n);i&&(bn(i.effect),v(this,Ie).set(n,i.effect),v(this,se).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of v(this,we)){if(v(this,we).delete(o),o===t)break;const l=v(this,se).get(s);l&&(he(l.effect),v(this,se).delete(s))}for(const[o,s]of v(this,Ie)){if(o===n||v(this,Je).has(o))continue;const l=()=>{if(Array.from(v(this,we).values()).includes(o)){var u=document.createDocumentFragment();Ki(s,u),u.append(Be()),v(this,se).set(o,{effect:s,fragment:u})}else he(s);v(this,Je).delete(o),v(this,Ie).delete(o)};v(this,Xt)||!r?(v(this,Je).add(o),wr(s,l,!1)):l()}}});F(this,En,t=>{v(this,we).delete(t);const n=Array.from(v(this,we).values());for(const[r,i]of v(this,se))n.includes(r)||(he(i.effect),v(this,se).delete(r))});this.anchor=t,$(this,Xt,n)}ensure(t,n){var r=L,i=Ri();if(n&&!v(this,Ie).has(t)&&!v(this,se).has(t))if(i){var o=document.createDocumentFragment(),s=Be();o.append(s),v(this,se).set(t,{effect:rt(()=>n(s)),fragment:o})}else v(this,Ie).set(t,rt(()=>n(this.anchor)));if(v(this,we).set(r,t),i){for(const[l,a]of v(this,Ie))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of v(this,se))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(v(this,Zt)),r.ondiscard(v(this,En))}else v(this,Zt).call(this,r)}}we=new WeakMap,Ie=new WeakMap,se=new WeakMap,Je=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,En=new WeakMap;function Ar(e,t,...n){var r=new Dn(e);en(()=>{const i=t()??null;r.ensure(i,i&&(o=>i(o,...n)))},Ke)}function Se(e,t,n=!1){var r=new Dn(e),i=n?Ke:0;function o(s,l){r.ensure(s,l)}en(()=>{var s=!1;t((l,a=0)=>{s=!0,o(a,l)}),s||o(-1,null)},i)}function pa(e,t,n){for(var r=[],i=t.length,o,s=t.length,l=0;l<i;l++){let g=t[l];wr(g,()=>{if(o){if(o.pending.delete(g),o.done.add(g),o.pending.size===0){var c=e.outrogroups;nr(e,ur(o.done)),c.delete(o),c.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var a=r.length===0&&n!==null&&e.pending.size===0;if(a){var u=n,f=u.parentNode;Yl(f),f.append(u),e.items.clear()}nr(e,t,!a)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function nr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const l of s)r.add(e.items.get(l).e)}for(var i=0;i<t.length;i++){var o=t[i];if(r!=null&&r.has(o)){o.f|=De;const s=document.createDocumentFragment();Ki(o,s)}else he(t[i],n)}}var Qr;function Vt(e,t,n,r,i,o=null){var s=e,l=new Map,a=(t&pi)!==0;if(a){var u=e;s=u.appendChild(Be())}var f=null,g=Nl(()=>{var A=n();return ar(A)?A:A==null?[]:ur(A)}),c,d=new Map,y=!0;function m(A){(E.effect.f&de)===0&&(E.pending.delete(A),E.fallback=f,ha(E,c,s,t,r),f!==null&&(c.length===0?(f.f&De)===0?bn(f):(f.f^=De,Mt(f,null,s)):wr(f,()=>{f=null})))}function h(A){E.pending.delete(A)}var _=en(()=>{c=p(g);for(var A=c.length,w=new Set,C=L,P=Ri(),S=0;S<A;S+=1){var b=c[S],T=r(b,S),I=y?null:l.get(T);I?(I.v&&Ht(I.v,b),I.i&&Ht(I.i,S),P&&C.unskip_effect(I.e)):(I=ga(l,y?s:Qr??(Qr=Be()),b,T,S,i,t,n),y||(I.e.f|=De),l.set(T,I)),w.add(T)}if(A===0&&o&&!f&&(y?f=rt(()=>o(s)):(f=rt(()=>o(Qr??(Qr=Be()))),f.f|=De)),A>w.size&&gl(),!y)if(d.set(C,w),P){for(const[O,Y]of l)w.has(O)||C.skip_effect(Y.e);C.oncommit(m),C.ondiscard(h)}else m(C);p(g)}),E={effect:_,items:l,pending:d,outrogroups:null,fallback:f};y=!1}function Pt(e){for(;e!==null&&(e.f&ge)===0;)e=e.next;return e}function ha(e,t,n,r,i){var I,O,Y,W,z,ie,It,rn,on;var o=(r&Zs)!==0,s=t.length,l=e.items,a=Pt(e.effect.first),u,f=null,g,c=[],d=[],y,m,h,_;if(o)for(_=0;_<s;_+=1)y=t[_],m=i(y,_),h=l.get(m).e,(h.f&De)===0&&((O=(I=h.nodes)==null?void 0:I.a)==null||O.measure(),(g??(g=new Set)).add(h));for(_=0;_<s;_+=1){if(y=t[_],m=i(y,_),h=l.get(m).e,e.outrogroups!==null)for(const ye of e.outrogroups)ye.pending.delete(h),ye.done.delete(h);if((h.f&Q)!==0&&(bn(h),o&&((W=(Y=h.nodes)==null?void 0:Y.a)==null||W.unfix(),(g??(g=new Set)).delete(h))),(h.f&De)!==0)if(h.f^=De,h===a)Mt(h,null,n);else{var E=f?f.next:a;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),We(e,f,h),We(e,h,E),Mt(h,E,n),f=h,c=[],d=[],a=Pt(f.next);continue}if(h!==a){if(u!==void 0&&u.has(h)){if(c.length<d.length){var A=d[0],w;f=A.prev;var C=c[0],P=c[c.length-1];for(w=0;w<c.length;w+=1)Mt(c[w],A,n);for(w=0;w<d.length;w+=1)u.delete(d[w]);We(e,C.prev,P.next),We(e,f,C),We(e,P,A),a=A,f=P,_-=1,c=[],d=[]}else u.delete(h),Mt(h,a,n),We(e,h.prev,h.next),We(e,h,f===null?e.effect.first:f.next),We(e,f,h),f=h;continue}for(c=[],d=[];a!==null&&a!==h;)(u??(u=new Set)).add(a),d.push(a),a=Pt(a.next);if(a===null)continue}(h.f&De)===0&&c.push(h),f=h,a=Pt(h.next)}if(e.outrogroups!==null){for(const ye of e.outrogroups)ye.pending.size===0&&(nr(e,ur(ye.done)),(z=e.outrogroups)==null||z.delete(ye));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||u!==void 0){var S=[];if(u!==void 0)for(h of u)(h.f&Q)===0&&S.push(h);for(;a!==null;)(a.f&Q)===0&&a!==e.fallback&&S.push(a),a=Pt(a.next);var b=S.length;if(b>0){var T=(r&pi)!==0&&s===0?n:null;if(o){for(_=0;_<b;_+=1)(It=(ie=S[_].nodes)==null?void 0:ie.a)==null||It.measure();for(_=0;_<b;_+=1)(on=(rn=S[_].nodes)==null?void 0:rn.a)==null||on.fix()}pa(e,S,T)}}o&&Bt(()=>{var ye,lt;if(g!==void 0)for(h of g)(lt=(ye=h.nodes)==null?void 0:ye.a)==null||lt.apply()})}function ga(e,t,n,r,i,o,s,l){var a=(s&qs)!==0?(s&Js)===0?jl(n,!1,!1):Kt(n):null,u=(s&Xs)!==0?Kt(i):null;return{v:a,i:u,e:rt(()=>(o(t,a??n,u??i,l),()=>{e.delete(r)}))}}function Mt(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&(t.f&De)===0?t.nodes.start:n;r!==null;){var s=$t(r);if(o.before(r),r===i)return;r=s}}function We(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Yn(e,t,n){var r=new Dn(e);en(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Ke)}function Sr(e,t,n,r,i,o){var s=null,l=e,a=new Dn(l,!1);en(()=>{const u=t()||null;var f=u==="svg"?el:void 0;if(u===null){a.ensure(null,null);return}return a.ensure(u,g=>{if(u){if(s=Ni(u,f),Yt(s,s),r){var c=null,d=s.appendChild(Be());r(s,d),c==null||c.remove()}R.nodes.end=s,g.before(s)}}),()=>{}},Ke),mr(()=>{})}function va(e,t){var n=void 0,r;Fi(()=>{n!==(n=t())&&(r&&(he(r),r=null),n&&(r=rt(()=>{Wi(()=>n(e))})))})}function Ji(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ji(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ya(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ji(e))&&(r&&(r+=" "),r+=t);return r}function zt(e){return typeof e=="object"?ya(e):e??""}const $r=[...`
2
+ \r\f \v\uFEFF`];function ma(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;(s===0||$r.includes(r[s-1]))&&(l===r.length||$r.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function ei(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];o!=null&&o!==""&&(r+=" "+i+": "+o+n)}return r}function zn(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function _a(e,t){if(t){var n="",r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,l=!1,a=[];r&&a.push(...Object.keys(r).map(zn)),i&&a.push(...Object.keys(i).map(zn));var u=0,f=-1;const m=e.length;for(var g=0;g<m;g++){var c=e[g];if(l?c==="/"&&e[g-1]==="*"&&(l=!1):o?o===c&&(o=!1):c==="/"&&e[g+1]==="*"?l=!0:c==='"'||c==="'"?o=c:c==="("?s++:c===")"&&s--,!l&&o===!1&&s===0){if(c===":"&&f===-1)f=g;else if(c===";"||g===m-1){if(f!==-1){var d=zn(e.substring(u,f).trim());if(!a.includes(d)){c!==";"&&g++;var y=e.substring(u,g).trim();n+=" "+y+";"}}u=g+1,f=-1}}}}return r&&(n+=ei(r)),i&&(n+=ei(i,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function St(e,t,n,r,i,o){var s=e[Hr];if(s!==n||s===void 0){var l=ma(n,r,o);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e[Hr]=n}else if(o&&i!==o)for(var a in o){var u=!!o[a];(i==null||u!==!!i[a])&&e.classList.toggle(a,u)}return o}function qn(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Z(e,t,n,r){var i=e[Gr];if(i!==t){var o=_a(t,r);o==null?e.removeAttribute("style"):e.style.cssText=o,e[Gr]=t}else r&&(Array.isArray(r)?(qn(e,n==null?void 0:n[0],r[0]),qn(e,n==null?void 0:n[1],r[1],"important")):qn(e,n,r));return r}function rr(e,t,n=!1){if(e.multiple){if(t==null)return;if(!ar(t))return Sl();for(var r of e.options)r.selected=t.includes(ti(r));return}for(r of e.options){var i=ti(r);if(Ul(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ba(e){var t=new MutationObserver(()=>{"__value"in e&&rr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),mr(()=>{t.disconnect()})}function ti(e){return"__value"in e?e.__value:e.value}const kt=Symbol("class"),Lt=Symbol("style"),Qi=Symbol("is custom element"),$i=Symbol("is html"),wa=dr?"input":"INPUT",Ca=dr?"option":"OPTION",Aa=dr?"select":"SELECT";function Sa(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function et(e,t,n,r){var i=eo(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[pl]=n),n==null?e.removeAttribute(t):typeof n!="string"&&to(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ea(e,t,n,r,i=!1,o=!1){var s=eo(e),l=s[Qi],a=!s[$i],u=t||{},f=e.nodeName===Ca;for(var g in t)g in n||(n[g]=null);n.class?n.class=zt(n.class):n[kt]&&(n.class=null),n[Lt]&&(n.style??(n.style=null));var c=to(e);if(e.nodeName===wa&&"type"in n&&("value"in n||"__value"in n)){var d=n.type;(d!==u.type||d===void 0&&e.hasAttribute("type"))&&(u.type=d,et(e,"type",d))}for(const w in n){let C=n[w];if(f&&w==="value"&&C==null){e.value=e.__value="",u[w]=C;continue}if(w==="class"){var y=e.namespaceURI==="http://www.w3.org/1999/xhtml";St(e,y,C,r,t==null?void 0:t[kt],n[kt]),u[w]=C,u[kt]=n[kt];continue}if(w==="style"){Z(e,C,t==null?void 0:t[Lt],n[Lt]),u[w]=C,u[Lt]=n[Lt];continue}var m=u[w];if(!(C===m&&!(C===void 0&&e.hasAttribute(w)))){u[w]=C;var h=w[0]+w[1];if(h!=="$$")if(h==="on"){const P={},S="$$"+w;let b=w.slice(2);var _=ca(b);if(aa(b)&&(b=b.slice(0,-7),P.capture=!0),!_&&m){if(C!=null)continue;e.removeEventListener(b,u[S],P),u[S]=null}if(_)ra(b,e,C),ia([b]);else if(C!=null){let T=function(I){u[w].call(this,I)};u[S]=na(b,e,T,P)}}else if(w==="style")et(e,w,C);else if(w==="autofocus")Ll(e,!!C);else if(!l&&(w==="__value"||w==="value"&&C!=null))e.value=e.__value=C;else if(w==="selected"&&f)Sa(e,C);else{var E=w;a||(E=da(E));var A=E==="defaultValue"||E==="defaultChecked";if(C==null&&!l&&!A)if(s[w]=null,E==="value"||E==="checked"){let P=e;const S=t===void 0;if(E==="value"){let b=P.defaultValue;P.removeAttribute(E),P.defaultValue=b,P.value=P.__value=S?b:null}else{let b=P.defaultChecked;P.removeAttribute(E),P.defaultChecked=b,P.checked=S?b:!1}}else e.removeAttribute(w);else A||c.includes(E)&&(l||typeof C!="string")?(e[E]=C,E in s&&(s[E]=B)):typeof C!="function"&&et(e,E,C)}}}return u}function Ta(e,t,n=[],r=[],i=[],o,s=!1,l=!1){Ci(i,n,r,a=>{var u=void 0,f={},g=e.nodeName===Aa,c=!1;if(Fi(()=>{var y=t(...a.map(p)),m=Ea(e,u,y,o,s,l);c&&g&&"value"in y&&rr(e,y.value);for(let _ of Object.getOwnPropertySymbols(f))y[_]||he(f[_]);for(let _ of Object.getOwnPropertySymbols(y)){var h=y[_];_.description===tl&&(!u||h!==u[_])&&(f[_]&&he(f[_]),f[_]=rt(()=>va(e,()=>h))),m[_]=h}u=m}),g){var d=e;Wi(()=>{rr(d,u.value,!0),ba(d)})}c=!0})}function eo(e){return e[Bn]??(e[Bn]={[Qi]:e.nodeName.includes("-"),[$i]:e.namespaceURI===hi})}var ni=new Map;function to(e){var t=e.getAttribute("is")||e.nodeName,n=ni.get(t);if(n)return n;ni.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=il(i);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);i=vi(i)}return n}const Ia={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(Dt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];Dt(i)&&(i=i());const o=Wt(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(Dt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const i=Wt(r,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===gt||t===dl)return!1;for(let n of e.props)if(Dt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(Dt(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function Xn(...e){return new Proxy({props:e},Ia)}function ce(e,t,n,r){var i=r,o=!0,s=()=>(o&&(o=!1,i=r),i),l;l=e[t],l===void 0&&r!==void 0&&(l=s());var a;return a=()=>{var u=e[t];return u===void 0?s():(o=!0,u)},a}const Tt="default";function Er(e,t){return!(e!=null&&e.length)||e===Tt?t:`${e}/${t}`}const Da=`RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-svelte README.`;function ri(e){if(!e||typeof e!="object")return!1;const t=e;return!!t.manifest&&typeof t.manifest=="object"&&!!t.components&&typeof t.components=="object"&&!Array.isArray(t.components)}function Pa(e){if(ri(e))return e;const t=e;return ri(t==null?void 0:t.default)?t.default:null}function Zn(e){return e.usesDefaultLibrary?[Tt,...e.libraryIds]:[...e.libraryIds]}function ii({registrations:e,referenced:t}){if(t.usesDefaultLibrary&&!(e!=null&&e[Tt]))throw new Error(Da)}function ka(e){const t=[],n=new Set;for(const r of e.values()){if(typeof r.stylesheet!="string")continue;const i=r.stylesheet.trim();!i||n.has(i)||(n.add(i),t.push(i))}return t.length>0?t:void 0}function no(e){const t={};for(const[r,i]of e){const o=r===Tt;for(const[s,l]of Object.entries(i.components))t[o?s:`${r}/${s}`]=l}const n=ka(e);return n?{components:t,stylesheets:n}:{components:t}}function nn(){const e=new Map,t=new Map,n=new Map,r=new Map;let i=0;function o(u,f){var g;e.get(u)!==f&&((g=f.manifest)!=null&&g.id&&f.manifest.id!==u&&console.warn(`RuleCMS widget: component library registered as "${u}" declares manifest id "${f.manifest.id}". The registered id wins for resolution.`),e.set(u,f),i+=1)}function s(u){const f=Zn(u),g=[...f].sort().join("|"),c=r.get(g);if(c&&c.loadedVersion===i)return c.plugin;const d=new Map;for(const m of f){const h=e.get(m);h&&d.set(m,h)}const y=no(d);return r.set(g,{loadedVersion:i,plugin:y}),y}function l(u){ii(u);const{registrations:f,referenced:g}=u;for(const c of Zn(g)){if(e.has(c)||n.has(c))continue;const d=f==null?void 0:f[c];if(!d){console.error(`RuleCMS widget: no component library registered for libraryId "${c}"; its components will not render.`),n.set(c,new Error(`No registration for libraryId "${c}"`));continue}if(typeof d=="function")return null;o(c,d)}return s(g)}async function a(u){ii(u);const{registrations:f,referenced:g}=u,c=Zn(g);return await Promise.all(c.map(async d=>{if(e.has(d)||n.has(d))return;const y=f==null?void 0:f[d];if(!y){console.error(`RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`),n.set(d,new Error(`No registration for libraryId "${d}"`));return}if(typeof y!="function"){o(d,y);return}let m=t.get(d);m||(m=y().then(h=>{const _=Pa(h);if(!_)throw new Error(`Registration for libraryId "${d}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`);o(d,_)}).catch(h=>{n.set(d,h),console.error(`RuleCMS widget: failed to load component library "${d}":`,h)}).finally(()=>{t.delete(d)}),t.set(d,m)),await m})),s(g)}return{resolveSync:l,resolve:a}}const La={Preview:"Preview",Compose:"Compose",RenderedPage:"RenderedPage"},Pn={DroppableBox:"droppable-box"},ir={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},xa={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly",Stretch:"stretch"},wn="cssAttrArray",Ra={Phone:"phone",Tablet:"tablet",Desktop:"desktop"},Tr={ComposerComponent:"ComposerWidget",Collection:"Collection",MoveComponentHandle:"MoveWidgetHandle"},Ir=`${Tr.Collection}_`,ro="dev.",io="https://rulecms.com",oo="https://widget-cache.rulecms.com",so="/api/v1/c/widget/get",lo="/api/v1/c/dev/widget/get";function it(e){return typeof e=="string"&&e.startsWith(ro)}function ao(e,t){return t?t.replace(/\/$/,""):it(e)?io:oo}function Dr({publishedKey:e,token:t,endpoint:n}){const r=it(t),i=r?lo:so,o=r?new URLSearchParams({widgetKey:e,token:t}):new URLSearchParams({publishedKey:e,token:t});return`${ao(t,n)}${i}?${o.toString()}`}const Na=({id:e,prefix:t})=>`${t}_${e}`,uo=e=>{if(!(e!=null&&e.length)||!e.includes("_")){console.error(`Invalid drag item id: ${e}. Type does not exist.`);return}return co(e)},Pr=e=>e.includes("_"),co=e=>{const t=e.indexOf("_"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:n,id:r}},kr=e=>{if(!Pr(e))return;const n=uo(e);return(n==null?void 0:n.prefix)===Tr.Collection||console.error("getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."),n==null?void 0:n.id},Ma=e=>{if(!(e!=null&&e.length)){console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");return}const t=e.split("$");if(t.length<2){console.error("getNameAndInstanceIdFromWidgetKey: Invalid widget key format");return}const n=t[0];if(!t[1].includes("@"))return{name:n,instanceId:t[1]};const i=t[1].split("@");return{name:n,instanceId:i[0],parentId:i[1]}},Oa=e=>{if(!(e!=null&&e.length))return{errorMessage:"getNameFromWidgetKey: Missing widget key"};const t=e.split("$");return t.length<2?{errorMessage:"getNameFromWidgetKey: Invalid widget key format"}:{name:t[0]}},fo=e=>{var i,o,s,l;if(!e)return{error:"getWidgetKeyForCollection: Missing collection"};if(!((i=e.name)!=null&&i.length))return{error:"getWidgetKeyForCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((s=e.id)!=null&&s.length))return{error:"getWidgetKeyForCollection: Missing collection id"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.id}@${e.parentId}`:`${e.id}`;return{data:`${t}$${r}`}},po=e=>{var i,o,s,l;if(!e)return{error:"getWidgetKeyForPublishedCollection: Missing collection"};if(!((i=e.name)!=null&&i.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((s=e.publishedKey)!=null&&s.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection publishedKey"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.publishedKey}@${e.parentId}`:`${e.publishedKey}`;return{data:`${t}$${r}`}},Wa=e=>{const t=fo(e);return`${Ir}${t.data}`},Fa=e=>{const t=po(e);return`${Ir}${t.data}`},ho="---",go="___";function vo(e,t){return`${e}${ho}${t}`}function Va(e,t,n){return`${vo(e,t)}${go}${n}`}function ja(e){const t=e.split(".");if(t.length!==3)throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);const n=t[0],r=t[1],i=parseInt(t[2],10);if(isNaN(i))throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);return`${n}.${r}.${i+1}`}function kn({displayItemList:e,widgetCollections:t}){const n=new Set;let r=!1;const i=o=>{var s,l,a;if((s=o==null?void 0:o.rows)!=null&&s.length){for(const u of o.rows)if((l=u==null?void 0:u.columns)!=null&&l.length)for(const f of u.columns)f.collection&&i(f.collection.collectionRows),!(!f.type||f.type===Pn.DroppableBox)&&(Pr(f.type)||(!((a=f.libraryId)!=null&&a.length)||f.libraryId===Tt?r=!0:n.add(f.libraryId)))}};i(e);for(const o of Object.values(t??{}))i(o==null?void 0:o.collectionRows);return{libraryIds:Array.from(n),usesDefaultLibrary:r}}const Lr=Symbol("rulecms-widget-context");function Ba(){return{token:"",endpoint:void 0,libraries:void 0,libraryRegistry:nn()}}function Ua(e,t){Ne(t,!0);const n=pt(Ba());_r(()=>{n.token=t.token,n.endpoint=t.endpoint,n.libraries=t.libraries}),Qn.setContext(Lr,n);var r=ne(),i=X(r);Ar(i,()=>t.children),x(e,r),Me()}const yo="1200px",xr="500px",Rr="820px",Ka=yo,mo="rulecms",Ha=1920,Ga={f:"auto",q:"auto",c:"limit"},Ya=/^[A-Za-z0-9][A-Za-z0-9._\-/]*$/,za=300,qa=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,Xa=100,Za=/^https:\/\/[^\s"'()\\<>]+$/,Ja=2e3,Qa=/^[A-Za-z0-9_,.:\-/]*$/,$a=300,_o=e=>typeof e=="string"&&e.length<=za&&Ya.test(e),bo=e=>typeof e=="string"&&e.length<=Xa&&qa.test(e),wo=e=>typeof e=="string"&&e.length<=Ja&&Za.test(e),Co=e=>typeof e=="string"&&e.length<=$a&&Qa.test(e),eu=e=>Object.entries(e).map(([t,n])=>`${t}_${n}`).join(","),tu=e=>{const t={};for(const n of e.split(",")){const r=n.trim(),i=r.indexOf("_");i<=0||(t[r.slice(0,i)]=r.slice(i+1))}return t},Ao=({publicId:e,cloudName:t=mo,transformations:n,width:r=Ha})=>{const i=typeof n=="string"?tu(n):n,o={...Ga,...i,w:r};return encodeURI(`https://res.cloudinary.com/${t}/image/upload/${eu(o)}/${e}`)},So=/^--[A-Za-z0-9_-]+$/,Eo=200,Nr=e=>{if(typeof e!="string")return!1;const t=e.trim();return t.length<=Eo&&So.test(t)},Ee=e=>`var(${e.trim()})`,K=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e.cssVariable;if(t!=null)return Nr(t)?t.trim():void 0},Le=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e.cssVariable;return t==null?!1:!Nr(t)},nu=(e,t)=>{const n=K(e);return n?{[t]:Ee(n)}:void 0},To=e=>{if(typeof e!="object"||e===null||Array.isArray(e)||Le(e))return!1;if(K(e))return!0;const t=e;return t.source==="none"?!0:t.source==="url"?wo(t.url):t.source==="cloudinary"?!_o(t.publicId)||t.cloudName!==void 0&&t.cloudName!==null&&!bo(t.cloudName)?!1:t.transformations===void 0||t.transformations===null||Co(t.transformations):!1},Io=["px","%","em","rem","vh","vw"],Ln=["inherit","unset"],Do=["allSides","top","right","bottom","left"],ot=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;return Le(e)?!1:K(e)?!0:n.unit==="auto"?t.allowAuto!==!1:n.unit==="keyword"?t.allowKeywords!==!1&&Ln.includes(n.keyword):Io.includes(n.unit)?typeof n.value!="number"||!Number.isFinite(n.value)?!1:t.allowNegative!==!1||n.value>=0:!1},Po=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;for(const r of Do){const i=n[r];if(i!=null&&!ot(i,t))return!1}return!0},ru=[...Ln,"transparent","currentColor"],iu=/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/,xn=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Le(e)?!1:K(e)?!0:t.unit==="keyword"?ru.includes(t.keyword):t.unit==="color"?typeof t.value=="string"&&iu.test(t.value.trim()):!1},Rn=e=>{const t=K(e);return t?Ee(t):"unit"in e?e.unit==="keyword"?e.keyword:e.value.trim():""},ko=(e,t)=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Le(e)&&!!K(e):typeof e!="string"||!e.length?!1:t.includes(e)?!0:Ln.includes(e),Lo=['system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif','Georgia, "Times New Roman", Times, serif',"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace","Arial, Helvetica, sans-serif",'"Helvetica Neue", Helvetica, Arial, sans-serif',"Verdana, Geneva, sans-serif"],xo=["normal","bold","100","200","300","400","500","600","700","800","900"],Ro=["normal","italic","oblique"],No=["left","center","right","justify","start","end"],Mo=["none","underline","line-through","overline"],Oo=["none","uppercase","lowercase","capitalize"],cn=["visible","hidden","scroll","auto","clip"],Wo=["auto","none"],Fo=["flex-start","flex-end","center","space-between","space-around","space-evenly"],Vo=["flex-start","flex-end","center","baseline","stretch"],jo=["wrap","nowrap"],Bo=["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch"],Uo=["row","row-reverse","column","column-reverse"],Ko=["cover","contain","auto"],Ho=["center center","center top","center bottom","left center","left top","left bottom","right center","right top","right bottom"],Go=["no-repeat","repeat","repeat-x","repeat-y","space","round"],Yo=["justifyContent","alignItems","flexWrap","alignContent","flexDirection"],zo=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],qo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Le(e)&&!!K(e):zo.includes(e),Xo=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Le(e)?!1:K(e)?!0:!(t.width!==void 0&&t.width!==null&&!ot(t.width,{allowAuto:!1,allowNegative:!1})||t.style!==void 0&&t.style!==null&&!qo(t.style)||t.color!==void 0&&t.color!==null&&!xn(t.color))},ou={allowAuto:!1,allowKeywords:!1,allowNegative:!0},su={allowAuto:!1,allowKeywords:!1,allowNegative:!1},Zo=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;if(Le(e))return!1;if(K(e))return!0;for(const n of["offsetX","offsetY","spread"]){const r=t[n];if(r!=null&&!ot(r,ou))return!1}return!(t.blur!==void 0&&t.blur!==null&&!ot(t.blur,su)||t.color!==void 0&&t.color!==null&&!xn(t.color)||t.inset!==void 0&&t.inset!==null&&typeof t.inset!="boolean")},Jo=e=>e?e.cssVariable!==void 0&&e.cssVariable!==null||e.offsetX!==void 0||e.offsetY!==void 0||e.blur!==void 0||e.spread!==void 0||e.color!==void 0:!1,Qo=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Le(e)?!1:K(e)?!0:t.unit==="number"?typeof t.value=="number"&&Number.isFinite(t.value)&&t.value>0:ot(e,{allowAuto:!1,allowNegative:!1})},$o=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Le(e)&&!!K(e):typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1,es=e=>{if(!To(e))return{};const t=K(e);if(t)return{backgroundImage:Ee(t)};const n=e;return n.source==="none"?{backgroundImage:"none"}:n.source==="url"?{backgroundImage:`url("${n.url}")`}:{backgroundImage:`url("${Ao({publicId:n.publicId,cloudName:n.cloudName,transformations:n.transformations})}")`}},st=e=>{const t=K(e);return t?Ee(t):"unit"in e?e.unit==="auto"?"auto":e.unit==="keyword"?e.keyword:`${e.value}${e.unit}`:""},ts=e=>{if(!Xo(e))return{};const t=K(e);if(t)return{border:Ee(t)};const n={};if(e.width&&(n.borderWidth=st(e.width)),e.style){const r=K(e.style);n.borderStyle=r?Ee(r):e.style}return e.color&&(n.borderColor=Rn(e.color)),n},ln=e=>e?st(e):"0px",ns=e=>{if(!Zo(e)||!Jo(e))return{};const t=K(e);if(t)return{boxShadow:Ee(t)};const n=[ln(e.offsetX),ln(e.offsetY),ln(e.blur),ln(e.spread)];return e.color&&n.push(Rn(e.color)),e.inset&&n.unshift("inset"),{boxShadow:n.join(" ")}},lu=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,rs=(e,t)=>{if(!Po(e))return{};if(e.allSides)return{[t]:st(e.allSides)};const n={};for(const r of["top","right","bottom","left"]){const i=e[r];i&&(n[`${t}${lu(r)}`]=st(i))}return n},is=(e,t)=>xn(e)?{[t]:Rn(e)}:{},os=(e,t,n)=>{if(!ko(e,n))return{};const r=K(e);return r?{[t]:Ee(r)}:{[t]:e}},ss=(e,t,n={})=>ot(e,n)?{[t]:st(e)}:{},ls=e=>{if(!Qo(e))return{};const t=K(e);return t?{lineHeight:Ee(t)}:"unit"in e&&e.unit==="number"?{lineHeight:e.value}:{lineHeight:st(e)}},as=e=>{if(!$o(e))return{};const t=K(e);return t?{opacity:Ee(t)}:{opacity:e}},Nn={"margin-3-resolutions":{kind:"boxSpacing",cssProperty:"margin"},"padding-3-resolutions":{kind:"boxSpacing",cssProperty:"padding"},"border-3-resolutions":{kind:"border"},"box-shadow-3-resolutions":{kind:"boxShadow"},"border-radius-3-resolutions":{kind:"length",cssProperty:"borderRadius",capabilities:{allowAuto:!1,allowNegative:!1}},"width-3-resolutions":{kind:"length",cssProperty:"width",capabilities:{allowAuto:!0,allowNegative:!1}},"height-3-resolutions":{kind:"length",cssProperty:"height",capabilities:{allowAuto:!0,allowNegative:!1}},"min-width-3-resolutions":{kind:"length",cssProperty:"minWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"max-width-3-resolutions":{kind:"length",cssProperty:"maxWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"min-height-3-resolutions":{kind:"length",cssProperty:"minHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"max-height-3-resolutions":{kind:"length",cssProperty:"maxHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"gap-3-resolutions":{kind:"length",cssProperty:"gap",capabilities:{allowAuto:!1,allowNegative:!1}},"justify-content-3-resolutions":{kind:"enum",cssProperty:"justifyContent",allowedValues:Fo},"align-items-3-resolutions":{kind:"enum",cssProperty:"alignItems",allowedValues:Vo},"flex-wrap-3-resolutions":{kind:"enum",cssProperty:"flexWrap",allowedValues:jo},"align-content-3-resolutions":{kind:"enum",cssProperty:"alignContent",allowedValues:Bo},"flex-direction-3-resolutions":{kind:"enum",cssProperty:"flexDirection",allowedValues:Uo},"overflow-3-resolutions":{kind:"enum",cssProperty:"overflow",allowedValues:cn},"overflow-x-3-resolutions":{kind:"enum",cssProperty:"overflowX",allowedValues:cn},"overflow-y-3-resolutions":{kind:"enum",cssProperty:"overflowY",allowedValues:cn},"pointer-events-3-resolutions":{kind:"enum",cssProperty:"pointerEvents",allowedValues:Wo},"background-color-3-resolutions":{kind:"color",cssProperty:"backgroundColor"},"color-3-resolutions":{kind:"color",cssProperty:"color"},"background-image-3-resolutions":{kind:"backgroundImage"},"background-size-3-resolutions":{kind:"enum",cssProperty:"backgroundSize",allowedValues:Ko},"background-position-3-resolutions":{kind:"enum",cssProperty:"backgroundPosition",allowedValues:Ho},"background-repeat-3-resolutions":{kind:"enum",cssProperty:"backgroundRepeat",allowedValues:Go},"opacity-3-resolutions":{kind:"opacity"},"font-family-3-resolutions":{kind:"enum",cssProperty:"fontFamily",allowedValues:Lo},"font-size-3-resolutions":{kind:"length",cssProperty:"fontSize",capabilities:{allowAuto:!1,allowNegative:!1}},"font-weight-3-resolutions":{kind:"enum",cssProperty:"fontWeight",allowedValues:xo},"font-style-3-resolutions":{kind:"enum",cssProperty:"fontStyle",allowedValues:Ro},"line-height-3-resolutions":{kind:"lineHeight"},"letter-spacing-3-resolutions":{kind:"length",cssProperty:"letterSpacing",capabilities:{allowAuto:!1,allowNegative:!0}},"text-align-3-resolutions":{kind:"enum",cssProperty:"textAlign",allowedValues:No},"text-decoration-3-resolutions":{kind:"enum",cssProperty:"textDecoration",allowedValues:Mo},"text-transform-3-resolutions":{kind:"enum",cssProperty:"textTransform",allowedValues:Oo}},us=(e,t)=>{const n=Nn[e];if(!n)return{};switch(n.kind){case"boxSpacing":return rs(t,n.cssProperty);case"length":return ss(t,n.cssProperty,n.capabilities);case"border":return ts(t);case"boxShadow":return ns(t);case"color":return is(t,n.cssProperty);case"opacity":return as(t);case"enum":return os(t,n.cssProperty,n.allowedValues);case"lineHeight":return ls(t);case"backgroundImage":return es(t);default:return{}}},au=Object.fromEntries(Object.entries(Nn).filter(([,e])=>e.kind==="boxSpacing").map(([e,t])=>[e,t.cssProperty])),uu=e=>e!=null&&e!=="",cs=e=>e?!Yo.some(n=>uu(e[n]))||e.display==="flex"?e:{...e,display:"flex"}:{},fs=({dbEntryType:e,libraryId:t,sourceComponentsPlugin:n})=>{if(!(e!=null&&e.length))return;const r=n.components[Er(t,e)];if(!r||!("defaultAttributeValues"in r))return;const o=r.defaultAttributeValues;if(o!=null&&o.length)return o.reduce((s,l)=>({...s,[l.name]:l.defaultValues}),{})},Oe=({deviceDisplayType:e,componentAttributes:t})=>{if(!t)return;const n={},r={};for(const[i,o]of Object.entries(t)){if(!i.includes("3-resolutions")||!o)continue;const s=o.all,l=s??o[e.toLowerCase()];r[i]=l,Nn[i]&&Object.assign(n,us(i,l))}return Object.keys(n).length||Object.keys(r).length?{styles:Object.keys(n).length?n:void 0,componentAttributesSpecificToDeviceType:Object.keys(r).length?r:void 0}:void 0},ds=({defaultAttributes:e,userModifiedAttributes:t})=>e?t?{...e,...t}:e:t;function jt(e){return e.componentAttributes??e.widgetAttributes}function or({col:e,deviceDisplayType:t,isComposeMode:n,sourceComponentsPlugin:r}){const i=jt(e),o=fs({dbEntryType:e.type,libraryId:e.libraryId,sourceComponentsPlugin:r})||[],s=ds({defaultAttributes:o,userModifiedAttributes:i}),{styles:l,componentAttributesSpecificToDeviceType:a}=Oe({deviceDisplayType:t,componentAttributes:s})||{styles:void 0,componentAttributesSpecificToDeviceType:void 0};let u={};const f={};if(l)for(const[c,d]of Object.entries(l))n&&f[c]||(u={...u,[c]:d});let g=jt(e);for(const c in a)if(c.includes("3-resolutions")){g={...jt(e)||{},...a||{}};break}return{componentAttributesBasedOnDevice:g,componentStyles:cs(u)}}const ps=e=>{const t=(e==null?void 0:e.rows)||[];for(const n of t)if(((n==null?void 0:n.columns)||[]).length>0)return!0;return(e==null?void 0:e.containerAttributes)&&Object.keys(e.containerAttributes).length>0},hs="var(--sl-spacing-x-small)";function gs(e){return e!=null&&e.horizontalAlignment||e!=null&&e.verticalAlignment||e!=null&&e.flexWrap||e!=null&&e.gap||e!=null&&e.alignContent?!0:!!(e!=null&&e.rowAttributes&&Object.keys(e.rowAttributes).length>0)}function vs({row:e,deviceDisplayType:t}){var r;const n=Oe({deviceDisplayType:t,componentAttributes:e.rowAttributes});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r["hide-component-3-resolutions"])==="true"}function ys({row:e,deviceDisplayType:t,isComposeMode:n}){var d;const r=((d=Oe({deviceDisplayType:t,componentAttributes:e.rowAttributes}))==null?void 0:d.styles)||{},i=r.justifyContent??e.horizontalAlignment??ir.Center,o=r.alignItems??e.verticalAlignment??ir.Center,s=r.flexDirection??"row",l=r.gap??e.gap??hs,a=n?"nowrap":r.flexWrap??e.flexWrap??"nowrap",u=r.alignContent??e.alignContent??void 0,f=new Set(["justifyContent","alignItems","flexDirection","gap","flexWrap","alignContent","display"]),g={};for(const[y,m]of Object.entries(r))f.has(y)||(g[y]=m);const c={display:"flex",flexDirection:s,gap:l,flexWrap:a,justifyContent:i,alignItems:o,...g};return u!==void 0&&(c.alignContent=u),c}const Mn="css-classes-3-resolutions",cu=500,fu=/[\x00-\x1f\x7f]/g,On=e=>{if(typeof e!="string")return;const t=new Set,n=[];for(const i of e.split(/\s+/)){const o=i.replace(fu,"");o&&(t.has(o)||(t.add(o),n.push(o)))}if(!n.length)return;let r="";for(const i of n){const o=r?`${r} ${i}`:i;if(o.length>cu)break;r=o}return r.length?r:void 0},Mr="hide-component-3-resolutions",ms="pointer-events-3-resolutions",_s=["width-3-resolutions","min-width-3-resolutions","max-width-3-resolutions","height-3-resolutions","min-height-3-resolutions","max-height-3-resolutions","margin-3-resolutions","padding-3-resolutions","border-3-resolutions","border-radius-3-resolutions","box-shadow-3-resolutions","overflow-3-resolutions","overflow-x-3-resolutions","overflow-y-3-resolutions",Mr,ms],du=new Set(_s);function Wn({containerAttributes:e,deviceDisplayType:t}){var r;const n=Oe({deviceDisplayType:t,componentAttributes:e});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r[Mr])==="true"}function Or({containerAttributes:e,deviceDisplayType:t,isComposeMode:n}){var o;if(!e)return{styles:{}};const r=n?Object.fromEntries(Object.entries(e).filter(([s])=>!du.has(s))):e,i=Oe({deviceDisplayType:t,componentAttributes:r});return{styles:(i==null?void 0:i.styles)??{},cssClasses:On((o=i==null?void 0:i.componentAttributesSpecificToDeviceType)==null?void 0:o[Mn])}}function bs(e){return Object.keys(e.styles).length>0||!!e.cssClasses}function Wr({containerAttributes:e,widgetContainerStyles:t}){return((e==null?void 0:e[wn])||[]).some(r=>r.toLowerCase().startsWith("height:"))||t.styles.height!==void 0}const ws="z-index-3-resolutions",Fr=0;function Cs(e){var t,n;return!!((n=(t=e==null?void 0:e.overlayLayers)==null?void 0:t.layers)!=null&&n.length)}function sr({containerAttributes:e,deviceDisplayType:t}){var i;const n=Oe({deviceDisplayType:t,componentAttributes:e}),r=(i=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:i[ws];if(typeof r=="number"&&Number.isFinite(r))return r;if(typeof r=="string"&&r.trim().length){const o=Number(r);if(Number.isFinite(o))return o}return Fr}function As(e,t){return e+t+1}function Ss({containerAttributes:e,deviceDisplayType:t}){var i;const n=Oe({deviceDisplayType:t,componentAttributes:e}),r=(i=n==null?void 0:n.styles)==null?void 0:i.pointerEvents;return typeof r=="string"?r:void 0}function Es({layer:e,deviceDisplayType:t}){var n;return(n=e==null?void 0:e.rows)!=null&&n.length?Wn({containerAttributes:e.containerAttributes,deviceDisplayType:t}):!0}function Ts({isWithinCollection:e,baseDeclaresOwnHeight:t,baseZIndex:n}){return{position:"relative",isolation:"isolate",display:"flex",flexDirection:"column",...t?{}:{height:e?"auto":"100%"},...n===Fr?{}:{zIndex:n}}}function Is({zIndex:e,pointerEvents:t}){return{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxSizing:"border-box",zIndex:e,...t?{pointerEvents:t}:{}}}function J(e){if(!e)return;const t=[];for(const[n,r]of Object.entries(e)){if(r==null||r==="")continue;const i=n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);t.push(`${i}: ${r}`)}return t.length>0?t.join("; "):void 0}const Fn="/";function Ds({componentProps:e,ancestorColumnIds:t,columnId:n}){if(!e||!n)return;const r=[...t??[],n];for(let i=0;i<r.length;i+=1){const o=r.slice(i).join(Fn),s=e[o];if(s)return s}}function Ps({displayItemList:e,widgetCollections:t}){const n=[],r=(i,o)=>{var s;if((s=i==null?void 0:i.rows)!=null&&s.length)for(const l of i.rows)for(const a of l.columns){if(!a.id||a.type===Pn.DroppableBox)continue;const u=kr(a.type);if(u!=null&&u.length){const f=a.collection??(t==null?void 0:t[u]);f&&!o.includes(a.id)&&r(f.collectionRows,[...o,a.id]);continue}n.push([...o,a.id].join(Fn))}};return r(e,[]),n}function pu(e,t){const n=`${Fn}${e}`;return t.some(r=>r===e||r.endsWith(n))}function ks({componentProps:e,displayItemList:t,widgetCollections:n}){const r=e?Object.keys(e):[];if(!r.length)return[];const i=Ps({displayItemList:t,widgetCollections:n});return r.filter(o=>!pu(o,i))}function Ls({componentProps:e,displayItemList:t,widgetCollections:n,publishedKey:r}){if(process.env.NODE_ENV==="production")return;const i=ks({componentProps:e,displayItemList:t,widgetCollections:n});i.length&&console.warn(`RuleCMSWidget "${r}": componentProps ${i.map(o=>`"${o}"`).join(", ")} ${i.length===1?"matches":"match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`)}function hu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function gu(e){if(e.all!==void 0&&e.all!==null)return!1;const t=e.phone,n=e.tablet,r=e.desktop;return t!==n||t!==r||n!==r}function lr(e){var t,n;if(!((t=e==null?void 0:e.rows)!=null&&t.length))return!1;if(Jn(e.containerAttributes))return!0;for(const r of e.rows){if(Jn(r.rowAttributes))return!0;for(const i of r.columns)if(Jn(jt(i)))return!0}for(const r of((n=e.overlayLayers)==null?void 0:n.layers)??[])if(lr(r))return!0;return!1}function Jn(e){if(!e)return!1;for(const[t,n]of Object.entries(e))if(!(!t.includes("3-resolutions")||!hu(n))){if(t==="hide-component-3-resolutions"){const r=n,i=o=>o==="true"||o===!0;if(i(r.phone)!==i(r.tablet)||i(r.phone)!==i(r.desktop))return!0;continue}if(gu(n))return!0}return!1}function xs(e,t){if(lr(e))return!0;for(const n of Object.values(t))if(lr(n.collectionRows))return!0;return!1}const Rs=parseInt(xr,10),Ns=parseInt(Rr,10),vu=Rs+1,yu=Ns+1;function mu(e){const t=`.${e}-phone`,n=`.${e}-tablet`,r=`.${e}-desktop`;return`
3
3
  ${t}, ${n}, ${r} { display: none; }
4
- @media (max-width: ${ys}px) { ${t} { display: block; } }
5
- @media (min-width: ${Xa}px) and (max-width: ${ms}px) { ${n} { display: block; } }
6
- @media (min-width: ${Za}px) { ${r} { display: block; } }
7
- `.trim()}function cn(e){if(!e)throw new Error("Source components plugin is required, but no plugins were provided");const t=e.sourceComponents;if(!t)throw new Error("Source components plugin is required, but was not found in plugins object");if(!t.components)throw new Error("Source components plugin is missing required property: components");if(typeof t.components!="object"||t.components===null||Array.isArray(t.components))throw new Error("Source components plugin components must be an object (Record<string, LibraryComponentEntry>)");return t}let Qa=0;var $a=Pe("<div><!> <!></div>");function eu(e,t){Me(t,!0);let n=ae(t,"isComposeMode",3,!1),r=ae(t,"showDropContainers",3,!1),o=ae(t,"isWithinCollection",3,!1),i=ae(t,"deviceDisplayType",3,"Desktop");const s=`rulecms-vc-${++Qa}`;function l(w,S,E){const b=w&&!E?3:1;return!!(S!=null&&S.length)&&S.length>b}const u=D(()=>{var w;return(((w=t.displayItemList.containerAttributes)==null?void 0:w[an])||[]).join(`;
8
- `)}),c=D(()=>g(u)?`.${s} {
9
- ${g(u)}
10
- }`:""),f=D(()=>!n()&&us({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:i()})),p=D(()=>cs({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:i(),isComposeMode:n()})),a=D(()=>{var E;const w=((E=t.displayItemList.containerAttributes)==null?void 0:E[an])||[],S=fs(g(p));return n()&&!o()||r()||w.length>0||S||l(n(),t.displayItemList.rows,o())}),d=D(()=>[g(u)?s:void 0,g(p).cssClasses].filter(Boolean).join(" ")),y=D(()=>{var S;return{...(((S=t.displayItemList.containerAttributes)==null?void 0:S[an])||[]).some(E=>E.toLowerCase().startsWith("height:"))?{}:{height:o()?"auto":"100%"},display:"flex",flexDirection:"column",...g(p).styles}}),m=D(()=>g(a)?g(d):""),h=D(()=>g(f)?{display:"none"}:g(a)?g(y):{display:"contents"});var _=$a(),A=_e(_);{var P=w=>{var S=ie(),E=q(S);yr(E,()=>"style",!1,(b,I)=>{var T=gr();le(()=>En(T,g(c))),M(I,T)}),M(w,S)};De(A,w=>{g(u)&&w(P)})}var C=Ct(A,2);vr(C,()=>t.children),le(w=>{ht(_,"hidden",g(f)||void 0),St(_,1,Gt(g(m)||void 0)),ne(_,w)},[()=>re(g(h))]),M(e,_),Ne()}var tu=Pe("<div><!></div>");function nu(e,t){Me(t,!0);let n=ae(t,"isComposeMode",3,!1),r=ae(t,"showDropContainers",3,!1),o=ae(t,"isWithinCollection",3,!1),i=ae(t,"deviceDisplayType",3,"Desktop");function s(m,h,_){var P;const A=m&&!_?3:1;return!!((P=h==null?void 0:h.columns)!=null&&P.length)&&h.columns.length>A}const l=D(()=>!n()&&ss({row:t.row,deviceDisplayType:i()})),u=D(()=>r()||is(t.row)||s(n(),t.row,o())),c=D(()=>ls({row:t.row,deviceDisplayType:i(),isComposeMode:n()})),f=D(()=>{var h;const m=ot({deviceDisplayType:i(),componentAttributes:t.row.rowAttributes});return Mn((h=m==null?void 0:m.componentAttributesSpecificToDeviceType)==null?void 0:h[xn])??""}),p=D(()=>g(u)?g(f):""),a=D(()=>g(l)?{display:"none"}:g(u)?g(c):{display:"contents"});var d=tu(),y=_e(d);vr(y,()=>t.children),le(m=>{ht(d,"hidden",g(l)||void 0),St(d,1,Gt(g(p)||void 0)),ne(d,m)},[()=>re(g(a))]),M(e,d),Ne()}const _s=["minWidth","maxWidth","minHeight","maxHeight","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","borderWidth","borderStyle","borderColor","border","borderRadius","boxShadow","width","height","gap","display","justifyContent","alignItems","flexWrap","alignContent","flexDirection","overflow","overflowX","overflowY","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","opacity","fontFamily","fontSize","fontWeight","fontStyle","color","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],ru=e=>e!=null&&e!=="",ou=e=>e?_s.reduce((t,n)=>{const r=e[n];return ru(r)&&(t[n]=r),t},{}):{},iu=e=>{if(!e)return;const t={...e};for(const n of _s)delete t[n];return Object.keys(t).length?t:void 0},su=e=>Object.keys(e).length>0,lu=(e,t)=>{const n=(e==null?void 0:e.noContainer)??!1,r=e==null?void 0:e.resolveNoContainer;if(typeof r!="function")return n;try{const o=r(t);if(typeof o=="boolean")return o;console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" returned ${typeof o} instead of a boolean; falling back to noContainer=${n}`)}catch(o){console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" threw; falling back to noContainer=${n}`,o)}return n},au=(e,t)=>{const n=e==null?void 0:e.resolveRendersOwnElement;if(typeof n!="function")return!1;try{const r=n(t);if(typeof r=="boolean")return r;console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" returned ${typeof r} instead of a boolean; falling back to false`)}catch(r){console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" threw; falling back to false`,r)}return!1};var Zr=Pe("<div><!></div>");function bs(e,t){Me(t,!0);const n=D(()=>t.components[mr(t.libraryId,t.componentType)]),r=D(()=>{var _;const h=(_=g(n))==null?void 0:_.card;return h||(console.error(`DisplayComponent: Component with type ${t.componentType}${t.libraryId?` (library "${t.libraryId}")`:""} not found in components`),null)}),o=D(()=>({componentAttributes:t.componentAttributes,styleProps:t.styleProps})),i=D(()=>g(n)?lu(g(n),g(o)):!1),s=D(()=>ou(t.styleProps)),l=D(()=>g(i)?iu(t.styleProps):t.styleProps),u=D(()=>{var h;return Mn((h=t.componentAttributes)==null?void 0:h[xn])}),c=D(()=>g(i)&&su(g(s))),f=D(()=>!g(i)||(g(n)?au(g(n),g(o)):!1)),p=D(()=>!g(c)&&g(f)?g(u):void 0),a=D(()=>({componentAttributes:t.componentAttributes,styleProps:g(l),className:g(p),widgetInstanceProps:t.widgetInstanceProps,mounts:t.mounts}));var d=ie(),y=q(d);{var m=h=>{const _=D(()=>g(r));var A=ie(),P=q(A);{var C=E=>{var b=Zr(),I=_e(b);Un(I,()=>g(_),(T,N)=>{N(T,Gn(()=>g(a)))}),le(T=>{St(b,1,Gt(g(u)||void 0)),ne(b,T)},[()=>re(g(s))]),M(E,b)},w=E=>{var b=Zr(),I=_e(b);Un(I,()=>g(_),(T,N)=>{N(T,Gn(()=>g(a)))}),le(()=>St(b,1,Gt(g(u)))),M(E,b)},S=E=>{var b=ie(),I=q(b);Un(I,()=>g(_),(T,N)=>{N(T,Gn(()=>g(a)))}),M(E,b)};De(P,E=>{g(c)?E(C):!g(f)&&g(u)?E(w,1):E(S,-1)})}M(h,A)};De(y,h=>{g(r)&&h(m)})}M(e,d),Ne()}function Pr(e,t){Me(t,!0);let n=ae(t,"isComposeMode",3,!1),r=ae(t,"isWithinCollection",3,!1),o=ae(t,"showDropContainers",3,!1);const i=D(()=>cn(t.plugins).components);function s(p){if(n()&&p.type===In.DroppableBox)return!1;const{componentAttributesBasedOnDevice:a}=er({col:p,deviceDisplayType:t.deviceDisplayType,isComposeMode:n(),sourceComponentsPlugin:cn(t.plugins)}),d=!!a&&a["hide-component-3-resolutions"]==="true";return!(!n()&&d)}function l(p){const{componentAttributesBasedOnDevice:a,componentStyles:d}=er({col:p,deviceDisplayType:t.deviceDisplayType,isComposeMode:n(),sourceComponentsPlugin:cn(t.plugins)});return{componentAttributes:a,styleProps:d}}function u(p){const a=Ar(p.type);if(!(a!=null&&a.length))return null;const d=p.collection??t.widgetCollections[a];if(!d)throw new Error(`DisplayCollection - Collection with ID ${a} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`);return!d.collectionRows||!rs(d.collectionRows)?null:d.collectionRows}function c(p){return[...t.ancestorColumnIds??[],p]}function f(p){return ds({componentProps:t.componentProps,ancestorColumnIds:t.ancestorColumnIds,columnId:p})}eu(e,{get displayItemList(){return t.displayItemList},get isComposeMode(){return n()},get showDropContainers(){return o()},get isWithinCollection(){return r()},get deviceDisplayType(){return t.deviceDisplayType},children:(p,a)=>{var d=ie(),y=q(d);bn(y,17,()=>t.displayItemList.rows,m=>m.id,(m,h)=>{nu(m,{get row(){return g(h)},get isComposeMode(){return n()},get showDropContainers(){return o()},get isWithinCollection(){return r()},get deviceDisplayType(){return t.deviceDisplayType},children:(_,A)=>{var P=ie(),C=q(P);bn(C,17,()=>g(h).columns,w=>w.id,(w,S)=>{var E=ie(),b=q(E);{var I=N=>{const Y=D(()=>u(g(S)));var O=ie(),X=q(O);{var it=Le=>{{let st=D(()=>c(g(S).id));Pr(Le,{get displayItemList(){return g(Y)},get isComposeMode(){return n()},isWithinCollection:!0,get widgetCollections(){return t.widgetCollections},get showDropContainers(){return o()},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return g(st)}})}},tn=Le=>{{let st=D(()=>l(g(S)).componentAttributes),he=D(()=>l(g(S)).styleProps),nn=D(()=>f(g(S).id));bs(Le,{get componentType(){return g(S).type},get libraryId(){return g(S).libraryId},get componentAttributes(){return g(st)},get components(){return g(i)},get styleProps(){return g(he)},get widgetInstanceProps(){return g(nn)},get mounts(){return t.mounts}})}};De(X,Le=>{g(Y)?Le(it):Le(tn,-1)})}M(N,O)},T=D(()=>s(g(S)));De(b,N=>{g(T)&&N(I)})}M(w,E)}),M(_,P)},$$slots:{default:!0}})}),M(p,d)},$$slots:{default:!0}}),Ne()}function wn(e,t){Me(t,!0);var n=ie(),r=q(n);{var o=i=>{Pr(i,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}})};De(r,i=>{var s,l;(l=(s=t.displayItemList)==null?void 0:s.rows)!=null&&l.length&&i(o)})}M(e,n),Ne()}function ws(e,t){var n=ie(),r=q(n);bn(r,16,()=>t.stylesheets??[],o=>o,(o,i)=>{var s=ie(),l=q(s);yr(l,()=>"style",!1,(u,c)=>{ia(u,()=>({"data-rulecms-library-stylesheet":""}));var f=gr();le(()=>En(f,i)),M(c,f)}),M(o,s)}),M(e,n)}let uu=0;var cu=Pe("<div><!></div>"),Jr=Pe("<!> <!>",1);function Cs(e,t){Me(t,!0);const n=["Phone","Tablet","Desktop"],r=`rulecms-bp-${++uu}`,o=D(()=>t.scopeIdInput??r),i=D(()=>vs(t.displayItemList,t.widgetCollections)),s=D(()=>Ja(g(o)));var l=Jr(),u=q(l);{let a=D(()=>{var d;return(d=t.plugins.sourceComponents)==null?void 0:d.stylesheets});ws(u,{get stylesheets(){return g(a)}})}var c=Ct(u,2);{var f=a=>{wn(a,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",deviceDisplayType:"Desktop",get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},p=a=>{var d=Jr(),y=q(d);yr(y,()=>"style",!1,(h,_)=>{var A=gr();le(()=>En(A,g(s))),M(_,A)});var m=Ct(y,2);bn(m,16,()=>n,h=>h,(h,_)=>{var A=cu(),P=_e(A);wn(P,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get deviceDisplayType(){return _},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),le(C=>St(A,1,C),[()=>`${g(o)}-${_.toLowerCase()}`]),M(h,A)}),M(a,d)};De(c,a=>{g(i)?a(p,-1):a(f)})}M(e,l),Ne()}function fu(e,t,n){if(e)return"Phone";if(t)return"Tablet";const r=(n==null?void 0:n.toLowerCase())||"desktop";return r==="phone"?"Phone":r==="tablet"?"Tablet":"Desktop"}const du=`(max-width: ${Er})`,pu=`(max-width: ${Tr})`;var hu=Pe("<!> <!>",1);function As(e,t){Me(t,!0);let n=oe("Desktop"),r,o;function i(){W(n,fu((r==null?void 0:r.matches)??!1,(o==null?void 0:o.matches)??!1,t.reduxDeviceDisplayType),!0)}dr(()=>(typeof matchMedia=="function"&&(r=matchMedia(du),o=matchMedia(pu),r.addEventListener("change",i),o.addEventListener("change",i)),i(),()=>{r==null||r.removeEventListener("change",i),o==null||o.removeEventListener("change",i)}));var s=hu(),l=q(s);{var u=f=>{{let p=D(()=>{var a;return(a=t.plugins.sourceComponents)==null?void 0:a.stylesheets});ws(f,{get stylesheets(){return g(p)}})}};De(l,f=>{t.isWithinCollection||f(u)})}var c=Ct(l,2);wn(c,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get deviceDisplayType(){return g(n)},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),M(e,s),Ne()}function gu(e){const t={};return Object.entries(e).forEach(([n,r])=>{const o={...r};if(o.itemList)try{o.collectionRows=typeof o.itemList=="string"?JSON.parse(o.itemList):o.itemList}catch(s){console.error(`Failed to parse itemList for collection ${n}:`,s),o.collectionRows={rows:[]}}let i=`${o.name}$${n}`;o.parentId&&(i=`${i}@${o.parentId}`),t[i]=o}),t}function vu(e){return typeof e.itemList=="string"?JSON.parse(e.itemList):e.itemList}function kr(e){return{displayItemList:vu(e.widget),widgetCollections:gu(e.childCollections),...e.libraries?{libraries:e.libraries}:{}}}function yu(e){const t=e.registry??en(),n=Dn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolveSync({registrations:e.libraries,referenced:n})}function mu(e){const t=e.registry??en(),n=Dn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolve({registrations:e.libraries,referenced:n})}const _u={display:"flex",justifyContent:"center",alignItems:"center",padding:"3rem",color:"#e2e8f0"},bu={display:"flex",alignItems:"center",gap:"1rem"},wu={width:"40px",height:"40px",border:"4px solid #4a5568",borderTopColor:"#63b3ed",borderRadius:"50%",animation:"spin 1s linear infinite"},Qr={padding:"1.5rem",backgroundColor:"#742a2a",border:"1px solid #9b2c2c",borderRadius:"8px",color:"#fed7d7"},$r={fontSize:"16px",fontWeight:"600",marginBottom:"0.5rem",color:"#feb2b2"},eo={fontSize:"14px",color:"#fed7d7"},Cu=`
4
+ @media (max-width: ${Rs}px) { ${t} { display: block; } }
5
+ @media (min-width: ${vu}px) and (max-width: ${Ns}px) { ${n} { display: block; } }
6
+ @media (min-width: ${yu}px) { ${r} { display: block; } }
7
+ `.trim()}function fn(e){if(!e)throw new Error("Source components plugin is required, but no plugins were provided");const t=e.sourceComponents;if(!t)throw new Error("Source components plugin is required, but was not found in plugins object");if(!t.components)throw new Error("Source components plugin is missing required property: components");if(typeof t.components!="object"||t.components===null||Array.isArray(t.components))throw new Error("Source components plugin components must be an object (Record<string, LibraryComponentEntry>)");return t}let _u=0;var bu=ve("<div><!> <!></div>");function wu(e,t){Ne(t,!0);let n=ce(t,"isComposeMode",3,!1),r=ce(t,"showDropContainers",3,!1),i=ce(t,"isWithinCollection",3,!1),o=ce(t,"deviceDisplayType",3,"Desktop");const s=`rulecms-vc-${++_u}`;function l(C,P,S){const b=C&&!S?3:1;return!!(P!=null&&P.length)&&P.length>b}const a=D(()=>{var C;return(((C=t.displayItemList.containerAttributes)==null?void 0:C[wn])||[]).join(`;
8
+ `)}),u=D(()=>p(a)?`.${s} {
9
+ ${p(a)}
10
+ }`:""),f=D(()=>!n()&&Wn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o()})),g=D(()=>Or({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o(),isComposeMode:n()})),c=D(()=>{var S;const C=((S=t.displayItemList.containerAttributes)==null?void 0:S[wn])||[],P=bs(p(g));return n()&&!i()||r()||C.length>0||P||l(n(),t.displayItemList.rows,i())}),d=D(()=>[p(a)?s:void 0,p(g).cssClasses].filter(Boolean).join(" ")),y=D(()=>({...Wr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:p(g)})?{}:{height:i()?"auto":"100%"},display:"flex",flexDirection:"column",...p(g).styles})),m=D(()=>p(c)?p(d):""),h=D(()=>p(f)?{display:"none"}:p(c)?p(y):{display:"contents"});var _=bu(),E=ae(_);{var A=C=>{var P=ne(),S=X(P);Sr(S,()=>"style",!1,(b,T)=>{var I=Cr();re(()=>In(I,p(u))),x(T,I)}),x(C,P)};Se(E,C=>{p(a)&&C(A)})}var w=nt(E,2);Ar(w,()=>t.children),re(C=>{et(_,"hidden",p(f)||void 0),St(_,1,zt(p(m)||void 0)),Z(_,C)},[()=>J(p(h))]),x(e,_),Me()}var Cu=ve("<div><!></div>");function Au(e,t){Ne(t,!0);let n=ce(t,"isComposeMode",3,!1),r=ce(t,"showDropContainers",3,!1),i=ce(t,"isWithinCollection",3,!1),o=ce(t,"deviceDisplayType",3,"Desktop");function s(m,h,_){var A;const E=m&&!_?3:1;return!!((A=h==null?void 0:h.columns)!=null&&A.length)&&h.columns.length>E}const l=D(()=>!n()&&vs({row:t.row,deviceDisplayType:o()})),a=D(()=>r()||gs(t.row)||s(n(),t.row,i())),u=D(()=>ys({row:t.row,deviceDisplayType:o(),isComposeMode:n()})),f=D(()=>{var h;const m=Oe({deviceDisplayType:o(),componentAttributes:t.row.rowAttributes});return On((h=m==null?void 0:m.componentAttributesSpecificToDeviceType)==null?void 0:h[Mn])??""}),g=D(()=>p(a)?p(f):""),c=D(()=>p(l)?{display:"none"}:p(a)?p(u):{display:"contents"});var d=Cu(),y=ae(d);Ar(y,()=>t.children),re(m=>{et(d,"hidden",p(l)||void 0),St(d,1,zt(p(g)||void 0)),Z(d,m)},[()=>J(p(c))]),x(e,d),Me()}const Ms=["minWidth","maxWidth","minHeight","maxHeight","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","borderWidth","borderStyle","borderColor","border","borderRadius","boxShadow","width","height","gap","display","justifyContent","alignItems","flexWrap","alignContent","flexDirection","overflow","overflowX","overflowY","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","opacity","fontFamily","fontSize","fontWeight","fontStyle","color","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Su=e=>e!=null&&e!=="",Eu=e=>e?Ms.reduce((t,n)=>{const r=e[n];return Su(r)&&(t[n]=r),t},{}):{},Tu=e=>{if(!e)return;const t={...e};for(const n of Ms)delete t[n];return Object.keys(t).length?t:void 0},Iu=e=>Object.keys(e).length>0,Du=(e,t)=>{const n=(e==null?void 0:e.noContainer)??!1,r=e==null?void 0:e.resolveNoContainer;if(typeof r!="function")return n;try{const i=r(t);if(typeof i=="boolean")return i;console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" returned ${typeof i} instead of a boolean; falling back to noContainer=${n}`)}catch(i){console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" threw; falling back to noContainer=${n}`,i)}return n},Pu=(e,t)=>{const n=e==null?void 0:e.resolveRendersOwnElement;if(typeof n!="function")return!1;try{const r=n(t);if(typeof r=="boolean")return r;console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" returned ${typeof r} instead of a boolean; falling back to false`)}catch(r){console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" threw; falling back to false`,r)}return!1};var oi=ve("<div><!></div>");function Os(e,t){Ne(t,!0);const n=D(()=>t.components[Er(t.libraryId,t.componentType)]),r=D(()=>{var _;const h=(_=p(n))==null?void 0:_.card;return h||(console.error(`DisplayComponent: Component with type ${t.componentType}${t.libraryId?` (library "${t.libraryId}")`:""} not found in components`),null)}),i=D(()=>({componentAttributes:t.componentAttributes,styleProps:t.styleProps})),o=D(()=>p(n)?Du(p(n),p(i)):!1),s=D(()=>Eu(t.styleProps)),l=D(()=>p(o)?Tu(t.styleProps):t.styleProps),a=D(()=>{var h;return On((h=t.componentAttributes)==null?void 0:h[Mn])}),u=D(()=>p(o)&&Iu(p(s))),f=D(()=>!p(o)||(p(n)?Pu(p(n),p(i)):!1)),g=D(()=>!p(u)&&p(f)?p(a):void 0),c=D(()=>({componentAttributes:t.componentAttributes,styleProps:p(l),className:p(g),widgetInstanceProps:t.widgetInstanceProps,mounts:t.mounts}));var d=ne(),y=X(d);{var m=h=>{const _=D(()=>p(r));var E=ne(),A=X(E);{var w=S=>{var b=oi(),T=ae(b);Yn(T,()=>p(_),(I,O)=>{O(I,Xn(()=>p(c)))}),re(I=>{St(b,1,zt(p(a)||void 0)),Z(b,I)},[()=>J(p(s))]),x(S,b)},C=S=>{var b=oi(),T=ae(b);Yn(T,()=>p(_),(I,O)=>{O(I,Xn(()=>p(c)))}),re(()=>St(b,1,zt(p(a)))),x(S,b)},P=S=>{var b=ne(),T=X(b);Yn(T,()=>p(_),(I,O)=>{O(I,Xn(()=>p(c)))}),x(S,b)};Se(A,S=>{p(u)?S(w):!p(f)&&p(a)?S(C,1):S(P,-1)})}x(h,E)};Se(y,h=>{p(r)&&h(m)})}x(e,d),Me()}var ku=ve("<div><!></div>"),Lu=ve("<div><!> <!></div>");function Cn(e,t){Ne(t,!0);const n=A=>{wu(A,{get displayItemList(){return t.displayItemList},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return i()},get deviceDisplayType(){return t.deviceDisplayType},children:(w,C)=>{var P=ne(),S=X(P);Vt(S,17,()=>t.displayItemList.rows,b=>b.id,(b,T)=>{Au(b,{get row(){return p(T)},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return i()},get deviceDisplayType(){return t.deviceDisplayType},children:(I,O)=>{var Y=ne(),W=X(Y);Vt(W,17,()=>p(T).columns,z=>z.id,(z,ie)=>{var It=ne(),rn=X(It);{var on=lt=>{const jr=D(()=>c(p(ie)));var Br=ne(),js=X(Br);{var Bs=at=>{{let Vn=D(()=>d(p(ie).id));Cn(at,{get displayItemList(){return p(jr)},get isComposeMode(){return r()},isWithinCollection:!0,get widgetCollections(){return t.widgetCollections},get showDropContainers(){return o()},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return p(Vn)}})}},Us=at=>{{let Vn=D(()=>g(p(ie)).componentAttributes),Ks=D(()=>g(p(ie)).styleProps),Hs=D(()=>y(p(ie).id));Os(at,{get componentType(){return p(ie).type},get libraryId(){return p(ie).libraryId},get componentAttributes(){return p(Vn)},get components(){return p(s)},get styleProps(){return p(Ks)},get widgetInstanceProps(){return p(Hs)},get mounts(){return t.mounts}})}};Se(js,at=>{p(jr)?at(Bs):at(Us,-1)})}x(lt,Br)},ye=D(()=>f(p(ie)));Se(rn,lt=>{p(ye)&&lt(on)})}x(z,It)}),x(I,Y)},$$slots:{default:!0}})}),x(w,P)},$$slots:{default:!0}})};let r=ce(t,"isComposeMode",3,!1),i=ce(t,"isWithinCollection",3,!1),o=ce(t,"showDropContainers",3,!1);const s=D(()=>fn(t.plugins).components),l=D(()=>!r()&&Cs(t.displayItemList)&&!Wn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType})),a=D(()=>{const A=sr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return Ts({isWithinCollection:i(),baseDeclaresOwnHeight:Wr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:Or({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType,isComposeMode:r()})}),baseZIndex:A})}),u=D(()=>{var C;const A=((C=t.displayItemList.overlayLayers)==null?void 0:C.layers)??[],w=sr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return A.flatMap((P,S)=>Es({layer:P,deviceDisplayType:t.deviceDisplayType})?[]:[{index:S,layer:P,boxStyles:Is({zIndex:As(w,S),pointerEvents:Ss({containerAttributes:P.containerAttributes,deviceDisplayType:t.deviceDisplayType})})}])});function f(A){if(r()&&A.type===Pn.DroppableBox)return!1;const{componentAttributesBasedOnDevice:w}=or({col:A,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:fn(t.plugins)}),C=!!w&&w["hide-component-3-resolutions"]==="true";return!(!r()&&C)}function g(A){const{componentAttributesBasedOnDevice:w,componentStyles:C}=or({col:A,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:fn(t.plugins)});return{componentAttributes:w,styleProps:C}}function c(A){const w=kr(A.type);if(!(w!=null&&w.length))return null;const C=A.collection??t.widgetCollections[w];if(!C)throw new Error(`DisplayCollection - Collection with ID ${w} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`);return!C.collectionRows||!ps(C.collectionRows)?null:C.collectionRows}function d(A){return[...t.ancestorColumnIds??[],A]}function y(A){return Ds({componentProps:t.componentProps,ancestorColumnIds:t.ancestorColumnIds,columnId:A})}var m=ne(),h=X(m);{var _=A=>{var w=Lu(),C=ae(w);n(C);var P=nt(C,2);Vt(P,17,()=>p(u),S=>S.index,(S,b)=>{var T=ku(),I=ae(T);Cn(I,{get displayItemList(){return p(b).layer},get isComposeMode(){return r()},isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}}),re(O=>{et(T,"data-rulecms-overlay-layer",p(b).index),Z(T,O)},[()=>J(p(b).boxStyles)]),x(S,T)}),re(S=>Z(w,S),[()=>J(p(a))]),x(A,w)},E=A=>{n(A)};Se(h,A=>{p(l)?A(_):A(E,-1)})}x(e,m),Me()}function An(e,t){Ne(t,!0);var n=ne(),r=X(n);{var i=o=>{Cn(o,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}})};Se(r,o=>{var s,l;(l=(s=t.displayItemList)==null?void 0:s.rows)!=null&&l.length&&o(i)})}x(e,n),Me()}function Ws(e,t){var n=ne(),r=X(n);Vt(r,16,()=>t.stylesheets??[],i=>i,(i,o)=>{var s=ne(),l=X(s);Sr(l,()=>"style",!1,(a,u)=>{Ta(a,()=>({"data-rulecms-library-stylesheet":""}));var f=Cr();re(()=>In(f,o)),x(u,f)}),x(i,s)}),x(e,n)}let xu=0;var Ru=ve("<div><!></div>"),si=ve("<!> <!>",1);function Fs(e,t){Ne(t,!0);const n=["Phone","Tablet","Desktop"],r=`rulecms-bp-${++xu}`,i=D(()=>t.scopeIdInput??r),o=D(()=>xs(t.displayItemList,t.widgetCollections)),s=D(()=>mu(p(i)));var l=si(),a=X(l);{let c=D(()=>{var d;return(d=t.plugins.sourceComponents)==null?void 0:d.stylesheets});Ws(a,{get stylesheets(){return p(c)}})}var u=nt(a,2);{var f=c=>{An(c,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",deviceDisplayType:"Desktop",get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},g=c=>{var d=si(),y=X(d);Sr(y,()=>"style",!1,(h,_)=>{var E=Cr();re(()=>In(E,p(s))),x(_,E)});var m=nt(y,2);Vt(m,16,()=>n,h=>h,(h,_)=>{var E=Ru(),A=ae(E);An(A,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get deviceDisplayType(){return _},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),re(w=>St(E,1,w),[()=>`${p(i)}-${_.toLowerCase()}`]),x(h,E)}),x(c,d)};Se(u,c=>{p(o)?c(g,-1):c(f)})}x(e,l),Me()}function Nu(e,t,n){if(e)return"Phone";if(t)return"Tablet";const r=(n==null?void 0:n.toLowerCase())||"desktop";return r==="phone"?"Phone":r==="tablet"?"Tablet":"Desktop"}const Mu=`(max-width: ${xr})`,Ou=`(max-width: ${Rr})`;var Wu=ve("<!> <!>",1);function Vs(e,t){Ne(t,!0);let n=le("Desktop"),r,i;function o(){M(n,Nu((r==null?void 0:r.matches)??!1,(i==null?void 0:i.matches)??!1,t.reduxDeviceDisplayType),!0)}_r(()=>(typeof matchMedia=="function"&&(r=matchMedia(Mu),i=matchMedia(Ou),r.addEventListener("change",o),i.addEventListener("change",o)),o(),()=>{r==null||r.removeEventListener("change",o),i==null||i.removeEventListener("change",o)}));var s=Wu(),l=X(s);{var a=f=>{{let g=D(()=>{var c;return(c=t.plugins.sourceComponents)==null?void 0:c.stylesheets});Ws(f,{get stylesheets(){return p(g)}})}};Se(l,f=>{t.isWithinCollection||f(a)})}var u=nt(l,2);An(u,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get deviceDisplayType(){return p(n)},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),x(e,s),Me()}function Fu(e){const t={};return Object.entries(e).forEach(([n,r])=>{const i={...r};if(i.itemList)try{i.collectionRows=typeof i.itemList=="string"?JSON.parse(i.itemList):i.itemList}catch(s){console.error(`Failed to parse itemList for collection ${n}:`,s),i.collectionRows={rows:[]}}let o=`${i.name}$${n}`;i.parentId&&(o=`${o}@${i.parentId}`),t[o]=i}),t}function Vu(e){return typeof e.itemList=="string"?JSON.parse(e.itemList):e.itemList}function Vr(e){return{displayItemList:Vu(e.widget),widgetCollections:Fu(e.childCollections),...e.libraries?{libraries:e.libraries}:{}}}function ju(e){const t=e.registry??nn(),n=kn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolveSync({registrations:e.libraries,referenced:n})}function Bu(e){const t=e.registry??nn(),n=kn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolve({registrations:e.libraries,referenced:n})}const Uu={display:"flex",justifyContent:"center",alignItems:"center",padding:"3rem",color:"#e2e8f0"},Ku={display:"flex",alignItems:"center",gap:"1rem"},Hu={width:"40px",height:"40px",border:"4px solid #4a5568",borderTopColor:"#63b3ed",borderRadius:"50%",animation:"spin 1s linear infinite"},li={padding:"1.5rem",backgroundColor:"#742a2a",border:"1px solid #9b2c2c",borderRadius:"8px",color:"#fed7d7"},ai={fontSize:"16px",fontWeight:"600",marginBottom:"0.5rem",color:"#feb2b2"},ui={fontSize:"14px",color:"#fed7d7"},Gu=`
11
11
  @keyframes spin {
12
12
  from {
13
13
  transform: rotate(0deg);
@@ -16,4 +16,4 @@ ${g(u)}
16
16
  transform: rotate(360deg);
17
17
  }
18
18
  }
19
- `,Au="data-rulecms-published-key";var Su=Pe("<div><div><div></div></div></div>"),Eu=Pe("<div><div>Error Loading Widget</div> <div> </div></div>"),Tu=Pe("<div><div>No Widget Data</div> <div>No widget data available</div></div>"),Iu=Pe('<span style="display: contents"><!></span>');function Du(e,t){Me(t,!0);let n=ae(t,"mode",3,"client-fetch");const r=zn.getContext(Sr);let o=oe(!1),i=oe(null),s=oe(null),l=oe(null);const u=D(()=>n()==="pre-fetched"),c=D(()=>({sourceComponents:g(l)??void 0}));let f=null,p=null,a=!1;function d(){if(!g(s)){W(l,null);return}const b=t.libraries??(r==null?void 0:r.libraries),I=r==null?void 0:r.libraryRegistry,T=yu({displayItemList:g(s).displayItemList,widgetCollections:g(s).widgetCollections,libraries:b,registry:I});if(T){W(l,T,!0);return}mu({displayItemList:g(s).displayItemList,widgetCollections:g(s).widgetCollections,libraries:b,registry:I}).then(N=>{W(l,N,!0)})}function y(){g(s)&&gs({componentProps:t.componentProps,displayItemList:g(s).displayItemList,widgetCollections:g(s).widgetCollections,publishedKey:t.publishedKey})}function m(){if(a||typeof document>"u")return;const b="rulecms-widget-spinner-styles";if(!document.getElementById(b)){const I=document.createElement("style");I.id=b,I.textContent=Cu,document.head.appendChild(I)}a=!0}function h(){const b=t.token??(r==null?void 0:r.token),I=t.endpoint??(r==null?void 0:r.endpoint);if(!t.publishedKey||!b){W(i,t.publishedKey?"Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.":tt(b)?"Widget key is required":"Published key is required",!0),W(s,null);return}const T=`${t.publishedKey}|${b}`;if(p===T&&g(s)){d();return}f==null||f.abort(),f=new AbortController;const N=f.signal;p=T,W(o,!0),W(i,null);const Y=wr({publishedKey:t.publishedKey,token:b,endpoint:I});fetch(Y,{method:"GET",headers:{"Content-Type":"application/json"},...tt(b)?{cache:"no-store"}:{},signal:N}).then(async O=>{if(O.ok){const X=await O.json();X.success?(W(s,kr(X.data),!0),W(i,null),d(),y()):(W(i,"Failed to fetch widget data"),W(s,null))}else{const X=await O.json().catch(()=>({error:"Unknown error"}));W(i,X.error||`Request failed with status ${O.status}`,!0),W(s,null)}}).catch(O=>{O instanceof DOMException&&O.name==="AbortError"||(console.error("Error fetching widget:",O),W(i,"Failed to fetch widget"),W(s,null))}).finally(()=>{W(o,!1)})}function _(){if(n()==="pre-fetched"){W(s,t.initialData??null,!0),W(o,!1),W(i,null),d(),y();return}m(),h()}dr(()=>(t.publishedKey,t.token,t.endpoint,n(),t.initialData,t.libraries,t.componentProps,zn.untrack(()=>_()),()=>{f==null||f.abort()}));var A=Iu(),P=_e(A);{var C=b=>{var I=Su(),T=_e(I),N=_e(T);le((Y,O,X)=>{ne(I,Y),ne(T,O),ne(N,X)},[()=>re(_u),()=>re(bu),()=>re(wu)]),M(b,I)},w=b=>{var I=Eu(),T=_e(I),N=Ct(T,2),Y=_e(N);le((O,X,it)=>{ne(I,O),ne(T,X),ne(N,it),En(Y,g(i))},[()=>re(Qr),()=>re($r),()=>re(eo)]),M(b,I)},S=b=>{var I=Tu(),T=_e(I),N=Ct(T,2);le((Y,O,X)=>{ne(I,Y),ne(T,O),ne(N,X)},[()=>re(Qr),()=>re($r),()=>re(eo)]),M(b,I)},E=b=>{var I=ie(),T=q(I);{var N=O=>{Cs(O,{get displayItemList(){return g(s).displayItemList},get widgetCollections(){return g(s).widgetCollections},get plugins(){return g(c)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},Y=O=>{As(O,{get displayItemList(){return g(s).displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return g(s).widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get plugins(){return g(c)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})};De(T,O=>{g(u)?O(N):O(Y,-1)})}M(b,I)};De(P,b=>{n()!=="pre-fetched"&&g(o)?b(C):n()!=="pre-fetched"&&g(i)?b(w,1):n()!=="pre-fetched"&&!g(s)?b(S,2):g(l)&&g(s)&&b(E,3)})}le(()=>ht(A,"data-rulecms-published-key",t.publishedKey)),M(e,A),Ne()}class Nt extends Error{constructor(n,r){super(n);ge(this,"status");this.name="FetchRuleCMSWidgetError",this.status=r}}async function Pu(e){const{publishedKey:t,token:n,endpoint:r,fetchOptions:o}=e;if(!t)throw new Nt(tt(n)?"Widget key is required":"Published key is required");if(!n)throw new Nt("Token is required");const i=wr({publishedKey:t,token:n,endpoint:r}),s=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json"},...tt(n)?{cache:"no-store"}:{},...o});if(!s.ok){const u=await s.json().catch(()=>({error:"Unknown error"}));throw new Nt(u.error||`Request failed with status ${s.status}`,s.status)}const l=await s.json();if(!l.success)throw new Nt("Failed to fetch widget data");return kr(l.data)}async function ku(e){const{data:t,libraries:n}=e,r=Dn({displayItemList:t.displayItemList,widgetCollections:t.widgetCollections});return en().resolve({registrations:n,referenced:r})}exports.AlignContentTypes=fa;exports.BreakpointVariantRender=Cs;exports.COLLECTION_TYPE_PREFIX=br;exports.COMPONENT_PROPS_PATH_SEPARATOR=Nn;exports.CSS_CLASSES_ATTRIBUTE_NAME=xn;exports.CSS_VARIABLE_NAME_MAX_LENGTH=vi;exports.CSS_VARIABLE_NAME_PATTERN=gi;exports.DEFAULT_CLOUDINARY_CLOUD_NAME=ui;exports.DEFAULT_LIBRARY_ID=Tt;exports.DEFAULT_ROW_GAP=os;exports.DEV_CLIENT_TOKEN_PREFIX=Xo;exports.DEV_WIDGET_API_PATH=$o;exports.DeviceDisplayTypes=da;exports.DisplayComponent=bs;exports.DisplayItemTypes=In;exports.DragItemIdPrefixTypes=_r;exports.EMBEDDED_KEY_SEPARATOR=si;exports.FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY=Oi;exports.FetchRuleCMSWidgetError=Nt;exports.HIDE_WIDGET_ATTRIBUTE_NAME=Dr;exports.JustifyContentTypes=$n;exports.PUBLISHED_KEY_SEPARATOR=ii;exports.PUBLISHED_WIDGET_API_PATH=Qo;exports.PageViewTypes=ca;exports.RULECMS_API_ORIGIN=Zo;exports.RULECMS_PUBLISHED_KEY_ATTRIBUTE=Au;exports.RULECMS_WIDGET_CONTEXT_KEY=Sr;exports.RenderComponents=As;exports.RenderComponentsForDevice=wn;exports.RenderComponentsInner=Pr;exports.RuleCMSWidget=Du;exports.RuleCMSWidgetProvider=wa;exports.WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE=as;exports.WIDGET_CACHE_API_ORIGIN=Jo;exports.alignContentAllowlist=Li;exports.alignItemsAllowlist=Pi;exports.backgroundPositionAllowlist=Mi;exports.backgroundRepeatAllowlist=Ni;exports.backgroundSizeAllowlist=xi;exports.borderStyleKeywords=Wi;exports.boxSpacingSideKeys=_i;exports.boxSpacingStyleAttributeEntries=Ba;exports.buildCloudinaryBackgroundUrl=hi;exports.buildWidgetFetchUrl=wr;exports.collectComponentInstancePaths=ps;exports.collectReferencedLibraryIds=Dn;exports.composeSourceComponentsPlugin=qo;exports.createComponentLibraryRegistry=en;exports.cssAttrArrayKey=an;exports.defaultPageWidth=ai;exports.deriveDisplayFlexIfNeeded=es;exports.desktopModeWidth=Ca;exports.fetchRuleCMSWidget=Pu;exports.findUnmatchedComponentPropsKeys=hs;exports.flexDirectionAllowlist=Ri;exports.flexWrapAllowlist=ki;exports.fontFamilyAllowlist=Ci;exports.fontStyleAllowlist=Si;exports.fontWeightAllowlist=Ai;exports.formatBackgroundImageStyles=Hi;exports.formatBorderStyles=Gi;exports.formatBoxShadowStyles=Yi;exports.formatBoxSpacingStyles=zi;exports.formatCssColorStyles=qi;exports.formatCssColorValue=Ln;exports.formatCssEnumStyles=Xi;exports.formatCssLengthStyles=Zi;exports.formatCssVariable=Ce;exports.formatCssVariableStyles=Na;exports.formatLineHeightStyles=Ji;exports.formatObjectStyleAttribute=$i;exports.formatOpacityStyles=Qi;exports.formatSpacingSideValue=rt;exports.generatePublishedKey=li;exports.generatePublishedKeyForEmbedded=ma;exports.getCollectionIdForCollectionType=Ar;exports.getColumnAttributes=Ft;exports.getComponentAttributesAndStyles=er;exports.getComponentsPluginFromPlugins=cn;exports.getCssVariableFromLeaf=K;exports.getDefaultDimensionAttributes=ts;exports.getDeviceTypeBasedAttributes=ot;exports.getDragItemId=pa;exports.getDragItemPrefixAndId=ti;exports.getIdAndPrefix=ni;exports.getMergedAttributes=ns;exports.getNameAndInstanceIdFromWidgetKey=ha;exports.getNameFromWidgetKey=ga;exports.getWidgetKeyForCollection=ri;exports.getWidgetKeyForCollectionWithPrefix=va;exports.getWidgetKeyForPublishedCollection=oi;exports.getWidgetKeyForPublishedCollectionWithPrefix=ya;exports.hasBoxShadowLeaf=Bi;exports.hasDeviceDivergentValues=vs;exports.hasInvalidCssVariable=ke;exports.hasItems=rs;exports.incrementVersion=_a;exports.isBackgroundImageValue=yi;exports.isBorderStyleValue=Fi;exports.isBorderValue=Vi;exports.isBoxShadowValue=ji;exports.isBoxSpacingValue=bi;exports.isCloudinaryCloudName=fi;exports.isCloudinaryPublicId=ci;exports.isCloudinaryTransformationString=pi;exports.isCssColorValue=kn;exports.isCssEnumValue=wi;exports.isCssVariableName=Ir;exports.isDevClientToken=tt;exports.isLineHeightValue=Ui;exports.isOpacityValue=Ki;exports.isRowHiddenForDevice=ss;exports.isSafeImageUrl=di;exports.isSpacingSideValue=nt;exports.isWidgetHiddenForDevice=us;exports.justifyContentAllowlist=Di;exports.normalizeCssClasses=Mn;exports.objectStyleAttributeRegistry=Rn;exports.overflowAllowlist=un;exports.phoneModeWidth=Er;exports.prepareRuleCMSWidgetData=kr;exports.resolveKey=mr;exports.resolveRowStyles=ls;exports.resolveWidgetApiOrigin=ei;exports.resolveWidgetContainerStyles=cs;exports.resolveWidgetInstanceProps=ds;exports.resolveWidgetLibraries=ku;exports.rowBasedPropertiesAreAssigned=is;exports.spacingKeywords=Pn;exports.spacingLengthUnits=mi;exports.tabletModeWidth=Tr;exports.textAlignAllowlist=Ei;exports.textDecorationAllowlist=Ti;exports.textTransformAllowlist=Ii;exports.toStyleAttr=re;exports.typeHasPrefix=Cr;exports.warnUnmatchedComponentProps=gs;exports.widgetBasedPropertiesAreAssigned=fs;
19
+ `,Yu="data-rulecms-published-key";var zu=ve("<div><div><div></div></div></div>"),qu=ve("<div><div>Error Loading Widget</div> <div> </div></div>"),Xu=ve("<div><div>No Widget Data</div> <div>No widget data available</div></div>"),Zu=ve('<span style="display: contents"><!></span>');function Ju(e,t){Ne(t,!0);let n=ce(t,"mode",3,"client-fetch");const r=Qn.getContext(Lr);let i=le(!1),o=le(null),s=le(null),l=le(null);const a=D(()=>n()==="pre-fetched"),u=D(()=>({sourceComponents:p(l)??void 0}));let f=null,g=null,c=!1;function d(){if(!p(s)){M(l,null);return}const b=t.libraries??(r==null?void 0:r.libraries),T=r==null?void 0:r.libraryRegistry,I=ju({displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,libraries:b,registry:T});if(I){M(l,I,!0);return}Bu({displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,libraries:b,registry:T}).then(O=>{M(l,O,!0)})}function y(){p(s)&&Ls({componentProps:t.componentProps,displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,publishedKey:t.publishedKey})}function m(){if(c||typeof document>"u")return;const b="rulecms-widget-spinner-styles";if(!document.getElementById(b)){const T=document.createElement("style");T.id=b,T.textContent=Gu,document.head.appendChild(T)}c=!0}function h(){const b=t.token??(r==null?void 0:r.token),T=t.endpoint??(r==null?void 0:r.endpoint);if(!t.publishedKey||!b){M(o,t.publishedKey?"Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.":it(b)?"Widget key is required":"Published key is required",!0),M(s,null);return}const I=`${t.publishedKey}|${b}`;if(g===I&&p(s)){d();return}f==null||f.abort(),f=new AbortController;const O=f.signal;g=I,M(i,!0),M(o,null);const Y=Dr({publishedKey:t.publishedKey,token:b,endpoint:T});fetch(Y,{method:"GET",headers:{"Content-Type":"application/json"},...it(b)?{cache:"no-store"}:{},signal:O}).then(async W=>{if(W.ok){const z=await W.json();z.success?(M(s,Vr(z.data),!0),M(o,null),d(),y()):(M(o,"Failed to fetch widget data"),M(s,null))}else{const z=await W.json().catch(()=>({error:"Unknown error"}));M(o,z.error||`Request failed with status ${W.status}`,!0),M(s,null)}}).catch(W=>{W instanceof DOMException&&W.name==="AbortError"||(console.error("Error fetching widget:",W),M(o,"Failed to fetch widget"),M(s,null))}).finally(()=>{M(i,!1)})}function _(){if(n()==="pre-fetched"){M(s,t.initialData??null,!0),M(i,!1),M(o,null),d(),y();return}m(),h()}_r(()=>(t.publishedKey,t.token,t.endpoint,n(),t.initialData,t.libraries,t.componentProps,Qn.untrack(()=>_()),()=>{f==null||f.abort()}));var E=Zu(),A=ae(E);{var w=b=>{var T=zu(),I=ae(T),O=ae(I);re((Y,W,z)=>{Z(T,Y),Z(I,W),Z(O,z)},[()=>J(Uu),()=>J(Ku),()=>J(Hu)]),x(b,T)},C=b=>{var T=qu(),I=ae(T),O=nt(I,2),Y=ae(O);re((W,z,ie)=>{Z(T,W),Z(I,z),Z(O,ie),In(Y,p(o))},[()=>J(li),()=>J(ai),()=>J(ui)]),x(b,T)},P=b=>{var T=Xu(),I=ae(T),O=nt(I,2);re((Y,W,z)=>{Z(T,Y),Z(I,W),Z(O,z)},[()=>J(li),()=>J(ai),()=>J(ui)]),x(b,T)},S=b=>{var T=ne(),I=X(T);{var O=W=>{Fs(W,{get displayItemList(){return p(s).displayItemList},get widgetCollections(){return p(s).widgetCollections},get plugins(){return p(u)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},Y=W=>{Vs(W,{get displayItemList(){return p(s).displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return p(s).widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get plugins(){return p(u)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})};Se(I,W=>{p(a)?W(O):W(Y,-1)})}x(b,T)};Se(A,b=>{n()!=="pre-fetched"&&p(i)?b(w):n()!=="pre-fetched"&&p(o)?b(C,1):n()!=="pre-fetched"&&!p(s)?b(P,2):p(l)&&p(s)&&b(S,3)})}re(()=>et(E,"data-rulecms-published-key",t.publishedKey)),x(e,E),Me()}class Ot extends Error{constructor(n,r){super(n);me(this,"status");this.name="FetchRuleCMSWidgetError",this.status=r}}async function Qu(e){const{publishedKey:t,token:n,endpoint:r,fetchOptions:i}=e;if(!t)throw new Ot(it(n)?"Widget key is required":"Published key is required");if(!n)throw new Ot("Token is required");const o=Dr({publishedKey:t,token:n,endpoint:r}),s=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json"},...it(n)?{cache:"no-store"}:{},...i});if(!s.ok){const a=await s.json().catch(()=>({error:"Unknown error"}));throw new Ot(a.error||`Request failed with status ${s.status}`,s.status)}const l=await s.json();if(!l.success)throw new Ot("Failed to fetch widget data");return Vr(l.data)}async function $u(e){const{data:t,libraries:n}=e,r=kn({displayItemList:t.displayItemList,widgetCollections:t.widgetCollections});return nn().resolve({registrations:n,referenced:r})}exports.AlignContentTypes=xa;exports.BreakpointVariantRender=Fs;exports.COLLECTION_TYPE_PREFIX=Ir;exports.COMPONENT_PROPS_PATH_SEPARATOR=Fn;exports.CSS_CLASSES_ATTRIBUTE_NAME=Mn;exports.CSS_VARIABLE_NAME_MAX_LENGTH=Eo;exports.CSS_VARIABLE_NAME_PATTERN=So;exports.DEFAULT_BASE_Z_INDEX=Fr;exports.DEFAULT_CLOUDINARY_CLOUD_NAME=mo;exports.DEFAULT_LIBRARY_ID=Tt;exports.DEFAULT_ROW_GAP=hs;exports.DEV_CLIENT_TOKEN_PREFIX=ro;exports.DEV_WIDGET_API_PATH=lo;exports.DeviceDisplayTypes=Ra;exports.DisplayComponent=Os;exports.DisplayItemTypes=Pn;exports.DragItemIdPrefixTypes=Tr;exports.EMBEDDED_KEY_SEPARATOR=go;exports.FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY=Yo;exports.FetchRuleCMSWidgetError=Ot;exports.HIDE_WIDGET_ATTRIBUTE_NAME=Mr;exports.JustifyContentTypes=ir;exports.POINTER_EVENTS_ATTRIBUTE_NAME=ms;exports.PUBLISHED_KEY_SEPARATOR=ho;exports.PUBLISHED_WIDGET_API_PATH=so;exports.PageViewTypes=La;exports.RULECMS_API_ORIGIN=io;exports.RULECMS_PUBLISHED_KEY_ATTRIBUTE=Yu;exports.RULECMS_WIDGET_CONTEXT_KEY=Lr;exports.RenderComponents=Vs;exports.RenderComponentsForDevice=An;exports.RenderComponentsInner=Cn;exports.RuleCMSWidget=Ju;exports.RuleCMSWidgetProvider=Ua;exports.WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE=_s;exports.WIDGET_CACHE_API_ORIGIN=oo;exports.Z_INDEX_WIDGET_ATTRIBUTE_NAME=ws;exports.alignContentAllowlist=Bo;exports.alignItemsAllowlist=Vo;exports.backgroundPositionAllowlist=Ho;exports.backgroundRepeatAllowlist=Go;exports.backgroundSizeAllowlist=Ko;exports.borderStyleKeywords=zo;exports.boxSpacingSideKeys=Do;exports.boxSpacingStyleAttributeEntries=au;exports.buildCloudinaryBackgroundUrl=Ao;exports.buildOverlayLayerBoxStyles=Is;exports.buildOverlayStackStyles=Ts;exports.buildWidgetFetchUrl=Dr;exports.collectComponentInstancePaths=Ps;exports.collectReferencedLibraryIds=kn;exports.composeSourceComponentsPlugin=no;exports.createComponentLibraryRegistry=nn;exports.cssAttrArrayKey=wn;exports.defaultPageWidth=yo;exports.deriveDisplayFlexIfNeeded=cs;exports.desktopModeWidth=Ka;exports.fetchRuleCMSWidget=Qu;exports.findUnmatchedComponentPropsKeys=ks;exports.flexDirectionAllowlist=Uo;exports.flexWrapAllowlist=jo;exports.fontFamilyAllowlist=Lo;exports.fontStyleAllowlist=Ro;exports.fontWeightAllowlist=xo;exports.formatBackgroundImageStyles=es;exports.formatBorderStyles=ts;exports.formatBoxShadowStyles=ns;exports.formatBoxSpacingStyles=rs;exports.formatCssColorStyles=is;exports.formatCssColorValue=Rn;exports.formatCssEnumStyles=os;exports.formatCssLengthStyles=ss;exports.formatCssVariable=Ee;exports.formatCssVariableStyles=nu;exports.formatLineHeightStyles=ls;exports.formatObjectStyleAttribute=us;exports.formatOpacityStyles=as;exports.formatSpacingSideValue=st;exports.generatePublishedKey=vo;exports.generatePublishedKeyForEmbedded=Va;exports.getCollectionIdForCollectionType=kr;exports.getColumnAttributes=jt;exports.getComponentAttributesAndStyles=or;exports.getComponentsPluginFromPlugins=fn;exports.getCssVariableFromLeaf=K;exports.getDefaultDimensionAttributes=fs;exports.getDeviceTypeBasedAttributes=Oe;exports.getDragItemId=Na;exports.getDragItemPrefixAndId=uo;exports.getIdAndPrefix=co;exports.getMergedAttributes=ds;exports.getNameAndInstanceIdFromWidgetKey=Ma;exports.getNameFromWidgetKey=Oa;exports.getOverlayLayerZIndex=As;exports.getWidgetKeyForCollection=fo;exports.getWidgetKeyForCollectionWithPrefix=Wa;exports.getWidgetKeyForPublishedCollection=po;exports.getWidgetKeyForPublishedCollectionWithPrefix=Fa;exports.hasBoxShadowLeaf=Jo;exports.hasDeviceDivergentValues=xs;exports.hasInvalidCssVariable=Le;exports.hasItems=ps;exports.hasOverlayLayers=Cs;exports.incrementVersion=ja;exports.isBackgroundImageValue=To;exports.isBorderStyleValue=qo;exports.isBorderValue=Xo;exports.isBoxShadowValue=Zo;exports.isBoxSpacingValue=Po;exports.isCloudinaryCloudName=bo;exports.isCloudinaryPublicId=_o;exports.isCloudinaryTransformationString=Co;exports.isCssColorValue=xn;exports.isCssEnumValue=ko;exports.isCssVariableName=Nr;exports.isDevClientToken=it;exports.isLineHeightValue=Qo;exports.isOpacityValue=$o;exports.isOverlayLayerEmptyForDevice=Es;exports.isRowHiddenForDevice=vs;exports.isSafeImageUrl=wo;exports.isSpacingSideValue=ot;exports.isWidgetHiddenForDevice=Wn;exports.justifyContentAllowlist=Fo;exports.normalizeCssClasses=On;exports.objectStyleAttributeRegistry=Nn;exports.overflowAllowlist=cn;exports.phoneModeWidth=xr;exports.pointerEventsAllowlist=Wo;exports.prepareRuleCMSWidgetData=Vr;exports.resolveBaseZIndex=sr;exports.resolveKey=Er;exports.resolveOverlayLayerPointerEvents=Ss;exports.resolveRowStyles=ys;exports.resolveWidgetApiOrigin=ao;exports.resolveWidgetContainerStyles=Or;exports.resolveWidgetInstanceProps=Ds;exports.resolveWidgetLibraries=$u;exports.rowBasedPropertiesAreAssigned=gs;exports.spacingKeywords=Ln;exports.spacingLengthUnits=Io;exports.tabletModeWidth=Rr;exports.textAlignAllowlist=No;exports.textDecorationAllowlist=Mo;exports.textTransformAllowlist=Oo;exports.toStyleAttr=J;exports.typeHasPrefix=Pr;exports.warnUnmatchedComponentProps=Ls;exports.widgetBasedPropertiesAreAssigned=bs;exports.widgetDeclaresOwnHeight=Wr;