@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 27.7 kB
JavaScript
var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}var r=(e,t)=>e===t,i=Symbol(`solid-proxy`),a=typeof Proxy==`function`,o=Symbol(`solid-track`),s={equals:r},c=null,l=me,u=1,d=2,f={owned:null,cleanups:null,context:null,owner:null},p={},m=null,h=null,g=null,_=null,v=null,y=0;function b(e,t){let n=g,r=m,i=e.length===0,a=t===void 0?r:t,o=i?f:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>E(()=>B(o)));m=o,g=null;try{return R(s,!0)}finally{g=n,m=r}}function x(e,t){t=t?Object.assign({},s,t):s;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ue.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),de(n,e))]}function ee(e,t,n){F(I(e,t,!0,u))}function S(e,t,n){F(I(e,t,!1,u))}function C(e,t,n){l=he;let r=I(e,t,!1,u),i=P&&M(P);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),v?v.push(r):F(r)}function w(e,t,n){n=n?Object.assign({},s,n):s;let r=I(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,F(r),ue.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function T(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=p,l=null,u=!1,d=!1,f=`initialValue`in o,_=typeof i==`function`&&w(i),v=new Set,[y,b]=(o.storage||x)(o.initialValue),[S,C]=x(void 0),[T,ne]=x(void 0,{equals:!1}),[D,re]=x(f?`ready`:`unresolved`);e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function O(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=p,h&&e&&u?(h.promises.delete(e),u=!1,R(()=>{h.running=!0,ie(t,n)},!1)):ie(t,n)),t}function ie(e,t){R(()=>{t===void 0&&b(()=>e),re(t===void 0?f?`ready`:`unresolved`:`errored`),C(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function k(){let e=P&&M(P),t=y(),n=S();if(n!==void 0&&!s)throw n;return g&&!g.user&&e&&ee(()=>{T(),s&&(e.resolved&&h&&u?h.promises.add(s):v.has(e)||(e.increment(),v.add(e)))}),t}function j(e=!0){if(e!==!1&&d)return;d=!1;let t=_?_():i;if(u=h&&h.running,t==null||t===!1){O(s,E(y));return}h&&s&&h.promises.delete(s);let n,r=c===p?E(()=>{try{return a(t,{value:y(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){O(s,void 0,V(n),t);return}else if(!te(r))return O(s,r,void 0,t),r;return s=r,`v`in r?(r.s===1?O(s,r.v,void 0,t):O(s,void 0,V(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),R(()=>{re(f?`refreshing`:`pending`),ne()},!1),r.then(e=>O(r,e,void 0,t),e=>O(r,void 0,V(e),t)))}Object.defineProperties(k,{state:{get:()=>D()},error:{get:()=>S()},loading:{get(){let e=D();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return k();let e=S();if(e&&!s)throw e;return y()}}});let ae=m;return _?ee(()=>(ae=m,j(!1))):j(!1),[k,{refetch:e=>A(ae,()=>j(e)),mutate:b}]}function ne(e){return R(e,!1)}function E(e){if(g===null)return e();let t=g;g=null;try{return e()}finally{g=t}}function D(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=E(()=>t(o,i,n));return i=o,s}}function re(e){C(()=>E(e))}function O(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function ie(){return g}function k(){return m}function A(e,t){let n=m,r=g;m=e,g=null;try{return R(t,!0)}catch(e){H(e)}finally{m=n,g=r}}function j(e){if(h&&h.running)return e(),h.done;let t=g,n=m;return Promise.resolve().then(()=>{g=t,m=n;let r;return P&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),R(e,!1),g=m=null,r?r.done:void 0})}var[ae,oe]=x(!1);function se(e){v.push.apply(v,e),e.length=0}function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:ye(n),defaultValue:e}}function M(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}function N(e){let t=w(e),n=w(()=>U(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var P;function le(){return P||=ce()}function ue(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===u)F(this);else{let e=_;_=null,R(()=>z(this),!1),_=e}if(g){let e=this.observers;if(!e||e[e.length-1]!==g){let t=e?e.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(t)):(g.sources=[this],g.sourceSlots=[t]),e?(e.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return e&&h.sources.has(this)?this.tValue:this.value}function de(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&R(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=h&&h.running;r&&h.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?_.push(n):v.push(n),n.observers&&ge(n)),r?n.tState=u:n.state=u)}if(_.length>1e6)throw _=[],Error()},!1)}return t}function F(e){if(!e.fn)return;B(e);let t=y;fe(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{R(()=>{h&&(h.running=!0),g=m=e,fe(e,e.tValue,t),g=m=null},!1)})}function fe(e,t,n){let r,i=m,a=g;g=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=u,e.tOwned&&e.tOwned.forEach(B),e.tOwned=void 0):(e.state=u,e.owned&&e.owned.forEach(B),e.owned=null)),e.updatedAt=n+1,H(t)}finally{g=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?de(e,r,!0):h&&h.running&&e.pure?(h.sources.has(e)||(e.value=r),h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function I(e,t,n,r=u,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};return h&&h.running&&(a.state=0,a.tState=r),m===null||m!==f&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),a}function L(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===d)return z(e);if(e.suspense&&E(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<y);){if(t&&h.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===u)F(e);else if((t?e.tState:e.state)===d){let t=_;_=null,R(()=>z(e,n[0]),!1),_=t}}}function R(e,t){if(_)return e();let n=!1;t||(_=[]),v?n=!0:v=[],y++;try{let t=e();return pe(n),t}catch(e){n||(v=null),_=null,H(e)}}function pe(e){if(_&&=(me(_),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;v.push.apply(v,h.effects),t=h.resolve;for(let e of v)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,R(()=>{for(let e of n)B(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)B(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}oe(!1)},!1)}else if(h.running){h.running=!1,h.effects.push.apply(h.effects,v),v=null,oe(!0);return}}let n=v;v=null,n.length&&R(()=>l(n),!1),t&&t()}function me(e){for(let t=0;t<e.length;t++)L(e[t])}function he(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:L(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)L(t[r])}function z(e,t){let n=h&&h.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===u?i!==t&&(!i.updatedAt||i.updatedAt<y)&&L(i):e===d&&z(i,t)}}}function ge(e){let t=h&&h.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=d:r.state=d,r.pure?_.push(r):v.push(r),r.observers&&ge(r))}}function B(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)B(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)_e(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)B(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function _e(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)_e(e.owned[t])}function V(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function ve(e,t,n){try{for(let n of t)n(e)}catch(e){H(e,n&&n.owner||null)}}function H(e,t=m){let n=c&&t&&t.context&&t.context[c],r=V(e);if(!n)throw r;v?v.push({fn(){ve(r,n,t)},state:u}):ve(r,n,t)}function U(e){if(typeof e==`function`&&!e.length)return U(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=U(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e]);else t.push(r)}return t}return e}function ye(e,t){return function(t){let n;return S(()=>n=E(()=>(m.context={...m.context,[e]:t.value},N(()=>t.children))),void 0),n}}var W=Symbol(`fallback`);function G(e){for(let t=0;t<e.length;t++)e[t]()}function be(e,t,n={}){let r=[],i=[],a=[],s=0,c=t.length>1?[]:null;return O(()=>G(a)),()=>{let l=e()||[],u=l.length,d,f;return l[o],E(()=>{let e,t,o,m,h,g,_,v,y;if(u===0)s!==0&&(G(a),a=[],r=[],i=[],s=0,c&&=[]),n.fallback&&(r=[W],i[0]=b(e=>(a[0]=e,n.fallback())),s=1);else if(s===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=b(p);s=u}else{for(o=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(s,u);g<_&&r[g]===l[g];g++);for(_=s-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)o[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(o[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in o?(i[f]=o[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=b(p);i=i.slice(0,s=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=x(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function xe(e,t,n={}){let r=[],i=[],a=[],s=[],c=0,l;return O(()=>G(a)),()=>{let u=e()||[],d=u.length;return u[o],E(()=>{if(d===0)return c!==0&&(G(a),a=[],r=[],i=[],c=0,s=[]),n.fallback&&(r=[W],i[0]=b(e=>(a[0]=e,n.fallback())),c=1),i;for(r[0]===W&&(a[0](),a=[],r=[],i=[],c=0),l=0;l<d;l++)l<r.length&&r[l]!==u[l]?s[l](()=>u[l]):l>=r.length&&(i[l]=b(f));for(;l<r.length;l++)a[l]();return c=s.length=a.length=d,r=u.slice(0),i=i.slice(0,c)});function f(e){a[l]=e;let[n,r]=x(u[l]);return s[l]=r,t(n,l)}}}function Se(e,t){return E(()=>e(t||{}))}function K(){return!0}var q={get(e,t,n){return t===i?n:e.get(t)},has(e,t){return t===i||e.has(t)},set:K,deleteProperty:K,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:K,deleteProperty:K}},ownKeys(e){return e.keys()}};function J(e){return(e=typeof e==`function`?e():e)?e:{}}function Ce(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function we(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&i in r,e[n]=typeof r==`function`?(t=!0,w(r)):r}if(a&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=J(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in J(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(J(e[n])));return[...new Set(t)]}},q);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ce.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let o={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(o,t,n):o[t]=n?n.value:void 0}return o}function Te(e,...t){let n=t.length;if(a&&i in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},q));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},q)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function Ee(t){let r,i,a=a=>{let o=e.context;if(o){let[a,s]=x();e.count||=0,e.count++,(i||=t()).then(t=>{!e.done&&n(o),e.count--,s(()=>t.default),n()}),r=a}else if(!r){let[e]=T(()=>(i||=t()).then(e=>e.default));r=e}let s;return w(()=>(s=r())?E(()=>{if(!o||e.done)return s(a);let t=e.context;n(o);let r=s(a);return n(t),r}):``)};return a.preload=()=>i||((i=t()).then(e=>r=()=>e.default),i),a}var De=0;function Oe(){return e.context?e.getNextContextId():`cl-${De++}`}var ke=e=>`Stale read from <${e}>.`;function Ae(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return w(be(()=>e.each,e.children,t||void 0))}function je(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return w(xe(()=>e.each,e.children,t||void 0))}function Me(e){let t=e.keyed,n=w(()=>e.when,void 0,void 0),r=t?n:w(n,void 0,{equals:(e,t)=>!e==!t});return w(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?E(()=>a(t?i:()=>{if(!E(r))throw ke(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Ne(e){let t=N(()=>e.children),n=w(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=w(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:w(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return w(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?E(()=>o(a.keyed?i():()=>{if(E(n)()?.[0]!==r)throw ke(`Match`);return i()})):o},void 0,void 0)}function Pe(e){return e}var Fe;function Ie(){Fe&&[...Fe].forEach(e=>e())}var Le=ce();function Re(t){let r=0,i,a,o,s,c,[l,u]=x(!1),d=le(),f={increment:()=>{++r===1&&u(!0)},decrement:()=>{--r===0&&u(!1)},inFallback:l,effects:[],resolved:!1},p=k();if(e.context&&e.load){let t=e.getContextId(),r=e.load(t);if(r&&(typeof r!=`object`||r.s!==1?o=r:e.gather(t)),o&&o!==`$$f`){let[r,i]=x(void 0,{equals:!1});s=r,o.then(()=>{if(e.done)return i();e.gather(t),n(a),i(),n()},e=>{c=e,i()})}}let m=M(Le);m&&(i=m.register(f.inFallback));let h;return O(()=>h&&h()),Se(d.Provider,{value:f,get children(){return w(()=>{if(c)throw c;if(a=e.context,s){s(),s=void 0;return}a&&o===`$$f`&&n();let r=w(()=>t.children);return w(e=>{let s=f.inFallback(),{showContent:c=!0,showFallback:l=!0}=i?i():{};if((!s||o&&o!==`$$f`)&&c)return f.resolved=!0,h&&h(),h=a=o=void 0,se(f.effects),r();if(l)return h?e:b(e=>(h=e,a&&=(n({id:a.id+`F`,count:0}),void 0),t.fallback),p)})})}})}var ze=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Be=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ve=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),He=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ue(e,t){let n=He[e];return typeof n==`object`?n[t]?n.$:void 0:n}var We=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Ge=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),Ke={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},qe=e=>w(()=>e());function Je(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var Ye=`_$DX_DELEGATE`;function Xe(e,t,n,r={}){let i;return b(r=>{i=r,t===document?e():X(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Ze(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>E(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Qe(e,t=window.document){let n=t[Ye]||(t[Ye]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,pt))}}function Y(e,t,n){Z(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function $e(e,t,n,r){Z(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function et(e,t,n){Z(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function tt(e,t){Z(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function nt(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function rt(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(dt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(dt(e,i,!0),n[i]=o)}return n}function it(e,t,n){if(!t)return n?Y(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function at(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function ot(e,t={},n,r){let i={};return r||S(()=>i.children=Q(e,t.children,i.children)),S(()=>typeof t.ref==`function`&&st(t.ref,e)),S(()=>ct(e,t,n,!0,i,!0)),i}function st(e,t,n){return E(()=>e(t,n))}function X(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Q(e,t,r,n);S(r=>Q(e,t(),r,n),r)}function ct(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=ft(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Q(e,t.children);continue}let s=t[o];i[o]=ft(e,o,s,i[o],n,a,t)}}function lt(t){let n,r;return!Z()||!(n=e.registry.get(r=gt()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function Z(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ut(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function dt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function ft(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return it(e,n,r);if(t===`classList`)return rt(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=We.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(nt(e,i,n,a),a&&Qe([i]))}else if(t.slice(0,5)===`attr:`)Y(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)et(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Be.has(t))||!i&&((u=Ue(t,e.tagName))||(c=ze.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(Z(e))return n;t===`class`||t===`className`?tt(e,n):s&&!c&&!l?e[ut(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Ke[t.split(`:`)[0]];r?$e(e,r,t,n):Y(e,Ve[t]||t,n)}return n}function pt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function Q(e,t,n,r,i){let a=Z(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=$(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=$(e,n,r)}else if(o===`function`)return S(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Q(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(mt(o,t,n,i))return S(()=>n=Q(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=$(e,n,r),s)return n}else c?n.length===0?ht(e,o,r):Je(e,n,o):(n&&$(e),ht(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=$(e,n,r,t);$(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function mt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=mt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=mt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function ht(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function $(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function gt(){return e.getNextContextId()}var _t=()=>void 0,vt=`http://www.w3.org/2000/svg`;function yt(e,t=!1,n=void 0){return t?document.createElementNS(vt,e):document.createElement(e,{is:n})}function bt(t){let{useShadow:n}=t,r=document.createTextNode(``),i=()=>t.mount||document.body,a=k(),o,s=!!e.context;return C(()=>{s&&(k().user=s=!1),o||=A(a,()=>w(()=>t.children));let e=i();if(e instanceof HTMLHeadElement){let[t,n]=x(!1);b(n=>X(e,()=>t()?n():o(),null)),O(()=>n(!0))}else{let i=yt(t.isSVG?`g`:`div`,t.isSVG),a=n&&i.attachShadow?i.attachShadow({mode:`open`}):i;Object.defineProperty(i,"_$host",{get(){return r.parentNode},configurable:!0}),X(a,o),e.appendChild(i),t.ref&&t.ref(i),O(()=>e.removeChild(i))}},void 0,{render:!s}),r}function xt(t,n){let r=w(t);return w(()=>{let t=r();switch(typeof t){case`function`:return E(()=>t(n));case`string`:let r=Ge.has(t),i=e.context?lt():yt(t,r,E(()=>n.is));return ot(i,n,r),i}})}function St(e){let[,t]=Te(e,[`component`]);return xt(()=>e.component,t)}export{C as A,we as B,Re as C,Se as D,N as E,x as F,A as G,O as H,Oe as I,j as J,e as K,ie as L,S as M,T as N,ee as O,b as P,k as R,Me as S,ne as T,re as U,D as V,Ie as W,M as X,E as Y,i as _,tt as a,je as b,qe as c,at as d,ot as f,_t as g,st as h,rt as i,w as j,ce as k,Xe as l,Ze as m,bt as n,Qe as o,it as p,Te as q,nt as r,X as s,St as t,Y as u,o as v,Ne as w,Pe as x,Ae as y,Ee as z};