@plitzi/plitzi-sdk 0.38.8 → 0.38.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/plitzi-sdk-devtools-DmTtYHDq.js +385 -0
- package/dist/plitzi-sdk-devtools-DmTtYHDq.js.gz +0 -0
- package/dist/plitzi-sdk.css +1 -1
- package/dist/plitzi-sdk.css.gz +0 -0
- package/dist/plitzi-sdk.js +119 -119
- package/dist/plitzi-sdk.js.gz +0 -0
- package/package.json +12 -12
- package/dist/plitzi-sdk-devtools-8TF3uHjh.js +0 -385
- package/dist/plitzi-sdk-devtools-8TF3uHjh.js.gz +0 -0
package/dist/plitzi-sdk.js
CHANGED
|
@@ -17,140 +17,140 @@ import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Pro
|
|
|
17
17
|
/* @__PURE__ */I("path",{fill:"currentColor",d:"M67.12,83.23c-0.251,4.695-10.719,13.862-14.292,16.887l-4.008-4.008 c2.94-3.723,11.57-14.256,16.276-14.751C66.352,81.226,67.185,82.018,67.12,83.23z"})]})]});function B(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=B(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function U(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=B(e))&&(r&&(r+=" "),r+=t);return r}var H=Symbol.for("plitzi.sharedContexts.v1"),W=(e,t)=>{let n=(e=>(e[H]??=/* @__PURE__ */new Map,e[H]))(globalThis),r=n.get(e);if(r)return r;let i=l(t);return i.displayName=e,n.set(e,i),i},V=W("ElementContext",void 0),G=W("ElementParentContext",void 0),K=e=>!1!==e&&"false"!==e,J=(e,t)=>{let n=new Set(t),r={};for(let i in e)!n.has(i)&&Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},Y={previewMode:!0,debugMode:!1,renderMode:"raw",environment:"main",isHydrating:!1,hydrated:!1,overQuota:!1,testAttributes:!0,ownsHead:!0},X=()=>{let[[e,t,n,r,i,o,a,s,l]]=_t(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota","render.testAttributes","render.ownsHead"]);return k(()=>({previewMode:e??Y.previewMode,debugMode:t??Y.debugMode,renderMode:n??Y.renderMode,environment:r??Y.environment,isHydrating:i??Y.isHydrating,hydrated:o??Y.hydrated,overQuota:a??Y.overQuota,testAttributes:s??Y.testAttributes,ownsHead:l??Y.ownsHead}),[e,t,n,r,i,o,a,s,l])},Q=()=>{},Z=class{items=[];notifying=0;dead=0;get length(){return this.items.length-this.dead}add(e){return this.items.push(e),()=>this.remove(e)}remove(e){let t=this.items.indexOf(e);if(-1===t)return;if(this.notifying>0)return this.items[t]=Q,void this.dead++;let n=this.items.pop();t<this.items.length&&(this.items[t]=n)}begin(){this.notifying++}end(){0===--this.notifying&&this.dead>0&&this.compact()}forEach(e,t){this.begin();try{let n,{items:r}=this,i=r.length,o=0,a=!1;for(;o<i;)try{for(;o<i;o++)e(r[o])}catch(e){a||(a=!0,n=e),o++}if(a){if(!t)throw n;t(n)}}finally{this.end()}}clear(){if(this.notifying>0){let{items:e}=this;for(let t=0,n=e.length;t<n;t++)e[t]=Q;return void(this.dead=e.length)}this.items.length=0,this.dead=0}compact(){let{items:e}=this,t=0;for(let n=0;n<e.length;n++)e[n]!==Q&&(e[t++]=e[n]);e.length=t,this.dead=0}},ee=(e,t)=>"function"==typeof e?!e(t):!1===e,te=e=>"object"==typeof e&&!!e&&!Array.isArray(e),ne=(e,t)=>{if(!te(e)||!te(t))return t;let n={...e};for(let r of Object.keys(t))"__proto__"!==r&&(n[r]=r in e?ne(e[r],t[r]):t[r]);return n},re=/* @__PURE__ */new Map,ie=e=>{let t=re.get(e);return void 0===t&&(t=e.split("."),re.size<4096&&re.set(e,t)),t},oe=/* @__PURE__ */new Map;function ae(e,t){let n=Array.isArray(t);if("string"!=typeof t&&!n||n&&!t.length||"string"==typeof t&&!t)return e;if("string"==typeof t&&-1===t.indexOf("."))return"object"==typeof e&&e&&t in e?e[t]:void 0;if("string"==typeof t)return(e=>{let t=oe.get(e);return t||(t=(e=>{if(1===e.length){let t=e[0];return e=>"object"==typeof e&&e&&t in e?e[t]:void 0}return t=>{let n=t;for(let r=0;r<e.length;r++){if("object"!=typeof n||!n)return;n=n[e[r]]}return n}})(ie(e)),oe.size<4096&&oe.set(e,t)),t})(t)(e);let r=e;for(let i of t){if("object"!=typeof r||!r||!(i in r))return;r=r[i]}return r}var se=(e,t)=>"string"!=typeof e||e===t||e.length>t.length&&e.startsWith(t)&&"."===e[t.length]||t.length>e.length&&t.startsWith(e)&&"."===t[e.length],le=(e,t,n=12)=>{if(!Object.is(e,t)){if(n<=0||!te(e)||!te(t))return{path:"",value:t};for(let r of/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)])){if(Object.is(e[r],t[r]))continue;let i=le(e[r],t[r],n-1);if(i)return{path:i.path?`${r}.${i.path}`:r,value:i.value}}}},ce=/* @__PURE__ */new WeakMap;function ue(e){return ce.get(e)}var de,pe=e=>{let t=e?.enabled;return n=>{if(ee(t,n.getState()))return;let{handle:r,record:i}=function(e,t={}){let n=t.limit??100,r=t.path,i=t.shouldRecord,o=[{state:e.getState(),timestamp:Date.now()}],a=0,s=!1,l=()=>({entries:o,index:a,canUndo:a>0,canRedo:a<o.length-1}),c=l(),u=/* @__PURE__ */new Set,d=()=>{c=l(),u.forEach(e=>e())},p=t=>{if(t<0||t>=o.length||t===a)return;let n=o[t].state;if(s=!0,r){let t=ae(n,r);e.setState(r,()=>t)}else e.setState(void 0,()=>n);s=!1,a=t,d()};return{handle:{getSnapshot:()=>c,subscribe:e=>(u.add(e),()=>u.delete(e)),undo:()=>p(a-1),redo:()=>p(a+1),travelTo:p,clear:()=>{o=[{state:e.getState(),timestamp:Date.now()}],a=0,d()}},record:({path:t})=>{if(s||i&&!i(t)||r&&void 0!==t&&!se(t,r))return;let l,c=a<o.length-1?o.slice(0,a+1):o,u=c[c.length-1].state,p=e.getState(),h=t??r,f=t??r;if(f)try{let e=le(ae(u,f),ae(p,f));e&&(h=e.path?`${f}.${e.path}`:f,l=e.value)}catch{}let m=[...c,{path:h,value:l,state:p,timestamp:Date.now()}];o=m.length>n?m.slice(m.length-n):m,a=o.length-1,d()}}}(n,e);return ce.set(n,r),{onChange:i}}},he=e=>{},fe=e=>{console.error("[store]",`${e.phase} error at`,e.path??"(root)",e.error)},me=(e={})=>{let{filter:t,sink:n=he,errorSink:r=fe,enabled:i}="function"==typeof e?{sink:e}:e;return e=>{if(!ee(i,e.getState()))return{onChange:e=>{(!t||t(e))&&n(e)},onError:r}}},ge=(e="local")=>{if("string"!=typeof e)return e;try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}},ye=Symbol("unchanged"),be=e=>/^\d+$/.test(e),ve=e=>Array.isArray(e)?e.slice():{...e},we=(e,t,n,r,i)=>{let o=t[n],a="object"==typeof e&&e?e:{};if(n===t.length-1){let e=a[o],t=i?r(e):r;if(e===t)return ye;let n=ve(a);return n[o]=t,n}let s=we(a[o],t,n+1,r,i);if(s===ye)return ye;let l=ve(a);return l[o]=s,l},ke=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,xe=e=>ke.test(e)?`.${e}`:`[${JSON.stringify(e)}]`,Se=e=>ke.test(e)?e:JSON.stringify(e),Te=e=>{let t=e.length,n="";for(let o=0;o<t-1;o++){let t=0===o?"o":"_"+(o-1);n+=`var _${o}=${t}==null?void 0:${t}${xe(e[o])};\n`}let r=t>1?"_"+(t-2):"o";n+=`var _p=${r}==null?void 0:${r}${xe(e[t-1])};\n`,n+="var _v=f?v(_p):v;\nif(_p===_v)return null;\n";let i="_v";for(let o=t-1;o>=0;o--)i=`{...${0===o?"o":`(_${o-1}||{})`},${Se(e[o])}:${i}}`;return n+=`return ${i};`,Function("o","v","f",n)},Ce=/* @__PURE__ */new Map,Ee=(e,t,n)=>{if("object"!=typeof e||!e)return ye;let r=e,i=t[n];if(!Object.hasOwn(r,i))return ye;if(n===t.length-1){let e=ve(r);return Array.isArray(e)?e.splice(Number(i),1):delete e[i],e}let o=Ee(r[i],t,n+1);if(o===ye)return ye;let a=ve(r);return a[i]=o,a},Ae=(e,t,n,r,i)=>{let o=((e,t)=>{if(!(()=>{if(typeof window>"u")return!1;if(void 0===de)try{Te(["x","y"])({x:{}},1,!1),de=!0}catch{de=!1}return de})())return;let n=Ce.get(e);if(n)return n;if(t.some(be))return;let r=Te(t);return Ce.size>=256&&Ce.delete(Ce.keys().next().value),Ce.set(e,r),r})(t,n);if(o){let t=o(e,r,i);return null===t?ye:t}return we(e,n,0,r,i)},Ie=Symbol("@plitzi/nexus/cancel"),Me=(()=>{try{return"production"}catch{}return"production"})(),Oe="production"===Me,Ne=!Oe,_e="test"===Me;var Pe=e=>"number"==typeof e||""===e||isNaN(Number(e))?e:Number(e),Le=e=>Array.isArray(e)?e.slice():{...e},De=(e,t,n,r)=>{let i=Pe(t[n]),o=Le(e);return o[i]=n===t.length-1?r:De(e[i]??{},t,n+1,r),o},ze=Symbol("no-error"),Re=(e,t,n)=>{let r=0,i=ze;for(;r<n;)try{for(;r<n;r++)e[r](t)}catch(e){i===ze&&(i=e),r++}return i},je="__proto__";var $e=(e,t)=>e===t||e.startsWith(`${t}.`),Fe=class{reportError;records=/* @__PURE__ */new Map;listeners=/* @__PURE__ */new Set;announced=/* @__PURE__ */new Set;timer;snapshot;constructor(e){this.reportError=e}get size(){return this.records.size}getRecords(){return this.snapshot??=Object.fromEntries(this.records),this.snapshot}subscribe(e){return this.listeners.add(e),this.schedule(),()=>{this.listeners.delete(e),this.schedule()}}record(e,t,n,r){this.drop(e,r,!1);let i=Math.max(0,t),o={updatedAt:n,expiresAt:n+i,ttl:i};this.records.set(e,o),this.announced.delete(e),this.changed(),r||this.emit({path:e,type:"recorded",freshness:o})}drop(e,t,n=!0){if(0!==this.records.size)for(let r of[...this.records.keys()])(r===e?n:r.startsWith(`${e}.`))&&this.forget(r,t)}dropChanged(e,t,n){for(let r of[...this.records.keys()])ae(e,r)!==ae(t,r)&&this.forget(r,n)}get(e){if(0===this.records.size)return;let t=e;for(;;){let e=this.records.get(t);if(e)return e;let n=t.lastIndexOf(".");if(-1===n)return;t=t.slice(0,n)}}expire(e,t){let n=[];if(this.records.forEach((r,i)=>{(void 0===e||$e(i,e)||$e(e,i))&&(r.expiresAt>t&&this.records.set(i,{...r,expiresAt:t}),this.announced.add(i),n.push(i))}),n.length>0){this.changed();for(let e of n)this.emit({path:e,type:"expired",freshness:this.records.get(e)})}return n}forget(e,t){let n=this.records.get(e);this.records.delete(e),this.announced.delete(e),this.changed(),t||this.emit({path:e,type:"dropped",freshness:n})}changed(){this.snapshot=void 0,this.schedule()}emit(e){for(let t of[...this.listeners])try{t(e)}catch(Fr){this.reportError(Fr,e.path)}}schedule(){if(clearTimeout(this.timer),this.timer=void 0,0===this.listeners.size)return;let e=1/0;this.records.forEach((t,n)=>{!this.announced.has(n)&&t.expiresAt<e&&(e=t.expiresAt)}),e!==1/0&&(this.timer=setTimeout(()=>this.elapse(),Math.min(2147483647,Math.max(0,e-Date.now()))))}elapse(){let e=Date.now(),t=[];this.records.forEach((n,r)=>{!this.announced.has(r)&&n.expiresAt<=e&&(this.announced.add(r),t.push(r))});for(let n of t)this.emit({path:n,type:"elapsed",freshness:this.records.get(n)});this.schedule()}},qe=class{subscribers=null;children=null},Be=class{direct=/* @__PURE__ */new Map;descendants=/* @__PURE__ */new Map;root=new qe;size=0;add(e,t){let n=ie(e),r=this.direct.get(e);if(!r){r=new Z,this.direct.set(e,r);let t=this.root;for(let e of n){t.children||(t.children=/* @__PURE__ */new Map);let n=t.children.get(e);n||(n=new qe,t.children.set(e,n)),t=n}t.subscribers=r,this.size++;let i="";for(let r=0;r<n.length-1;r++){i=i?`${i}.${n[r]}`:n[r];let t=this.descendants.get(i);t||(t=/* @__PURE__ */new Set,this.descendants.set(i,t)),t.add(e)}}return r.add(t),()=>this.remove(e,r,t,n)}remove(e,t,n,r){if(this.direct.get(e)!==t||(t.remove(n),t.length>0))return;this.direct.delete(e),this.size--;let i=this.root;for(let a of r){if(!i.children)return;let e=i.children.get(a);if(!e)return;i=e}i.subscribers===t&&(i.subscribers=null);let o="";for(let a=0;a<r.length-1;a++){o=o?`${o}.${r[a]}`:r[a];let t=this.descendants.get(o);t&&(t.delete(e),0===t.size&&this.descendants.delete(o))}}walkAncestors(e,t){let n=this.root;for(let r of e){if(!n.children)return;let e=n.children.get(r);if(!e)return;n=e,n.subscribers&&t(n.subscribers)}}getDescendants(e){return this.descendants.get(e)}forEachAffected(e,t,n){let r=e=>{e&&e.forEach(t,n)};if("string"!=typeof e)return void this.direct.forEach(r);let i=ie(e);this.walkAncestors(i,r),this.descendants.get(e)?.forEach(e=>r(this.direct.get(e)))}clear(){this.direct.clear(),this.descendants.clear(),this.root.children=null,this.root.subscribers=null,this.size=0}},Ue=e=>`@plitzi/nexus: scope collision — two sibling scopes under the same parent both delegate a write to "${e}", clobbering each other through the shared parent. Write to a path each scope owns, or move the shared value into the parent and update it there.`,He=0;function We(e,t){let n,r,i,o={},a=new Z,s=new Z,l=new Be,c=new Z,u=()=>{0!==c.length&&c.forEach(e=>e())},d=[],p=[],h=[],f=t?.parent,m=++He,g=(e,t,n)=>{if(0===p.length)throw e;let r={error:e,phase:t,path:n};for(let i=0,o=p.length;i<o;i++)p[i](r)},y=new Fe((e,t)=>g(e,"notify",t)),b=()=>o,v=()=>n??={...o},{getState:w,getPath:k,invalidate:x,resetCache:S,getMergeCount:T}=function(e,t,n,r){if(!n)return{getState:t,getPath:t=>ae(e(),t),invalidate:()=>{},resetCache:()=>{},getMergeCount:()=>0};let i,o=n,a=r&&r.length>0?new Set(r):void 0,s=!0,l=!1,c=0,u=/* @__PURE__ */new Map,d=/* @__PURE__ */new Map;return{getState:()=>((s||void 0===i)&&(i=(()=>{c++;let e=t(),n=ne(o.getState(),e);if(a)for(let t of a)void 0!==e[t]&&(n[t]=e[t]);return n})(),s=!1),i),getPath:t=>{if(l)u.clear(),l=!1;else if(u.has(t))return u.get(t);let n=(t=>{if(a){let n=t.indexOf("."),r=-1===n?t:t.slice(0,n);if(a.has(r)&&void 0!==e()[r])return ae(e(),t)}let n=ae(e(),t);if(void 0===n)return o.getPath(t);let r=o.getPath(t);if(void 0===r||!te(n)||!te(r))return n;let i=d.get(t);if(i&&i.own===n&&i.parent===r)return i.value;c++;let s=ne(r,n);return d.set(t,{own:n,parent:r,value:s}),s})(t);return u.set(t,n),n},invalidate:()=>{s=!0,l=!0},resetCache:()=>{u.clear(),d.clear(),i=void 0,s=!0,l=!1},getMergeCount:()=>c}}(b,v,f,t?.exclusive),C=()=>{x(),u()},E=!1;f&&(S(),i=f.subscribeInvalidate?.(C));let{setState:A,batch:I}=function(e){let{getOwnState:t,getOwnSnapshot:n,setOwnState:r,mutateOwnKey:i,deleteOwnKey:o,parent:a,listeners:s,pathListeners:l,changeListeners:c,interceptors:u,readOnly:d,freshness:p,reportError:h,invalidateDescendants:f,onDelegateToParent:m}=e,g=e=>{if(0===d.length||!(e=>{for(let t=0,n=d.length;t<n;t++){let n=d[t];if(e===n||e.startsWith(`${n}.`)||n.startsWith(`${e}.`))return!0}return!1})(e))return!1;if(Ne)throw Error(`@plitzi/nexus: refused to write to read-only path "${e}"`);return!0},y=(e,t,n)=>{let r=t;for(let i=0,o=u.length;i<o;i++){let o;try{o=u[i]({path:e,value:r,prev:n})}catch(t){return h(t,"beforeChange",e),Ie}if(o===Ie)return Ie;void 0!==o&&(r=o)}return r},b=(e,t,n)=>{void 0===t?p.size>0&&p.drop(e,n):p.record(e,t,Date.now(),n)},v=0,w=/* @__PURE__ */new Set,k=(e,t)=>{let{items:n}=e;if(v>0)for(let r=0,i=n.length;r<i;r++)w.add(n[r]);else if(0!==n.length){e.begin();try{let e=Re(n,t,n.length);e!==ze&&h(e,"notify",t)}finally{e.end()}}},x=(e,t,n)=>{let r={path:e,prev:t,next:n,prevValue:void 0===e?t:ae(t,e),nextValue:void 0===e?n:ae(n,e)},{items:i}=c;c.begin();try{let t=Re(i,r,i.length);t!==ze&&h(t,"onChange",e)}finally{c.end()}},S=(e,t,n,r)=>{let i=l.getDescendants(e);if(i)for(let o of i){let i=l.direct.get(o);if(!i)continue;let a=ie(o).slice(r);ae(t,a)!==ae(n,a)&&k(i,e)}},T=(e,t,n,i,o)=>{let a=e?ae(n,e):void 0,h=e?o?t(a):t:void 0;if(e&&u.length>0){let t=y(e,h,a);if(t===Ie)return;h=t}if(e&&a===h)return;let m=e?((e,t,n)=>{if("string"==typeof t){if(!t)return n;let r=ie(t);if(1===r.length){let t=Le(e);return t[Pe(r[0])]=n,t}return De(e,r,0,n)}return Array.isArray(t)&&t.length?De(e,t,0,n):n})(n,e,h):o?t(n):{...n,...t};if(!e&&u.length>0){let e=y(void 0,m,n);if(e===Ie)return;m=e}if(m!==n){if(d.length>0)for(let e=0,t=d.length;e<t;e++){let t=d[e];if(ae(n,t)!==ae(m,t)){if(Ne)throw Error(`@plitzi/nexus: refused to write to read-only path "${d[e]}"`);return}}p.size>0&&p.dropChanged(n,m,!i),r(m),c.length>0&&x(e,n,m),f(),i&&(k(s,e),l.size>0&&l.direct.forEach((t,r)=>{ae(n,r)!==ae(m,r)&&k(t,e)}))}};return{setState:(e,d,h={})=>{let{canPropagate:v=!0,unmount:w=!1,raw:C=!1,ttl:E}=h,A=t(),I=!C&&"function"==typeof d;if("string"==typeof e&&-1!==e.indexOf(je)&&-1!==ie(e).indexOf(je))throw Error(`@plitzi/nexus: refused to write to unsafe path "${e}" (\`__proto__\` segment)`);if("string"==typeof e&&g(e))return;if(a&&"string"==typeof e&&!(-1===e.indexOf(".")?Object.hasOwn(A,e):((e,t)=>{let n=e;for(let r=0,i=t.length;r<i;r++){if("object"!=typeof n||!n||!Object.hasOwn(n,t[r]))return!1;n=n[t[r]]}return!0})(A,ie(e))))return m?.(e),void a.setState(e,d,{canPropagate:v,unmount:w,raw:C,ttl:E});if("string"!=typeof e)return void T(e,d,A,v,I);if(-1===e.indexOf(".")){if(w){if(!Object.hasOwn(A,e))return;let t=A[e];if(u.length>0&&y(e,void 0,t)===Ie)return;p.drop(e,!v);let r=c.length>0?n():void 0;if(o(e),void 0!==r&&x(e,r,n()),v&&(k(s,e),l.size>0)){let n=l.direct.get(e);n&&k(n,e),S(e,t,void 0,1)}return void f()}let t=A[e],r=I?d(t):d,a=r;if(u.length>0){let n=y(e,r,t);if(n===Ie)return;a=n}if(b(e,E,!v),t===a)return;let h=c.length>0?n():void 0;if(i(e,a),void 0!==h&&x(e,h,n()),v&&(k(s,e),l.size>0)){let n=l.direct.get(e);n&&k(n,e),S(e,t,a,1)}return void f()}let M,O=ie(e);if(w){if(u.length>0&&y(e,void 0,ae(A,e))===Ie)return;p.drop(e,!v),M=((e,t)=>Ee(e,t,0))(A,O)}else if(u.length>0){let t=ae(A,e),n=I?d(t):d,r=y(e,n,t);if(r===Ie)return;M=Ae(A,e,O,r,!1)}else M=Ae(A,e,O,d,I);if(w||b(e,E,!v),M===ye)return;let N=M;r(N),c.length>0&&x(e,A,N),v&&(k(s,e),l.size>0&&(((e,t)=>{l.walkAncestors(t,t=>k(t,e))})(e,O),S(e,A,N,0))),f()},batch:e=>{v++;try{return e()}finally{if(v--,0===v&&w.size>0){let e=[...w];w.clear();let t=Re(e,void 0,e.length);t!==ze&&h(t,"notify",void 0)}}}}}({getOwnState:b,getOwnSnapshot:v,setOwnState:e=>{o=e,n=void 0,x()},mutateOwnKey:(e,t)=>{o[e]=t,x(),n=void 0},deleteOwnKey:e=>{delete o[e],x(),n=void 0},parent:f,listeners:a,pathListeners:l,changeListeners:s,interceptors:d,readOnly:t?.readOnly??[],freshness:y,reportError:g,invalidateDescendants:u,onDelegateToParent:Ne&&f?e=>f.scopeClaims?.claimDelegatedWrite(e,m):void 0}),M=()=>{r&&(r.unsubscribe(),r=void 0,S())},O=()=>{f&&(!E&&(a.length>0||l.size>0||s.length>0)?!r&&f&&(x(),S(),r=function(e,t,n,r,i,o,a){let s;return{unsubscribe:e.subscribe(e=>{a();let l=e;if(t.forEach(t=>t(e),e=>o(e,"notify",l)),n.size>0&&n.forEachAffected(e,t=>t(e),e=>o(e,"notify",l)),r.length>0){let e=i(),t=s??e,n={path:l,prev:t,next:e,prevValue:void 0===l?t:ae(t,l),nextValue:void 0===l?e:ae(e,l)};s=e,r.forEach(e=>e(n),e=>o(e,"onChange",l))}}),seedBaseline:()=>{s??=i()}}}(f,a,l,s,w,g,x),s.length>0&&r.seedBaseline()):M())},N=e=>(O(),()=>{e(),O()}),_=e=>N(a.add(e)),P=(e,t)=>N(l.add(e,t)),L=e=>{let t=N(s.add(e));return r?.seedBaseline(),t};o="function"==typeof e?e(A,w):e;let D=e=>y.get(e)??f?.getFreshness(e),z={id:t?.id,scopePath:t?.scopePath,getState:w,getOwnState:v,getPath:k,setState:A,get:e=>void 0===e?w():k(e),set:A,watch:(e,t)=>"function"==typeof e?_(e):P(e,t),withBase:e=>{let t=(t,n,r)=>A(void 0===t?e:`${e}.${t}`,n,r);return{getState:t=>{let n=k(e);return void 0===n&&void 0!==t?t:n},getPath:(t,n)=>{let r=k(`${e}.${t}`);return void 0===r&&void 0!==n?n:r},setState:t,subscribe:t=>P(e,t),subscribePath:(t,n)=>P(`${e}.${t}`,n),get:t=>k(void 0===t?e:`${e}.${t}`),set:t,watch:(t,n)=>"function"==typeof t?P(e,t):P(`${e}.${t}`,n)}},batch:I,subscribe:_,subscribePath:P,subscribeChange:L,getFreshness:D,isStale:e=>{let t=D(e);return!t||Date.now()>=t.expiresAt},expire:e=>{let t=y.expire(e,Date.now()),n=f?f.expire(e):[];return 0===n.length?t:[...t,...n]},watchFreshness:(e,t)=>{let n="function"==typeof e?void 0:e,r="function"==typeof e?e:t,i=void 0===n?r:e=>{let t=e.path;(t===n||t.startsWith(`${n}.`)||n.startsWith(`${t}.`))&&r(e)},o=y.subscribe(i),a=f?.watchFreshness(i);return()=>{o(),a?.()}},getFreshnessRecords:()=>y.getRecords(),destroy:()=>{E=!0,M(),a.clear(),l.clear(),s.clear(),c.clear(),i?.(),Ne&&f&&f.scopeClaims?.releaseScope(m)},reconnect:()=>{E=!1,f&&(i?.(),i=f.subscribeInvalidate?.(C)),O()},subscribeInvalidate:e=>c.add(e),hydrate:()=>{for(let e of h)e()}};if(t?.middlewares)for(let R of t.middlewares){let e=R(z);e?.beforeChange&&d.push(e.beforeChange),e?.onChange&&L(e.onChange),e?.onError&&p.push(e.onError);let n=e?.hydrate;n&&(t.deferHydrate?h.push(()=>n(z)):n(z))}return Ne&&(z.scopeClaims=(()=>{let e=/* @__PURE__ */new Map,t=/* @__PURE__ */new Map;return{claimDelegatedWrite(n,r){let i=e.get(n);if(void 0!==i){if(i===r)return;if(_e)throw Error(Ue(n));return void console.warn(Ue(n))}e.set(n,r);let o=t.get(r);o?o.add(n):t.set(r,/* @__PURE__ */new Set([n]))},releaseScope(n){let r=t.get(n);if(r){for(let t of r)e.delete(t);t.delete(n)}}}})()),_e&&(z.listeners=a,z.pathListeners=l,z.changeListeners=s,z.interceptors=d,z.errorHandlers=p,z.invalidateListeners=c,z.getMergeCount=T),z}var Ve=Symbol("@plitzi/nexus/ssr-snapshot");function Ge(e){return"object"==typeof e&&!!e&&Ve in e}var Ke,Je=/* @__PURE__ */new Map,Ye=/* @__PURE__ */new Set,Xe=0,Qe=()=>{Ke=void 0;for(let e of Ye)e()},Ze=(e,t,n)=>{let r=e;return Je.set(r,{uid:"dev-store-"+ ++Xe,store:r,scopeId:t,name:n}),Qe(),()=>{Je.delete(r),Qe()}},et=e=>(Ye.add(e),()=>{Ye.delete(e)}),tt=()=>(Ke??=[...Je.values()],Ke),nt=We({runs:[]},{id:"action-runs"}),rt=0,it=e=>nt.setState("runs",e),ot=/* @__PURE__ */new Map,at=e=>{ot.get(e)?.()},st=e=>({id:`render-${e.runId}`,actionId:e.actionId,mode:"render",runId:e.runId,status:e.status,steps:e.steps,progress:[],startedAt:e.startedAt,endedAt:e.endedAt,...void 0===e.error?{}:{error:e.error},...void 0===e.elementId?{}:{elementId:e.elementId}}),lt=e=>{let{runs:t}=nt.getState(),n=new Set(t.map(e=>e.runId)),r=e.filter(e=>!n.has(e.runId)).map(st);0!==r.length&&it([...r.reverse(),...t].slice(0,100))},ct=(e,t)=>{let{runs:n}=nt.getState();n.some(t=>t.id===e)&&it(n.map(n=>n.id===e?{...n,...t}:n))},ut=()=>{let e=new Set(nt.getState().runs.filter(e=>e.cancellable).map(e=>e.id));[...ot.keys()].forEach(t=>{e.has(t)||ot.delete(t)}),it([])},dt=()=>({...T(nt.subscribe,nt.getState,nt.getState),clear:ut}),pt=Symbol.for("@plitzi/nexus.contexts.v1"),ht=(e,t)=>{let n=(e=>(e[pt]??=/* @__PURE__ */new Map,e[pt]))(globalThis),r=n.get(e);if(r)return r;let i=l(t);return i.displayName=e,n.set(e,i),i},ft=ht("DevStoreScopeContext",void 0),mt=ht("StoreContext",void 0),gt=ht("StoreRegistryContext",void 0),yt=(e,t)=>{for(let n=e;n;n=n.parent)if(n.id===t)return n.store},bt=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0};function vt(e,t,n){let r=m(mt),i=m(gt);if(e)return e;if(void 0!==n){let e=yt(i,n);if(!e)throw Error(`${t}: no store registered with id "${n}" in any ancestor StoreProvider`);return e}if(!r)throw Error(`${t} must be used inside a StoreProvider`);return r}var wt=typeof window<"u"?w:g,kt=(e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!Object.is(e[i],t[i]))return!1;return!0};function xt(e,t,n={}){let r=n,i=vt(r.store,"useStoreSync",r.storeId);Array.isArray(e)?function(e,t,n,r){let{mode:i="sync",enabled:o=!0,syncStrategy:a="afterRender",raw:s=!1,ttl:l}=r,c=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),u=x(!1),d=!u.current;u.current=!0;let p=x(void 0),h=o&&(d||"sync"===i&&n.some((e,t)=>!Object.is(p.current?.[t],e))),f=(r=!0)=>{p.current=n,e.batch(()=>{t.forEach((t,i)=>{let o="function"==typeof t?t(e.getState()):t;e.setState(o,n[i],{canPropagate:r,raw:s,ttl:l})})})};"render"===a?h&&f():(h&&d&&f(!1),wt(()=>{h&&!d&&f()},[h,n,c]))}(i,e,t,n):function(e,t,n,r){let i=void 0===t,o="function"==typeof t,a=i?kt:Object.is,{mode:s="sync",enabled:l=!0,equalityFn:c=a,syncStrategy:u="afterRender",raw:d=!1,ttl:p}=r,h=x(void 0),f=x(!1),m=!f.current;f.current=!0;let g=h.current,y=l&&(m||"sync"===s&&(void 0===g||!c(g,n))),b=(r=!0)=>{if(h.current=n,i)e.setState(void 0,e=>({...e,...n}),{canPropagate:r});else if(o){let i=t(e.getState());e.setState(i,n,{canPropagate:r,raw:d,ttl:p})}else e.setState(t,n,{canPropagate:r,raw:d,ttl:p})};"render"===u?y&&b():(y&&m&&b(!1),wt(()=>{y&&!m&&b()},[y,n,t]))}(i,e,t,n)}var St=We,Tt=ht("StoreMiddlewareContext",void 0),Ct=e=>!0===e.cascade,Et=({store:e,id:t,segment:n,isolate:r,path:i,value:o,inherit:a,autoSync:s=!0,middlewares:l,name:c,children:u})=>{let d=m(mt),p=m(Tt),h=m(gt),f=m(ft),y=d?.scopePath??"",b=k(()=>void 0===n?y:y?`${y}/${n}`:n,[y,n]),v=x(void 0),w="live"===a,S=k(()=>{let e="snapshot"===a&&d?d.getState():{},t="function"==typeof o?o(e):{...e,...o};return Ge(t)?function(e){return Ge(e)?{...e}:e}(t):t},[a,d,o]),T=l??[],C=p?[...p,...T]:T,E=k(()=>{let e=T.filter(Ct);return 0===e.length?p:[...p??[],...e]},[p,l]);v.current||=e??St(()=>S,{id:t,scopePath:b,exclusive:w?r:void 0,parent:w?d:void 0,middlewares:C.length>0?C:void 0,deferHydrate:!0});let A=k(()=>t?{id:t,store:v.current,parent:h}:h,[t,h]),M=x(!1);g(()=>{Ne&&t&&!M.current&&yt(h,t)&&(M.current=!0,console.warn(`@plitzi/nexus: duplicate StoreProvider id "${t}" — it shadows an ancestor provider with the same id, so a descendant's { storeId: "${t}" } or useStoreById("${t}") resolves to this (nearer) store. Use a distinct id, or remove one of the providers.`))},[t,h]),g(()=>(w&&!e&&v.current?.reconnect?.(),()=>{w&&!e&&v.current?.destroy?.()}),[w,e]),g(()=>{if(Ne||void 0!==f)return Ze(v.current,f,c)},[f,c]);let O=x(!1);g(()=>{!O.current&&v.current?.hydrate&&(v.current.hydrate(),O.current=!0)},[]),xt(i,i?o:S,{enabled:!!o&&s,store:v.current});let N=/* @__PURE__ */I(mt,{value:v.current,children:u});return A!==h&&(N=/* @__PURE__ */I(gt,{value:A,children:N})),E!==p&&(N=/* @__PURE__ */I(Tt,{value:E,children:N})),N};var At=Symbol("unset"),It=e=>Array.isArray(e),Mt=(e,t,n,r)=>{void 0===t?e.setState(void 0,n,r):"function"==typeof t?e.setState(t(e.getState()),n,r):e.setState(t,n,r)};var Ot=()=>({useStore:function(e,t){return function(e,t={}){let n=vt(t.store,"useStore",t.storeId),r=It(e),i=t.mode??"sync",o=t.enabled??!0,a=t.equalityFn??(r?bt:void 0===e?kt:Object.is),s=x(t.transformer);s.current=t.transformer;let l=x(e);l.current=e;let c=x(At),u=x(r);u.current!==r&&(u.current=r,c.current=At);let d=(e=>It(e)?`[${e.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|")}]`:e)(e),p=k(()=>()=>{let e=l.current;if(!o&&c.current!==At)return c.current;let t=It(e)?((e,t)=>{let n=t.some(e=>"function"==typeof e)?e.getState():void 0;return t.map(t=>"function"==typeof t?ae(n,t(n)):e.getPath(t))})(n,e):((e,t)=>{if("string"==typeof t)return e.getPath(t);if("function"==typeof t){let n=e.getState();return ae(n,t(n))}return e.getState()})(n,e);return c.current!==At&&("mount"!==i||It(e))&&a(c.current,t)?c.current:(c.current=t,t)},[n,d,o,i,a]),h=k(()=>e=>{let t=l.current;if(!o||"mount"===i)return()=>{};if("string"==typeof t)return n.subscribePath(t,e);if(!It(t)||t.some(e=>"function"==typeof e))return n.subscribe(e);let r=t.map(t=>n.subscribePath(t,e));return()=>r.forEach(e=>e())},[n,d,o,i]),f=T(h,p,p);return[k(()=>s.current?s.current(f):f,[f]),...k(()=>{let e=l.current;return It(e)?e.map((e,t)=>(e,r)=>{let i=l.current;Mt(n,i[t],e,r)}):[(e,t)=>Mt(n,l.current,e,t)]},[n,d])]}(e,t)},useStoreSync:function(e,t,n){xt(e,t,n)},useStoreGetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r=Array.isArray(e)?e:void 0,i="object"!=typeof e||Array.isArray(e)?t:e,o=vt(i?.store,"useStoreGetter",i?.storeId),a=x(r);a.current=r;let s=r?.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|");return k(()=>{if(r)return r.map((e,t)=>(e,n)=>{let i=(a.current??r)[t],s="function"==typeof i?i(o.getState()):ae(o.getState(),i);if(void 0!==e){let t=ae(s,e);return void 0===t&&void 0!==n?n:t}return void 0===s&&void 0!==n?n:s});if(void 0!==n){let e=o.withBase(n);return(t,n)=>void 0===t?void 0===n?e.getState():e.getState(n):void 0===n?e.getPath(t):e.getPath(t,n)}return(e,t)=>{let n=o.getState();if(void 0!==e){let r=ae(n,e);return void 0===r&&void 0!==t?t:r}return n}},[o,n,s])}(e,t)},useStoreSetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r="object"==typeof e?e:t,i=vt(r?.store,"useStoreSetter",r?.storeId);return k(()=>void 0===n?i.setState:i.withBase(n).setState,[i,n])}(e,t)},useFreshness:function(e,t){return function(e,t={}){let{enabled:n=!0}=t,r=vt(t.store,"useFreshness",t.storeId),i=x(void 0),o=f(t=>n?r.watchFreshness(e,t):()=>{},[r,e,n]),a=f(()=>{let t=(e=>({isStale:!e||Date.now()>=e.expiresAt,updatedAt:e?.updatedAt,expiresAt:e?.expiresAt}))(r.getFreshness(e));return i.current&&((e,t)=>e.isStale===t.isStale&&e.updatedAt===t.updatedAt&&e.expiresAt===t.expiresAt)(i.current,t)?i.current:(i.current=t,t)},[r,e]);return T(o,a,a)}(e,t)},useOnStale:function(e,t,n){!function(e,t,n={}){let{enabled:r=!0}=n,i=vt(n.store,"useOnStale",n.storeId),o=x(t);g(()=>{o.current=t},[t]),g(()=>{if(r)return i.watchFreshness(e,e=>{("expired"===e.type||"elapsed"===e.type)&&o.current(e)})},[i,e,r])}(e,t,n)}});function Nt(e){return vt(void 0,"useStoreById",e)}var{useStore:_t,useStoreSync:Pt,useStoreGetter:Lt,useStoreSetter:Dt}=Ot(),{useStore:zt,useStoreSync:Rt,useStoreGetter:jt,useStoreSetter:$t}=Ot(),{useStore:Ft,useStoreSync:qt,useStoreGetter:Bt,useStoreSetter:Ut}=Ot(),Ht=Symbol("twigArrowParams"),Wt=(e,t)=>e===t?0:null==e?-1:null==t?1:"number"==typeof e&&"number"==typeof t?e-t:String(e).localeCompare(String(t)),Vt=e=>void 0===e||"function"==typeof e||"symbol"==typeof e?"null":"bigint"==typeof e?e.toString():JSON.stringify(e),Gt=e=>null==e?"":String(e),Kt=e=>"object"==typeof e&&!!e&&"__PLITZI_RAW__"===e.__marker,Jt=e=>Kt(e)?e.__raw:e,Yt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xt=/* @__PURE__ */new Map,Qt=e=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){let t=Number(e);return Number.isFinite(t)?t:void 0}},Zt=(e,t,n)=>{for(let r of[null==t?"en":Gt(t),"en"])try{return new Intl.NumberFormat(r,n).format(e)}catch{continue}return String(e)},en={raw:e=>(e=>({__raw:e,__marker:"__PLITZI_RAW__"}))(e),to_json:e=>Vt(e),json_encode:e=>Vt(e),object_as_json:e=>"object"==typeof e&&e?JSON.stringify(e):e,default:(e,t)=>(e=>null==e||""===e)(e)?t[0]:e,upper:e=>"string"==typeof e?e.toUpperCase():e,lower:e=>"string"==typeof e?e.toLowerCase():e,trim:e=>"string"==typeof e?e.trim():e,capitalize:e=>"string"==typeof e&&e.length>0?e[0].toUpperCase()+e.slice(1).toLowerCase():e,title:e=>"string"==typeof e?e.replace(/\b\w/g,e=>e.toUpperCase()):e,camelize:e=>"string"==typeof e?e.replace(/[-_]+(.)?/g,(e,t)=>t?t.toUpperCase():""):e,kebab:e=>"string"==typeof e?e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():e,snake:e=>"string"==typeof e?e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():e,ltrim:e=>"string"==typeof e?e.trimStart():e,rtrim:e=>"string"==typeof e?e.trimEnd():e,pad:(e,t)=>{if("string"!=typeof e)return e;let n=Number(t[0])||0,r=t.length>1?Gt(t[1]):" ";if(""===r)return e;let i=n-e.length;if(i<=0)return e;let o=Math.ceil(i/r.length);return r.repeat(o).slice(0,i)+e},padRight:(e,t)=>{if("string"!=typeof e)return e;let n=Number(t[0])||0,r=t.length>1?Gt(t[1]):" ";if(""===r)return e;let i=n-e.length;if(i<=0)return e;let o=Math.ceil(i/r.length);return e+r.repeat(o).slice(0,i)},number:(e,t)=>{if("number"==typeof e){let n=Number(t[0])||0;return e.toFixed(n)}if("string"!=typeof e)return e;let n=e.match(/-?\d+(?:\.\d+)?/);return n?Number(n[0]):0},replace:(e,t)=>"string"!=typeof e||0===t.length?e:e.split(Gt(t[0])).join(Gt(t[1])),slice:(e,t)=>{if(0===t.length)return e;let n=Number(t[0])||0,r=t.length>1&&Number.isFinite(Number(t[1]))?n+Number(t[1]):void 0;return"string"==typeof e||Array.isArray(e)?e.slice(n,r):e},split:(e,t)=>"string"==typeof e&&t.length>0?e.split(Gt(t[0])):e,join:(e,t)=>Array.isArray(e)?e.join(0===t.length?"":Gt(t[0])):e,reverse:e=>"string"==typeof e?e.split("").reverse().join(""):Array.isArray(e)?[...e].reverse():e,length:e=>"string"==typeof e||Array.isArray(e)?e.length:"number"==typeof e?Gt(e).length:"object"==typeof e&&e?Object.keys(e).length:0,first:e=>"string"==typeof e?e.length>0?e[0]:"":Array.isArray(e)?e.length>0?e[0]:void 0:e,last:e=>"string"==typeof e?e.length>0?e[e.length-1]:"":Array.isArray(e)?e.length>0?e[e.length-1]:void 0:e,contains:(e,t)=>{if(0===t.length)return!1;let n=t[0];return"string"==typeof e?e.includes(Gt(n)):!!Array.isArray(e)&&e.includes(n)},startswith:(e,t)=>"string"==typeof e&&t.length>0&&e.startsWith(Gt(t[0])),endswith:(e,t)=>"string"==typeof e&&t.length>0&&e.endsWith(Gt(t[0])),number_format:(e,t)=>{if("number"!=typeof e)return e;let n=Number(t[0])||0,r=null==t[1]?".":Gt(t[1]),i=null==t[2]?"":Gt(t[2]),o=e.toFixed(n);if(""===i)return o.replace(".",r);let a=o.split(".");return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,i),a.join(r)},currency:(e,t)=>{let n=Qt(e);if(void 0===n||0===t.length)return e;let r=t[2],i="object"==typeof r&&!!r&&"trimZeros"in r&&!0===r.trimZeros&&Number.isInteger(n);return Zt(n,t[1],{style:"currency",currency:Gt(t[0]),...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})},percent:(e,t)=>{let n=Qt(e);if(void 0===n)return e;let r=Number(t[0])||0;return Zt(n,t[1],{style:"percent",minimumFractionDigits:0,maximumFractionDigits:r})},sort:(e,t)=>{if(!Array.isArray(e))return e;let n=[...e],r=t[0];if("function"==typeof r){let e=r;return(e[Ht]??1)>=2?n.sort((t,n)=>Number(e(t,n))):n.sort((t,n)=>Wt(e(t),e(n)))}return n.sort(Wt)},batch:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Number(t[0]);if(n<=0)return e;let r=[];for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},map:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=t[0];return"function"==typeof n?e.map((e,t)=>n(e,t)):e},reduce:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=t[0];if("function"!=typeof n)return e;let r=t[1],i=+(void 0===r),o=void 0===r?e[0]:r;for(let a=i;a<e.length;a++)o=n(o,e[a],a);return o},merge:(e,t)=>{if(0===t.length)return e;let n=t[0];return Array.isArray(e)&&Array.isArray(n)?[...e,...n]:"object"==typeof e&&e&&"object"==typeof n&&n&&!Array.isArray(n)?{...e,...n}:e},keys:e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.keys(e):e,values:e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.values(e):e,filter:(e,t)=>{if(!Array.isArray(e))return e;if(0===t.length)return e.filter(Boolean);let n=t[0];if("function"==typeof n)return e.filter((e,t)=>n(e,t));let r=Gt(n);return e.filter(e=>{if("object"==typeof e&&e){let t=e[r];return null!=t&&!1!==t&&""!==t}return!!e})},column:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]);return e.map(e=>"object"==typeof e&&e?e[n]:void 0)},url_encode:e=>"string"==typeof e?encodeURIComponent(e):"object"==typeof e&&e&&!Array.isArray(e)?new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Gt(t)]))).toString():e,nl2br:e=>"string"==typeof e?e.replace(/\n/g,"<br>"):e,striptags:(e,t)=>{if("string"!=typeof e)return e;let n=t.length>0?Gt(t[0]).trim():"";if(n){let t=n.split(/(?:\s*>\s*<\s*|<\s*|>\s*)/).filter(Boolean).map(e=>e.replace(/[/>]/g,"").trim());if(t.length>0){let n=RegExp(`<(?!/?(?:${t.join("|")})\\b)[^>]+>`,"gi");return e.replace(n,"").replace(/\s+/g," ").trim()}}return e.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim()},abs:e=>"number"==typeof e?Math.abs(e):e,round:(e,t)=>{if("number"!=typeof e)return e;let n=Number(t[0])||0,r=null==t[1]?"common":Gt(t[1]),i=10**n;return"ceil"===r?Math.ceil(e*i)/i:"floor"===r?Math.floor(e*i)/i:Math.round(e*i)/i},format:(e,t)=>{if("string"!=typeof e)return e;let n=0;return e.replace(/%((?:[-+ 0]|'.)*)(\d*)(?:\.(\d+))?([sdf%])/g,(e,r,i,o,a)=>{if("%"===a)return"%";let s=t[n];if(n++,void 0===s)return e;let l,c=r.includes("+");if("d"===a){let e=Math.trunc(Number(s));l=`${c&&e>=0?"+":""}${e}`}else if("f"===a){let e=Number(s);l=`${c&&e>=0?"+":""}${void 0===o?String(e):e.toFixed(Number(o))}`}else l=Gt(s),l=void 0===o?l:l.slice(0,Number(o));let u=Number(i||0);if(l.length>=u)return l;let d=/'(.)/.exec(r),p=d?d[1]:r.includes("0")?"0":" ";return r.includes("-")?l.padEnd(u,"0"===p?" ":p):"0"===p&&"s"!==a&&/^[+-]/.test(l)?l[0]+l.slice(1).padStart(u-1,"0"):l.padStart(u,p)})},spaceless:e=>"string"==typeof e?e.replace(/>\s+</g,"><").trim():e,random:e=>Array.isArray(e)?e.length>0?e[Math.floor(Math.random()*e.length)]:void 0:"string"==typeof e?e.length>0?e[Math.floor(Math.random()*e.length)]:"":"number"==typeof e?Math.floor(Math.random()*e):e,date:(e,t)=>{if(0===t.length)return e;let n=Gt(t[0]),r=(e=>{if(e instanceof Date)return e;if("number"==typeof e)return new Date(e);let t=String(e).trim();return/^-?\d+$/.test(t)?new Date(Number(t)):new Date(t)})(e);if(Number.isNaN(r.getTime()))return"";let i=((e,t)=>{if(!t)return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),weekday:e.getDay()};let n=(e=>{if(!Xt.has(e))try{Xt.set(e,new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short"}))}catch{Xt.set(e,null)}return Xt.get(e)??null})(t);if(!n)return;let r=n.formatToParts(e),i=e=>r.find(t=>t.type===e)?.value??"";return{year:Number(i("year")),month:Number(i("month")),day:Number(i("day")),hours:Number(i("hour")),minutes:Number(i("minute")),seconds:Number(i("second")),weekday:Yt.indexOf(i("weekday"))}})(r,t.length>1?Gt(t[1]):"");if(!i)return"";let o=e=>String(e).padStart(2,"0"),a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s={Y:String(i.year),y:o(i.year%100),m:o(i.month),n:String(i.month),d:o(i.day),j:String(i.day),H:o(i.hours),G:String(i.hours),h:o(i.hours%12||12),g:String(i.hours%12||12),A:i.hours<12?"AM":"PM",a:i.hours<12?"am":"pm",i:o(i.minutes),s:o(i.seconds),w:String(i.weekday),N:String(0===i.weekday?7:i.weekday),U:String(Math.floor(r.getTime()/1e3)),l:a[i.weekday],D:a[i.weekday].slice(0,3),F:["January","February","March","April","May","June","July","August","September","October","November","December"][i.month-1],M:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i.month-1]},l="",c=!1;for(let u of n)c?(l+=u,c=!1):"\\"===u?c=!0:l+=Object.prototype.hasOwnProperty.call(s,u)?s[u]:u;return l},base64_encode:e=>"string"==typeof e?(e=>{let t=(new TextEncoder).encode(e),n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)})(e):e,base64_decode:e=>"string"==typeof e?(e=>{let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return(new TextDecoder).decode(n)})(e):e,md5:e=>"string"==typeof e?(e=>{let t=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],n=/* @__PURE__ */new Uint32Array(64);for(let f=0;f<64;f++)n[f]=Math.floor(4294967296*Math.abs(Math.sin(f+1)));let r=(new TextEncoder).encode(e),i=8*r.length,o=1+(r.length+8>>6)<<6,a=new Uint8Array(o);a.set(r),a[r.length]=128;let s=new DataView(a.buffer);s.setUint32(o-8,i>>>0,!0),s.setUint32(o-4,Math.floor(i/4294967296)>>>0,!0);let l=1732584193,c=4023233417,u=2562383102,d=271733878,p=(e,t)=>e<<t|e>>>32-t;for(let f=0;f<o;f+=64){let e=/* @__PURE__ */new Uint32Array(16);for(let t=0;t<16;t++)e[t]=s.getUint32(f+4*t,!0);let r=l,i=c,o=u,a=d;for(let s=0;s<64;s++){let l,c;s<16?(l=i&o|~i&a,c=s):s<32?(l=a&i|~a&o,c=(5*s+1)%16):s<48?(l=i^o^a,c=(3*s+5)%16):(l=o^(i|~a),c=7*s%16),l=l+r+n[s]+e[c]|0,r=a,a=o,o=i,i=i+p(l,t[s])|0}l=l+r|0,c=c+i|0,u=u+o|0,d=d+a|0}let h=e=>{let t="";for(let n=0;n<4;n++)t+=(e>>>8*n&255).toString(16).padStart(2,"0");return t};return h(l)+h(c)+h(u)+h(d)})(e):e,without:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let n=t.map(Gt),r={};for(let[i,o]of Object.entries(e))n.includes(i)||(r[i]=o);return r},only:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let n=t.map(Gt),r={};for(let[i,o]of Object.entries(e))n.includes(i)&&(r[i]=o);return r},find:(e,t)=>{if(!Array.isArray(e)||0===t.length)return;let n=t[0];if("function"==typeof n)return e.find((e,t)=>n(e,t));if(t.length<2)return;let r=Gt(n),i=t[1];return e.find(e=>"object"==typeof e&&e?e[r]===i:e===i)},pluck:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]);return e.map(e=>"object"==typeof e&&e?e[n]:void 0)},unique:e=>Array.isArray(e)?[...new Set(e)]:e,flatten:e=>Array.isArray(e)?e.flat():e,sum:e=>Array.isArray(e)?e.reduce((e,t)=>e+("number"==typeof t?t:0),0):e,chunk:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Number(t[0]);if(n<=0)return e;let r=[];for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},index_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]),r={};for(let i of e)"object"==typeof i&&i&&(r[String(i[n]??"")]=i);return r},group_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]),r={};for(let i of e)if("object"==typeof i&&i){let e=String(i[n]??"");r[e]=r[e]??[],r[e].push(i)}return r}},tn=(e,t)=>e[t],nn=(e,t)=>{let n=t.indexOf(".");if(-1===n)return e[t];let r=e[t.slice(0,n)],i=n+1,o=t.length;for(;i<o;){if(null==r)return;let e=t.indexOf(".",i);if(-1===e)return r[t.slice(i)];r=r[t.slice(i,e)],i=e+1}return r},rn=e=>null==e?"":"object"==typeof e?JSON.stringify(e):String(e),on=e=>{try{let t=JSON.parse(e);return"number"==typeof t&&String(t)!==e.trim()?e:t||e}catch{return e}},an=e=>{let t={},n=e.variables;for(let r in n)t[r]=n[r];for(let r in e)t[r]=e[r];return t},sn=e=>!(null==e||!1===e||""===e||0===e||Array.isArray(e)&&0===e.length),ln=(e,t)=>"string"==typeof t?t.includes(String(e)):Array.isArray(t)?t.includes(e):!("object"!=typeof t||!t)&&String(e)in t,cn={defined:e=>void 0!==e,null:e=>null==e,none:e=>null==e,empty:e=>null==e||""===e||!1===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length,iterable:e=>Array.isArray(e)||"object"==typeof e&&!!e,even:e=>"number"==typeof e&&e%2==0,odd:e=>"number"==typeof e&&1===Math.abs(e%2)},un=e=>"path"===e.type||"filter"===e.type&&un(e.subject),dn=e=>"path"===e.type?e.segments[0]:"filter"===e.type?dn(e.subject):void 0,pn=[],hn=(e,t,n=!1,r=!1)=>{let i=new mn(t,n,r);return{output:i.evalNodes(e),variables:i.variables,hasSet:i.hasSet}},fn=(e,t)=>new mn(t).evalExpression(e),mn=class e{variables;keepEmptyTokens;jsonStrings;inString=!1;escaping=!1;breakFlag=!1;continueFlag=!1;hasSet=!1;constructor(e,t=!1,n=!1){this.variables={...e},this.keepEmptyTokens=t,this.jsonStrings=n}keeps(e){if("boolean"==typeof this.keepEmptyTokens)return this.keepEmptyTokens;let t=dn(e);return void 0===t||!this.keepEmptyTokens.settled.has(t)}evalNodes(e){let t=e.length;if(0===t)return"";if(1===t)return this.evalNode(e[0]);let n="";for(let r=0;r<t&&(n+=this.evalNode(e[r]),!this.breakFlag&&!this.continueFlag);r++);return n}evalNode(e){switch(e.type){case"text":return this.jsonStrings&&this.followQuotes(e.value),e.value;case"variable":return this.jsonStrings&&this.inString?JSON.stringify(this.evalVariable(e)).slice(1,-1):this.evalVariable(e);case"if":return this.evalIf(e);case"for":return this.evalFor(e);case"set":return this.evalSet(e);case"apply":return this.evalApply(e);case"break":return this.breakFlag=!0,"";case"continue":return this.continueFlag=!0,""}}evalVariable(e){let t=this.evalExpression(e.expression);return this.keeps(e.expression)&&((e,t)=>null==t||""===t&&un(e))(e.expression,t)?e.source:Kt(t)?String(Jt(t)):"function"==typeof t?"":null!=t&&"object"!=typeof t?String(t):e.raw?null==t?"":String(t):"object"==typeof t&&t?JSON.stringify(t):""}followQuotes(e){for(let t=0;t<e.length;t++){let n=e[t];this.escaping?this.escaping=!1:this.inString&&"\\"===n?this.escaping=!0:'"'===n&&(this.inString=!this.inString)}}evalIf(e){if(sn(this.evalExpression(e.condition)))return this.evalNodes(e.body);for(let t of e.elseifClauses)if(sn(this.evalExpression(t.condition)))return this.evalNodes(t.body);return e.elseBody?this.evalNodes(e.elseBody):""}evalFor(e){let t=this.evalExpression(e.collection);if(void 0!==e.source&&void 0===t&&this.keeps(e.collection))return e.source;let n,r=null;if(null!==e.keyVar){let i=(e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.entries(e):null)(t);if(!i||0===i.length)return e.elseBody?this.evalNodes(e.elseBody):"";let o=i.length;r=Array(o),n=Array(o);for(let e=0;e<o;e++)r[e]=i[e][0],n[e]=i[e][1]}else{let r=(e=>Array.isArray(e)?e:"object"==typeof e&&e?Object.values(e):null)(t);if(!r||0===r.length)return e.elseBody?this.evalNodes(e.elseBody):"";n=r}return this.runLoop(e,n,r)}runLoop(e,t,n){let{valueVar:r,keyVar:i,body:o}=e,a=t.length,s=this.variables.loop,l={index:0,index0:0,first:!1,last:!1,length:a,revindex:0};this.variables.loop=l;let c="";for(let u=0;u<a;u++){if(l.index=u+1,l.index0=u,l.first=0===u,l.last=u===a-1,l.revindex=a-u,null!==n&&null!==i&&(this.variables[i]=n[u]),this.variables[r]=t[u],c+=this.evalNodes(o),this.breakFlag){this.breakFlag=!1;break}this.continueFlag&&=!1}return void 0===s?delete this.variables.loop:this.variables.loop=s,c}evalSet(e){return this.hasSet=!0,this.variables[e.name]=Array.isArray(e.value)?this.evalNodes(e.value):this.evalExpression(e.value),""}evalApply(e){let t=this.applyFilters(this.evalNodes(e.body),e.filters);return Kt(t)?String(Jt(t)):"object"==typeof t&&t?JSON.stringify(t):null==t?"":String(t)}applyFilters(e,t){let n=e;for(let r of t){let e=en[r.name];void 0!==e&&(n=e(n,0===r.args.length?pn:this.evalArgs(r.args)))}return n}evalArgs(e){let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=this.evalExpression(e[r]);return n}evalExpression(e){switch(e.type){case"literal":return e.value;case"array":{let t=e.elements,n=Array(t.length);for(let e=0;e<t.length;e++)n[e]=this.evalExpression(t[e]);return n}case"object":{let t={};for(let n of e.entries){let e=this.evalExpression(n.key);t["string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):""]=this.evalExpression(n.value)}return t}case"range":return this.evalRange(e.start,e.end);case"path":return this.resolvePath(e.segments);case"index":return this.resolveIndex(e.object,e.index);case"function":return this.evalFunction(e.name,e.args);case"filter":return this.applyFilters(this.evalExpression(e.subject),e.filters);case"concat":{let t=e.parts,n=t.length,r="";for(let e=0;e<n;e++){let n=this.evalExpression(t[e]);r+=null==n?"":String(n)}return r}case"unary":return"-"===e.operator?-Number(this.evalExpression(e.operand)):!sn(this.evalExpression(e.operand));case"binary":return this.evalBinary(e.operator,e.left,e.right);case"default":return this.evalExpression(e.value)??this.evalExpression(e.defaultExpr);case"ternary":{let t=this.evalExpression(e.condition);return sn(t)?e.trueExpr?this.evalExpression(e.trueExpr):t:this.evalExpression(e.falseExpr)}case"arrow":return this.createArrowFunction(e.params,e.body)}}createArrowFunction(t,n){let r={...this.variables},i=this.keepEmptyTokens,o=(...o)=>{let a=new e(r,i);for(let e=0;e<t.length;e++)a.variables[t[e]]=o[e];return a.evalExpression(n)};return o[Ht]=t.length,o}resolvePath(e){let t=e.length;if(0===t)return;let n=this.variables[e[0]];for(let r=1;r<t;r++){if(null==n)return;n=n[e[r]]}return n}resolveIndex(e,t){let n=this.evalExpression(e);if(null==n)return;let r=this.evalExpression(t);return null!=r?n[String(r)]:void 0}evalRange(e,t){let n=Number(this.evalExpression(e)),r=Number(this.evalExpression(t)),i=n<=r,o=1+(i?r-n:n-r),a=Array(o);for(let s=0;s<o;s++)a[s]=i?n+s:n-s;return a}evalFunction(e,t){let n=this.evalArgs(t);switch(e){case"cycle":{let e=n[0],t=n[1];return Array.isArray(e)&&"number"==typeof t?e[t%e.length]:""}case"max":return this.minMax(n,Math.max);case"min":return this.minMax(n,Math.min);case"range":return this.rangeFunction(n);default:return""}}minMax(e,t){return 0===e.length?void 0:t(...1===e.length&&Array.isArray(e[0])?e[0]:e)}rangeFunction(e){if(0===e.length)return[];if(1===e.length){let t=Number(e[0]),n=Array(t+1);for(let e=0;e<=t;e++)n[e]=e;return n}let t=Number(e[0]),n=Number(e[1]),r=e.length>2?Number(e[2]):t<=n?1:-1;if(0===r)return[];let i=Math.floor((r>0?n-t:t-n)/Math.abs(r))+1;if(i<=0)return[];let o=Array(i);for(let a=0;a<i;a++)o[a]=t+a*r;return o}evalBinary(e,t,n){let r=(e=>"path"===e.type&&1===e.segments.length?e.segments[0]:"literal"===e.type&&null===e.value?"null":void 0)(n);if(("is"===e||"is not"===e)&&void 0!==r){let n=cn[r];if(n){let r=n(this.evalExpression(t));return"is"===e?r:!r}}if("or"===e)return sn(this.evalExpression(t))||sn(this.evalExpression(n));if("and"===e)return sn(this.evalExpression(t))&&sn(this.evalExpression(n));let i=this.evalExpression(t),o=this.evalExpression(n),a="number"==typeof i&&"number"==typeof o;switch(e){case"+":return a?i+o:Number(i)+Number(o);case"-":return a?i-o:Number(i)-Number(o);case"*":return a?i*o:Number(i)*Number(o);case"/":return a?i/o:Number(i)/Number(o);case"//":return Math.floor(Number(i)/Number(o));case"**":return Number(i)**Number(o);case"starts with":return"string"==typeof i&&i.startsWith(rn(o));case"ends with":return"string"==typeof i&&i.endsWith(rn(o));case"%":return a?i%o:Number(i)%Number(o);case"==":return i===o||String(i)===String(o);case"!=":return i!==o&&String(i)!==String(o);case">":return a?i>o:Number(i)>Number(o);case"<":return a?i<o:Number(i)<Number(o);case">=":return a?i>=o:Number(i)>=Number(o);case"<=":return a?i<=o:Number(i)<=Number(o);case"in":return ln(i,o);case"not in":return!ln(i,o);case"same as":case"is":return i===o;case"divisible by":{let e=Number(o);return 0!==e&&Number.isFinite(e)&&Number(i)%e===0}case"is not":return i!==o;default:return!1}}},gn=41,yn=42,bn=45,vn=e=>e>=97&&e<=122||e>=65&&e<=90||95===e,wn=e=>vn(e)||e>=48&&e<=57,kn=e=>wn(e)||e===bn,xn=e=>e>=48&&e<=57,Sn=e=>32===e||9===e||10===e||13===e,Tn=e=>{let t=e.length;if(0===t||!vn(e.charCodeAt(0)))return!1;for(let n=1;n<t;n++)if(!wn(e.charCodeAt(n)))return!1;return!0},Cn=e=>{let t=e.length;if(0===t||!vn(e.charCodeAt(0)))return!1;let n=!1,r=!1;for(let i=1;i<t;i++){let t=e.charCodeAt(i);if(46!==t){if(n){if(r=xn(t),!r&&!vn(t))return!1;n=!1}else if(r?!xn(t):!wn(t))return!1}else{if(n)return!1;n=!0,r=!1}}return!n},En=e=>Tn(e),An=(e,t)=>t?`{{{${e}}}}`:`{{${e}}}`,In=e=>{switch(e.type){case"text":return e.value;case"variable":return An(e.content,e.raw);case"tag":return`{%${e.content}%}`}},Mn=class{src;pos=0;constructor(e){this.src=e}eof(){return this.pos>=this.src.length}peek(){return this.pos<this.src.length?this.src.charCodeAt(this.pos):-1}at(e){let t=this.pos+e;return t<this.src.length?this.src.charCodeAt(t):-1}skipWs(){for(;this.pos<this.src.length&&Sn(this.src.charCodeAt(this.pos));)this.pos++}scanName(){let e=this.pos;if(!this.eof()&&vn(this.src.charCodeAt(this.pos)))for(this.pos++;!this.eof()&&kn(this.src.charCodeAt(this.pos));)this.pos++;return this.src.slice(e,this.pos)}scanIndex(){let e=this.pos;for(;!this.eof()&&xn(this.src.charCodeAt(this.pos));)this.pos++;return this.src.slice(e,this.pos)}scanStringLiteral(){let e=this.src.charCodeAt(this.pos);this.pos++;let t="";for(;this.pos<this.src.length&&this.src.charCodeAt(this.pos)!==e;)if(92===this.src.charCodeAt(this.pos)&&this.pos+1<this.src.length){this.pos++;let n=this.src.charCodeAt(this.pos);t+=110===n?"\n":116===n?"\t":114===n?"\r":92===n?"\\":n===e?String.fromCharCode(n):String.fromCharCode(92)+String.fromCharCode(n),this.pos++}else t+=this.src[this.pos],this.pos++;return this.pos<this.src.length&&this.pos++,t}scanNumber(){let e=this.pos;for(this.src.charCodeAt(this.pos)===bn&&this.pos++;this.pos<this.src.length&&xn(this.src.charCodeAt(this.pos));)this.pos++;if(46===this.src.charCodeAt(this.pos))for(this.pos++;this.pos<this.src.length&&xn(this.src.charCodeAt(this.pos));)this.pos++;return Number(this.src.slice(e,this.pos))}matchKeyword(e){let t=this.pos+e.length;if(t>this.src.length)return!1;for(let n=0;n<e.length;n++)if(this.src.charCodeAt(this.pos+n)!==e.charCodeAt(n))return!1;return!(t<this.src.length&&wn(this.src.charCodeAt(t))||(this.pos=t,this.skipWs(),0))}matchBinaryOp(){this.skipWs();let e=this.peek();if(61===this.at(1)){if(61===e)return this.pos+=2,"==";if(33===e)return this.pos+=2,"!=";if(62===e)return this.pos+=2,">=";if(60===e)return this.pos+=2,"<="}return 62===e?(this.pos++,">"):60===e?(this.pos++,"<"):null}},On=(e,t)=>{let n=new _n(e,t),r=n.parseTernary();return n.expectEnd(),r},Nn=["same as","divisible by"],_n=class extends Mn{issues;constructor(e,t){super(e),this.issues=t}report(e){this.issues?.push(e)}expectEnd(){this.skipWs(),this.eof()||this.report(`Unexpected "${this.src.slice(this.pos).trim()}" in "${this.src.trim()}"`)}expectChar(e,t){this.skipWs(),this.peek()!==e?this.report(`Missing ${t} in "${this.src.trim()}"`):this.pos++}parseTernary(){let e=this.parseOr();if(this.skipWs(),63!==this.peek())return e;if(this.pos++,this.skipWs(),58===this.peek())return this.pos++,this.skipWs(),{type:"ternary",condition:e,trueExpr:null,falseExpr:this.parseTernary()};let t=this.parseOr();return this.skipWs(),58===this.peek()?(this.pos++,this.skipWs(),{type:"ternary",condition:e,trueExpr:t,falseExpr:this.parseTernary()}):{type:"ternary",condition:e,trueExpr:t,falseExpr:{type:"literal",value:""}}}parseOr(){let e=this.parseAnd();for(this.skipWs();this.matchKeyword("or");)e={type:"binary",operator:"or",left:e,right:this.parseAnd()},this.skipWs();return e}parseAnd(){let e=this.parseNot();for(this.skipWs();this.matchKeyword("and");)e={type:"binary",operator:"and",left:e,right:this.parseNot()},this.skipWs();return e}parseNot(){return this.skipWs(),this.matchKeyword("not")?{type:"unary",operator:"not",operand:this.parseComparison()}:this.parseComparison()}parseComparison(){let e=this.parseConcat();for(this.skipWs();!this.eof();){if(this.matchKeyword("is")){this.skipWs();let t=this.matchKeyword("not");this.skipWs();let n=this.matchWordedTest();if(n){let r={type:"binary",operator:n,left:e,right:this.parseConcat()};e=t?{type:"unary",operator:"not",operand:r}:r,this.skipWs();continue}e={type:"binary",operator:t?"is not":"is",left:e,right:this.parseConcat()},this.skipWs();continue}if(this.matchKeyword("not")){if(this.skipWs(),this.matchKeyword("in")){e={type:"binary",operator:"not in",left:e,right:this.parseConcat()},this.skipWs();continue}let t=this.src.slice(this.pos-4);return this.pos=this.src.length,{type:"unary",operator:"not",operand:On(t,this.issues)}}if(this.matchKeyword("in")){e={type:"binary",operator:"in",left:e,right:this.parseConcat()},this.skipWs();continue}let t=this.matchAffixTest();if(t){e={type:"binary",operator:t,left:e,right:this.parseConcat()},this.skipWs();continue}if(this.matchKeyword("matches")){this.report("`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`."),e={type:"binary",operator:"matches",left:e,right:this.parseConcat()},this.skipWs();continue}let n=this.matchBinaryOp();if(!n)break;e={type:"binary",operator:n,left:e,right:this.parseConcat()},this.skipWs()}return e}matchWordedTest(){let e=this.pos;for(let t of Nn){let[n,r]=t.split(" ");if(this.matchKeyword(n)){if(this.skipWs(),this.matchKeyword(r))return t;this.pos=e}}return null}matchAffixTest(){let e=this.pos;for(let t of["starts","ends"])if(this.matchKeyword(t)){if(this.matchKeyword("with"))return"starts"===t?"starts with":"ends with";this.pos=e}return null}parseConcat(){let e=this.parseAdditive();for(this.skipWs();126===this.peek();){this.pos++;let t=this.parseAdditive();e="concat"===e.type?{type:"concat",parts:[...e.parts,t]}:{type:"concat",parts:[e,t]},this.skipWs()}return e}parseAdditive(){let e=this.parseMultiplicative();this.skipWs();for(let t=this.peek();43===t||t===bn;t=this.peek())this.pos++,e={type:"binary",operator:43===t?"+":"-",left:e,right:this.parseMultiplicative()},this.skipWs();return e}parseMultiplicative(){let e=this.parsePower();this.skipWs();for(let t=this.peek();!(t!==yn&&47!==t&&37!==t||t===yn&&this.at(1)===yn);t=this.peek()){let n=47===t&&47===this.at(1);this.pos+=n?2:1,e={type:"binary",operator:n?"//":t===yn?"*":47===t?"/":"%",left:e,right:this.parsePower()},this.skipWs()}return e}parsePower(){let e=this.parseDefault();return this.skipWs(),this.peek()!==yn||this.at(1)!==yn?e:(this.pos+=2,{type:"binary",operator:"**",left:e,right:this.parsePower()})}parseSignedAtom(){return this.peek()===bn&&xn(this.at(1))?this.maybeTrailingFilters({type:"literal",value:this.scanNumber()}):this.peek()===bn?(this.pos++,this.skipWs(),{type:"unary",operator:"-",operand:this.parseSignedAtom()}):this.parseAtom()}parseDefault(){if(this.skipWs(),this.peek()===bn&&xn(this.at(1)))return this.maybeTrailingFilters({type:"literal",value:this.scanNumber()});if(this.peek()===bn)return this.pos++,{type:"unary",operator:"-",operand:this.parseDefault()};let e=this.parseAtom();for(this.skipWs();63===this.peek()&&63===this.at(1);)this.pos+=2,this.skipWs(),e={type:"default",value:e,defaultExpr:this.parseSignedAtom()},this.skipWs();return e}parseAtom(){this.skipWs();let e=this.peek();if(40===e){this.pos++,this.skipWs();let e=this.pos,t=this.tryParseArrowParams();if(null!==t)return this.maybeTrailingFilters({type:"arrow",params:t,body:this.parseTernary()});this.pos=e;let n=this.parseTernary();return this.expectChar(gn,'a closing ")"'),this.maybeTrailingFilters(this.parseAccessChain(n,null))}if(39===e||34===e)return this.maybeTrailingFilters({type:"literal",value:this.scanStringLiteral()});if(xn(e))return this.maybeTrailingFilters({type:"literal",value:this.scanNumber()});if(91===e){this.pos++;let e={type:"array",elements:this.parseArgList(93)};return this.maybeTrailingFilters(this.parseAccessChain(e,null))}return 123===e?(this.pos++,this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(),null))):this.parsePathOrFunctionOrArrow()}tryParseArrowParams(){let e=this.pos,t=[];for(this.skipWs();this.peek()!==gn;){let n=this.scanName();if(!n)return this.pos=e,null;if(t.push(n),this.skipWs(),44!==this.peek())break;this.pos++,this.skipWs()}return this.skipWs(),this.peek()===gn&&(this.pos++,this.skipWs(),61===this.peek()&&62===this.at(1))?(this.pos+=2,t):(this.pos=e,null)}parsePathOrFunctionOrArrow(){let e=this.scanName();if(!e)return this.report(this.eof()?`Missing a value at the end of "${this.src.trim()}"`:`Unexpected "${this.src.slice(this.pos).trim()}" in "${this.src.trim()}"`),this.pos++,{type:"literal",value:""};if("true"===e||"false"===e)return this.maybeTrailingFilters({type:"literal",value:"true"===e});if("null"===e||"none"===e)return this.maybeTrailingFilters({type:"literal",value:null});if(this.skipWs(),61===this.peek()&&62===this.at(1))return this.pos+=2,this.maybeTrailingFilters({type:"arrow",params:[e],body:this.parseTernary()});if(40===this.peek()){this.pos++;let t=this.parseArgList(gn);return this.maybeTrailingFilters(this.parseAccessChain({type:"function",name:e,args:t},null))}let t=[e];return this.maybeTrailingFilters(this.parseAccessChain({type:"path",segments:t},t))}parseAccessChain(e,t){let n=e,r=t;for(;;){let e=this.peek();if(46===e){let e=this.pos;this.pos++;let t=this.scanName()||this.scanIndex();if(!t){this.pos=e;break}r?r.push(t):n={type:"index",object:n,index:{type:"literal",value:t}};continue}if(91!==e)break;this.pos++;let t=this.parseTernary();this.expectChar(93,'a closing "]"'),!r||"literal"!==t.type||"string"!=typeof t.value&&"number"!=typeof t.value?(r&&=(n={type:"path",segments:r},null),n={type:"index",object:n,index:t}):r.push(String(t.value))}return r?{type:"path",segments:r}:n}maybeTrailingFilters(e){return this.skipWs(),124===this.peek()?{type:"filter",subject:e,filters:this.parseTrailingFilters()}:e}parseObjectLiteral(){let e=[];for(this.skipWs();!this.eof()&&125!==this.peek();){let t=this.parseObjectKey();this.skipWs(),58===this.peek()&&this.pos++,this.skipWs(),e.push({key:t,value:this.parseTernary()}),this.skipWs(),44===this.peek()&&(this.pos++,this.skipWs())}return this.expectChar(125,'a closing "}"'),{type:"object",entries:e}}parseObjectKey(){let e=this.peek();if(39===e||34===e)return{type:"literal",value:this.scanStringLiteral()};if(xn(e))return{type:"literal",value:this.scanNumber()};if(40===e){this.pos++,this.skipWs();let e=this.parseTernary();return this.skipWs(),this.peek()===gn&&this.pos++,e}return{type:"literal",value:this.scanName()}}parseArgList(e){let t=[];for(this.skipWs();!this.eof()&&this.peek()!==e;)t.push(this.parseTernary()),this.skipWs(),44===this.peek()&&(this.pos++,this.skipWs());return this.expectChar(e,e===gn?'a closing ")"':'a closing "]"'),t}parseTrailingFilters(){let e=[];for(;124===this.peek();)this.pos++,this.skipWs(),e.push(this.readFilter()),this.skipWs();return e}parseApplyChain(){this.skipWs();let e=[this.readFilter()];for(this.skipWs();124===this.peek();)this.pos++,this.skipWs(),e.push(this.readFilter()),this.skipWs();return e}readFilter(){let e=this.scanName();return e||this.report(`A "|" with no filter name after it in "${this.src.trim()}"`),this.skipWs(),40===this.peek()?(this.pos++,{name:e,args:this.parseArgList(gn)}):{name:e,args:[]}}},Pn=e=>{let t=0;for(;t<e.length&&!Sn(e.charCodeAt(t));)t++;return e.slice(0,t)},Ln=(e,t=!1,n)=>{let r=new zn(e,t,n),i=r.parseBody();if(!r.error){let e=r.peek();if(e&&"tag"===e.type){let t=Pn(e.content.trim());Dn.has(t)&&(r.error=`Orphan closing tag: {% ${t} %} without matching opening tag`)}}return{nodes:i,error:r.error}},Dn=/* @__PURE__ */new Set(["endif","endfor","endset","endapply","else","elseif"]),zn=class{tokens;keepEmptyTokens;issues;pos=0;error=null;constructor(e,t=!1,n){this.tokens=e,this.keepEmptyTokens=t,this.issues=n}peek(){return this.tokens[this.pos]}advance(){let e=this.tokens[this.pos];return e&&this.pos++,e}isTag(e){let t=this.peek();if(!t||"tag"!==t.type)return!1;let n=t.content.trim();return n===e||n.startsWith(e+" ")||n.startsWith(e+"\t")}parseBody(){let e=[];for(;this.pos<this.tokens.length;){let t=this.peek();if(!t||"tag"===t.type&&Dn.has(Pn(t.content.trim())))break;let n=this.parseNode();n&&e.push(n)}return e}parseNode(){let e=this.peek();return e?"text"===e.type?(this.advance(),{type:"text",value:e.value}):"variable"===e.type?this.parseVariable():this.parseTag():null}parseVariable(){let e=this.advance();if(!e||"variable"!==e.type)return{type:"variable",raw:!1,expression:{type:"literal",value:""},source:""};let t=e.content.trim(),n=this.keepEmptyTokens?An(e.content,e.raw):"";if(Tn(t))return{type:"variable",raw:e.raw,expression:{type:"path",segments:[t]},source:n};let r=On(t,this.issues);return{type:"variable",raw:e.raw,expression:r,source:n}}parseTag(){let e=this.peek();if(!e||"tag"!==e.type)return null;let t=e.content.trim(),n=Pn(t);switch(n){case"if":return this.parseIf();case"for":return this.parseFor();case"set":return this.parseSet();case"apply":return this.parseApply();case"break":return this.advance(),{type:"break"};case"continue":return this.advance(),{type:"continue"};default:return this.issues?.push(`Unknown tag {% ${n} %}: the tags are if, for, set, apply, break and continue`),this.advance(),null}}parseIf(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return this.error="Malformed {% if %} tag",{type:"if",condition:{type:"literal",value:!1},body:[],elseifClauses:[],elseBody:null};let t=e.content.trim(),n=-1===t.indexOf(" ")?"":t.slice(t.indexOf(" ")+1).trim();if(!n)return this.error="Malformed {% if %} tag: missing condition",{type:"if",condition:{type:"literal",value:!1},body:[],elseifClauses:[],elseBody:null};let r=On(n,this.issues),i=this.parseBody(),o=[],a=null,s=!1;for(;this.peek();){let e=this.peek();if(!e||"tag"!==e.type)break;let t=Pn(e.content.trim());if("elseif"===t){this.advance();let t=e.content.trim(),n=t.slice(t.indexOf(" ")+1).trim(),r=On(n,this.issues),i=this.parseBody();o.push({condition:r,body:i})}else{if("else"!==t){if("endif"===t){this.advance(),s=!0;break}break}this.advance(),a=this.parseBody()}}return s||(this.error="Malformed {% if %} block: missing {% endif %}"),{type:"if",condition:r,body:i,elseifClauses:o,elseBody:a}}parseFor(){let e=this.pos;this.advance();let t=this.tokens[this.pos-1];if("tag"!==t.type)return{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let n=t.content.trim(),r=n.slice(n.indexOf(" ")+1).trim(),i=/\sin\s/.exec(r);if(!i)return this.error="Invalid {% for %} syntax: missing the `in` keyword",{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let o=r.slice(0,i.index).trim(),a=r.slice(i.index+i[0].length).trim(),s=(e=>{let t=0;for(let n=0;n+1<e.length;n++){let r=e.charCodeAt(n);if(0!==t)r===t&&(t=0);else if(39===r||34===r)t=r;else if(46===r&&46===e.charCodeAt(n+1))return[e.slice(0,n).trim(),e.slice(n+2).trim()]}return null})(a),l=s?{type:"range",start:On(s[0],this.issues),end:On(s[1],this.issues)}:On(a,this.issues),c=o.indexOf(","),u=-1===c?null:o.slice(0,c).trim(),d=-1===c?o:o.slice(c+1).trim();if(!En(d))return this.error=`Invalid {% for %} variable name: "${d}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};if(null!==u&&!En(u))return this.error=`Invalid {% for %} key variable name: "${u}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let p=this.parseBody(),h=null;if(this.peek()){let e=this.peek();e&&"tag"===e.type&&"else"===Pn(e.content.trim())&&(this.advance(),h=this.parseBody())}let f=this.peek();return f&&"tag"===f.type&&"endfor"===Pn(f.content.trim())?this.advance():this.error="Malformed {% for %} block: missing {% endfor %}",{type:"for",valueVar:d,keyVar:u,collection:l,body:p,elseBody:h,source:this.keepEmptyTokens?this.reconstructRange(e,this.pos):void 0}}reconstructRange(e,t){let n="";for(let r=e;r<t;r++)n+=In(this.tokens[r]);return n}parseSet(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return{type:"set",name:"_unknown",value:{type:"literal",value:""}};let t=e.content.trim(),n=t.slice(t.indexOf(" ")+1).trim(),r=n.indexOf("=");if(-1===r){let e=n.trim(),t=this.parseBody(),r=this.peek();return r&&"tag"===r.type&&this.advance(),{type:"set",name:e,value:t}}let i=n.slice(0,r).trim(),o=n.slice(r+1).trim();return{type:"set",name:i,value:On(o,this.issues)}}parseApply(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return{type:"apply",filters:[],body:[]};let t=e.content.trim(),n=((e,t)=>{let n=new _n(e,t),r=n.parseApplyChain();return n.expectEnd(),r})(t.slice(t.indexOf(" ")+1).trim(),this.issues),r=this.parseBody(),i=this.peek();return i&&"tag"===i.type&&this.advance(),{type:"apply",filters:n,body:r}}},Rn=/* @__PURE__ */new Map,jn={hits:0,misses:0},$n=e=>{let t=Rn.get(e);if(t)return jn.hits++,t;jn.misses++;let n=(e=>{let t=(e=>{let t=[],n=0;for(;n<e.length;){let r,i,o=e.indexOf("{{",n),a=e.indexOf("{%",n);if(-1===o&&-1===a)break;if(-1===o?(r=a,i=!0):-1===a||o<a?(r=o,i=!1):(r=a,i=!0),r>n&&t.push({type:"text",value:e.slice(n,r)}),i||123!==e.charCodeAt(r+2))if(i){let i=e.indexOf("%}",r+2);if(-1===i)return{tokens:t,error:"Unclosed tag"};t.push({type:"tag",content:e.slice(r+2,i)}),n=i+2}else{let i=e.indexOf("}}",r+2);if(-1===i)return{tokens:t,error:"Unclosed double-brace token"};t.push({type:"variable",content:e.slice(r+2,i),raw:!1}),n=i+2}else{let i=e.indexOf("}}}",r+3);if(-1===i)return{tokens:t,error:"Unclosed triple-brace token"};t.push({type:"variable",content:e.slice(r+3,i),raw:!0}),n=i+3}}return n<e.length&&t.push({type:"text",value:e.slice(n)}),{tokens:t,error:null}})(e);if(t.error)return null;let n=t.tokens,{hasTags:r,allSimpleOrDotted:i}=(e=>{let t=!1,n=!0;for(let r=0;r<e.length;r++){let i=e[r];if("tag"===i.type){t=!0;break}if("variable"===i.type&&!Cn(i.content.trim())){n=!1;break}}return{hasTags:t,allSimpleOrDotted:n}})(n),o=null,a=null;if(r||!i){let e=Ln(n,!1);if(e.error)return null;o=e.nodes;let t=Ln(n,!0);t.error||(a=t.nodes)}else{let e=Ln(n,!0);e.error||(a=e.nodes)}return{tokens:n,hasTags:r,allSimpleOrDotted:i,nodes:o,nodesWithSource:a}})(e);return n?((()=>{if(Rn.size>=1024){let e=Rn.keys().next().value;void 0!==e&&Rn.delete(e)}})(),Rn.set(e,n),n):null},Fn=(e,t={},n=!1,r=!1)=>{if("string"!=typeof e)return e;try{if(-1===e.indexOf("{%")&&-1===e.indexOf("{{"))return e;let i="variables"in t?an(t):t,o=$n(e);if(!o)return e;if(!1===n&&!o.hasTags&&o.allSimpleOrDotted){let e=((e,t)=>{let n="";for(let r of e.tokens)if("text"===r.type)n+=r.value;else if("variable"===r.type){let e=r.content.trim(),i=-1===r.content.indexOf(".")?tn(t,e):nn(t,e);n+=r.raw?null==i?"":String(i):rn(i)}return n})(o,i);return r?on(e):e}let a=((e,t)=>t?e.nodesWithSource:e.nodes)(o,!1!==n);if(!a)return e;let{output:s,variables:l,hasSet:c}=hn(a,i,n);return c&&Object.assign(t,l),!1!==n&&s===e?e:r?on(s):s}catch{return e}},qn=e=>{let t=e?.filter(e=>"text"!==e.type||""!==e.value.trim())??[],n=t.at(-1),r=t.slice(0,-1);if("variable"===n?.type&&r.every(e=>"set"===e.type))return{statements:r,expression:n.expression}},Bn=({statements:e,expression:t},n)=>{let r="variables"in n?an(n):n;if(0===e.length)return fn(t,r);let{variables:i}=hn(e,r);return Object.assign(n,i),fn(t,i)},Un=(e,t={})=>{if("string"!=typeof e)return e;let n=$n(e),r=qn(n?n.nodes??n.nodesWithSource:null);if(!r)return Fn(e,t);try{return Bn(r,t)}catch{return e}},Hn=/* @__PURE__ */new Set(["json_encode","to_json","object_as_json"]),Wn=(e,t={})=>{if("string"!=typeof e)return e;let n=$n(e),r=qn(n?n.nodes??n.nodesWithSource:null);if(!r){let n=e.includes('"')?((e,t)=>{let n=$n(e),r=n?n.nodes??n.nodesWithSource:null;if(r)try{let e="variables"in t?an(t):t,{output:n,variables:i,hasSet:o}=hn(r,e,!1,!0);if(!(e=>{let t=e.trimStart();return t.startsWith("{")||t.startsWith("[")})(n))return;let a=JSON.parse(n);return o&&Object.assign(t,i),a}catch{return}})(e,t):void 0;if(void 0!==n)return n;let r=Fn(e,t);return"string"==typeof r?(e=>{let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return e;try{return JSON.parse(t)}catch{return e}})(r):r}let{expression:i}=r;try{let e=Bn(r,t);if(void 0===e)return"";if("string"==typeof e&&(e=>"filter"===e.type&&Hn.has(e.filters[e.filters.length-1]?.name??""))(i))try{return JSON.parse(e)}catch{return e}return e}catch{return e}},Vn="[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*",Gn=`(?:${Vn}|\\d+)`,Kn=`\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${Vn}(?:\\.${Gn})*)\\s*\\]`,Jn=`${Vn}(?:${Kn})*(?:\\??\\.${Gn}(?:${Kn})*)*(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`,Yn=`(?:\\{\\{\\{\\s*${Jn}\\s*\\}\\}\\}|\\{\\{\\s*${Jn}\\s*\\}\\})`,Xn=new RegExp(Yn,"g"),Qn=RegExp(`^${Yn}$`),Zn=(e,t=!1)=>{if("string"!=typeof e)return!1;let n=t?Qn:Xn;return n.lastIndex=0,n.test(e.trim())},er=(e,t)=>{if(Array.isArray(e))for(let n of e)er(n,t);else if("object"==typeof e&&e){if("type"in e&&"path"===e.type&&"segments"in e&&Array.isArray(e.segments)){let n=e.segments.filter(e=>"string"==typeof e);return void(n.length>0&&t.add(n.join(".")))}for(let n of Object.values(e))er(n,t)}},tr=e=>{let t=$n(e);if(!t)return[];let n=/* @__PURE__ */new Set;return er(t.nodes??t.nodesWithSource,n),[...n]},nr=e=>"object"==typeof e&&!!e&&!Array.isArray(e),rr=({source:e,transformers:t,when:n})=>{let r=e?[e]:[];for(let{action:i,params:o}of t??[])"twigTemplate"===i&&"string"==typeof o.template&&o.template&&r.push(...tr(o.template).filter(e=>"source"!==e&&!e.startsWith("source.")));return n&&r.push(...ir(n)),r},ir=e=>e.rules.flatMap(e=>"rules"in e?ir(e):[e.field,...e.isBinding&&"string"==typeof e.value?[e.value]:[]]);function or(e){if("string"==typeof e||"number"==typeof e){let t=String(e);return""===t?null:/^[a-zA-Z0-9_-]+$/.test(t)||/^\d+$/.test(t)?t:null}return null}function ar(e,t=!0){return e?"string"==typeof e?function(e,t){if(!e||e.startsWith(".")||e.endsWith(".")||/[^a-zA-Z0-9_.[\]-]/.test(e)||t&&(/\.\.|(\[\])/g.test(e)||(e.match(/\[/g)||[]).length!==(e.match(/\]/g)||[]).length||/\][^.[]/.test(e)))return[];let n,r=[],i=/([^.[\]]+)|\[(\d+)\]/g;for(;n=i.exec(e);)if(n[1]){if(!t&&""===n[1])continue;let e=or(n[1]);if(null!==e)r.push(e);else if(t)return[]}else if(n[2]){let e=or(n[2]);if(null!==e)r.push(e);else if(t)return[]}return r.length?r:[]}(e,t):Array.isArray(e)?function(e,t){if(!Array.isArray(e))return[];let n=[];for(let r of e){let e=or(r);if(null!==e)n.push(e);else if(t)return[]}return n}(e,t):[]:[]}function sr(e,t,n){if(null==e||!t)return n;let r=ar(t);if(!r.length)return n;let i=e;for(let o of r){if("object"!=typeof i||!i)return n;i=Array.isArray(i)?i[Number(o)]:i[o]}return void 0===i?n:i}function lr(e,t,n){let r=ar(t);if(!r.length)return e;let i=e;for(let a=0;a<r.length-1;a++){let t=r[a],n=r[a+1];if("object"!=typeof i||!i)return e;let o=i;(null==o[t]||"object"!=typeof o[t])&&(o[t]=/^\d+$/.test(n)?[]:{}),i=o[t]}let o=r[r.length-1];return"object"==typeof i&&i&&(i[o]=n),e}function cr(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=sr(e,i);void 0!==t&&lr(n,i,t)}return n}function ur(e,t=/* @__PURE__ */new WeakMap){if("object"!=typeof e||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){let n=/* @__PURE__ */new Map;return t.set(e,n),e.forEach((e,r)=>n.set(r,ur(e,t))),n}if(e instanceof Set){let n=/* @__PURE__ */new Set;return t.set(e,n),e.forEach(e=>n.add(ur(e,t))),n}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let n=new DataView(ur(e.buffer,t),e.byteOffset,e.byteLength);return t.set(e,n),n}let n=new(0,e.constructor)(e.buffer.slice(0),e.byteOffset,e.length);return t.set(e,n),n}if(e instanceof ArrayBuffer){let n=e.slice(0);return t.set(e,n),n}if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach((e,r)=>n[r]=ur(e,t)),n}let n=Object.getPrototypeOf(e),r=Object.create(n);t.set(e,r);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=ur(e[i],t));return r}var dr=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e);function pr(e,t){let n=ar(t),r=Array.isArray(e)?[...e]:dr(e);if(!n.length)return r;let i=e,o=r;for(let a=0;a<n.length;a++){let e=n[a],t=i?.[e];if(!t||"object"!=typeof t){o[e]=t;break}let r=Array.isArray(t)?[...t]:dr(t);o[e]=r,i=t,o=r}return r}function hr(e,t){if(null===e)return!1;let n=ar(t),r=e;for(let i of n){if(null==r||!(i in r))return!1;r=r[i]}return!0}function fr(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(0===n.length)return{...e};let r=[],i=[];for(let a of n){let e=ar(a);0!==e.length&&(1===e.length?r.push(e[0]):i.push(a))}let o=e;if(r.length){let e;for(let t of r)Object.prototype.hasOwnProperty.call(o,t)&&(e??=dr(o),delete e[t]);e&&(o=e)}for(let a of i){let e=ar(a);if(!hr(o,a))continue;let t=pr(o,a),n=t;for(let r=0;r<e.length-1&&n&&"object"==typeof n;r++)n=n[e[r]];if(n&&"object"==typeof n){let t=e[e.length-1];Object.prototype.hasOwnProperty.call(n,t)&&delete n[t]}o=t}return o}function mr(e,t=0,n={}){let r,i,o,a,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function h(t){if(!r)return o;l=t;let n=r,a=i;return r=void 0,i=void 0,o=e.apply(a,n),o}function f(e){a=setTimeout(g,e)}function m(e){if(void 0===s)return!0;let n=e-s;return n>=t||n<0||void 0!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);f(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,f(t),c?h(e):o}function b(e){return a=void 0,u&&r?h(e):(r=i=void 0,o)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!a)return y(n);if(void 0!==d)return clearTimeout(a),f(t),h(n)}return a||f(t),o}return v.cancel=()=>{void 0!==a&&clearTimeout(a),l=0,r=s=i=a=void 0},v.flush=()=>void 0===a?o:b(p()),v.pending=()=>void 0!==a,v}function gr(e,t=0,n={}){return mr(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}var yr=/* @__PURE__ */$({cva:()=>wr,cx:()=>vr}),br=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,vr=U,wr=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return vr(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const a=br(t)||br(r);return i[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]);return vr(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)},{cva:kr}=yr,xr=(Math.pow(10,8),6048e5),Sr=36e5,Tr=Symbol.for("constructDateFrom");function Cr(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Tr in e?e[Tr](t):e instanceof Date?new e.constructor(t):new Date(t)}function Er(e,t){return Cr(t||e,e)}function Ar(e,t){const n=()=>Cr(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Ir.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ir.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ir.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Ir.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let o;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?i:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);o=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Mr);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=_r(n[1]),o=_r(n[2])-1,a=_r(n[3]),s=_r(n[4]),l=_r(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Lr[t]||(Dr(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(Dr(e)?366:365)}(t,i)?(e.setUTCFullYear(t,o,Math.max(i,a)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!o||isNaN(+o))return n();const a=+o;let s,l=0;if(i.time&&(l=function(e){const t=e.match(Or);if(!t)return NaN;const n=Pr(t[1]),r=Pr(t[2]),i=Pr(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*Sr+6e4*r+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(a+l),n=Er(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(Nr);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*Sr+6e4*i):NaN}(i.timezone),isNaN(s)?n():Er(a+l+s,t?.in)}var Ir={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Mr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Or=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Nr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _r(e){return e?parseInt(e):1}function Pr(e){return e&&parseFloat(e.replace(",","."))||0}var Lr=[31,null,31,30,31,30,31,31,30,31,30,31];function Dr(e){return e%400==0||e%4==0&&e%100!=0}var zr=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Ar(e):e,Math.floor((n=t,+Er(n)/1e3)).toString();var n},Rr=e=>{if("string"!=typeof e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let[t,n,r]=e.split("-").map(Number),i=/* @__PURE__ */new Date(0);return i.setFullYear(t,n-1,r),i.getFullYear()===t&&i.getMonth()===n-1&&i.getDate()===r},jr={},$r=/* @__PURE__ */new Map,Fr=W("ComponentContext",{}),qr={};Object.freeze(qr);var Br,Ur=(e,t="",n=".",r=!1)=>e&&"object"==typeof e?Object.keys(e).reduce((i,o)=>{o=o.replaceAll(n,"").replaceAll(".","");let a=`${t}${t?n:""}${o}`;return"object"!=typeof e[o]||Array.isArray(e[o])&&(r||e[o].length>5)?[...i,a]:[...i,a,...Ur(e[o],a,n,r)]},[]):[],Hr=({url:e="",type:t,internalProps:n,autoRegister:r=!0,plitziJsxSkipHOC:i=!1,plitziJsxProps:o=qr})=>{let{register:s}=h(Fr),[l,c]=S(!1);g(()=>c(!0),[]);let u=k(()=>d(((e,t,n=!0,r=!1,i)=>async()=>{if(!$r.get(e)){let t=(async e=>{try{let t=await fetch(e),n=new Blob([await t.text()],{type:"text/javascript"});return await(import(
|
|
18
18
|
/* @vite-ignore */
|
|
19
19
|
/* webpackIgnore: true */
|
|
20
|
-
URL.createObjectURL(n)))}catch(e){return void console.error(e)}})(e).finally(()=>{$r.delete(e)});$r.set(e,{promise:t,timestamp:Date.now()})}let o=await($r.get(e)?.promise),[{default:a},{default:s},{nestedInject:l}]=await Promise.all([Promise.resolve().then(()=>xd),Promise.resolve().then(()=>CC),Promise.resolve().then(()=>NO)]);if(!o)return{default:s};let{type:c,pluginSettings:u}=sr(o,"default",{}),{version:d,initialItems:p,plugins:h}=o;if(!c)return{default:s};let f=o.default;return r||(f=a(o.default)),f.version=d,f.origin="remote",f.type=c,f.initialItems=p,f.pluginSettings=u,f.plugins=l(h,"remote"),n&&t(f),i&&i!==c?{default:(r?h?.[i]:f.plugins[i])??s}:{default:f}})(e,s,r,i,t)),[e,t]);return l?/* @__PURE__ */I(a,i?{children:/* @__PURE__ */I(u,{internalProps:n,plitziJsxSkipHOC:i,...o})}:{children:/* @__PURE__ */I(u,{internalProps:n})}):null},Wr=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=sr(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??sr(r,"0.params.src","")}},Vr=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:o})=>{let a={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */I(i.notFound,{internalProps:a},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return I(l,{internalProps:a,extraProps:l.extraProps},e);let c=Wr({type:n,plugins:o});return c?/* @__PURE__ */I(Hr,{url:c.url,type:n,internalProps:a},e):s},Gr=W("LayoutBodyContext",void 0),Kr=()=>{},Jr=({bodies:e,children:t})=>{let[n]=S(()=>({current:e,listeners:/* @__PURE__ */new Set}));return w(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */I(Gr,{value:n,children:t})},Yr=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Xr=({id:e,frozen:t,children:n})=>{let[r]=S(()=>{if(!t||typeof document>"u")return null;let n=document.querySelector(`[data-rsc-id="${e}"]`);if(!n)return null;let r={};for(let e=0;e<n.attributes.length;e++){let{name:t,value:i}=n.attributes[e];"class"!==t&&"style"!==t&&"data-rsc-id"!==t&&(r[t]=i)}let i=n.getAttribute("style");return{tag:n.tagName.toLowerCase(),className:n.className,style:i?Yr(i):void 0,attrs:r,html:n.innerHTML}});return r&&t?c(r.tag,{"data-rsc-id":e,className:r.className||void 0,style:r.style,...r.attrs,dangerouslySetInnerHTML:{__html:r.html}}):n},Qr=/* @__PURE__ */new Set,Zr=async e=>(await Promise.all([...Qr].map(async t=>t(e)))).some(e=>!0===e),ei=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],ti=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&ei.includes(n)?n:"expired"},ni=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e,ri=["variables","navigation","auth","state","host","theme","flags","computed"].filter(e=>"state"!==e&&"computed"!==e),ii=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,oi=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:o=!1}=r;if(e===t&&"soft"===n)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let o,a,s=[];if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(a=o;0!==a--;)if(!oi(e[a],t[a],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.values())if(!t.has(a))return!1;for(a of e.entries())if(!oi(a[1],t.get(a[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(o=e.length,o!=t.length)return!1;for(a=o;0!==a--;)if(e[a]!==t[a])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.lastIndex===t.lastIndex&&e.sticky===t.sticky;if((e.valueOf!==Object.prototype.valueOf||t.valueOf!==Object.prototype.valueOf)&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if((e.toString!==Object.prototype.toString||t.toString!==Object.prototype.toString)&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if(s="soft"===n?Object.keys(e):Object.getOwnPropertyNames(e),o=s.length,o!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(a=o;0!==a--;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=o;0!==a--;){let o=s[a];if("_owner"===o&&e.$$typeof)continue;let l="soft"===n||ii(e,o)||!i.includes(o);if(!oi(e[o],t[o],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||o&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t},ai=oi,si=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[o,a]of Object.entries(e)){let e=Un(a,{...t,computed:{...r}}),s=n?.[o],l=void 0!==n&&Object.hasOwn(n,o)&&(s===e||ai(s,e));r[o]=l?s:e,i&&=l}return i&&n?n:r},li=(e,t,n)=>{let r=ri.map(e=>t[e]);if(Br?.definitions===e&&Br.state===n&&Br.globals.every((e,t)=>e===r[t]))return Br.computed;let i=si(e,{...Object.fromEntries(ri.map((e,t)=>[e,r[t]])),state:n},Br?.definitions===e?Br.computed:void 0);return Br={definitions:e,state:n,globals:r,computed:i},i},ci=(e,t)=>{if(e)for(let n of e.split(";")){let e=n.indexOf("=");if(e>-1&&n.slice(0,e).trim()===t)try{return decodeURIComponent(n.slice(e+1).trim())}catch{return}}},ui=()=>{try{return typeof document>"u"?void 0:document.cookie}catch{return}};function di(e,t){return+Er(e)-+Er(t)}var pi={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function hi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var fi={date:hi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:hi({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},mi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function gi(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var yi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:gi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:gi({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function bi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}function vi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(i.length)}}}var wi={ordinalNumber:vi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},ki={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=pi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:fi,formatRelative:(e,t,n,r)=>mi[e],localize:yi,match:wi,options:{weekStartsOn:0,firstWeekContainsDate:1}},xi={};function Si(){return xi}function Ti(e){const t=Er(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ci(e,...t){const n=Cr.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Ei(e,t){const n=Er(e,t?.in);return n.setHours(0,0,0,0),n}function Ai(e,t){const n=Si(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Er(e,t?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Ii(e,t){return Ai(e,{...t,weekStartsOn:1})}function Mi(e,t){const n=Er(e,t?.in),r=n.getFullYear(),i=Cr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Ii(i),a=Cr(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Ii(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Oi(e,t){const n=Er(e,t?.in),r=n.getFullYear(),i=Si(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Cr(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Ai(a,t),l=Cr(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Ai(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ni(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var _i={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ni("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ni(n+1,2)},d:(e,t)=>Ni(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Ni(e.getHours()%12||12,t.length),H:(e,t)=>Ni(e.getHours(),t.length),m:(e,t)=>Ni(e.getMinutes(),t.length),s:(e,t)=>Ni(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ni(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Pi={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return _i.y(e,t)},Y:function(e,t,n,r){const i=Oi(e,r),o=i>0?i:1-i;return"YY"===t?Ni(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Ni(o,t.length)},R:function(e,t){return Ni(Mi(e),t.length)},u:function(e,t){return Ni(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ni(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ni(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return _i.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ni(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Er(e,t?.in),r=+Ai(n,t)-+function(e,t){const n=Si(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Oi(e,t),o=Cr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ai(o,t)}(n,t);return Math.round(r/xr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ni(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=Er(e,t?.in),r=+Ii(n)-+function(e){const t=Mi(e,void 0),n=Cr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Ii(n)}(n);return Math.round(r/xr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ni(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):_i.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Er(e,t?.in);return function(e,t){const[n,r]=Ci(void 0,e,t),i=Ei(n),o=Ei(r),a=+i-Ti(i),s=+o-Ti(o);return Math.round((a-s)/864e5)}(n,function(e){const t=Er(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ni(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ni(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ni(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Ni(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return _i.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):_i.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ni(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ni(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_i.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_i.s(e,t)},S:function(e,t){return _i.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Di(r);case"XXXX":case"XX":return zi(r);default:return zi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Di(r);case"xxxx":case"xx":return zi(r);default:return zi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Li(r,":");default:return"GMT"+zi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Li(r,":");default:return"GMT"+zi(r,":")}},t:function(e,t,n){return Ni(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ni(+e,t.length)}};function Li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+Ni(o,2)}function Di(e,t){return e%60==0?(e>0?"-":"+")+Ni(Math.abs(e)/60,2):zi(e,t)}function zi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ni(Math.trunc(r/60),2)+t+Ni(r%60,2)}var Ri=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ji=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},$i={p:ji,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ri(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Ri(r,t)).replace("{{time}}",ji(i,t))}},Fi=/^D+$/,qi=/^Y+$/,Bi=["D","DD","YY","YYYY"];var Ui=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wi=/^'([^]*?)'?$/,Vi=/''/g,Gi=/[a-zA-Z]/;function Ki(e,t,n){const r=Si(),i=n?.locale??r.locale??ki,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Er(e,n?.in);if(!function(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Er(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(Hi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,$i[t])(e,i.formatLong):e}).join("").match(Ui).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ji(e)};if(Pi[t])return{isToken:!0,value:e};if(t.match(Gi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const o=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return qi.test(e)}(o)||!n?.useAdditionalDayOfYearTokens&&function(e){return Fi.test(e)}(o))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Bi.includes(e))throw new RangeError(r)}(o,t,String(e)),(0,Pi[o[0]])(s,o,i.localize,c)}).join("")}function Ji(e){const t=e.match(Wi);return t?t[1].replace(Vi,"'"):e}function Yi(e,t){const n=+Er(e)-+Er(t);return n<0?-1:n>0?1:n}function Xi(e,t,n){const[r,i,o]=Ci(n?.in,e,e,t),a=Yi(i,o),s=Math.abs(function(e,t){const[n,r]=Ci(void 0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,o));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=Yi(i,o)===-a;(function(e,t){const n=Er(e,t?.in);return+function(e,t){const n=Er(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=Er(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(n,t)})(r)&&1===s&&1===Yi(r,o)&&(l=!1);const c=a*(s-+l);return 0===c?0:c}function Qi(e,t){return function(e,t,n){const r=Si(),i=n?.locale??r.locale??ki,o=Yi(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:o}),[s,l]=Ci(n?.in,...o>0?[t,e]:[e,t]),c=function(e,t,n){const r=di(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(Ti(l)-Ti(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,a):c<10?i.formatDistance("lessThanXSeconds",10,a):c<20?i.formatDistance("lessThanXSeconds",20,a):c<40?i.formatDistance("halfAMinute",0,a):c<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):0===d?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",d,a);if(d<45)return i.formatDistance("xMinutes",d,a);if(d<90)return i.formatDistance("aboutXHours",1,a);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,a)}if(d<2520)return i.formatDistance("xDays",1,a);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,a)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,a);if(p=Xi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,a)}{const e=p%12,t=Math.trunc(p/12);return e<3?i.formatDistance("aboutXYears",t,a):e<9?i.formatDistance("overXYears",t,a):i.formatDistance("almostXYears",t+1,a)}}(e,function(e){return Cr(e,Date.now())}(e),t)}var Zi={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},eo={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},to={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},no={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},ro={ordinalNumber:(e,t)=>Number(e)+"º",era:gi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:gi({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:gi({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},io={ordinalNumber:vi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:bi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},oo={code:"es",formatDistance:(e,t,n)=>{let r;const i=Zi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:eo,formatRelative:(e,t,n,r)=>1!==t.getHours()?no[e]:to[e],localize:ro,match:io,options:{weekStartsOn:1,firstWeekContainsDate:1}},ao={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},so={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lo={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},co={ordinalNumber:(e,t)=>Number(e)+"º",era:gi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:gi({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},uo={ordinalNumber:vi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},po={code:"pt",formatDistance:(e,t,n)=>{let r;const i=ao[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:so,formatRelative:(e,t,n,r)=>{const i=lo[e];return"function"==typeof i?i(t):i},localize:co,match:uo,options:{weekStartsOn:0,firstWeekContainsDate:4}},ho={en:ki,es:oo,pt:po},fo=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Ar(e):e,t};function mo(e,t="dd MMMM, yyyy",n="en"){return e?Ki(fo(e),t,{locale:ho[n]}):""}function go(e,t){let n=fo(e);return di(fo(t),n)}var yo=e=>{let t="string"==typeof e&&""!==e.trim()?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>=250?t:void 0},bo=e=>"number"==typeof e||"string"==typeof e&&!e.includes(",")&&!Number.isNaN(parseFloat(e)),vo=e=>{if(!e||"object"!=typeof e)return;let{combinator:t,enabled:n}=e,{rules:r}=e;return Array.isArray(r)?(r=r.map(e=>{if((e=>"rules"in e)(e))return vo(e);let{field:t,value:n,operator:r,enabled:i,isBinding:o}=e;return{field:t,value:n,operator:r,enabled:i,isBinding:o}}).filter(Boolean),{rules:r,combinator:t,enabled:n}):void 0},wo=(e,t="json")=>vo(e),ko=(e,t)=>"boolean"==typeof e&&"string"==typeof t?e===(t="true"===(t=t.toLowerCase())||"1"===t):"string"==typeof e&&"boolean"==typeof t?(e="true"===(e=e.toLowerCase())||"1"===e)===t:("number"==typeof e&&(e=`${e}`),"number"==typeof t&&(t=`${t}`),e===t),xo=(e,t)=>null!=e&&null!=t&&(Rr(e)&&Rr(t)?(e=zr(e),t=zr(t),parseFloat(t)>parseFloat(e)):bo(e)?(e=parseFloat(e),t=parseFloat(t),bo(t)&&t>e):t>e),So=(e,t)=>xo(e,t)||ko(e,t),To=(e,t)=>null!=e&&null!=t&&(Rr(e)&&Rr(t)?(e=zr(e),t=zr(t),parseFloat(t)<parseFloat(e)):bo(e)?(e=parseFloat(e),t=parseFloat(t),bo(t)&&t<e):t<e),Co=(e,t)=>To(e,t)||ko(e,t),Eo=(e,t)=>Array.isArray(t)?t.some(t=>ko(e,t)):"string"==typeof e&&"string"==typeof t&&t.toLowerCase().includes(e.toLowerCase()),Ao=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().startsWith(e.toLowerCase()),Io=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().endsWith(e.toLowerCase()),Mo=e=>{switch(typeof e){case"boolean":case"number":case"function":return!1;case"object":case"undefined":return null==e||0===Object.keys(e).length;default:return!e}},Oo=(e,t)=>("string"==typeof e&&e.includes(",")?e=e.split(",").map(e=>e.trim()):("string"==typeof e||"number"==typeof e)&&(e=[e]),!!Array.isArray(e)&&("string"==typeof t&&t.includes(",")&&(t=t.split(",").map(e=>e.trim())),Array.isArray(t)?t.some(t=>bo(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t)):bo(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t))),No=(e,t)=>{let n=[];return"string"==typeof e&&(n=e.split(",").map(e=>e.trim())),!(n.length<2)&&So(n[0],t)&&Co(n[1],t)},_o=(e,t={},n=!1,r=!1)=>{if(!e)return r;let{combinator:i,rules:o,enabled:a}=e;if(!Array.isArray(o))return r;if(!1===a)return!0;let s=o.filter(e=>!1!==e.enabled).map(e=>"rules"in e?_o(e,t,n):((e,t)=>{let{field:n,operator:r,isBinding:i}=e,{value:o}=e,a=sr(t,n);switch(i&&(o=sr(t,e.value)),r){case"=":return ko(o,a);case"!=":return!ko(o,a);case"<":return To(o,a);case">":return xo(o,a);case"<=":return Co(o,a);case">=":return So(o,a);case"contains":return Eo(o,a);case"doesNotContain":return!Eo(o,a);case"beginsWith":return Ao(o,a);case"doesNotBeginWith":return!Ao(o,a);case"endsWith":return Io(o,a);case"doesNotEndWith":return!Io(o,a);case"empty":return Mo(a);case"notEmpty":return!Mo(a);case"in":return Oo(o,a);case"notIn":return!Oo(o,a);case"between":return No(o,a);case"notBetween":return!No(o,a);default:return!1}})(e,t));return n?s:"and"===i?!s.includes(!1):s.includes(!0)},Po=(e,t={},n=!1,r=!1)=>_o(wo(e),t,n,r),Lo=(e,t,n,r=!1)=>{let{rules:i,enabled:o}=e;if(!Array.isArray(i)||!1===o)return{};let a=i.filter(e=>!1!==e.enabled).flatMap(e=>"rules"in e?Lo(e,t,n,!0):e);return r?a:a.reduce((e,r)=>{let{field:i,isBinding:o,value:a}=r;return o&&lr(e,a,sr(t,a,n)),lr(e,i,sr(t,i,n)),e},{})},Do=(e,t={},n=void 0)=>Lo(wo(e),t,n),zo={action:"arrayMap",title:"Array Map",type:"utility",params:{keys:{defaultValue:'[{"from": "", "to": ""}]',type:"textarea"}},preview:{sourceParsed:""},callback:(e,t)=>{let{keys:n}=t;if(!Array.isArray(e))return e;try{"string"==typeof n&&(n=JSON.parse(n))}catch{return e}return e.map(e=>{let t={};return n.forEach(n=>{"object"==typeof n&&n.from&&n.to&&lr(t,n.to,sr(e,n.from,""))}),t})}},Ro={action:"dateConverter",title:"Date Converter",type:"utility",params:{format:{defaultValue:"dd/MM/yyyy",type:"text"},asAge:{defaultValue:!1,type:"checkbox"},isUnix:{defaultValue:!0,type:"checkbox"},isUtc:{defaultValue:!1,type:"checkbox"},locale:{defaultValue:"en",type:"select",options:[{label:"en",value:"en"},{label:"es",value:"es"},{label:"pt",value:"pt"}]}},preview:{format:"",asAge:"",isUnix:"",isUtc:"",locale:""},callback:(e,{format:t="dd/MM/yyyy",asAge:n=!1,isUnix:r=!0,isUtc:i=!1,locale:o="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let a=fo(r?Number(e):e);return isNaN(a.getTime())?e:n?function(e,t="en",n){if(!e)return"";let r=fo(e);return isNaN(r.getTime())?"":Qi(r,{...n,locale:ho[t]})}(a,o,{addSuffix:!0}):i?function(e,t="dd MMMM, yyyy",n="en"){return e?Ki((e=>{let t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t.setFullYear(e.getUTCFullYear()),t})(fo(e)),t,{locale:ho[n]}):""}(a,t,o):mo(a,t,o)}catch{return e}}},jo=/* @__PURE__ */new Set(["false","0",""]),$o=e=>"string"==typeof e?!jo.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e,Fo={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!$o(e)},qo={action:"styleSelector",title:"Style Selector",type:"utility",params:{originalSelector:{label:"Original Selector",description:"This will append the original selector (require append option enabled)",defaultValue:!1,disabled:({append:e})=>!e,type:"checkbox"},append:{label:"Append Selector",defaultValue:!1,type:"checkbox"},selector:{label:"Selector",defaultValue:"",type:"select",options:(e,t,n)=>{let r=n?.stylePlatform;return r?Object.keys(r).map(e=>({label:e,options:Object.values(r[e]).filter(e=>"class"===e.type).map(e=>({label:e.name,value:e.name}))})):[]}}},preview:{append:"",originalSelector:"",selector:""},callback:(e,t,n,r={})=>{let{originalSelector:i,append:o,selector:a}=t,s=[];if(o&&!i&&r.sourceTo)s.push(r.sourceTo,a);else if(i&&o){let e=sr(n,"definition.styleSelectors.base","");e?s.push(e,a):s.push(a)}return s.length?1===s.length?s[0]:s.join(" "):""}},Bo={action:"styleVariant",title:"Style Variant",type:"utility",params:{key:{label:"Selector Key",defaultValue:"",type:"select",options:(e,t)=>{let n=t?.definition?.styleSelectors;if(!t||!t.definition||!n)return[];let r=t.definition.type;return(e=>{let t=e.reduce((e,{groupLabel:t,option:n})=>(t in e||(e[t]=[]),e[t].push(n),e),{});return Object.entries(t).map(([e,t])=>({label:e,options:t}))})(Object.entries(n).flatMap(([e,t])=>(t?[r,...t.split(" ")]:[r]).map(t=>({groupLabel:e,option:{value:`${t}.${e}`,label:`${t} (${e})`}}))))}},variant:{label:"Variant",defaultValue:"",type:"select",options:(e,t,n)=>{let r=t?.definition?.styleSelectors,i=e.key||"";if(!(t&&t.definition&&r&&n?.stylePlatform&&i.includes(".")))return[];let o=t.definition.type,a=i.split(".").pop()||"",s=r[a];if(!s)return[];let l=[],c=[o,...s.split(" ").filter(Boolean)];return Object.entries(n.stylePlatform).forEach(([e,t])=>{c.forEach(n=>{let r=t[n];if(!r)return;let i=r.attributes[a];Object.keys(i.variants||{}).forEach(t=>{l.push({value:t,label:`${e}: ${t}`})})})}),l}},append:{label:"Append to Variant",description:"Merge with existing variant values instead of replacing",defaultValue:!1,type:"checkbox"}},preview:{key:"",variant:"",append:""},callback:(e,t,n,r={})=>{let{key:i,variant:o,append:a}=t;if(!i)return r.sourceTo??{};let s=i||"base",l=o||e;return"object"!=typeof l||Array.isArray(l)?lr(a?{...r.sourceTo}:{},s,l):l}},Uo={action:"twigTemplate",title:"Twig Template",type:"utility",params:{template:{label:"Template",defaultValue:"Tokens {{source}} from the value selected to bind previously, {{sourceTo}} is your original value, other tokens via autocomplete",type:"codemirror-text"},returnMode:{label:"Returns",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Value (a single {{ expression }})",value:"value"}]}},preview:{template:""},callback:(e,t,n,r={})=>{let{template:i,returnMode:o="text"}=t,a={source:e,...r};try{return"value"===o?Un(i,a):Fn(i,a)}catch{return e}}},Ho={twigTemplate:Uo,dateConverter:Ro,staticValue:{action:"staticValue",title:"Static Value",type:"utility",params:{valueType:{label:"Value Type",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Long Text",value:"textarea"},{label:"Boolean",value:"select"}]},value:{defaultValue:"",type:({valueType:e})=>e,options:[{label:"True",value:"true"},{label:"False",value:"false"}]}},preview:{valueType:"",value:""},callback:(e,t)=>{let{valueType:n,value:r}=t;return"select"===n?"true"===r:r}},capitalize:{action:"capitalize",title:"Capitalize",type:"utility",params:{},preview:{content:""},callback:e=>"string"==typeof e?function(e){return null!=e&&"string"==typeof e&&e.trim()?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}(e):e},arrayMap:zo,stringToArray:{action:"stringToArray",title:"Text to List",type:"utility",params:{separator:{label:"Separator",defaultValue:",",type:"text"}},preview:{valueType:"",value:""},callback:(e,t)=>{let{separator:n}=t;return"string"==typeof e?e.split(n).map(e=>e.trim()):e}},not:Fo,styleSelector:qo,styleVariant:Bo},Wo=(Object.values(Ho).map(({title:e,action:t})=>({label:e,value:t})),(e,t)=>{if(e&&typeof localStorage<"u")try{let t=localStorage.getItem(e);if("dark"===t||"light"===t)return t}catch{}return"system"===t?(()=>{if(typeof window>"u")return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():t}),Vo=l({theme:{components:{}},colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{}});Vo.displayName="ThemeContext";var Go=(e,t="soft",n={})=>{let r=x(e);return ai(r.current,e,t,n)?r.current:(r.current=e,e)},Ko=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jo="-",Yo=[],Xo=e=>{const t=ea(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Zo(e);const n=e.split(Jo),r=""===n[0]&&n.length>1?1:0;return Qo(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||Yo}return n[e]||Yo}}},Qo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=Qo(e,t+1,i);if(n)return n}const o=n.validators;if(null===o)return;const a=0===t?e.join(Jo):e.slice(t).join(Jo),s=o.length;for(let l=0;l<s;l++){const e=o[l];if(e.validator(a))return e.classGroupId}},Zo=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),ea=e=>{const{theme:t,classGroups:n}=e;return ta(n,t)},ta=(e,t)=>{const n=Ko();for(const r in e){const i=e[r];na(i,n,r,t)}return n},na=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const i=e[o];ra(i,t,n,r)}},ra=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?aa(e,t,n,r):oa(e,t,n,r):ia(e,t,n)},ia=(e,t,n)=>{(""===e?t:sa(t,e)).classGroupId=n},oa=(e,t,n,r)=>{la(e)?na(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},aa=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[e,o]=i[a];na(o,sa(t,e),n,r)}},sa=(e,t)=>{let n=e;const r=t.split(Jo),i=r.length;for(let o=0;o<i;o++){const e=r[o];let t=n.nextPart.get(e);t||(t=Ko(),n.nextPart.set(e,t)),n=t}return n},la=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ca=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,o)=>{n[i]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},ua=[],da=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,o=0;const a=e.length;for(let u=0;u<a;u++){const a=e[u];if(0===r&&0===i){if(":"===a){t.push(e.slice(o,u)),o=u+1;continue}if("/"===a){n=u;continue}}"["===a?r++:"]"===a?r--:"("===a?i++:")"===a&&i--}const s=0===t.length?e:e.slice(o);let l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),da(t,c,l,n&&n>o?n-o:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):da(ua,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},ha=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i],a="["===o[0],s=t.has(o);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(o)):r.push(o)}return r.length>0&&(r.sort(),n.push(...r)),n}},fa=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},ma=/\s+/,ga=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ga(e[r]))&&(n&&(n+=" "),n+=t);return n},ya=(e,...t)=>{let n,r,i,o;const a=e=>{const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:a}=t,s=[],l=e.trim().split(ma);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:f}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!f;if(g){m=r(h.substring(0,f));const e=m&&a[m]?r(h):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(h);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:o(d).join(":"),b=p?y+"!":y,v=b+m;if(s.indexOf(v)>-1)continue;s.push(v);const w=i(m,g);for(let n=0;n<w.length;++n){const e=w[n];s.push(b+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return i(e,o),o};return o=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ca(e.cacheSize),parseClassName:pa(e),sortModifiers:ha(e),postfixLookupClassGroupIds:fa(e),...Xo(e)}))(l),r=n.cache.get,i=n.cache.set,o=a,a(s)},(...e)=>o(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=ga(t))&&(i&&(i+=" "),i+=n);return i})(...e))},ba=[],va=e=>{const t=t=>t[e]||ba;return t.isThemeGetter=!0,t.themeKey=e,t},wa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ka=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xa=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Sa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ta=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Aa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ia=e=>xa.test(e),Ma=e=>!!e&&!Number.isNaN(Number(e)),Oa=e=>!!e&&Number.isInteger(Number(e)),Na=e=>e.endsWith("%")&&Ma(e.slice(0,-1)),_a=e=>Sa.test(e),Pa=()=>!0,La=e=>Ta.test(e)&&!Ca.test(e),Da=()=>!1,za=e=>Ea.test(e),Ra=e=>Aa.test(e),ja=e=>!qa(e)&&!Ja(e),$a=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),Fa=e=>rs(e,ss,Da),qa=e=>wa.test(e),Ba=e=>rs(e,ls,La),Ua=e=>rs(e,cs,Ma),Ha=e=>rs(e,ds,Pa),Wa=e=>rs(e,us,Da),Va=e=>rs(e,os,Da),Ga=e=>rs(e,as,Ra),Ka=e=>rs(e,ps,za),Ja=e=>ka.test(e),Ya=e=>is(e,ls),Xa=e=>is(e,us),Qa=e=>is(e,os),Za=e=>is(e,ss),es=e=>is(e,as),ts=e=>is(e,ps,!0),ns=e=>is(e,ds,!0),rs=(e,t,n)=>{const r=wa.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},is=(e,t,n=!1)=>{const r=ka.exec(e);return!!r&&(r[1]?t(r[1]):n)},os=e=>"position"===e||"percentage"===e,as=e=>"image"===e||"url"===e,ss=e=>"length"===e||"size"===e||"bg-size"===e,ls=e=>"length"===e,cs=e=>"number"===e,us=e=>"family-name"===e,ds=e=>"number"===e||"weight"===e,ps=e=>"shadow"===e,hs=/*#__PURE__*/ya(()=>{const e=va("color"),t=va("font"),n=va("text"),r=va("font-weight"),i=va("tracking"),o=va("leading"),a=va("breakpoint"),s=va("container"),l=va("spacing"),c=va("radius"),u=va("shadow"),d=va("inset-shadow"),p=va("text-shadow"),h=va("drop-shadow"),f=va("blur"),m=va("perspective"),g=va("aspect"),y=va("ease"),b=va("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ja,qa],w=()=>[Ja,qa,l],k=()=>[Ia,"full","auto",...w()],x=()=>[Oa,"none","subgrid",Ja,qa],S=()=>["auto",{span:["full",Oa,Ja,qa]},Oa,Ja,qa],T=()=>[Oa,"auto",Ja,qa],C=()=>["auto","min","max","fr",Ja,qa],E=()=>["auto",...w()],A=()=>[Ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],I=()=>[s,Ia,"screen","full","dvw","lvw","svw","min","max","fit",...w()],M=()=>[Ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],O=()=>[e,Ja,qa],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Qa,Va,{position:[Ja,qa]}],_=()=>["auto","cover","contain",Za,Fa,{size:[Ja,qa]}],P=()=>[Na,Ya,Ba],L=()=>["","none","full",c,Ja,qa],D=()=>["",Ma,Ya,Ba],z=()=>[Ma,Na,Qa,Va],R=()=>["","none",f,Ja,qa],j=()=>["none",Ma,Ja,qa],$=()=>["none",Ma,Ja,qa],F=()=>[Ma,Ja,qa],q=()=>[Ia,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_a],breakpoint:[_a],color:[Pa],container:[_a],"drop-shadow":[_a],ease:["in","out","in-out"],font:[ja],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_a],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_a],shadow:[_a],spacing:["px",Ma],text:[_a],"text-shadow":[_a],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ia,qa,Ja,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Ja,qa]}],"container-named":[$a],columns:[{columns:[Ma,"auto",qa,Ja,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Oa,"auto",Ja,qa]}],basis:[{basis:[Ia,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ma,Ia,"auto","initial","none",qa]}],grow:[{grow:["",Ma,Ja,qa]}],shrink:[{shrink:["",Ma,Ja,qa]}],order:[{order:[Oa,"first","last","none",Ja,qa]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh","none",...A()]}],"font-size":[{text:["base",n,Ya,Ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ns,Ha]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Na,qa]}],"font-family":[{font:[Xa,Wa,t]}],"font-features":[{"font-features":[qa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ja,qa]}],"line-clamp":[{"line-clamp":[Ma,"none",Ja,Ua]}],leading:[{leading:["none",o,...w()]}],"list-image":[{"list-image":["none",Ja,qa]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ja,qa]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Ma,"from-font","auto",Ja,Ba]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Ma,"auto",Ja,qa]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[Oa,Ja,qa]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ja,qa]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ja,qa]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oa,Ja,qa],radial:["",Ja,qa],conic:["",Oa,Ja,qa]},es,Ga]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Ma,Ja,qa]}],"outline-w":[{outline:["",Ma,Ya,Ba]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","inner","none",u,ts,Ka]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,ts,Ka]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Ma,Ba]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,ts,Ka]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Ma,Ja,qa]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ma]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Ja,qa]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Ma]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ja,qa]}],filter:[{filter:["","none",Ja,qa]}],blur:[{blur:R()}],brightness:[{brightness:[Ma,Ja,qa]}],contrast:[{contrast:[Ma,Ja,qa]}],"drop-shadow":[{"drop-shadow":["","none",h,ts,Ka]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Ma,Ja,qa]}],"hue-rotate":[{"hue-rotate":[Ma,Ja,qa]}],invert:[{invert:["",Ma,Ja,qa]}],saturate:[{saturate:[Ma,Ja,qa]}],sepia:[{sepia:["",Ma,Ja,qa]}],"backdrop-filter":[{"backdrop-filter":["","none",Ja,qa]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Ma,Ja,qa]}],"backdrop-contrast":[{"backdrop-contrast":[Ma,Ja,qa]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ma,Ja,qa]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ma,Ja,qa]}],"backdrop-invert":[{"backdrop-invert":["",Ma,Ja,qa]}],"backdrop-opacity":[{"backdrop-opacity":[Ma,Ja,qa]}],"backdrop-saturate":[{"backdrop-saturate":[Ma,Ja,qa]}],"backdrop-sepia":[{"backdrop-sepia":["",Ma,Ja,qa]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ja,qa]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ma,"initial",Ja,qa]}],ease:[{ease:["linear","initial",y,Ja,qa]}],delay:[{delay:[Ma,Ja,qa]}],animate:[{animate:["none",b,Ja,qa]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ja,qa]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Ja,qa,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],zoom:[{zoom:[Oa,Ja,qa]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ja,qa]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ja,qa]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Ma,Ya,Ba,Ua]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fs=function(e,{componentKey:t,className:n,variants:r}){let{theme:i}=h(Vo);e=Go(e);let o=Go(n),a=f((t,n={},r="")=>(n={...n,className:r},"string"==typeof e?sr(i.components[e],t,void 0)?.(n)??r:e.map(e=>sr(i.components[e],t,void 0)?.(n)).filter(Boolean).join(" ")||r),[i.components,e]);return t=k(()=>void 0!==t?t:e&&"string"==typeof e?Object.keys(i.components[e]):Array.isArray(e)&&e.length>0?e.map(e=>Object.keys(i.components[e])).flat():void 0,[e,i.components]),k(()=>{if(t&&"string"==typeof t)return hs(a(t,r,o&&"object"==typeof o?sr(o,t,""):o));if(t&&Array.isArray(t)){let e={};return t.forEach((t,n)=>{let i;"object"==typeof o?i=sr(o,t):"string"==typeof o&&0===n&&(i=o);let s=hs(a(t,r,i));t.split(".").length>1?lr(e,t.split(".").slice(1).join("."),s):lr(e,t,s)}),e}return""},[t,o,a,r])},ms=({ref:e,className:t,children:n,testId:r,direction:i,wrap:o,items:a,gap:s,justify:l,grow:c,basis:u,alignItems:d,shrink:p,...h})=>(t=fs("Flex",{className:t,componentKey:"root",variants:{direction:i,wrap:o,items:a,gap:s,justify:l,grow:c,basis:u,shrink:p,alignItems:d}}),/* @__PURE__ */I("div",{...h,"data-testid":r,className:t,ref:e,children:n})),gs=(e,t,n="primary")=>e?"disabled":t&&"primary"===n?"primaryActive":t&&"secondary"===n?"secondaryActive":t&&"tertiary"===n?"tertiaryActive":n,ys=({className:e,children:t,icon:r,active:i=!1,disabled:o=!1,testId:a,intent:l,size:c,cursor:d,title:p,...h})=>{let f=fs("Icon",{className:e,componentKey:"root",variants:{intent:gs(o,i,l),size:c,cursor:o?"disabled":d}}),{iconChildren:m}=k(()=>{let e={iconChildren:void 0};return n.forEach(t,t=>{u(t)&&(e.iconChildren=s(t,{...h,className:U({"h-[1em] w-[1em]":"custom"!==c},f,t.props.className),title:p}))}),e},[t,f,h,c,p]);return m||/* @__PURE__ */I("i",{...h,title:p,"data-testid":a,className:U(r,f)})},bs=({ref:e,children:t,testId:r,className:i="",iconPlacement:o="none",loading:a=!1,disabled:l=!1,type:c="button",size:d,intent:p,border:h,justify:f,items:m,aspect:g,...y})=>{let b=fs("Button",{className:i,componentKey:["root","icon"],variants:{intent:p,size:d,border:h,justify:f,items:m,disabled:l,aspect:g}}),{iconChildren:v,contentChildren:w}=k(()=>{let e={iconChildren:void 0,contentChildren:void 0};return n.forEach(t,t=>{if("string"!=typeof t){if(u(t))if(t.type===ys){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,testId:r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else if("i"===t.type){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,"data-testid":r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else e.contentChildren=t}else e.contentChildren=t}),e},[t,b.icon,d,r]);/* @__PURE__ */
|
|
20
|
+
URL.createObjectURL(n)))}catch(e){return void console.error(e)}})(e).finally(()=>{$r.delete(e)});$r.set(e,{promise:t,timestamp:Date.now()})}let o=await($r.get(e)?.promise),[{default:a},{default:s},{nestedInject:l}]=await Promise.all([Promise.resolve().then(()=>Td),Promise.resolve().then(()=>AC),Promise.resolve().then(()=>PO)]);if(!o)return{default:s};let{type:c,pluginSettings:u}=sr(o,"default",{}),{version:d,initialItems:p,plugins:h}=o;if(!c)return{default:s};let f=o.default;return r||(f=a(o.default)),f.version=d,f.origin="remote",f.type=c,f.initialItems=p,f.pluginSettings=u,f.plugins=l(h,"remote"),n&&t(f),i&&i!==c?{default:(r?h?.[i]:f.plugins[i])??s}:{default:f}})(e,s,r,i,t)),[e,t]);return l?/* @__PURE__ */I(a,i?{children:/* @__PURE__ */I(u,{internalProps:n,plitziJsxSkipHOC:i,...o})}:{children:/* @__PURE__ */I(u,{internalProps:n})}):null},Wr=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=sr(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??sr(r,"0.params.src","")}},Vr=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:o})=>{let a={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */I(i.notFound,{internalProps:a},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return I(l,{internalProps:a,extraProps:l.extraProps},e);let c=Wr({type:n,plugins:o});return c?/* @__PURE__ */I(Hr,{url:c.url,type:n,internalProps:a},e):s},Gr=W("LayoutBodyContext",void 0),Kr=()=>{},Jr=({bodies:e,children:t})=>{let[n]=S(()=>({current:e,listeners:/* @__PURE__ */new Set}));return w(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */I(Gr,{value:n,children:t})},Yr=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Xr=({id:e,frozen:t,children:n})=>{let[r]=S(()=>{if(!t||typeof document>"u")return null;let n=document.querySelector(`[data-rsc-id="${e}"]`);if(!n)return null;let r={};for(let e=0;e<n.attributes.length;e++){let{name:t,value:i}=n.attributes[e];"class"!==t&&"style"!==t&&"data-rsc-id"!==t&&(r[t]=i)}let i=n.getAttribute("style");return{tag:n.tagName.toLowerCase(),className:n.className,style:i?Yr(i):void 0,attrs:r,html:n.innerHTML}});return r&&t?c(r.tag,{"data-rsc-id":e,className:r.className||void 0,style:r.style,...r.attrs,dangerouslySetInnerHTML:{__html:r.html}}):n},Qr=/* @__PURE__ */new Set,Zr=async e=>(await Promise.all([...Qr].map(async t=>t(e)))).some(e=>!0===e),ei=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],ti=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&ei.includes(n)?n:"expired"},ni=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e,ri=["variables","navigation","auth","state","host","theme","flags","computed"].filter(e=>"state"!==e&&"computed"!==e),ii=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,oi=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:o=!1}=r;if(e===t&&"soft"===n)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let o,a,s=[];if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(a=o;0!==a--;)if(!oi(e[a],t[a],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.values())if(!t.has(a))return!1;for(a of e.entries())if(!oi(a[1],t.get(a[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(o=e.length,o!=t.length)return!1;for(a=o;0!==a--;)if(e[a]!==t[a])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.lastIndex===t.lastIndex&&e.sticky===t.sticky;if((e.valueOf!==Object.prototype.valueOf||t.valueOf!==Object.prototype.valueOf)&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if((e.toString!==Object.prototype.toString||t.toString!==Object.prototype.toString)&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if(s="soft"===n?Object.keys(e):Object.getOwnPropertyNames(e),o=s.length,o!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(a=o;0!==a--;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=o;0!==a--;){let o=s[a];if("_owner"===o&&e.$$typeof)continue;let l="soft"===n||ii(e,o)||!i.includes(o);if(!oi(e[o],t[o],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||o&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t},ai=oi,si=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[o,a]of Object.entries(e)){let e=Un(a,{...t,computed:{...r}}),s=n?.[o],l=void 0!==n&&Object.hasOwn(n,o)&&(s===e||ai(s,e));r[o]=l?s:e,i&&=l}return i&&n?n:r},li=(e,t,n)=>{let r=ri.map(e=>t[e]);if(Br?.definitions===e&&Br.state===n&&Br.globals.every((e,t)=>e===r[t]))return Br.computed;let i=si(e,{...Object.fromEntries(ri.map((e,t)=>[e,r[t]])),state:n},Br?.definitions===e?Br.computed:void 0);return Br={definitions:e,state:n,globals:r,computed:i},i},ci=(e,t)=>{if(e)for(let n of e.split(";")){let e=n.indexOf("=");if(e>-1&&n.slice(0,e).trim()===t)try{return decodeURIComponent(n.slice(e+1).trim())}catch{return}}},ui=()=>{try{return typeof document>"u"?void 0:document.cookie}catch{return}};function di(e,t){return+Er(e)-+Er(t)}var pi={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function hi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var fi={date:hi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:hi({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},mi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function gi(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var yi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:gi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:gi({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function bi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}function vi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(i.length)}}}var wi={ordinalNumber:vi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},ki={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=pi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:fi,formatRelative:(e,t,n,r)=>mi[e],localize:yi,match:wi,options:{weekStartsOn:0,firstWeekContainsDate:1}},xi={};function Si(){return xi}function Ti(e){const t=Er(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ci(e,...t){const n=Cr.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Ei(e,t){const n=Er(e,t?.in);return n.setHours(0,0,0,0),n}function Ai(e,t){const n=Si(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Er(e,t?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Ii(e,t){return Ai(e,{...t,weekStartsOn:1})}function Mi(e,t){const n=Er(e,t?.in),r=n.getFullYear(),i=Cr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Ii(i),a=Cr(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Ii(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Oi(e,t){const n=Er(e,t?.in),r=n.getFullYear(),i=Si(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Cr(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Ai(a,t),l=Cr(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Ai(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ni(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var _i={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ni("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ni(n+1,2)},d:(e,t)=>Ni(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Ni(e.getHours()%12||12,t.length),H:(e,t)=>Ni(e.getHours(),t.length),m:(e,t)=>Ni(e.getMinutes(),t.length),s:(e,t)=>Ni(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ni(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Pi={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return _i.y(e,t)},Y:function(e,t,n,r){const i=Oi(e,r),o=i>0?i:1-i;return"YY"===t?Ni(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Ni(o,t.length)},R:function(e,t){return Ni(Mi(e),t.length)},u:function(e,t){return Ni(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ni(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ni(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return _i.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ni(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Er(e,t?.in),r=+Ai(n,t)-+function(e,t){const n=Si(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Oi(e,t),o=Cr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ai(o,t)}(n,t);return Math.round(r/xr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ni(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=Er(e,t?.in),r=+Ii(n)-+function(e){const t=Mi(e,void 0),n=Cr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Ii(n)}(n);return Math.round(r/xr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ni(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):_i.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Er(e,t?.in);return function(e,t){const[n,r]=Ci(void 0,e,t),i=Ei(n),o=Ei(r),a=+i-Ti(i),s=+o-Ti(o);return Math.round((a-s)/864e5)}(n,function(e){const t=Er(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ni(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ni(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ni(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Ni(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return _i.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):_i.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ni(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ni(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_i.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_i.s(e,t)},S:function(e,t){return _i.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Di(r);case"XXXX":case"XX":return zi(r);default:return zi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Di(r);case"xxxx":case"xx":return zi(r);default:return zi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Li(r,":");default:return"GMT"+zi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Li(r,":");default:return"GMT"+zi(r,":")}},t:function(e,t,n){return Ni(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ni(+e,t.length)}};function Li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+Ni(o,2)}function Di(e,t){return e%60==0?(e>0?"-":"+")+Ni(Math.abs(e)/60,2):zi(e,t)}function zi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ni(Math.trunc(r/60),2)+t+Ni(r%60,2)}var Ri=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ji=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},$i={p:ji,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ri(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Ri(r,t)).replace("{{time}}",ji(i,t))}},Fi=/^D+$/,qi=/^Y+$/,Bi=["D","DD","YY","YYYY"];var Ui=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wi=/^'([^]*?)'?$/,Vi=/''/g,Gi=/[a-zA-Z]/;function Ki(e,t,n){const r=Si(),i=n?.locale??r.locale??ki,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Er(e,n?.in);if(!function(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Er(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(Hi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,$i[t])(e,i.formatLong):e}).join("").match(Ui).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ji(e)};if(Pi[t])return{isToken:!0,value:e};if(t.match(Gi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const o=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return qi.test(e)}(o)||!n?.useAdditionalDayOfYearTokens&&function(e){return Fi.test(e)}(o))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Bi.includes(e))throw new RangeError(r)}(o,t,String(e)),(0,Pi[o[0]])(s,o,i.localize,c)}).join("")}function Ji(e){const t=e.match(Wi);return t?t[1].replace(Vi,"'"):e}function Yi(e,t){const n=+Er(e)-+Er(t);return n<0?-1:n>0?1:n}function Xi(e,t,n){const[r,i,o]=Ci(n?.in,e,e,t),a=Yi(i,o),s=Math.abs(function(e,t){const[n,r]=Ci(void 0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,o));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=Yi(i,o)===-a;(function(e,t){const n=Er(e,t?.in);return+function(e,t){const n=Er(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=Er(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(n,t)})(r)&&1===s&&1===Yi(r,o)&&(l=!1);const c=a*(s-+l);return 0===c?0:c}function Qi(e,t){return function(e,t,n){const r=Si(),i=n?.locale??r.locale??ki,o=Yi(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:o}),[s,l]=Ci(n?.in,...o>0?[t,e]:[e,t]),c=function(e,t,n){const r=di(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(Ti(l)-Ti(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,a):c<10?i.formatDistance("lessThanXSeconds",10,a):c<20?i.formatDistance("lessThanXSeconds",20,a):c<40?i.formatDistance("halfAMinute",0,a):c<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):0===d?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",d,a);if(d<45)return i.formatDistance("xMinutes",d,a);if(d<90)return i.formatDistance("aboutXHours",1,a);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,a)}if(d<2520)return i.formatDistance("xDays",1,a);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,a)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,a);if(p=Xi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,a)}{const e=p%12,t=Math.trunc(p/12);return e<3?i.formatDistance("aboutXYears",t,a):e<9?i.formatDistance("overXYears",t,a):i.formatDistance("almostXYears",t+1,a)}}(e,function(e){return Cr(e,Date.now())}(e),t)}var Zi={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},eo={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},to={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},no={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},ro={ordinalNumber:(e,t)=>Number(e)+"º",era:gi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:gi({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:gi({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},io={ordinalNumber:vi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:bi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},oo={code:"es",formatDistance:(e,t,n)=>{let r;const i=Zi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:eo,formatRelative:(e,t,n,r)=>1!==t.getHours()?no[e]:to[e],localize:ro,match:io,options:{weekStartsOn:1,firstWeekContainsDate:1}},ao={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},so={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lo={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},co={ordinalNumber:(e,t)=>Number(e)+"º",era:gi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:gi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:gi({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:gi({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},uo={ordinalNumber:vi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:bi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:bi({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},po={code:"pt",formatDistance:(e,t,n)=>{let r;const i=ao[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:so,formatRelative:(e,t,n,r)=>{const i=lo[e];return"function"==typeof i?i(t):i},localize:co,match:uo,options:{weekStartsOn:0,firstWeekContainsDate:4}},ho={en:ki,es:oo,pt:po},fo=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Ar(e):e,t};function mo(e,t="dd MMMM, yyyy",n="en"){return e?Ki(fo(e),t,{locale:ho[n]}):""}function go(e,t){let n=fo(e);return di(fo(t),n)}var yo=e=>{let t="string"==typeof e&&""!==e.trim()?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>=250?t:void 0},bo=e=>"number"==typeof e||"string"==typeof e&&!e.includes(",")&&!Number.isNaN(parseFloat(e)),vo=e=>{if(!e||"object"!=typeof e)return;let{combinator:t,enabled:n}=e,{rules:r}=e;return Array.isArray(r)?(r=r.map(e=>{if((e=>"rules"in e)(e))return vo(e);let{field:t,value:n,operator:r,enabled:i,isBinding:o}=e;return{field:t,value:n,operator:r,enabled:i,isBinding:o}}).filter(Boolean),{rules:r,combinator:t,enabled:n}):void 0},wo=(e,t="json")=>vo(e),ko=(e,t)=>"boolean"==typeof e&&"string"==typeof t?e===(t="true"===(t=t.toLowerCase())||"1"===t):"string"==typeof e&&"boolean"==typeof t?(e="true"===(e=e.toLowerCase())||"1"===e)===t:("number"==typeof e&&(e=`${e}`),"number"==typeof t&&(t=`${t}`),e===t),xo=(e,t)=>null!=e&&null!=t&&(Rr(e)&&Rr(t)?(e=zr(e),t=zr(t),parseFloat(t)>parseFloat(e)):bo(e)?(e=parseFloat(e),t=parseFloat(t),bo(t)&&t>e):t>e),So=(e,t)=>xo(e,t)||ko(e,t),To=(e,t)=>null!=e&&null!=t&&(Rr(e)&&Rr(t)?(e=zr(e),t=zr(t),parseFloat(t)<parseFloat(e)):bo(e)?(e=parseFloat(e),t=parseFloat(t),bo(t)&&t<e):t<e),Co=(e,t)=>To(e,t)||ko(e,t),Eo=(e,t)=>Array.isArray(t)?t.some(t=>ko(e,t)):"string"==typeof e&&"string"==typeof t&&t.toLowerCase().includes(e.toLowerCase()),Ao=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().startsWith(e.toLowerCase()),Io=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().endsWith(e.toLowerCase()),Mo=e=>{switch(typeof e){case"boolean":case"number":case"function":return!1;case"object":case"undefined":return null==e||0===Object.keys(e).length;default:return!e}},Oo=(e,t)=>("string"==typeof e&&e.includes(",")?e=e.split(",").map(e=>e.trim()):("string"==typeof e||"number"==typeof e)&&(e=[e]),!!Array.isArray(e)&&("string"==typeof t&&t.includes(",")&&(t=t.split(",").map(e=>e.trim())),Array.isArray(t)?t.some(t=>bo(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t)):bo(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t))),No=(e,t)=>{let n=[];return"string"==typeof e&&(n=e.split(",").map(e=>e.trim())),!(n.length<2)&&So(n[0],t)&&Co(n[1],t)},_o=(e,t={},n=!1,r=!1)=>{if(!e)return r;let{combinator:i,rules:o,enabled:a}=e;if(!Array.isArray(o))return r;if(!1===a)return!0;let s=o.filter(e=>!1!==e.enabled).map(e=>"rules"in e?_o(e,t,n):((e,t)=>{let{field:n,operator:r,isBinding:i}=e,{value:o}=e,a=sr(t,n);switch(i&&(o=sr(t,e.value)),r){case"=":return ko(o,a);case"!=":return!ko(o,a);case"<":return To(o,a);case">":return xo(o,a);case"<=":return Co(o,a);case">=":return So(o,a);case"contains":return Eo(o,a);case"doesNotContain":return!Eo(o,a);case"beginsWith":return Ao(o,a);case"doesNotBeginWith":return!Ao(o,a);case"endsWith":return Io(o,a);case"doesNotEndWith":return!Io(o,a);case"empty":return Mo(a);case"notEmpty":return!Mo(a);case"in":return Oo(o,a);case"notIn":return!Oo(o,a);case"between":return No(o,a);case"notBetween":return!No(o,a);default:return!1}})(e,t));return n?s:"and"===i?!s.includes(!1):s.includes(!0)},Po=(e,t={},n=!1,r=!1)=>_o(wo(e),t,n,r),Lo=(e,t,n,r=!1)=>{let{rules:i,enabled:o}=e;if(!Array.isArray(i)||!1===o)return{};let a=i.filter(e=>!1!==e.enabled).flatMap(e=>"rules"in e?Lo(e,t,n,!0):e);return r?a:a.reduce((e,r)=>{let{field:i,isBinding:o,value:a}=r;return o&&lr(e,a,sr(t,a,n)),lr(e,i,sr(t,i,n)),e},{})},Do=(e,t={},n=void 0)=>Lo(wo(e),t,n),zo={action:"arrayMap",title:"Array Map",type:"utility",params:{keys:{defaultValue:'[{"from": "", "to": ""}]',type:"textarea"}},preview:{sourceParsed:""},callback:(e,t)=>{let{keys:n}=t;if(!Array.isArray(e))return e;try{"string"==typeof n&&(n=JSON.parse(n))}catch{return e}return e.map(e=>{let t={};return n.forEach(n=>{"object"==typeof n&&n.from&&n.to&&lr(t,n.to,sr(e,n.from,""))}),t})}},Ro={action:"dateConverter",title:"Date Converter",type:"utility",params:{format:{defaultValue:"dd/MM/yyyy",type:"text"},asAge:{defaultValue:!1,type:"checkbox"},isUnix:{defaultValue:!0,type:"checkbox"},isUtc:{defaultValue:!1,type:"checkbox"},locale:{defaultValue:"en",type:"select",options:[{label:"en",value:"en"},{label:"es",value:"es"},{label:"pt",value:"pt"}]}},preview:{format:"",asAge:"",isUnix:"",isUtc:"",locale:""},callback:(e,{format:t="dd/MM/yyyy",asAge:n=!1,isUnix:r=!0,isUtc:i=!1,locale:o="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let a=fo(r?Number(e):e);return isNaN(a.getTime())?e:n?function(e,t="en",n){if(!e)return"";let r=fo(e);return isNaN(r.getTime())?"":Qi(r,{...n,locale:ho[t]})}(a,o,{addSuffix:!0}):i?function(e,t="dd MMMM, yyyy",n="en"){return e?Ki((e=>{let t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t.setFullYear(e.getUTCFullYear()),t})(fo(e)),t,{locale:ho[n]}):""}(a,t,o):mo(a,t,o)}catch{return e}}},jo=/* @__PURE__ */new Set(["false","0",""]),$o=e=>"string"==typeof e?!jo.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e,Fo={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!$o(e)},qo={action:"styleSelector",title:"Style Selector",type:"utility",params:{originalSelector:{label:"Original Selector",description:"This will append the original selector (require append option enabled)",defaultValue:!1,disabled:({append:e})=>!e,type:"checkbox"},append:{label:"Append Selector",defaultValue:!1,type:"checkbox"},selector:{label:"Selector",defaultValue:"",type:"select",options:(e,t,n)=>{let r=n?.stylePlatform;return r?Object.keys(r).map(e=>({label:e,options:Object.values(r[e]).filter(e=>"class"===e.type).map(e=>({label:e.name,value:e.name}))})):[]}}},preview:{append:"",originalSelector:"",selector:""},callback:(e,t,n,r={})=>{let{originalSelector:i,append:o,selector:a}=t,s=[];if(o&&!i&&r.sourceTo)s.push(r.sourceTo,a);else if(i&&o){let e=sr(n,"definition.styleSelectors.base","");e?s.push(e,a):s.push(a)}return s.length?1===s.length?s[0]:s.join(" "):""}},Bo={action:"styleVariant",title:"Style Variant",type:"utility",params:{key:{label:"Selector Key",defaultValue:"",type:"select",options:(e,t)=>{let n=t?.definition?.styleSelectors;if(!t||!t.definition||!n)return[];let r=t.definition.type;return(e=>{let t=e.reduce((e,{groupLabel:t,option:n})=>(t in e||(e[t]=[]),e[t].push(n),e),{});return Object.entries(t).map(([e,t])=>({label:e,options:t}))})(Object.entries(n).flatMap(([e,t])=>(t?[r,...t.split(" ")]:[r]).map(t=>({groupLabel:e,option:{value:`${t}.${e}`,label:`${t} (${e})`}}))))}},variant:{label:"Variant",defaultValue:"",type:"select",options:(e,t,n)=>{let r=t?.definition?.styleSelectors,i=e.key||"";if(!(t&&t.definition&&r&&n?.stylePlatform&&i.includes(".")))return[];let o=t.definition.type,a=i.split(".").pop()||"",s=r[a];if(!s)return[];let l=[],c=[o,...s.split(" ").filter(Boolean)];return Object.entries(n.stylePlatform).forEach(([e,t])=>{c.forEach(n=>{let r=t[n];if(!r)return;let i=r.attributes[a];Object.keys(i.variants||{}).forEach(t=>{l.push({value:t,label:`${e}: ${t}`})})})}),l}},append:{label:"Append to Variant",description:"Merge with existing variant values instead of replacing",defaultValue:!1,type:"checkbox"}},preview:{key:"",variant:"",append:""},callback:(e,t,n,r={})=>{let{key:i,variant:o,append:a}=t;if(!i)return r.sourceTo??{};let s=i||"base",l=o||e;return"object"!=typeof l||Array.isArray(l)?lr(a?{...r.sourceTo}:{},s,l):l}},Uo={action:"twigTemplate",title:"Twig Template",type:"utility",params:{template:{label:"Template",defaultValue:"Tokens {{source}} from the value selected to bind previously, {{sourceTo}} is your original value, other tokens via autocomplete",type:"codemirror-text"},returnMode:{label:"Returns",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Value (a single {{ expression }})",value:"value"}]}},preview:{template:""},callback:(e,t,n,r={})=>{let{template:i,returnMode:o="text"}=t,a={source:e,...r};try{return"value"===o?Un(i,a):Fn(i,a)}catch{return e}}},Ho={twigTemplate:Uo,dateConverter:Ro,staticValue:{action:"staticValue",title:"Static Value",type:"utility",params:{valueType:{label:"Value Type",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Long Text",value:"textarea"},{label:"Boolean",value:"select"}]},value:{defaultValue:"",type:({valueType:e})=>e,options:[{label:"True",value:"true"},{label:"False",value:"false"}]}},preview:{valueType:"",value:""},callback:(e,t)=>{let{valueType:n,value:r}=t;return"select"===n?"true"===r:r}},capitalize:{action:"capitalize",title:"Capitalize",type:"utility",params:{},preview:{content:""},callback:e=>"string"==typeof e?function(e){return null!=e&&"string"==typeof e&&e.trim()?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}(e):e},arrayMap:zo,stringToArray:{action:"stringToArray",title:"Text to List",type:"utility",params:{separator:{label:"Separator",defaultValue:",",type:"text"}},preview:{valueType:"",value:""},callback:(e,t)=>{let{separator:n}=t;return"string"==typeof e?e.split(n).map(e=>e.trim()):e}},not:Fo,styleSelector:qo,styleVariant:Bo},Wo=(Object.values(Ho).map(({title:e,action:t})=>({label:e,value:t})),(e,t)=>{if(e&&typeof localStorage<"u")try{let t=localStorage.getItem(e);if("dark"===t||"light"===t)return t}catch{}return"system"===t?(()=>{if(typeof window>"u")return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():t}),Vo=l({theme:{components:{}},colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{}});Vo.displayName="ThemeContext";var Go=(e,t="soft",n={})=>{let r=x(e);return ai(r.current,e,t,n)?r.current:(r.current=e,e)},Ko=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jo="-",Yo=[],Xo=e=>{const t=ea(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Zo(e);const n=e.split(Jo),r=""===n[0]&&n.length>1?1:0;return Qo(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||Yo}return n[e]||Yo}}},Qo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=Qo(e,t+1,i);if(n)return n}const o=n.validators;if(null===o)return;const a=0===t?e.join(Jo):e.slice(t).join(Jo),s=o.length;for(let l=0;l<s;l++){const e=o[l];if(e.validator(a))return e.classGroupId}},Zo=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),ea=e=>{const{theme:t,classGroups:n}=e;return ta(n,t)},ta=(e,t)=>{const n=Ko();for(const r in e){const i=e[r];na(i,n,r,t)}return n},na=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const i=e[o];ra(i,t,n,r)}},ra=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?aa(e,t,n,r):oa(e,t,n,r):ia(e,t,n)},ia=(e,t,n)=>{(""===e?t:sa(t,e)).classGroupId=n},oa=(e,t,n,r)=>{la(e)?na(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},aa=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[e,o]=i[a];na(o,sa(t,e),n,r)}},sa=(e,t)=>{let n=e;const r=t.split(Jo),i=r.length;for(let o=0;o<i;o++){const e=r[o];let t=n.nextPart.get(e);t||(t=Ko(),n.nextPart.set(e,t)),n=t}return n},la=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ca=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,o)=>{n[i]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},ua=[],da=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,o=0;const a=e.length;for(let u=0;u<a;u++){const a=e[u];if(0===r&&0===i){if(":"===a){t.push(e.slice(o,u)),o=u+1;continue}if("/"===a){n=u;continue}}"["===a?r++:"]"===a?r--:"("===a?i++:")"===a&&i--}const s=0===t.length?e:e.slice(o);let l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),da(t,c,l,n&&n>o?n-o:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):da(ua,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},ha=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i],a="["===o[0],s=t.has(o);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(o)):r.push(o)}return r.length>0&&(r.sort(),n.push(...r)),n}},fa=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},ma=/\s+/,ga=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ga(e[r]))&&(n&&(n+=" "),n+=t);return n},ya=(e,...t)=>{let n,r,i,o;const a=e=>{const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:a}=t,s=[],l=e.trim().split(ma);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:f}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!f;if(g){m=r(h.substring(0,f));const e=m&&a[m]?r(h):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(h);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:o(d).join(":"),b=p?y+"!":y,v=b+m;if(s.indexOf(v)>-1)continue;s.push(v);const w=i(m,g);for(let n=0;n<w.length;++n){const e=w[n];s.push(b+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return i(e,o),o};return o=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ca(e.cacheSize),parseClassName:pa(e),sortModifiers:ha(e),postfixLookupClassGroupIds:fa(e),...Xo(e)}))(l),r=n.cache.get,i=n.cache.set,o=a,a(s)},(...e)=>o(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=ga(t))&&(i&&(i+=" "),i+=n);return i})(...e))},ba=[],va=e=>{const t=t=>t[e]||ba;return t.isThemeGetter=!0,t.themeKey=e,t},wa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ka=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xa=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Sa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ta=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Aa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ia=e=>xa.test(e),Ma=e=>!!e&&!Number.isNaN(Number(e)),Oa=e=>!!e&&Number.isInteger(Number(e)),Na=e=>e.endsWith("%")&&Ma(e.slice(0,-1)),_a=e=>Sa.test(e),Pa=()=>!0,La=e=>Ta.test(e)&&!Ca.test(e),Da=()=>!1,za=e=>Ea.test(e),Ra=e=>Aa.test(e),ja=e=>!qa(e)&&!Ja(e),$a=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),Fa=e=>rs(e,ss,Da),qa=e=>wa.test(e),Ba=e=>rs(e,ls,La),Ua=e=>rs(e,cs,Ma),Ha=e=>rs(e,ds,Pa),Wa=e=>rs(e,us,Da),Va=e=>rs(e,os,Da),Ga=e=>rs(e,as,Ra),Ka=e=>rs(e,ps,za),Ja=e=>ka.test(e),Ya=e=>is(e,ls),Xa=e=>is(e,us),Qa=e=>is(e,os),Za=e=>is(e,ss),es=e=>is(e,as),ts=e=>is(e,ps,!0),ns=e=>is(e,ds,!0),rs=(e,t,n)=>{const r=wa.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},is=(e,t,n=!1)=>{const r=ka.exec(e);return!!r&&(r[1]?t(r[1]):n)},os=e=>"position"===e||"percentage"===e,as=e=>"image"===e||"url"===e,ss=e=>"length"===e||"size"===e||"bg-size"===e,ls=e=>"length"===e,cs=e=>"number"===e,us=e=>"family-name"===e,ds=e=>"number"===e||"weight"===e,ps=e=>"shadow"===e,hs=/*#__PURE__*/ya(()=>{const e=va("color"),t=va("font"),n=va("text"),r=va("font-weight"),i=va("tracking"),o=va("leading"),a=va("breakpoint"),s=va("container"),l=va("spacing"),c=va("radius"),u=va("shadow"),d=va("inset-shadow"),p=va("text-shadow"),h=va("drop-shadow"),f=va("blur"),m=va("perspective"),g=va("aspect"),y=va("ease"),b=va("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ja,qa],w=()=>[Ja,qa,l],k=()=>[Ia,"full","auto",...w()],x=()=>[Oa,"none","subgrid",Ja,qa],S=()=>["auto",{span:["full",Oa,Ja,qa]},Oa,Ja,qa],T=()=>[Oa,"auto",Ja,qa],C=()=>["auto","min","max","fr",Ja,qa],E=()=>["auto",...w()],A=()=>[Ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],I=()=>[s,Ia,"screen","full","dvw","lvw","svw","min","max","fit",...w()],M=()=>[Ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],O=()=>[e,Ja,qa],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Qa,Va,{position:[Ja,qa]}],_=()=>["auto","cover","contain",Za,Fa,{size:[Ja,qa]}],P=()=>[Na,Ya,Ba],L=()=>["","none","full",c,Ja,qa],D=()=>["",Ma,Ya,Ba],z=()=>[Ma,Na,Qa,Va],R=()=>["","none",f,Ja,qa],j=()=>["none",Ma,Ja,qa],$=()=>["none",Ma,Ja,qa],F=()=>[Ma,Ja,qa],q=()=>[Ia,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_a],breakpoint:[_a],color:[Pa],container:[_a],"drop-shadow":[_a],ease:["in","out","in-out"],font:[ja],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_a],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_a],shadow:[_a],spacing:["px",Ma],text:[_a],"text-shadow":[_a],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ia,qa,Ja,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Ja,qa]}],"container-named":[$a],columns:[{columns:[Ma,"auto",qa,Ja,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Oa,"auto",Ja,qa]}],basis:[{basis:[Ia,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ma,Ia,"auto","initial","none",qa]}],grow:[{grow:["",Ma,Ja,qa]}],shrink:[{shrink:["",Ma,Ja,qa]}],order:[{order:[Oa,"first","last","none",Ja,qa]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh","none",...A()]}],"font-size":[{text:["base",n,Ya,Ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ns,Ha]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Na,qa]}],"font-family":[{font:[Xa,Wa,t]}],"font-features":[{"font-features":[qa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ja,qa]}],"line-clamp":[{"line-clamp":[Ma,"none",Ja,Ua]}],leading:[{leading:["none",o,...w()]}],"list-image":[{"list-image":["none",Ja,qa]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ja,qa]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Ma,"from-font","auto",Ja,Ba]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Ma,"auto",Ja,qa]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[Oa,Ja,qa]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ja,qa]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ja,qa]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oa,Ja,qa],radial:["",Ja,qa],conic:["",Oa,Ja,qa]},es,Ga]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Ma,Ja,qa]}],"outline-w":[{outline:["",Ma,Ya,Ba]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","inner","none",u,ts,Ka]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,ts,Ka]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Ma,Ba]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,ts,Ka]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Ma,Ja,qa]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ma]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Ja,qa]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Ma]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ja,qa]}],filter:[{filter:["","none",Ja,qa]}],blur:[{blur:R()}],brightness:[{brightness:[Ma,Ja,qa]}],contrast:[{contrast:[Ma,Ja,qa]}],"drop-shadow":[{"drop-shadow":["","none",h,ts,Ka]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Ma,Ja,qa]}],"hue-rotate":[{"hue-rotate":[Ma,Ja,qa]}],invert:[{invert:["",Ma,Ja,qa]}],saturate:[{saturate:[Ma,Ja,qa]}],sepia:[{sepia:["",Ma,Ja,qa]}],"backdrop-filter":[{"backdrop-filter":["","none",Ja,qa]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Ma,Ja,qa]}],"backdrop-contrast":[{"backdrop-contrast":[Ma,Ja,qa]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ma,Ja,qa]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ma,Ja,qa]}],"backdrop-invert":[{"backdrop-invert":["",Ma,Ja,qa]}],"backdrop-opacity":[{"backdrop-opacity":[Ma,Ja,qa]}],"backdrop-saturate":[{"backdrop-saturate":[Ma,Ja,qa]}],"backdrop-sepia":[{"backdrop-sepia":["",Ma,Ja,qa]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ja,qa]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ma,"initial",Ja,qa]}],ease:[{ease:["linear","initial",y,Ja,qa]}],delay:[{delay:[Ma,Ja,qa]}],animate:[{animate:["none",b,Ja,qa]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ja,qa]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Ja,qa,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],zoom:[{zoom:[Oa,Ja,qa]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ja,qa]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ja,qa]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Ma,Ya,Ba,Ua]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fs=function(e,{componentKey:t,className:n,variants:r}){let{theme:i}=h(Vo);e=Go(e);let o=Go(n),a=f((t,n={},r="")=>(n={...n,className:r},"string"==typeof e?sr(i.components[e],t,void 0)?.(n)??r:e.map(e=>sr(i.components[e],t,void 0)?.(n)).filter(Boolean).join(" ")||r),[i.components,e]);return t=k(()=>void 0!==t?t:e&&"string"==typeof e?Object.keys(i.components[e]):Array.isArray(e)&&e.length>0?e.map(e=>Object.keys(i.components[e])).flat():void 0,[e,i.components]),k(()=>{if(t&&"string"==typeof t)return hs(a(t,r,o&&"object"==typeof o?sr(o,t,""):o));if(t&&Array.isArray(t)){let e={};return t.forEach((t,n)=>{let i;"object"==typeof o?i=sr(o,t):"string"==typeof o&&0===n&&(i=o);let s=hs(a(t,r,i));t.split(".").length>1?lr(e,t.split(".").slice(1).join("."),s):lr(e,t,s)}),e}return""},[t,o,a,r])},ms=({ref:e,className:t,children:n,testId:r,direction:i,wrap:o,items:a,gap:s,justify:l,grow:c,basis:u,alignItems:d,shrink:p,...h})=>(t=fs("Flex",{className:t,componentKey:"root",variants:{direction:i,wrap:o,items:a,gap:s,justify:l,grow:c,basis:u,shrink:p,alignItems:d}}),/* @__PURE__ */I("div",{...h,"data-testid":r,className:t,ref:e,children:n})),gs=(e,t,n="primary")=>e?"disabled":t&&"primary"===n?"primaryActive":t&&"secondary"===n?"secondaryActive":t&&"tertiary"===n?"tertiaryActive":n,ys=({className:e,children:t,icon:r,active:i=!1,disabled:o=!1,testId:a,intent:l,size:c,cursor:d,title:p,...h})=>{let f=fs("Icon",{className:e,componentKey:"root",variants:{intent:gs(o,i,l),size:c,cursor:o?"disabled":d}}),{iconChildren:m}=k(()=>{let e={iconChildren:void 0};return n.forEach(t,t=>{u(t)&&(e.iconChildren=s(t,{...h,className:U({"h-[1em] w-[1em]":"custom"!==c},f,t.props.className),title:p}))}),e},[t,f,h,c,p]);return m||/* @__PURE__ */I("i",{...h,title:p,"data-testid":a,className:U(r,f)})},bs=({ref:e,children:t,testId:r,className:i="",iconPlacement:o="none",loading:a=!1,disabled:l=!1,type:c="button",size:d,intent:p,border:h,justify:f,items:m,aspect:g,...y})=>{let b=fs("Button",{className:i,componentKey:["root","icon"],variants:{intent:p,size:d,border:h,justify:f,items:m,disabled:l,aspect:g}}),{iconChildren:v,contentChildren:w}=k(()=>{let e={iconChildren:void 0,contentChildren:void 0};return n.forEach(t,t=>{if("string"!=typeof t){if(u(t))if(t.type===ys){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,testId:r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else if("i"===t.type){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,"data-testid":r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else e.contentChildren=t}else e.contentChildren=t}),e},[t,b.icon,d,r]);/* @__PURE__ */
|
|
21
21
|
return M("button",{ref:e,type:c,"data-testid":r,className:b.root,disabled:l,...y,children:[!a&&w&&/* @__PURE__ */M(A,{children:[("before"===o||"both"===o)&&w&&v,w,("after"===o||"both"===o)&&w&&v]}),!a&&!w&&v,a&&/* @__PURE__ */I("i",{className:"fa-solid fa-sync fa-spin text-base"})]})};bs.Icon=ys;var vs={root:kr("flex outline-none select-none border transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{primary:["border-transparent bg-primary-500 text-white","hover:bg-primary-600","focus-visible:ring-primary-500","dark:bg-primary-400 dark:hover:bg-primary-500 dark:focus-visible:ring-primary-300"],secondary:["border-gray-300 text-zinc-700 hover:border-gray-400 hover:bg-gray-50 hover:text-zinc-900","focus-visible:ring-gray-400","dark:border-zinc-700 dark:text-zinc-300 dark:hover:border-zinc-400 dark:hover:bg-zinc-700/50 dark:hover:text-white dark:focus-visible:ring-zinc-500"],danger:["border-transparent bg-red-500 text-white hover:bg-red-600","focus-visible:ring-red-500","dark:bg-red-600 dark:hover:bg-red-700"],custom:""},disabled:{true:["disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none"],false:"cursor-pointer"},aspect:{square:"aspect-square",custom:""},size:{md:"py-2 px-4 gap-2 text-sm rounded-lg",sm:"py-1.5 px-3 gap-1.5 text-sm rounded-md",xs:"py-1 px-2 gap-1 text-xs rounded-sm min-w-6",custom:""},border:{solid:"border-solid",none:"border-none",custom:""},items:{start:"",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},justify:{normal:"justify-normal",start:"",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"}},compoundVariants:[],defaultVariants:{items:"center",justify:"center",intent:"primary",border:"solid",size:"md",disabled:!1,aspect:"custom"}}),icon:kr("shrink-0",{variants:{intent:{default:""},size:{md:"text-sm",sm:"text-xs",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"default",size:"md"}})},ws=bs,ks=e=>({labelId:`${e}-label`,errorId:`${e}-error`}),xs=({className:e,id:t,message:n,disabled:r=!1,error:i=!1,intent:o,size:a})=>(e=fs("ErrorMessage",{className:e,componentKey:"root",variants:{intent:o,size:a,error:i,disabled:r}}),/* @__PURE__ */I("p",{id:t,className:e,children:n})),Ss=({className:e,children:t,disabled:n=!1,error:r=!1,intent:i,size:o,...a})=>(e=fs("Label",{className:e,componentKey:"root",variants:{intent:i,size:o,error:r,disabled:n}}),/* @__PURE__ */I("label",{className:e,...a,children:t})),Ts=({ref:e,className:t,id:r,labelledByControl:i=!1,label:o,error:a,disabled:l,intent:c,size:d,prefix:p,children:h,loading:m,clearable:g,inline:y,value:b,onClear:v,...w})=>{let x=fs("Input",{className:t,componentKey:["root","label","inputContainer","iconFloatingContainer","icon","iconError","iconClear"],variants:{intent:c,size:d,disabled:l||m,error:!!a,inline:y}}),S=f(e=>v?.(e),[v]),{labelId:T,errorId:C}=r?ks(r):{labelId:void 0,errorId:void 0},E=i?void 0:r,{iconChildren:A,inputChildren:O}=k(()=>{let e={iconChildren:void 0,inputChildren:[]};return n.forEach(h,t=>{if(u(t))if(t.type===ys){let n=t.props;e.iconChildren=s(t,{className:U(x.icon,n.className),size:d,...n,intent:n.intent??"custom"})}else e.inputChildren.push(t)}),e},[h,x.icon,d]);/* @__PURE__ */
|
|
22
22
|
return M("div",{className:x.root,ref:e,...w,children:[o&&!y&&/* @__PURE__ */I(Ss,{error:!!a,disabled:l,intent:c,size:d,id:T,htmlFor:E,className:x.label,children:o}),
|
|
23
23
|
/* @__PURE__ */M("div",{className:x.inputContainer,children:[A,!!p&&p,!y&&O,y&&/* @__PURE__ */M(Ss,{error:!!a,disabled:l,intent:c,size:d,id:T,htmlFor:E,className:x.label,children:[O,o]}),!l&&(!!a||m||g&&!!b)&&/* @__PURE__ */M("div",{className:x.iconFloatingContainer,children:[a&&!m&&/* @__PURE__ */I(ys,{intent:"custom",icon:"fa-solid fa-circle-exclamation",className:x.iconError}),m&&/* @__PURE__ */I(ys,{icon:"fa-solid fa-sync fa-spin",className:x.iconLoading}),!m&&g&&!!b&&/* @__PURE__ */I(ys,{className:x.iconClear,icon:"fa-solid fa-xmark",onClick:S})]})]}),a&&/* @__PURE__ */I(xs,{id:C,message:"boolean"==typeof a?"":a,intent:c,size:d,error:!!a})]})},Cs=(e,t,n=!1)=>{let r=x(n),i=x(t);g(()=>{if(r.current){let n=i.current;return i.current=t,e(n)}r.current=!0,i.current=t},t)},Es=Object.assign(p(({ref:e,children:t,className:n="",id:r,label:i="",placeholder:o="",loading:a=!1,disabled:s=!1,clearable:l=!1,inline:c=!1,prefix:u="",type:d="text",size:p,intent:h="primary",value:m="",error:g=!1,containerProps:y,onChange:v,...w})=>{let k=fs("Input",{className:n&&"object"==typeof n?n.input:"",componentKey:"input",variants:{intent:h,size:p,disabled:s||a,error:!!g,inline:c}}),x=(({id:e,error:t})=>{let n=b(),r=e??n,{labelId:i,errorId:o}=ks(r),a=(e=>"string"==typeof e&&""!==e)(t)?o:void 0;return{id:r,labelId:i,describedBy:a,controlProps:{id:r,"aria-describedby":a,"aria-invalid":!!t||void 0}}})({id:r,error:g}),S=f(e=>v?.(e.target.value),[v]),T=f(()=>v?.(""),[v]);/* @__PURE__ */
|
|
24
|
-
return M(Ts,{className:n,id:x.id,label:i,loading:a,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:h,size:p,onClear:T,...y,children:[t,/* @__PURE__ */I("input",{ref:e,...x.controlProps,type:d,placeholder:o,className:k,disabled:s||a,value:m,onChange:S,...w})]})}),{Icon:ys}),As={root:kr("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:kr("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded-md",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:kr("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:kr("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:kr("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:kr("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:kr("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:kr("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:kr("text-zinc-400 dark:text-zinc-500")},Is=Es,Ms=Symbol.for("immer-nothing"),Os=Symbol.for("immer-draftable"),Ns=Symbol.for("immer-state");function _s(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ps=Object,Ls=Ps.getPrototypeOf,Ds="constructor",zs="prototype",Rs="configurable",js="enumerable",$s="writable",Fs="value",qs=e=>!!e&&!!e[Ns];function Bs(e){return!!e&&(Ws(e)||Xs(e)||!!e[Os]||!!e[Ds]?.[Os]||Qs(e)||Zs(e))}var Us=Ps[zs][Ds].toString(),Hs=/* @__PURE__ */new WeakMap;function Ws(e){if(!e||!el(e))return!1;const t=Ls(e);if(null===t||t===Ps[zs])return!0;const n=Ps.hasOwnProperty.call(t,Ds)&&t[Ds];if(n===Object)return!0;if(!tl(n))return!1;let r=Hs.get(n);return void 0===r&&(r=Function.toString.call(n),Hs.set(n,r)),r===Us}function Vs(e,t,n=!0){0===Gs(e)?(n?Reflect.ownKeys(e):Ps.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Gs(e){const t=e[Ns];return t?t.type_:Xs(e)?1:Qs(e)?2:Zs(e)?3:0}var Ks=(e,t,n=Gs(e))=>2===n?e.has(t):Ps[zs].hasOwnProperty.call(e,t),Js=(e,t,n=Gs(e))=>2===n?e.get(t):e[t],Ys=(e,t,n,r=Gs(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},Xs=Array.isArray,Qs=e=>e instanceof Map,Zs=e=>e instanceof Set,el=e=>"object"==typeof e,tl=e=>"function"==typeof e,nl=e=>"boolean"==typeof e,rl=e=>e.copy_||e.base_,il=e=>e.modified_?e.copy_:e.base_;function ol(e,t){if(Qs(e))return new Map(e);if(Zs(e))return new Set(e);if(Xs(e))return Array[zs].slice.call(e);const n=Ws(e);if(!0===t||"class_only"===t&&!n){const t=Ps.getOwnPropertyDescriptors(e);delete t[Ns];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[$s]&&(o[$s]=!0,o[Rs]=!0),(o.get||o.set)&&(t[i]={[Rs]:!0,[$s]:!0,[js]:o[js],[Fs]:e[i]})}return Ps.create(Ls(e),t)}{const t=Ls(e);if(null!==t&&n)return{...e};const r=Ps.create(t);return Ps.assign(r,e)}}function al(e,t=!1){return ll(e)||qs(e)||!Bs(e)||(Gs(e)>1&&Ps.defineProperties(e,{set:sl,add:sl,clear:sl,delete:sl}),Ps.freeze(e),t&&Vs(e,(e,t)=>{al(t,!0)},!1)),e}var sl={[Fs]:function(){_s(2)}};function ll(e){return null===e||!el(e)||Ps.isFrozen(e)}var cl="MapSet",ul="Patches",dl="ArrayMethods",pl={};function hl(e){const t=pl[e];return t||_s(0),t}var fl,ml=e=>!!pl[e],gl=()=>fl;function yl(e,t){t&&(e.patchPlugin_=hl(ul),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bl(e){vl(e),e.drafts_.forEach(kl),e.drafts_=null}function vl(e){e===fl&&(fl=e.parent_)}var wl=e=>fl={drafts_:[],parent_:fl,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:ml(cl)?hl(cl):void 0,arrayMethodsPlugin_:ml(dl)?hl(dl):void 0};function kl(e){const t=e[Ns];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function xl(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[Ns].modified_&&(bl(t),_s(4)),Bs(e)&&(e=Sl(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Ns].base_,e,t)}else e=Sl(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&al(t,n)}(t,e,!0),bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ms?e:void 0}function Sl(e,t){if(ll(t))return t;const n=t[Ns];if(!n)return Ml(t,e.handledSet_,e);if(!Cl(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Il(n,e)}return n.copy_}function Tl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Cl=(e,t)=>e.scope_===t,El=[];function Al(e,t,n,r){const i=rl(e),o=e.type_;if(void 0!==r&&Js(i,r,o)===t)return void Ys(i,r,n,o);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;Vs(i,(e,n)=>{if(qs(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??El;for(const s of a)Ys(i,s,n,o)}function Il(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Tl(e)}}function Ml(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||qs(e)||t.has(e)||!Bs(e)||ll(e)||(t.add(e),Vs(e,(r,i)=>{if(qs(i)){const t=i[Ns];Cl(t,n)&&(Ys(e,r,il(t),e.type_),Tl(t))}else Bs(i)&&Ml(i,t,n)})),e}var Ol={get(e,t){if(t===Ns)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=rl(e);if(!Ks(i,t,e.type_))return function(e,t,n){const r=Pl(t,n);return r?Fs in r?r[Fs]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!Bs(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===_l(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Bs(n)||n[Ns])&&e.baseRefs_.has(n)}(e,t,o)){Dl(e);const n=1===e.type_?+t:t,r=zl(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in rl(e),ownKeys:e=>Reflect.ownKeys(rl(e)),set(e,t,n){const r=Pl(rl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=_l(rl(e),t),i=r?.[Ns];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Ks(e.base_,t,e.type_)))return!0;Dl(e),Ll(e)}return e.copy_[t]===n&&(void 0!==n||Ks(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(qs(n)){const i=n[Ns];Cl(i,r)&&i.callbacks_.push(function(){Dl(e),Al(e,n,il(i),t)})}else Bs(n)&&e.callbacks_.push(function(){const i=rl(e);3===e.type_?i.has(n)&&Ml(n,r.handledSet_,r):Js(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&Ml(Js(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Dl(e),void 0!==_l(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Ll(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=rl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[$s]:!0,[Rs]:1!==e.type_||"length"!==t,[js]:r[js],[Fs]:n[t]}:r},defineProperty(){_s(11)},getPrototypeOf:e=>Ls(e.base_),setPrototypeOf(){_s(12)}},Nl={};for(let AN in Ol){let e=Ol[AN];Nl[AN]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function _l(e,t){const n=e[Ns];return(n?rl(n):e)[t]}function Pl(e,t){if(!(t in e))return;let n=Ls(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ls(n)}}function Ll(e){e.modified_||(e.modified_=!0,e.parent_&&Ll(e.parent_))}function Dl(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=ol(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function zl(e,t,n,r){const[i,o]=Qs(t)?hl(cl).proxyMap_(t,n):Zs(t)?hl(cl).proxySet_(t,n):function(e,t){const n=Xs(e),r={type_:n?1:0,scope_:t?t.scope_:gl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Ol;n&&(i=[r],o=Nl);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??gl()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Cl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=il(i);Al(e,i.draft_??i,o,n),Il(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function Rl(e){if(!Bs(e)||ll(e))return e;const t=e[Ns];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ol(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ol(e,!0);return Vs(n,(e,t)=>{Ys(n,e,Rl(t))},r),t&&(t.finalized_=!1),n}Nl.deleteProperty=function(e,t){return Nl.set.call(this,e,t,void 0)},Nl.set=function(e,t,n){return Ol.set.call(this,e[0],t,n,e[0])},globalThis.Iterator;var jl=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(tl(e)&&!tl(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(tl(t)||_s(6),void 0===n||tl(n)||_s(7),Bs(e)){const i=wl(this),o=zl(0,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?bl(i):vl(i)}return yl(i,n),xl(r,i)}if(!e||!el(e)){if(r=t(e),void 0===r&&(r=e),r===Ms&&(r=void 0),this.autoFreeze_&&al(r,!0),n){const t=[],i=[];hl(ul).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}_s(1)},this.produceWithPatches=(e,t)=>{if(tl(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},nl(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),nl(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),nl(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Bs(e)||_s(8),qs(e)&&(qs(t=e)||_s(10),e=Rl(t));const n=wl(this),r=zl(0,e,void 0);return r[Ns].isManual_=!0,vl(n),r}finishDraft(e,t){const n=e&&e[Ns];n&&n.isManual_||_s(9);const{scope_:r}=n;return yl(r,t),xl(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=hl(ul).applyPatches_;return qs(e)?r(e,t):this.produce(e,e=>r(e,t))}},$l=jl.produce,Fl=(e,t)=>`${e}_${t}`,ql=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=Ot(),o=i(),a=k(()=>`${e}_${((e,t=!0,n=!0)=>{let r="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),n&&(i=`${i}0123456789`);let o=i.length;for(let a=0;a<e;a++)r+=i.charAt(Math.floor(Math.random()*o));return r})(8)}`,[e]);g(()=>{if(t)return o(`sources.${a}`,{id:a,meta:{id:e,source:t,name:n,fields:r}}),()=>o(`sources.${a}`,void 0,{unmount:!0})},[a,t]),g(()=>{t&&o(`sources.${a}.meta.fields`,r,{raw:!0})},[r,t,a,o])},Bl=e=>{let t=x(e);return t.current!==e&&!ai(t.current,e)&&(t.current=e),t.current},Ul=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:o}=n;if(!Array.isArray(o)||0===o.length)return{...e,[r]:i};let a=o.find(e=>Po(e.when,t));return{...e,[r]:a?a.value:i}},{}):{},Hl=()=>{let{environment:e}=X(),[[t,n,r,i]]=_t(["schema.variables","navigation.routeParams","navigation.queryParams","navigation.hostname"]);return Bl(k(()=>Ul(t,{routeParams:n,queryParams:r,hostname:i,environment:e}),[e,i,r,n,t]))},Wl=W("DevToolsContext",{logs:[],providers:{}}),Vl=(e,t=2)=>String(e).padStart(t,"0"),Gl=()=>typeof window<"u",Kl=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;#n=/* @__PURE__ */new Set;#r=[];recentLimit=200;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}addListener(e,{replay:t=!1}={}){if(t)for(let n of this.#r)e(n);return this.#n.add(e),()=>{this.#n.delete(e)}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#i(e,t,n,r){if(!this.callbackInternal&&!Gl())return;let i=this.getTime(!0);if(Gl()){let o={logType:e,category:t,message:n,params:r,time:i};this.#r.push(o),this.#r.length>this.recentLimit&&this.#r.shift();for(let e of this.#n)e(o)}if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#o()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#o(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?(e=>`${Vl(e.getHours())}:${Vl(e.getMinutes())}:${Vl(e.getSeconds())}.${Vl(e.getMilliseconds(),3)}`)(t):t}info(e,t,n){this.#i("info",e,t,n)}warning(e,t,n){this.#i("warning",e,t,n)}danger(e,t,n){this.#i("danger",e,t,n)}success(e,t,n){this.#i("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Jl(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Kl.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Yl="[A-Za-z_][A-Za-z0-9_]*",Xl=RegExp(`^${Yl}$`),Ql=(/* @__PURE__ */RegExp(`^!?${Yl}$`),new Set(["__proto__","constructor","prototype"])),Zl=e=>Xl.test(e)&&!Ql.has(e),ec=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},tc=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},nc=(e,t)=>{let n=ec(e),r=(e=>Object.entries(e).filter(([e])=>Zl(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},rc=["server","sdk","qa"],ic=(e,t)=>{let n=((e,t)=>Array.isArray(e.rules)?e.rules.findIndex(e=>(e=>"object"==typeof e&&!!e&&"rules"in e&&Array.isArray(e.rules)&&e.rules.some(e=>!("object"!=typeof e||!e||"enabled"in e&&!1===e.enabled)))(e.when)&&((e,t)=>!!Po(e,t))(e.when,t)):-1)(e,t);return-1===n?{value:e.value,layer:"space"}:{value:e.rules[n].value,layer:"space",rule:n}},oc=(e,t={},n={})=>Object.fromEntries(Object.entries(e??{}).map(([e,r])=>[e,rc.reduce((t,r)=>{let i=n[r]?.[e];return"boolean"==typeof i?{value:i,layer:r}:t},ic(r,t))])),ac=e=>Object.fromEntries(Object.entries(e).map(([e,{value:t}])=>[e,t])),sc=(e,t)=>!e||(t[e.name]??!1)===e.is,lc="data-plitzi-fonts",cc=W("PlitziServiceContext",{}),uc=()=>{let e=h(cc);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},dc=e=>{let{children:t,value:n}=e;/* @__PURE__ */
|
|
25
|
-
return I(cc,{value:n,children:t})},pc={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},hc=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",MASK_SIZE:"mask-size",MASK_POSITION:"mask-position",MASK_REPEAT:"mask-repeat",MASK_COMPOSITE:"mask-composite",WEBKIT_MASK_IMAGE:"-webkit-mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",TRANSITION_BEHAVIOR:"transition-behavior",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",ANIMATION_TIMELINE:"animation-timeline",ANIMATION_RANGE:"animation-range",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",TRANSLATE:"translate",ROTATE:"rotate",SCALE:"scale",TRANSFORM_STYLE:"transform-style",PERSPECTIVE:"perspective",PERSPECTIVE_ORIGIN:"perspective-origin",BACKFACE_VISIBILITY:"backface-visibility",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",SCROLL_SNAP_TYPE:"scroll-snap-type",SCROLL_SNAP_ALIGN:"scroll-snap-align",SCROLL_SNAP_STOP:"scroll-snap-stop",SCROLL_PADDING_TOP:"scroll-padding-top",SCROLL_MARGIN_TOP:"scroll-margin-top",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",CONTENT:"content",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",SCROLLBAR_WIDTH:"scrollbar-width",SCROLLBAR_COLOR:"scrollbar-color",CONTAINER_TYPE:"container-type",CONTAINER_NAME:"container-name",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",FONT_VARIANT_NUMERIC:"font-variant-numeric",FONT_FEATURE_SETTINGS:"font-feature-settings",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",WEBKIT_TEXT_FILL_COLOR:"-webkit-text-fill-color",WEBKIT_BACKGROUND_CLIP:"-webkit-background-clip",BOX_DECORATION_BREAK:"box-decoration-break",WEBKIT_BOX_DECORATION_BREAK:"-webkit-box-decoration-break",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),{desktop:1024,tablet:768,mobile:0}),fc=e=>0===hc[e]?"0":`${String(hc[e]/16)}rem`,mc=e=>e<=hc.tablet?"mobile":e<=hc.desktop?"tablet":"desktop",gc="plitzi-sdk-runtime",yc=e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{}),bc="https://fonts.googleapis.com",vc={woff2:"font/woff2",woff:"font/woff"},wc=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},kc=e=>{try{return new URL(e).origin}catch{return}},xc={"<":"\\3c ",">":"\\3e "},Sc=e=>`"${e.replace(/[\\"<>]/g,e=>xc[e]??`\\${e}`)}"`,Tc=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,Cc=e=>encodeURIComponent(e).replace(/%20/g,"+"),Ec=(e,t)=>["@font-face{",`font-family:${Sc(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${Sc(t.url)}) format(${Sc(t.format)});`,t.unicodeRange&&Tc.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),Ac="/*plitzi:style-cache*/",Ic="/*plitzi:style-cache-end*/",Mc="plitzi-component--hidden",Oc=(e,t)=>{let n=(e=>e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+|-+$/g,"")||"section")(e),r=n;for(let i=2;t.has(r);i+=1)r=`${n}-${String(i)}`;return t.add(r),r},Nc="props",_c={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[],components:{}},Pc=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},Lc=(e,t,n)=>{let r=[],i=/* @__PURE__ */new Set,o=t,a=n;for(;o&&!i.has(o)&&r.length<16;){let t=e(o);if("layoutContainer"!==t?.definition.type)break;i.add(o),r.push({layout:o,slot:a||o}),o=Pc(t,"layout"),a=Pc(t,"layoutContainer")}return r},Dc=(e,t,n,r)=>{if(void 0===t)return[];let i=n?new Set(n):void 0,o=[],a=/* @__PURE__ */new Set,s=e.flat[t],l=e=>"string"==typeof e?e:"",c=[t,...s?Lc(t=>e.flat[t],l(s.attributes.layout),l(s.attributes.layoutContainer)).map(e=>e.layout):[]];for(;c.length>0;){let t=c.pop();if(void 0===t||a.has(t))continue;a.add(t);let n=e.flat[t];if(!n||r&&!sc(n.definition.flag,r))continue;"server"===n.definition.runtime&&(!i||i.has(n.id))&&o.push(n);let{items:s}=n.definition;s&&c.push(...s)}return o},zc=W("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"}),Rc=W("NetworkInternalContext",{}),jc=e=>({...e.enter?{enter:e.enter}:{},...e.on?{on:e.on}:{},..."number"==typeof e.duration?{duration:e.duration}:{},..."number"==typeof e.delay?{delay:e.delay}:{},..."number"==typeof e.stagger?{stagger:e.stagger}:{},...e.loop?{loop:e.loop}:{}}),$c=({definition:e,...t})=>{let{parentId:n,items:r,bindings:i,interactions:o,initialState:a,runtime:s,loadStrategy:l,flag:c,anchor:u,motion:d,quiet:p,...h}=e;return{...t,definition:{...h,...null==n?{}:{parentId:n},...null==r?{}:{items:r},...null==i?{}:{bindings:i},...null==o?{}:{interactions:o},...null==a?{}:{initialState:a},...null==s?{}:{runtime:s},...null==l?{}:{loadStrategy:l},...null==c?{}:{flag:c},...null==u?{}:{anchor:u},...null==d?{}:{motion:jc(d)},...null==p?{}:{quiet:p}}}},Fc=e=>({...e,flat:Object.fromEntries(e.flat.map(e=>[e.id,$c(e)]))}),qc={},Bc={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n variables\n cache\n }\n # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it\n # would have been handed in an SSR bootstrap travels here instead.\n render {\n overQuota\n }\n }\n }\n"},Uc="theme",Hc=["dark","light"],Wc=[...Hc,"system"],Vc=(e="theme")=>We({mode:"system",scheme:"light",areas:{}},{id:e}),Gc=Vc(),Kc=(e,t)=>"system"===e?t:e,Jc=(e,t=Gc)=>{t.batch(()=>{t.setState("mode",e),t.setState("areas",{})})},Yc=(e,t=Gc)=>{t.setState("scheme",e)},Xc=W("ThemeScopeContext",void 0),Qc="(prefers-color-scheme: dark)",Zc=({state:e})=>(Pt(["theme.mode","theme.resolved","theme.areas"],[e.mode,Kc(e.mode,e.scheme),e.areas]),null),eu=({defaultTheme:e="system",theme:t,scope:n="document",cookieName:r=Uc,children:i})=>{let o="container"===n,a=b(),[s]=S(()=>o?Vc(`theme${a}`):void 0),l=s??Gc,c=x({mode:e,remembered:!1});wt(()=>{let n=o?void 0:((e=Uc)=>{try{return((e,t=Uc)=>{let n=ci(e,t);return(e=>Wc.includes(e))(n)?n:void 0})(document.cookie,e)}catch{return}})(r),i=t??n??e;c.current={mode:i,remembered:void 0!==n},l.batch(()=>{Yc(window.matchMedia(Qc).matches?"dark":"light",l),Jc(i,l)})},[e,t,r,o,l]);let u=T(l.subscribe,l.getState,l.getState),d=void 0!==h(mt);g(()=>{let e=window.matchMedia(Qc),t=()=>Yc(e.matches?"dark":"light",l);return e.addEventListener("change",t),t(),()=>e.removeEventListener("change",t)},[l]),g(()=>{if(o)return;let e=()=>{let{mode:e}=l.getState();(c.current.remembered||e!==c.current.mode)&&(((e,t=Uc)=>{try{document.cookie=`${t}=${encodeURIComponent(e)};path=/;max-age=31536000;SameSite=Lax`}catch{}})(e,r),c.current.remembered=!0),((e,t)=>{for(let n of Hc)t.classList.toggle(n,e===n)})(e,document.documentElement)};return e(),l.subscribe(e)},[r,o,l]);let p=d?/* @__PURE__ */I(Zc,{state:u}):null;return o?/* @__PURE__ */M(Xc,{value:s,children:[p,i]}):/* @__PURE__ */M(A,{children:[p,i]})},tu="canvas",nu=e=>{let t=h(Xc)??Gc,n=T(t.subscribe,t.getState,t.getState),r=((e,t)=>(t?e.areas[t]:void 0)??e.mode)(n,e),i=Kc(r,n.scheme),o=f(n=>e?((e,t,n=Gc)=>{n.setState(`areas.${e}`,t)})(e,n,t):Jc(n,t),[e,t]),a=f(()=>o("dark"===i?"light":"dark"),[i,o]);return k(()=>({theme:r,resolvedTheme:i,setTheme:o,toggleTheme:a}),[r,i,o,a])},ru=e=>/^https?:\/\//i.test(e),iu=e=>e.replaceAll(/\/+/g,"/"),ou=e=>iu(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi,":$1")),au=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${au(e,r)}/${n}`:n};function su(e,t,n,r=!1){let i=n.replace(/^\/+/,""),{slug:o="",folder:a,default:s}=e[i]?.attributes??{slug:i,folder:"",default:!1};if(s&&!r)return{"/":n,[`/${n}`]:n};if(s&&r)return"/";if(!a&&!r)return{[ou(`/${o}`)]:n,[ou(`/${n}`)]:n};if(!a&&r)return iu(`/${o}`);if(!t.find(e=>e.id===a))return r?iu(`/${o}`):{[ou(`/${o}`)]:n,[ou(`/${n}`)]:n};let l=[au(t.reduce((e,t)=>({...e,[t.id]:t}),{}),a),o].filter(Boolean).join("/");return r?iu(`/${l}`):{[ou(`/${l}`)]:n,[ou(`/${n}`)]:n}}var lu=(e,t,n)=>{let r=n.indexOf("#");if(r>0)return`${lu(e,t,n.slice(0,r))}${n.slice(r)}`;let i=e[n];if(!i)return n;let{slug:o,default:a}=i.attributes;return"string"==typeof o?su(e,t,n,!0):a?"/":`/${n}`},cu=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),uu=(e={},t=[],n,r="",i=!0,o=!0)=>{let a=Object.keys(e).reduce((o,a)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[a],u=e[a].attributes.unauthorizedPageRedirect;if(!l&&i)return o;u&&=(e=>ru(e)||e.includes("{{"))(u)?u:su(e,t,u,!0);let d=su(e,t,a),p=Object.keys(d).map(e=>({pageId:a,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${a}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:cu(s,n,i)}));return[...o,...p]},[]).filter(e=>"*"!==e.path||e.hasAccess).sort((e,t)=>e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1);if(!a.find(e=>"*"===e.path)&&!o){let e=a.find(e=>"/"===e.path&&e.hasAccess);e&&"redirect"===e.unauthorizedBehaviour&&e.unauthorizedPageRedirect&&a.push({...e,path:"*",hasAccess:!1,isRaw:!0,unauthorizedBehaviour:"redirect",unauthorizedPageRedirect:"/"})}return a},du=(e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=((e,t)=>{let n="string"==typeof e?{path:e,caseSensitive:!1,end:!0}:{path:e.path,caseSensitive:e.caseSensitive??!1,end:e.end??!0},[r,i]=((e,t,n)=>{let r=[],i=`^${e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,o)=>{if(r.push({paramName:t,isOptional:void 0!==n}),void 0===n)return"/([^\\/]+)";let a=o.charAt(i+e.length);return a&&"/"!==a?"/([^\\/]*)":"(?:/([^\\/]*))?"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2")}`;return e.endsWith("*")?(r.push({paramName:"*",isOptional:!1}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]})(n.path,n.caseSensitive,n.end),o=t.match(r);if(!o)return null;let a=o[0],s=o.slice(1),l=a.replace(/(.)\/+$/,"$1");return{params:i.reduce((e,{paramName:t,isOptional:n},r)=>{let i=s[r];if("*"===t){let e=i??"";l=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return n&&!i?(e[t]=void 0,e):(e[t]=(i??"").replace(/%2F/g,"/"),e)},{}),pathname:a,pathnameBase:l,pattern:n}})({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e);if(i||=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),!i&&e.find(e=>"/"===e.path&&e.hasAccess))return{action:{type:"redirect",path:"/"},pathMatch:void 0};if(!i)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:o,matchResult:a,path:{hasAccess:s,unauthorizedBehaviour:l,unauthorizedPageRedirect:c}}=i;return!s&&"redirect"===l&&c?{action:{type:"redirect",path:c},pathMatch:void 0}:s?{action:{type:"normal",path:void 0},pathMatch:a,pageId:o}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}},pu=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],hu=e=>`rsc.data.${e}`,fu=()=>typeof window>"u"?"":`${window.location.pathname}${window.location.search}`,mu="*",gu=/* @__PURE__ */new Map,yu=/* @__PURE__ */new WeakMap,bu=()=>({seq:0,inFlight:/* @__PURE__ */new Set,asked:/* @__PURE__ */new Map}),vu=e=>{let t=e.get("rsc.instance");if("string"==typeof t&&t){let e=gu.get(t);if(e)return e;let n=bu();return gu.set(t,n),n}let n=yu.get(e);if(n)return n;let r=bu();return yu.set(e,r),r},wu=(e,t)=>{let n={};t.inFlight.forEach(e=>{e.here&&(e.ids??[mu]).forEach(e=>{n[e]=!0})}),e.set("rsc.refreshing",n)},ku=async(e,t,n,{location:r,fresh:i=!1}={})=>{let{enabled:o,endpoint:a}=e.get("rsc")??{};if(!o||!a||typeof window>"u")return;let s=r??fu(),l=e.get("schema"),c=e.get("runtime.sources.auth"),u=r?((e,t,n)=>{if(!e)return;let r=e.pages.reduce((t,n)=>(n in e.flat&&(t[n]=e.flat[n]),t),{});return du(uu(r,e.pageFolders,n),t.split("?")[0],n).pageId})(l,r,!!c?.details):e.get("navigation.currentPageId"),d=r?void 0:e.get("runtime.sources.flags");if(!l)return;let p=t?.length?((e,t,n,r)=>{let i=new Set(Dc(e,t,[...n],r).map(({id:e})=>e));return n.filter(e=>i.has(e))})(l,u,t,d):void 0;if(p?!p.length:!((e,t,n)=>Dc(e,t,void 0,n).length>0)(l,u,d))return;let h=new URLSearchParams({location:s});p?.length&&h.set("ids",p.join(",")),Object.entries(n??{}).forEach(([e,t])=>h.set(e,t));let f=`${a}?${h.toString()}`,m=vu(e),g=[...m.inFlight].find(e=>e.url===f&&(e.fresh||!i));if(g)return g.promise;m.inFlight.forEach(e=>{((e,t)=>!e||!!t&&t.every(t=>e.includes(t)))(p,e.ids)&&e.controller.abort()});let y=++m.seq;p?.length?p.forEach(e=>m.asked.set(e,y)):(m.asked.clear(),m.asked.set(mu,y));let b=new AbortController,v={url:f,...p?.length?{ids:p}:{},here:s===fu(),fresh:i,seq:y,controller:b,promise:Promise.resolve()},w=async t=>{let n=await fetch(f,{...i?{cache:"no-cache",headers:{Accept:"application/json","Cache-Control":"no-cache"}}:{headers:{Accept:"application/json"}},signal:b.signal});if(!n.ok){let r=ti(n.status,await n.json().catch(()=>{}));return r&&await Zr({reason:r,url:a})&&!t?w(!0):void e.set("rsc.stale",!0)}let{serverData:r,actionRuns:o}=await n.json();o?.length&<(o),((e,t,n,r,i)=>{let{ids:o,seq:a}=n;e.batch(()=>{if(o?.length)Object.entries(r).forEach(([n,r])=>{(t.asked.get(n)??0)<=a&&(t.asked.get(mu)??0)<=a&&e.set(hu(n),r)});else{let n=e.get("rsc.data")??{},i=e=>e!==mu&&(t.asked.get(e)??0)>a,o=Object.fromEntries([...Object.entries(r).filter(([e])=>!i(e)),...Object.entries(n).filter(([e])=>i(e))]);e.set("rsc.data",o)}e.set("rsc.loaded",!0),e.set("rsc.stale",!1),e.set("rsc.location",i)})})(e,m,v,r??{},s)};return v.promise=w(!1).catch(()=>{b.signal.aborted||e.set("rsc.stale",!0)}).finally(()=>{m.inFlight.delete(v),wu(e,m)}),m.inFlight.add(v),wu(e,m),v.promise},xu=()=>{let e=Nt();return f((t,n,{fresh:r}={})=>ku(e,t,n,{fresh:r}),[e])},Su=e=>new Set(Array.isArray(e?.paintedState)?e.paintedState.filter(e=>"string"==typeof e&&""!==e):[]),Tu=(e,t)=>nr(e)?Object.fromEntries(Object.entries(e).filter(([e,n])=>t.has(e)&&void 0!==n)):{},Cu=e=>{try{document.cookie=`${e}=;path=/;max-age=0;SameSite=Lax`}catch{}},Eu=/* @__PURE__ */new Set(["init","initLoading","authenticating"]),Au=e=>{let t=e.runtime?.sources.auth;if(t){if(void 0===t.status)return{kind:"browser"};if(!Eu.has(t.status))return t.isAuthenticated&&void 0!==t.details?.id?{kind:"account",id:String(t.details.id)}:{kind:"guest"}}},Iu=e=>{switch(e.kind){case"account":return`user:${e.id}`;case"guest":return"guest";case"browser":return""}},Mu=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))),Ou=(e,t)=>nr(e)?Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))):{},Nu=e=>e.schema?.settings,_u=e=>new Set((e?.transientState??[]).filter(e=>"string"==typeof e&&""!==e)),Pu=(e,t)=>{let n,r=((e,t)=>{let n=t?.split(":")[1];return n?`plitzi_${e}_painted_${n}`:`plitzi_${e}_painted`})(t,typeof window>"u"?void 0:window.location.host),i=!1;return()=>{let t=e.getState();if(typeof document>"u"||t.render?.isHydrating&&!t.render.hydrated)return;let o=Nu(t),a=Su(o),s=Au(t);if(!o?.keepState||0===a.size||void 0===s)return;let l=Iu(s),c=t.runtime?.state;if(!i){i=!0;let t=(e=>((e,t)=>{let n=ci(e,t);if(void 0!==n)try{let e=JSON.parse(n);return nr(e)&&"string"==typeof e.owner&&nr(e.values)?{owner:e.owner,values:e.values}:void 0}catch{return}})(ui(),e))(r);if(t&&t.owner!==l&&(Cu(r),nr(c)&&[...a].some(e=>e in c)))return void e.setState("runtime.state",Mu(c,a));n=t?.owner===l?JSON.stringify(Tu(t.values,a)):void 0}let u=Tu(c,a),d=JSON.stringify(u);if(d!==n){if(n=d,0===Object.keys(u).length)return void Cu(r);"too-large"===((e,t)=>{let n=encodeURIComponent(JSON.stringify(t));if(n.length>3072)return Cu(e),"too-large";try{return document.cookie=`${e}=${n};path=/;max-age=31536000;SameSite=Lax`,"written"}catch{return"unavailable"}})(r,{owner:l,values:u})&&Kl.warning("store",`settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...a].join(", ")}. Declare only what the first paint shows.`,{storeName:"runtime",path:"runtime.state",prev:void 0,next:u})}}},Lu=e=>{let t=(e=>{let{key:t,storage:n,paths:r,partialize:i,partializePath:o,version:a=0,migrate:s,merge:l,mergePath:c,enabled:u}=e,d="function"==typeof n?n:void 0,p="function"==typeof n?void 0:ge(n);if(!d&&!p)return()=>{};let h=e=>{if(!d)return p;let t=d(e);return t?ge(t):void 0},f=e=>{if(r){let t={};for(let n of r){let r=ae(e,n);t[n]=o?o(n,r,e):r}return t}return i?i(e):e};return e=>{if(ee(u,e.getState()))return;let n=!1,i=()=>{if(n)return;let i=h(e.getState());i&&(n=!0,function(e,t,n,{version:r,paths:i,migrate:o,merge:a,mergePath:s}){let l=n?.getItem(t);if(l)try{let t=JSON.parse(l),n=t.version!==r;if(n&&!o)return;let c=n&&o?o(t.state,t.version):t.state;if(i){let t=c;return void e.batch(()=>{for(let n of i)if(n in t){let r=s?s(n,t[n],ae(e.getState(),n),e.getState()):t[n];e.setState(n,r)}})}let u=c;e.setState(void 0,a?a(u,e.getState()):u)}catch{n?.removeItem(t)}}(e,t,i,{version:a,paths:r,migrate:s,merge:l,mergePath:c}))};return{hydrate:i,onChange:n=>{i(),(e=>!r||r.some(t=>se(e,t)))(n.path)&&(e=>{let n=e.getState(),r=h(n);if(!r)return;let i={version:a,state:f(n)};r.setItem(t,JSON.stringify(i))})(e)}}}})({key:`plitzi_${e}_state`,paths:["runtime.state"],partializePath:(e,t,n)=>nr(t)?Mu(t,_u(Nu(n))):t,mergePath:(e,t,n,r)=>{let i=_u(Nu(r));return i.size>0&&nr(t)?{...Mu(t,i),...Ou(n,i)}:t},storage:e=>{let{render:t}=e;if(t?.isHydrating&&!t.hydrated)return!1;let n=Nu(e),r=Au(e);if(!n?.keepState||void 0===r)return!1;let i=(e=>{try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}})("sessionStorage"===n.stateStorage?"session":"local");return!!i&&((e,t)=>({getItem:n=>{let r=e.getItem(n);if(null===r)return null;try{let e=JSON.parse(r);if(e.owner===t&&"string"==typeof e.payload)return e.payload}catch{}return e.removeItem(n),null},setItem:(n,r)=>e.setItem(n,JSON.stringify({owner:t,payload:r})),removeItem:t=>e.removeItem(t)}))(i,Iu(r))}});return n=>{let r=t(n),i=n.getState().runtime?.state,o=Au(n.getState()),a=Pu(n,e);return{...r,onChange:e=>{let t=o,s=Au(n.getState());if(void 0!==s&&(o=s),"account"===t?.kind&&void 0!==s&&Iu(s)!==Iu(t)){let e=nr(i)?Mu(i,Su(Nu(n.getState()))):i;n.setState("runtime.state",e)}r?.onChange?.(e),a()}}}},Du=typeof window>"u",zu={},Ru=()=>()=>{},ju=()=>!0,$u=()=>!1,Fu=({id:e,definition:t,plitziElementLayout:n,children:r,previewMode:o,visible:a=!0})=>{let[[s,l]]=_t(["schema.flat","rsc.enabled"],{mode:"mount"}),[c=zu]=_t("runtime.sources.flags"),{components:d,componentDefinitions:p}=h(Fr),{contexts:{PluginsContext:m}}=uc(),{plugins:g}=h(m),{items:y}=t,b=p.current[t.type],v=t.loadStrategy??b?.definition.loadStrategy??"eager",w=n||r||y?.length,S=x(!1);a&&(S.current=!0);let C=!o||"eager"===v||a||"lazy"===v&&S.current,E=n?`${n.type}:${n.rootId}:${n.slots.join(",")}`:"",A=T(Ru,ju,$u),M=n?.slots.includes(e)??!1,O=(e=>{let t=h(Gr),n=f(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):Kr,[e,t]),r=f(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return T(n,r,r)})(M?e:void 0);return k(()=>{if(!w||!C)return;let e=(y??[]).filter(e=>{let t=s[e];if(!t||!sc(t.definition.flag,c))return!1;if(!o||!l)return!0;let n=t.definition.runtime??"shared";return!(!A&&"client"===n)}).map(e=>{let{rootId:t,type:r,runtime:i}=sr(s,`${e}.definition`,{}),a=sr(n,"rootId",t),c=r in d.current||!!Wr({type:r,plugins:g}),u=Vr({key:!o&&n?`${e}_${E}`:e,plitziElementLayout:n,type:r,internalProps:{id:e,rootId:a},components:d.current,plugins:g});return l&&"server"===i&&!Du&&o?/* @__PURE__ */I(Xr,{id:e,frozen:!(A&&c),children:u},e):u});return M&&e.push(/* @__PURE__ */I(i,{children:O},"#layout-body")),Array.isArray(r)?e.push(...r.filter(u)):u(r)&&e.push(/* @__PURE__ */I(i,{children:r},"#children")),y?1===e.length?e[0]:e:void 0},[w,C,y,c,n,r,s,o,l,A,E,d,g,e,M,O])},qu=/* @__PURE__ */new Map,Bu={settled:/* @__PURE__ */new Set([Nc])},Uu=(e,t,n={},r={})=>{let i,{attributes:o,definition:a}=e,{rootId:s,plitziElementLayout:l}=t;t.attributes&&(o={...o,...t.attributes});let c=o;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(a.bindings)){let t=((e,t,n={})=>{let{attributes:r,definition:i}=t,{bindings:o}=i;return!o||"object"==typeof o&&!Object.keys(o).length?{attributes:r,style:{},definition:i}:$l({attributes:r,style:n,definition:i},t=>{Object.keys(o).forEach(n=>{o[n]&&Array.isArray(o[n])&&o[n].length&&o[n].forEach(r=>{let{source:i,transformers:o,when:a,enabled:s=!0}=r,{to:l}=r;if(!l||a&&!Po(a,e,!1,!0)||!s)return;"style"===n&&(l=function(e){if(!e)return"";let t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/[_\s-]+/g," ").trim().split(/\s+/);return 0===t.length?"":t.map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}(l));let{fromValue:c,toValue:u}=((e,t,n,r,i)=>{let o="initialState"===r?`definition.${r}.${i}`:`${r}.${i}`;return{fromValue:t?sr(e,t):void 0,toValue:sr(n,o,t?sr(e,t):void 0)}})(e,i,t,n,l),d=c;o&&Array.isArray(o)&&o.length>0&&o.forEach(n=>{let{action:r,params:i,enabled:o=!0}=n;if(!o)return;let a=Ho[r];a&&(d=a.callback(d,((e,t)=>{if(!t)return t;let n=t;for(let[r,i]of Object.entries(e.params)){let e=t[r];"true"!==e&&"false"!==e||"checkbox"!==("function"==typeof i.type?i.type(t):i.type)||(n===t&&(n={...t}),n[r]="true"===e)}return n})(a,i)??{},t,{...e,sourceTo:u}))}),"initialState"===n&&"visibility"===l&&i&&void 0!==sr(e,i)&&(d=$o(d)),("boolean"==typeof d||"number"==typeof d||d)&&lr(t,"initialState"===n?`definition.${n}.${l}`:`${n}.${l}`,d)})})})})(n,{...e,attributes:o},i);({attributes:o,definition:a,style:i}=t)}else i={};let u=Object.keys(o).filter(e=>{let t=o[e];return"string"==typeof t&&t===c[e]&&Zn(t)});return u.length>0&&(o=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:o={},origin:a="",navigation:s,...l}=n,c={...o,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:a}},u={...e};for(let d of t)u[d]=Fn(e[d],c,Bu);return u})(o,u,n)),o={...o,...J(r,["visibility","styleSelectors"])},a={...a,styleSelectors:{...a.styleSelectors,...a.initialState?.styleSelectors,...r.styleSelectors??{}}},a.styleSelectors=(e=>{let t=e.initialState?.styleVariant;return Object.fromEntries(Object.entries(e.styleSelectors).map(([n,r])=>{let i="base"===n?`plitzi__${e.type}`:`plitzi__${e.type}-${n}`;if("string"!=typeof r)return[n,r];!(e=>{let t=qu.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),qu.set(e,t)),t})(e.type).test(r)&&t?.[e.type]?.[n]&&(r=r?`${e.type} ${r}`:e.type);let o=r.replace(/\S+/g,r=>{let i=t?.[r]?.[n];if(!i)return r;let o=Array.isArray(i)?i:[i];return r===e.type&&"base"===n?o.map(e=>`${r}--${e}`).join(" "):r===e.type&&"base"!==n?o.map(e=>`${r}-${n}--${e}`).join(" "):`${r} ${o.map(e=>`${r}--${e}`).join(" ")}`});return o?[n,`${i} ${o}`]:[n,i]}))})(a),{...t,rootId:sr(l,"rootId",s),attributes:{...o,...J(t,["id","rootId","attributes","definition","plitziElementLayout"])},definition:a,elementState:{...a.initialState,...r},style:i}},Hu=e=>Object.values(e??{}).filter(e=>"string"==typeof e&&Zn(e)),Wu=({element:e,children:t,internalProps:n,previewMode:r=!1,parentVisible:i=!0})=>{let{id:o}=n,{state:a,setElementState:s}=(({id:e,bindings:t,previewMode:n})=>{let{scopePath:r}=Nt(),i=k(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(e,r),[e,r]),[o]=_t(i),a=o??jr,s=Dt(),l=k(()=>(t?.attributes&&Array.isArray(t.attributes)?t.attributes:[]).filter(e=>!1!==e.enabled).map(e=>sr(e,"to","")),[t]),c=f(e=>!!n&&(s(i,t=>{if(!e)return{};let n="function"==typeof e?e(t??jr):e;return l.length&&(n=fr(n,l)),n}),!0),[l,i,n,s]);return g(()=>{if(n&&r)return()=>s(i,void 0)},[n,r,i,s,e]),{state:a,setElementState:c}})({id:o,bindings:e.definition.bindings,previewMode:r}),l=k(()=>{let t=[...Hu(e.attributes),...Hu(n.attributes)];return t.length>0?(e=>["variables",...new Set(e.flatMap(e=>tr(e)))])(t):void 0},[e.attributes,n.attributes]),[[c,u,d]]=_t(["navigation.routeParams","navigation.queryParams","navigation.origin"],{enabled:void 0!==l}),p=(({bindings:e,sources:t})=>{let n=k(()=>{let n=new Set(t??[]);for(let t of Object.values(e??{}))if(Array.isArray(t))for(let e of t)for(let t of rr(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},[e,t]),r=k(()=>n.map(e=>`runtime.sources.${e}`),[n]),[i]=_t(r);return k(()=>{let e={};return n.forEach((t,n)=>{void 0!==i[n]&&((e,t,n)=>{let r=t.split("."),i=e;for(let o of r.slice(0,-1)){let e=i[o],t=nr(e)?e:{};i[o]=t,i=t}i[r[r.length-1]]=n})(e,t,i[n])}),e},[n,i])})({bindings:e.definition.bindings,sources:l}),h=k(()=>({...Uu(e,n,{...p,routeParams:c,queryParams:u,origin:d},a),setElementState:s}),[e,n,p,c,u,d,a,s]);return{internalProps:h,customProps:k(()=>J(h,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"]),[h]),children:Fu({id:o,definition:h.definition,plitziElementLayout:h.plitziElementLayout,children:t,previewMode:r,visible:i&&K(h.elementState.visibility)})}},Vu=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */I("div",{children:"Something broke! Please refresh and try again."}):e}},Gu=W("EventBridgeContext",{}),Ku=Object.freeze({}),Ju=Object.freeze({}),Yu=e=>{if(void 0===e)return"undefined";if(null===e)return"null";let t=typeof e;if("function"===t)return"ƒ";if("string"===t){let t=e;return JSON.stringify(t.length>40?`${t.slice(0,40)}…`:t)}return"symbol"===t?e.toString():"number"===t||"boolean"===t||"bigint"===t?`${e}`:Array.isArray(e)?0===e.length?"[]":`[…${e.length}]`:"$$typeof"in e?"<ReactElement>":"{…}"},Xu=e=>{if("object"!=typeof e||!e)return Yu(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(Yu).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${Yu(t[e])}`).join(", ")}${n.length>4?", …":""} }`},Qu=(e,t)=>{if(Object.is(e,t))return!0;if(null===e||null===t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.is(e[n],t[n]))},Zu=We({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),ed=((e={})=>{let{max:t=100,enabled:n}=e,r=new Z,i=[],o=0,a=()=>{r.forEach(e=>e())},s=e=>{o+=1;let n={seq:o,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},r=i.length>=t?i.slice(i.length-t+1):i.slice();r.push(n),i=r,a()};return{middleware:e=>{if(!ee(n,e.getState()))return{onChange:s}},record:s,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>o,subscribe:e=>r.add(e),clear:()=>{i=[],a()}}})({max:30}),td=[],nd=/* @__PURE__ */new Map,rd=/* @__PURE__ */new Map,id=/* @__PURE__ */new Map,od=/* @__PURE__ */new Map,ad=!0,sd=/* @__PURE__ */new Map,ld=/* @__PURE__ */new Map,cd=0,ud=/* @__PURE__ */new Map,dd=!1,pd=!1,hd=0,fd=!1,md=!1,gd="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},yd=()=>{ad&&(ad=!1,Zu.setState("tree",(()=>{let e={};for(let[t,n]of od)e[t]={parentId:rd.get(t),baseDuration:n,elementId:id.get(t)??t,mountedAt:sd.get(t),unmountedAt:ld.get(t)};return e})())),Zu.setState("hydrated",md),Zu.setState("commits",td)},bd=e=>{rd.delete(e),id.delete(e),od.delete(e),sd.delete(e),ld.delete(e),ad=!0},vd=()=>{if(fd=!1,nd.size>0){let e=[...nd.values()].sort((e,t)=>e.timestamp-t.timestamp);nd.clear(),(td=[...td,...e]).length>200&&(td=td.slice(td.length-200)),(e=>{for(let[t,n]of ld)n<=e&&bd(t)})(td[0].commitId)}pd&&yd()},wd=()=>{let e=ed.entriesSince(cd);cd=ed.lastSeq();let t=/* @__PURE__ */new Map;for(let n of e){if(void 0===n.path)continue;let e=t.get(n.path);e?e.next=n.nextValue:t.set(n.path,{prev:n.prevValue,next:n.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${Xu(t.prev)} → ${Xu(t.next)}`}))},kd={onRender:(e,t,n,r,i,o)=>{dd||(dd=!0,Zu.setState("enabled",!0));let a=!od.has(e);od.set(e,r);let s=ud.get(e);ud.delete(e);let l={id:e,elementId:id.get(e)??e,parentId:rd.get(e),phase:t,actualDuration:n,baseDuration:r,changedProps:s},c=nd.get(o);c?(c.elements.push(l),c.elementCount+=1,c.duration=Math.max(c.duration,n)):(hd+=1,nd.set(o,{commitId:hd,timestamp:o,duration:n,elementCount:1,elements:[l],causes:wd()})),a&&(sd.set(e,nd.get(o)?.commitId??hd),ad=!0),fd||(fd=!0,gd(vd))},lastCommitId:()=>hd,commitsSince:e=>{let t=[...nd.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...td,...t].filter(t=>t.commitId>e)},linkParent:(e,t,n)=>{(!rd.has(e)||rd.get(e)!==t)&&(ad=!0),rd.size>=2e4&&!rd.has(e)&&(rd.clear(),id.clear(),od.clear(),sd.clear(),ld.clear(),ad=!0),rd.set(e,t),id.set(e,n)},markMounted:e=>{ld.delete(e)&&(ad=!0)},markUnmounted:e=>{od.has(e)?(ld.set(e,hd),ad=!0,fd||(fd=!0,gd(vd))):bd(e)},recordProps:(e,t)=>{ud.set(e,t)},recordStoreChange:e=>{ed.record(e)},setHydrated:()=>{md||(md=!0,pd&&Zu.setState("hydrated",!0))},start:()=>{pd=!0,vd(),yd()},stop:()=>{pd=!1},clear:()=>{td=[],nd.clear(),cd=ed.lastSeq(),ud.clear(),hd=0;for(let e of[...ld.keys()])bd(e);sd.clear(),ad=!0,yd()}},xd=/* @__PURE__ */$({default:()=>Sd}),Sd=e=>{let t=e.displayName||e.name,n=t=>{let n=x(void 0),r=x(void 0),{id:i,rootId:a}=t.internalProps,s=h(G),l=s?.visible??!0,c=`${i}${b()}`,u=s?.traceId??c,d=k(()=>({id:i,rootId:a,visible:l,traceId:u,plitziJsxSkipHOC:!0}),[i,a,l,u]),p=k(()=>({visible:l,traceId:u}),[l,u]);if(t.plitziJsxSkipHOC)/* @__PURE__ */return I(G,{value:p,children:/* @__PURE__ */I(V,{value:d,children:/* @__PURE__ */I(e,{...t})})});let{settings:{previewMode:f,debugMode:m},root:{baseElementId:y}}=uc();g(()=>{if(m)return kd.markMounted(c),()=>kd.markUnmounted(c)},[m,c]);let[v]=_t(`schema.flat.${i}`);if(!v)throw Error(`Element ${i} not found, Page ${y}`);let{internalProps:w,customProps:S,children:T}=Wu({element:v,internalProps:t.internalProps,children:t.children,previewMode:f,parentVisible:l}),{attributes:C,definition:E,style:A,plitziElementLayout:M,elementState:O,setElementState:N}=w;((e,t=Ku,n=Ju,r=Gu,i=!1)=>{let{eventBridge:o}=h(r);g(()=>{if(i||!o||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&o.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&o.off(e,t,n)}},[e,t,o,n,i])})("element",k(()=>({[`${i}_setState`]:N}),[i,N]));let _=l&&K(O.visibility),P=k(()=>({id:i,rootId:a,visible:_,traceId:c,attributes:C,definition:E,plitziElementLayout:M,style:A,elementState:O,setElementState:N}),[C,E,O,i,M,a,A,N,_,c]),L=k(()=>({visible:_,traceId:c}),[_,c]),D=k(()=>{let r={...w.attributes,...t.extraProps,...S,...J(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return T&&(r={...r,children:T}),/* @__PURE__ */I(Vu,{children:/* @__PURE__ */I(e,{...r,ref:n})})},[w.attributes,t,S,T]),z=/* @__PURE__ */I(G,{value:L,children:/* @__PURE__ */I(V,{value:P,children:D})});if(m){kd.linkParent(c,s?.traceId,i);let e={attributes:C,definition:E,style:A,elementState:O,plitziElementLayout:M,children:T,...S,...t.extraProps,...J(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return kd.recordProps(c,((e,t)=>{if(!e)return[];let n=[],r=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r){let r=e[i],o=t[i];if(!Object.is(r,o)&&(n.push({key:i,prev:Xu(r),next:Xu(o),ref:Qu(r,o)}),n.length>=12))break}return n})(r.current,e)),r.current=e,/* @__PURE__ */I(o,{id:c,onRender:kd.onRender,children:z})}return z};return n.displayName=`withElement(${t})`,n},Td=()=>{let e=h(V);if(void 0===e)throw Error("Element data not found. Make sure the element is rendered under withElement.");return e},Cd=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:o,params:a,serverMarker:s,motion:l,testMarker:u,events:d,children:p})=>""===e?p:c(e,{ref:t,style:n,className:r,...i,...o?{id:o}:{},...a,...l,...d,...s,...u},p),Ed={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},Ad=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),Id=(e,t)=>({type:t.builderType??Ed[t.type],label:t.label??Ad(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??Ad(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),Md=/* @__PURE__ */new WeakMap,Od=e=>{let t=Md.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Id(e,t)])),Md.set(e,t)),t},Nd=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:Od(t.params),...r}),_d=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,Nd(r,e[r],t[r],n[r]??{})])),Pd=["smooth","auto"],Ld=["start","center","end","nearest"],Dd=/^(-?\d+(?:\.\d+)?)(px|%)?$/,zd=(e,t)=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;let n=Dd.exec(e.trim());if(!n)return;let r=Number(n[1]);return"%"===n[2]?r/100*t:r},Rd=(e,t,n)=>{let r=Math.max(t-n,0);if("start"===e)return 0;if("end"===e)return r;let i=zd(e,r);return void 0===i?void 0:Math.min(Math.max(i,0),r)},jd={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...Pd]},$d={scrollBy:{title:"Scroll By",type:"callback",strictParams:!0,params:{x:{type:"text",description:'How far across: pixels ("240") or a share of what the box shows ("80%"); negative goes back.',default:""},y:{type:"text",description:"How far down, the same way; negative goes up.",default:""},behavior:jd}},scrollTo:{title:"Scroll To",type:"callback",strictParams:!0,params:{x:{type:"text",description:'Where across: "start", "end", pixels from the start, or a share of the way ("50%"). Empty stays.',default:""},y:{type:"text",description:"Where down, the same way. Empty stays.",default:""},behavior:jd}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...Ld]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...Ld]},behavior:jd}}},Fd={setState:{title:"Update Element (set attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to change on the element: "attribute" sets one of its props (the common case — e.g. content, disabled); "state" sets element state (visibility or a style selector). REQUIRED — always set it.',default:"attribute",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to set. When category="attribute", an attribute/prop key of THIS element (e.g. "content", "disabled"). When category="state", "visibility" or "styleSelectors.<selector>". REQUIRED.',required:!0},value:{type:"scalar",description:'The value to set — its type follows the target attribute: a real boolean (true/false) for a boolean attribute, a number for a numeric one, otherwise a string (the strings "true"/"false" also coerce). There is NO separate `type` param (that belongs to the global state setState, not this one). REQUIRED.',when:e=>!!e.category,required:!0},revertOnFinish:{type:"boolean",description:'When true, this change is UNDONE automatically when the whole flow finishes. Use it for a TEMPORARY change (a "loading…" label, disabling a button while it works) instead of adding manual restore steps at the end of the flow.',default:!1,label:"Revert changes after interaction"}}},toggleState:{title:"Toggle Element (flip attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to flip on the element: "attribute" flips one of its props (e.g. disabled); "state" flips element state ("visibility", or "styleSelectors.<selector>" for an expanded/collapsed look). REQUIRED.',default:"state",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to flip. When category="attribute", an attribute/prop key of THIS element. When category="state", "visibility" or "styleSelectors.<selector>". Anything not already true counts as false, so a field that has never been set flips ON first. REQUIRED.',required:!0},revertOnFinish:{type:"boolean",description:"When true, the flip is UNDONE automatically when the whole flow finishes — a change that lasts only as long as the flow does.",default:!1,label:"Revert changes after interaction"}}},...$d},qd=(e,t)=>n=>{let{category:r}=n;return"attribute"===r?Object.keys(e).map(e=>({value:e,label:e})):"state"===r?[{value:"visibility",label:"Visibility"},...Object.keys(t.styleSelectors).map(e=>({value:`styleSelectors.${e}`,label:`Selector - ${e}`}))]:[]},Bd=e=>{if("string"!=typeof e)return e;let t=e.toLowerCase();return"true"===t||"false"===t||"yes"===t||"no"===t?"true"===t||"yes"===t:e},Ud=["ctrl","alt","shift","meta"],Hd={ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",shift:"shift",meta:"meta",cmd:"meta",command:"meta",mod:"mod"},Wd={esc:"escape",space:"space",spacebar:"space",plus:"+",minus:"-",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",return:"enter"},Vd=/* @__PURE__ */new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown",...Array.from({length:12},(e,t)=>`f${t+1}`)]),Gd=(e,t)=>[...Ud.filter(t=>e.has(t)),t].join("+"),Kd=(e,t=!1)=>{let n=e.split(",").map(e=>((e,t)=>{let n=e.trim().toLowerCase();if(!n)return{problem:"an empty shortcut (two commas in a row, or one at the end)"};let r=n.endsWith("++")?[...n.slice(0,-2).split("+"),"+"]:n.split("+"),i="+"===n?["+"]:r.filter(e=>""!==e),o=/* @__PURE__ */new Set,a=[];for(let l of i){if(Object.hasOwn(Hd,l)){let e=Hd[l];o.add("mod"===e?t?"meta":"ctrl":e);continue}a.push(Object.hasOwn(Wd,l)?Wd[l]:l)}if(1!==a.length)return{problem:`"${e.trim()}" names ${a.length?`${a.length} keys (${a.join(", ")})`:"no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"`};let[s]=a;return 1===s.length||Vd.has(s)?{combo:Gd(o,s)}:{problem:`"${s}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...Vd].slice(0,15).join(", ")}, f1…f12)`}})(e,t));return{combos:n.flatMap(e=>e.combo?[e.combo]:[]),problems:n.flatMap(e=>e.problem?[e.problem]:[])}},Jd=/* @__PURE__ */new Set(["a","z","y","c","x","v"]),Yd=/* @__PURE__ */new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","backspace","delete"]),Xd=e=>Pd.find(t=>t===e)??"smooth",Qd=(e,t)=>Ld.find(t=>t===e)??t,Zd={onLoad:{action:"onLoad",title:"On Load",type:"trigger",preview:{},params:{}},onClick:{action:"onClick",title:"On Click",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onPointerDown:{action:"onPointerDown",title:"On Pointer Down",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseEnter:{action:"onMouseEnter",title:"On Mouse Enter",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseLeave:{action:"onMouseLeave",title:"On Mouse Leave",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onHover:{action:"onHover",title:"On Hover",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onFocus:{action:"onFocus",title:"On Focus",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onBlur:{action:"onBlur",title:"On Blur",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onInterval:{action:"onInterval",title:"On Interval",type:"trigger",preview:{interval:"",count:""},params:{interval:{canBind:!1,defaultValue:"5000",type:"text",label:"Every (milliseconds, at least 250)"}}},onKey:{action:"onKey",title:"On Key",type:"trigger",preview:{key:"",shortcuts:""},params:{keys:{canBind:!1,defaultValue:"",type:"text",label:"Keys (e.g. f, shift+f, mod+k, escape)"}}},onScroll:{action:"onScroll",title:"On Scroll",type:"trigger",preview:{x:"",y:"",atStart:"",atEnd:""},params:{}},onFlowEnd:{action:"onFlowEnd",title:"On Server Action End",type:"trigger",preview:{actionId:"",runId:"",status:"",output:{}},params:{}},onFlowError:{action:"onFlowError",title:"On Server Action Error",type:"trigger",preview:{actionId:"",runId:"",error:"",reason:""},params:{}},onFlowProgress:{action:"onFlowProgress",title:"On Server Action Progress",type:"trigger",preview:{actionId:"",runId:"",chunk:""},params:{}}},ep=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"],tp=/* @__PURE__ */new WeakSet,np=({elementContext:e,InteractionsContext:t,previewMode:n,debugMode:r,baseElementId:i,className:o,interactionTriggers:a,interactionCallbacks:s,otherProps:l,ref:c})=>{let{id:u,className:d,attributes:p,definition:y,definition:{interactions:b},plitziElementLayout:v,elementState:w,setElementState:S}=e,{interactionsManager:T,useInteractions:C}=h(t),E=f((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e);let o=(e=>"nativeEvent"in e&&nr(e.nativeEvent)?e.nativeEvent:e)(e);tp.has(o)||(i||tp.add(o),T.interactionTrigger(t,n,{event:e}))},[T]),A=k(()=>n&&b?Object.values(b).filter(e=>"trigger"===e.type&&e.action&&ep.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=sr(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>E(e,u,t.action,l[t.action],n)}},{}):{},[u,b,l,n,E]),I=m(mt),M=f(()=>{let e=I?.getPath("runtime.sources");return((e,t,n)=>{let r=nr(t)?t:{};return(e=>nr(e)&&Object.values(e).every(e=>"string"==typeof e))(n)?{...e,state:r,computed:li(n,e,r)}:{...e,state:r}})(nr(e)?e:qr,I?.getPath("runtime.state"),I?.getPath("schema.settings.computed"))},[I]),O=f(()=>({dataSource:M()}),[M]),N=k(()=>({...Zd,...a}),[a]),_=x(null),P=c??_,L=(({attributes:e,definition:t,setElementState:n})=>{let r=f((e,t)=>{let r,i;return n(n=>(r=n,i=$l(n,r=>lr(r,e,t(sr(n,e)))),i)),{prevState:r,nextState:i}},[n]),i=f(e=>{if(!e.key||void 0===e.value)return{prevState:void 0,nextState:void 0};let{key:t}=e,n=Bd(e.value);return r(t,()=>n)},[r]),o=f(e=>{if(!e.key)return{prevState:void 0,nextState:void 0};let{key:t}=e;return r(t,e=>!0!==Bd(e))},[r]),a=f((e,t)=>{let r=t?.prevState;e.revertOnFinish&&r&&n(r)},[n]);return k(()=>((e,t,n,r,i)=>{let o=Fd.setState,a=Od(o.params),s=Fd.toggleState,l=Od(s.params),c={type:"select",options:qd(e,t),when:e=>"attribute"===e.category||"state"===e.category};return{setState:Nd("setState",o,n,{title:`Update ${t.label}`,postCallback:r,params:{...a,key:{...a.key,...c},value:{...a.value,type:t=>"boolean"==typeof e[t.key]?"select":"text",options:t=>{let{key:n}=t;return"boolean"==typeof e[n]?[{value:"true",label:"True"},{value:"false",label:"False"}]:Object.keys(e).map(e=>({value:e,label:e}))}}}}),toggleState:Nd("toggleState",s,i,{title:`Toggle ${t.label}`,postCallback:r,params:{...l,key:{...l.key,...c}}})}})(e,t,i,a,o),[e,t,i,a,o])})({attributes:p,definition:y,setElementState:S}),D=(({id:e,label:t,nodeRef:n,interactions:r,previewMode:i,interactionsManager:o})=>{let a=k(()=>_d($d,{scrollBy:e=>{let t=n.current;t?.scrollBy({left:zd(e.x,t.clientWidth)??0,top:zd(e.y,t.clientHeight)??0,behavior:Xd(e.behavior)})},scrollTo:e=>{let t=n.current;t&&t.scrollTo({left:Rd(e.x,t.scrollWidth,t.clientWidth)??t.scrollLeft,top:Rd(e.y,t.scrollHeight,t.clientHeight)??t.scrollTop,behavior:Xd(e.behavior)})},scrollIntoView:e=>{n.current?.scrollIntoView({block:Qd(e.block,"start"),inline:Qd(e.inline,"nearest"),behavior:Xd(e.behavior)})}},{scrollBy:{title:`Scroll ${t} by`},scrollTo:{title:`Scroll ${t} to`},scrollIntoView:{title:`Scroll to ${t}`}}),[t,n]),s=k(()=>Object.values(r??{}).some(e=>"trigger"===e.type&&"onScroll"===e.action&&e.enabled),[r]);return g(()=>{let t=n.current;if(!i||!s||!t||typeof window>"u")return;let r=0,a=()=>{r=0;let n=(e=>{let t=e.scrollWidth-e.clientWidth>1,n=t?e.scrollLeft:e.scrollTop,r=t?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;return{x:Math.round(e.scrollLeft),y:Math.round(e.scrollTop),atStart:n<=1,atEnd:n>=r-1}})(t);o.interactionTrigger(e,"onScroll",n)},l=()=>{0===r&&(r=window.requestAnimationFrame(a))};return t.addEventListener("scroll",l,{passive:!0}),r=window.requestAnimationFrame(a),()=>{t.removeEventListener("scroll",l),window.cancelAnimationFrame(r)}},[e,o,s,n,i]),a})({id:u,label:y.label,nodeRef:P,interactions:b,previewMode:n,interactionsManager:T});C({id:u,interactions:b,triggers:N,callbacks:k(()=>({...s,...D,...L}),[s,D,L]),getAdditionalParams:O}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let{keys:t}=e.params;return"trigger"===e.type&&"onKey"===e.action&&e.enabled&&"string"==typeof t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length)return;let t=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),o=i.map(e=>({spec:e,combos:Kd(e,t).combos})),a=t=>{if(t.isComposing)return;let n=(e=>{let t=e.ctrlKey||e.altKey||e.metaKey,n=/^(?:Key|Digit)([A-Z0-9])$/.exec(e.code),r=t&&n?n[1]:e.key,i=" "===r?"space":r.toLowerCase(),o=1===i.length&&!/[a-z0-9]/.test(i),a=/* @__PURE__ */new Set;return e.ctrlKey&&a.add("ctrl"),e.altKey&&a.add("alt"),e.shiftKey&&!o&&a.add("shift"),e.metaKey&&a.add("meta"),Gd(a,i)})(t),i=t.ctrlKey||t.metaKey||t.altKey;if((e=>e instanceof Element&&null!==e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))(t.target)&&(!i&&"escape"!==n||(e=>{let t=e.split("+"),n=e.endsWith("++")?"+":t[t.length-1];return Yd.has(n)||Jd.has(n)&&(e.includes("ctrl+")||e.includes("meta+"))})(n)))return;let a=o.filter(e=>e.combos.includes(n)).map(e=>e.spec);if(!a.length)return;t.preventDefault();let s={key:n,shortcuts:a};r.interactionTrigger(e,"onKey",s)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let t=yo(e.params.interval);return"trigger"===e.type&&"onInterval"===e.action&&e.enabled&&t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length||typeof document>"u")return;let t=new Map(i.map(e=>[e,0])),o=[],a=()=>{o.forEach(e=>clearInterval(e)),o=[]},s=()=>{a(),"visible"===document.visibilityState&&(o=i.map(n=>setInterval(()=>{let i=(t.get(n)??0)+1;t.set(n,i);let o={interval:n,count:i};r.interactionTrigger(e,"onInterval",o)},n)))};return s(),document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s),a()}},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),g(()=>{if(!n||!b||!Object.keys(b).length)return;let e=!1;return queueMicrotask(()=>{e||T.interactionTrigger(u,"onLoad",{})}),()=>{e=!0}},[]),g(()=>{if(r)return Kl.addProviderMethod(`getElementDataSource-${u}`,M),()=>{Kl.removeProviderMethod(`getElementDataSource-${u}`)}},[r,M,u]);let z=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:o,elementState:a})=>{let{items:s}=o,l=K(a.visibility);return k(()=>U(t,{[Mc]:!l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i?.slots.includes(e)},o.styleSelectors.base),[t,l,n,i,s,r,e,o.styleSelectors.base])})({id:u,className:o,previewMode:n,baseElementId:i,definition:y,elementState:w,plitziElementLayout:v});return{className:U(d,z),events:A,nodeRef:P}},rp={fade:[{at:0,opacity:0}],"fade-up":[{at:0,opacity:0,translate:"0 24px"}],"fade-down":[{at:0,opacity:0,translate:"0 -24px"}],"slide-left":[{at:0,opacity:0,translate:"32px 0"}],"slide-right":[{at:0,opacity:0,translate:"-32px 0"}],"slide-up":[{at:0,opacity:0,translate:"0 72px"}],scale:[{at:0,opacity:0,scale:"0.94"}],"zoom-in":[{at:0,opacity:0,scale:"0.6"}],"zoom-out":[{at:0,opacity:0,scale:"1.25"}],pop:[{at:0,opacity:0,scale:"0.5"},{at:55,opacity:1,scale:"1.08"},{at:78,scale:"0.97"}],"bounce-in":[{at:0,opacity:0,translate:"0 -64px"},{at:55,opacity:1,translate:"0 10px"},{at:75,translate:"0 -5px"},{at:90,translate:"0 2px"}],tilt:[{at:0,opacity:0,translate:"0 32px",rotate:"-6deg"}],"spin-in":[{at:0,opacity:0,scale:"0.4",rotate:"-180deg"}]},ip=(Object.fromEntries(["fade","fade-up","fade-down","slide-left","slide-right","slide-up","scale","zoom-in","zoom-out","pop","bounce-in","tilt","spin-in"].map(e=>{let[{at:t,...n}]=rp[e];return[e,n]})),(e,t)=>{let n=2*t*Math.PI,r=Math.round(Math.sin(n)*e*10)/10,i=Math.round(-Math.cos(n)*e*10)/10;return`translate(${String(r)}px, ${String(i)}px)`}),op=(Array.from({length:9},(e,t)=>({at:100*t/8,transform:ip(6,t/8)})),"data-motion-seen"),ap=(["[data-motion-loop] { animation-play-state: running, running !important; }",'[data-motion-on="view"][data-motion-enter], [data-motion-on="view"][data-motion-stagger] > * { animation-play-state: running, running !important; }','[data-motion-on="scroll"][data-motion-enter], [data-motion-on="scroll"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }'].join("\n"),e=>"animationName"in e&&"string"==typeof e.animationName&&e.animationName.startsWith("plitzi-motion-")),sp=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:o,style:a,...s})=>{let l=k(()=>((e="")=>{if(e)return"object"==typeof e?e:Object.fromEntries(e.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n]=e.split(":").map(e=>e.trim());return[t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),n]}))})(a),[a]),c=Td(),u=uc(),d=u.settings.previewMode??!0,p=!!u.settings.debugMode;if(c.plitziJsxSkipHOC)return Cd({tag:n,refProp:e,style:l,className:r,otherProps:s,children:t});let{root:{baseElementId:h},contexts:f}=u,m=f.InteractionsContext,{id:g,rootId:y,style:b,plitziElementLayout:v,definition:{type:w,label:x,runtime:S,anchor:T,parentId:C,motion:E}}=c,A=(e=>{if(!e)return{attributes:{},style:{}};let t={},n={};return e.enter&&(t[void 0===e.stagger?"data-motion-enter":"data-motion-stagger"]=e.enter,t["data-motion-on"]=e.on??"load"),e.loop&&(t["data-motion-loop"]=e.loop),void 0!==e.duration&&(n["--plitzi-motion-duration"]=`${String(e.duration)}ms`),void 0!==e.delay&&(n["--plitzi-motion-delay"]=`${String(e.delay)}ms`),void 0!==e.stagger&&(n["--plitzi-motion-stagger"]=`${String(e.stagger)}ms`),{attributes:t,style:n}})(E),I="server"===S?{"data-rsc-id":g}:void 0,M="component"!==v?.type||C||v.rootId===g?void 0:v.rootId,O=!1===u.settings.testAttributes?void 0:{"data-plitzi-el":g,...void 0===M?{}:{"data-plitzi-instance":M}},N=p||!d&&w&&y===h?{"data-id":g,"data-name":x||w||"unknown","data-root-id":y,"data-type":w||"unknown","data-root-render-element":!0}:{};if(!m)return Cd({tag:n,refProp:e,style:{...b,...l,...A.style},className:r,otherProps:s,anchor:T,params:N,serverMarker:I,motion:A.attributes,testMarker:O,children:t});let _=np({elementContext:c,InteractionsContext:m,previewMode:d,debugMode:p,baseElementId:h,className:r,interactionTriggers:i,interactionCallbacks:o,otherProps:s,ref:e});return Cd({tag:n,refProp:_.nodeRef,style:{...b,...l,...A.style},className:_.className,otherProps:s,anchor:T,params:N,serverMarker:I,motion:A.attributes,testMarker:O,events:_.events,children:t})},lp=/*#__PURE__*/function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),cp=/*#__PURE__*/function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),up={rel:["amphtml","canonical","alternate"]},dp={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},pp={type:["application/ld+json"]},hp=Object.values(cp),fp={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},mp=(()=>{const e={};for(const[t,n]of Object.entries(fp))e[n]=t;return e})(),gp="data-rh",yp=!("undefined"==typeof window||!window.document.createElement);function bp(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function vp(e){let t=bp(e,cp.TITLE);const n=bp(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=bp(e,"defaultTitle");return(t||r)??void 0}function wp(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function kp(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function xp(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&console.warn(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===lp.REL&&"canonical"===e[n].toLowerCase()||i===lp.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==lp.INNER_HTML&&i!==lp.CSS_TEXT&&i!==lp.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][o]&&(i[n][o]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const o=Object.keys(i);for(const t of o){const e={...r[t],...i[t]};r[t]=e}return e},[]).reverse()}function Sp(e){return Array.isArray(e)?e.join(""):e}function Tp(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function Cp(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)Tp(r,t)?n.priority.push(r):n.default.push(r);return n}function Ep(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function Ap(e){let t=xp(cp.LINK,[lp.REL,lp.HREF],e),n=xp("meta",[lp.NAME,"charSet","httpEquiv",lp.PROPERTY,"itemProp"],e),r=xp("script",[lp.SRC,lp.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let o;if(i){const e=Cp(t,up);t=e.default;const i=Cp(n,dp);n=i.default;const a=Cp(r,pp);r=a.default,o={links:e.priority,meta:i.priority,script:a.priority}}return{base:kp(e),bodyAttributes:wp("bodyAttributes",e),defer:bp(e,"defer"),encodeSpecialCharacters:bp(e,"encodeSpecialCharacters")??!0,htmlAttributes:wp("htmlAttributes",e),links:t,meta:n,noscript:xp("noscript",[lp.INNER_HTML],e),onChangeClientState:bp(e,"onChangeClientState"),priority:o,script:r,style:xp("style",[lp.CSS_TEXT],e),title:vp(e),titleAttributes:wp("titleAttributes",e)}}function Ip(e){return mp[e]??e}function Mp(e,t){const n=document.head||document.querySelector(cp.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${gp}]`)],o=[];for(const a of t){const t=document.createElement(e);for(const[e,r]of Object.entries(a))if(Object.prototype.hasOwnProperty.call(a,e)){const n=mp[e]??e;n===lp.INNER_HTML?t.innerHTML=r:n===lp.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=a.cssText:t.appendChild(document.createTextNode(a.cssText)):t.setAttribute(n,r??"")}t.setAttribute(gp,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){o.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),o.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:o,oldTags:i}}function Op(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(gp),i=r?r.split(","):[],o=[...i],a=[];for(const s of Object.keys(t))a.push(mp[s]??s);for(const[s,l]of Object.entries(t)){const e=mp[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=o.indexOf(e);-1!==t&&o.splice(t,1)}for(let s=o.length-1;s>=0;s-=1)n.removeAttribute(o[s]);i.length===o.length?n.removeAttribute(gp):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute(gp,a.join(","))}function Np(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:o,links:a,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:h,titleAttributes:f}=e;Op(cp.BODY,r??{}),Op(cp.HTML,o??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=Sp(e)),Op(cp.TITLE,t)}(h,f);const m={baseTag:Mp(cp.BASE,n?[n]:[]),linkTags:Mp(cp.LINK,[...u?.links??[],...a??[]]),metaTags:Mp(cp.META,[...u?.meta??[],...s??[]]),noscriptTags:Mp(cp.NOSCRIPT,l??[]),scriptTags:Mp(cp.SCRIPT,[...u?.script??[],...d??[]]),styleTags:Mp(cp.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:h??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var _p=[cp.NOSCRIPT,cp.SCRIPT,cp.STYLE],Pp=(e,t=!0)=>t?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e;function Lp(e){let t="";for(const[n,r]of Object.entries(e)){const e=Ip(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function Dp(e,t,n){let r="";for(const i of t){let t="";const o=Object.entries(i);for(const[e,r]of o)if(e!==lp.INNER_HTML&&e!==lp.CSS_TEXT){const i=mp[e]??e;let o;o=void 0===r?i:`${i}="${Pp("string"==typeof r?r:String(r),n)}"`,t?t+=` ${o}`:t=o}const a=i.innerHTML??i.cssText??"",s=!_p.includes(e);r+=`<${e} ${gp}="true" ${t}${s?"/>":`>${a}</${e}>`}`}return r}function zp(e,t={}){const n={};t.addHelmetDataAttr&&(n[gp]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=fp[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function Rp(e,t,n){/*#__PURE__*/
|
|
26
|
-
return c(e,
|
|
27
|
-
return I(
|
|
28
|
-
return M("div",{className:c.header,onClick:s,...l,children:[/* @__PURE__ */M("div",{className:c.headerContainer,children:["left"===a&&/* @__PURE__ */M("div",{className:c.headerIconContainer,children:[r&&i,!r&&o]}),/* @__PURE__ */I("div",{className:c.headerTitle,children:n})]}),/* @__PURE__ */M("div",{className:c.headerSlotContainer,children:[/* @__PURE__ */I("div",{className:c.headerSlot,children:e}),"right"===a&&/* @__PURE__ */M("div",{className:c.headerIconContainer,children:[r&&i,!r&&o]})]})]})},
|
|
29
|
-
return M(ms,{className:e,direction:i,wrap:o,items:a,justify:l,gap:c,shrink:p,basis:h,grow:!!d&&!y,...g,children:[w,!y&&x]})};
|
|
30
|
-
return I("div",{className:e,onClick:a,children:t})},
|
|
31
|
-
return M("div",{className:t,children:[l,c]})};
|
|
32
|
-
return I("div",{className:e,ref:d,onClick:y,onDoubleClick:b,onBlur:v,onInput:h,onKeyDown:w})},
|
|
33
|
-
return I(Vo,{value:d,children:e})},uh=({children:e,components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:o})=>/* @__PURE__ */I(ch,{components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:o,children:e}),dh={root:kr("",{variants:{intent:{primary:"text-primary-text",custom:""},size:{xs:"text-xs",sm:"text-sm",md:"",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl",custom:""},weight:{100:"font-thin",thin:"font-thin",200:"font-extralight",extralight:"font-extralight",300:"font-light",light:"font-light",400:"",normal:"",500:"font-medium",medium:"font-medium",600:"font-semibold",semibold:"font-semibold",700:"font-bold",bold:"font-bold",800:"font-extrabold",extrabold:"font-extrabold",900:"font-black",black:"font-black"}},compoundVariants:[],defaultVariants:{intent:"custom",size:"md",weight:400}})},ph=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,hh=/^[\\/]{2}/,fh="popstate";function mh(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function gh(e,t){if(!1===e||null==e)throw new Error(t)}function yh(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(VO){}}}function bh(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function vh(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?kh(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function wh({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function kh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xh(e,t,n="/"){return Sh(e,t,n,!1)}function Sh(e,t,n,r,i){let o=jh(("string"==typeof t?kh(t):t).pathname||"/",n);if(null==o)return null;let a=i??function(e){let t=Th(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return yh(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(o);for(let c=0;null==s&&c<a.length;++c)s=Lh(a[c],l,r);return s}function Th(e,t=[],n=[],r="",i=!1){let o=(e,o,a=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;gh(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=Hh([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(gh(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Th(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:Ph(c,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Rh(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of Ch(e.path))o(e,t,!0,n);else o(e,t)}),t}function Ch(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=Ch(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var Eh=/^:[\w-]+$/,Ah=3,Ih=2,Mh=1,Oh=10,Nh=-2,_h=e=>"*"===e;function Ph(e,t){let n=e.split("/"),r=n.length;return n.some(_h)&&(r+=Nh),t&&(r+=Ih),n.filter(e=>!_h(e)).reduce((e,t)=>e+(Eh.test(t)?Ah:""===t?Mh:Oh),r)}function Lh(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u={path:e.relativePath,caseSensitive:e.caseSensitive,end:l},d=e.matcher&&e.compiledParams?zh(u,c,e.matcher,e.compiledParams):Dh(u,c),p=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=Dh({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:Hh([o,d.pathname]),pathnameBase:Vh(Hh([o,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(o=Hh([o,d.pathnameBase]))}return a}function Dh(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Rh(e.path,e.caseSensitive,e.end);return zh(e,t,n,r)}function zh(e,t,n,r){let i=t.match(n);if(!i)return null;let o=i[0],a=Wh(o,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=Wh(o.slice(0,o.length-e.length),1)}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function Rh(e,t=!1,n=!0){yh("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function jh(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function $h(e,t){let n=Wh(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Fh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qh(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Bh(e,t,n,r=!1){let i;"string"==typeof e?i=kh(e):(i={...e},gh(!i.pathname||!i.pathname.includes("?"),Fh("?","pathname","search",i)),gh(!i.pathname||!i.pathname.includes("#"),Fh("#","pathname","hash",i)),gh(!i.search||!i.search.includes("#"),Fh("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?kh(e):e;return r?(r=Uh(r),n=r.startsWith("/")||r.startsWith("\\")?$h(r.substring(1),"/"):$h(r,t)):n=t,{pathname:n,search:Gh(i),hash:Kh(o)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Uh=e=>e.replace(/[\\/]{2,}/g,"/"),Hh=e=>Uh(e.join("/"));function Wh(e,t=0){let n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var Vh=e=>Wh(e).replace(/^\/*/,"/"),Gh=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Kh=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Jh=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Yh(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Xh(e){return Hh(e.map(e=>e.route.path).filter(Boolean))||"/"}var Qh="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Zh(e,t){let n=e;if("string"!=typeof n||!ph.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Qh)try{let e=new URL(window.location.href),r=hh.test(n)?new URL((o=n,e.protocol+o.replace(/\\/g,"/"))):new URL(n),a=jh(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(VO){yh(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var o;return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ef=new URL("http://localhost");function tf(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),ef)}catch{return ef}}function nf(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function rf(e,t,n,r){let i=null;try{i=null==e?null:new URL(e,n)}catch{}let o=new URL(t,n),a=null!=i&&!nf(i,n),s=!nf(o,n);if("reject"===r){if(a||s)throw new Error("External navigation is not allowed")}else if(s&&(null==i||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}(e,i)||!nf(i,o)))throw new Error("External navigation is not allowed")}var of=["POST","PUT","PATCH","DELETE"],af=(new Set(of),["GET",...of]);new Set(af);var sf=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],lf=e.createContext(null);lf.displayName="DataRouter";var cf=e.createContext(null);cf.displayName="DataRouterState";var uf=e.createContext(!1);function df(){return e.useContext(uf)}var pf=e.createContext({isTransitioning:!1});pf.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var hf=e.createContext(null);hf.displayName="Navigation";var ff=e.createContext(null);ff.displayName="Location";var mf=e.createContext({outlet:null,matches:[],isDataRoute:!1});mf.displayName="Route";var gf=e.createContext(null);gf.displayName="RouteError";var yf="REACT_ROUTER_ERROR";function bf(){return null!=e.useContext(ff)}function vf(){return gh(bf(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(ff).location}var wf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kf(t){e.useContext(hf).static||e.useLayoutEffect(t)}function xf(){let{isDataRoute:t}=e.useContext(mf);return t?function(){let{router:t}=function(){let t=e.useContext(lf);return gh(t,Of("useNavigate")),t}(),n=Nf("useNavigate"),r=e.useRef(!1);return kf(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{yh(r.current,wf),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){gh(bf(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(lf),{basename:n,navigator:r}=e.useContext(hf),{matches:i}=e.useContext(mf),{pathname:o}=vf(),a=JSON.stringify(qh(i)),s=e.useRef(!1);return kf(()=>{s.current=!0}),e.useCallback((e,i={})=>{if(yh(s.current,wf),!s.current)return;if("number"==typeof e)return void r.go(e);let l=Bh(e,JSON.parse(a),o,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:Hh([n,l.pathname])),rf("string"==typeof e?e:wh(e),r.createHref(l),tf(r),"reject"),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,a,o,t])}()}function Sf(t,{relative:n}={}){let{matches:r}=e.useContext(mf),{pathname:i}=vf(),o=JSON.stringify(qh(r));return e.useMemo(()=>Bh(t,JSON.parse(o),i,"path"===n),[t,o,i,n])}function Tf(){let t=function(){let t=e.useContext(gf),n=function(t){let n=e.useContext(cf);return gh(n,Of(t)),n}("useRouteError"),r=Nf("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=Yh(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:a},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:a},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:o},r):null,s)}e.createContext(null);var Cf=/* @__PURE__ */e.createElement(Tf,null),Ef=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${yf}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Jh(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(mf.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(gf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(If,{error:t},n):n}};Ef.contextType=uf;var Af=/* @__PURE__ */new WeakMap;function If({children:t,error:n}){let{basename:r,navigator:i}=e.useContext(hf);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${yf}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let o=Af.get(n);if(o)throw o;let a=Zh(t.location,r),s=a.absoluteURL||a.to;if(rf(t.location,s,tf(i),"allow-explicit"),function(e){try{return sf.includes(new URL(e).protocol)}catch{return!1}}(s))throw new Error("Invalid redirect location");if(Qh&&!Af.get(n)){if(!a.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:t.replace}));throw Af.set(n,e),e}window.location.href=s}/* @__PURE__ */
|
|
34
|
-
return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return t}function Mf({routeContext:t,match:n,children:r}){let i=e.useContext(lf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(mf.Provider,{value:t},r)}function Of(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nf(t){let n=function(t){let n=e.useContext(mf);return gh(n,Of(t)),n}(t),r=n.matches[n.matches.length-1];return gh(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var _f={};function Pf(e,t,n){t||_f[e]||(_f[e]=!0,yh(!1,n))}function Lf({basename:t,children:n,initialEntries:r,initialIndex:i,useTransitions:o}){let a=e.useRef();null==a.current&&(a.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let o=l(null==r?t.length-1:r),a="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[o]}function u(e,n=null,r,i){let o=vh(t?c().pathname:"/",e,n,r,i);return yh("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:wh(e)}return{get index(){return o},get action(){return a},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?kh(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=mh(e)?e:u(e,n);o+=1,t.splice(o,t.length,r),i&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=mh(e)?e:u(e,n);t[o]=r,i&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=l(o+e),r=t[n];o=n,s&&s({action:a,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}({initialEntries:r,initialIndex:i,v5Compat:!0}));let s=a.current,[l,c]=e.useState({action:s.action,location:s.location}),u=e.useCallback(t=>{!1===o?c(t):e.startTransition(()=>c(t))},[o]);return e.useLayoutEffect(()=>s.listen(u),[s,u]),/* @__PURE__ */e.createElement(zf,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,useTransitions:o})}function Df({to:t,replace:n,state:r,relative:i}){gh(bf(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:a}=e.useContext(hf);yh(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=e.useContext(mf),{pathname:l}=vf(),c=xf(),u=Bh(t,qh(s),l,"path"===i);rf("string"==typeof t?t:wh(t),a.createHref(u),tf(a),"reject");let d=JSON.stringify(u);return e.useEffect(()=>{c(JSON.parse(d),{replace:n,state:r,relative:i})},[c,d,i,n,r]),null}function zf({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:o,static:a=!1,useTransitions:s}){gh(!bf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:o,static:a,useTransitions:s,future:{}}),[l,o,a,s]);"string"==typeof r&&(r=kh(r));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:f="default",mask:m}=r,g=e.useMemo(()=>{let e=jh(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:h,key:f,mask:m},navigationType:i}},[l,u,d,p,h,f,i,m]);return yh(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(hf.Provider,{value:c},/* @__PURE__ */e.createElement(ff.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:o,onError:a}){return function(t,n,r){gh(bf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(hf),{matches:o}=e.useContext(mf),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",u=a&&a.route;{let e=u&&u.path||"";Pf(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=vf();if(n){let e="string"==typeof n?kh(n):n;gh("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let h=d.pathname||"/",f=h;if("/"!==c){let e=c.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):xh(t,{pathname:f});yh(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),yh(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let o=t,a=i?.errors;if(null!=a){let e=o.findIndex(e=>e.route.id&&void 0!==a?.[e.route.id]);gh(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){r.isStatic&&(s=!0),o=l>=0?o.slice(0,l+1):[o[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Xh(i.matches),errorInfo:t})}:void 0;return o.reduceRight((t,r,c)=>{let d,p=!1,h=null,f=null;i&&(d=a&&r.route.id?a[r.route.id]:void 0,h=r.route.errorElement||Cf,s&&(l<0&&0===c?(Pf("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,f=null):l===c&&(p=!0,f=r.route.hydrateFallbackElement||null)));let m=n.concat(o.slice(0,c+1)),g=()=>{let n;return n=d?h:p?f:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(Mf,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(Ef,{location:i.location,revalidation:i.revalidation,component:h,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Hh([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:Hh([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return n&&g?/* @__PURE__ */e.createElement(ff.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:o,onError:a,future:r})}),e.Component;var Rf="get",jf="application/x-www-form-urlencoded";function $f(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Ff=null,qf=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bf(e){return null==e||qf.has(e)?e:(yh(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${jf}"`),null)}function Uf(e,t){if(!1===e||null==e)throw new Error(t)}function Hf(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===jh(i.pathname,t)?i.pathname=`${Wh(t)}/_root.${r}`:i.pathname=`${Wh(i.pathname)}.${r}`,i}function Wf(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Vf(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Gf(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Kf(){let t=e.useContext(lf);return Uf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Jf(){let t=e.useContext(cf);return Uf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Yf=e.createContext(void 0);function Xf(){let t=e.useContext(Yf);return Uf(t,"You must render this element inside a <HydratedRouter> element"),t}function Qf(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Zf({page:t,...n}){let r=df(),{nonce:i}=Xf(),{router:o}=Kf(),a=e.useMemo(()=>xh(o.routes,t,o.basename),[o.routes,t,o.basename]);return a?(null==n.nonce&&i&&(n={...n,nonce:i}),r?/* @__PURE__ */e.createElement(em,{page:t,matches:a,...n}):/* @__PURE__ */e.createElement(tm,{page:t,matches:a,...n})):null}function em({page:t,matches:n,...r}){let i=vf(),{future:o}=Xf(),{basename:a}=Kf(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=Hf(t,a,o.v8_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[a,o.v8_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
|
|
35
|
-
return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function
|
|
24
|
+
return M(Ts,{className:n,id:x.id,label:i,loading:a,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:h,size:p,onClear:T,...y,children:[t,/* @__PURE__ */I("input",{ref:e,...x.controlProps,type:d,placeholder:o,className:k,disabled:s||a,value:m,onChange:S,...w})]})}),{Icon:ys}),As={root:kr("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:kr("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded-md",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:kr("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:kr("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:kr("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:kr("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:kr("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:kr("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:kr("text-zinc-400 dark:text-zinc-500")},Is=Es,Ms=Symbol.for("immer-nothing"),Os=Symbol.for("immer-draftable"),Ns=Symbol.for("immer-state");function _s(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ps=Object,Ls=Ps.getPrototypeOf,Ds="constructor",zs="prototype",Rs="configurable",js="enumerable",$s="writable",Fs="value",qs=e=>!!e&&!!e[Ns];function Bs(e){return!!e&&(Ws(e)||Xs(e)||!!e[Os]||!!e[Ds]?.[Os]||Qs(e)||Zs(e))}var Us=Ps[zs][Ds].toString(),Hs=/* @__PURE__ */new WeakMap;function Ws(e){if(!e||!el(e))return!1;const t=Ls(e);if(null===t||t===Ps[zs])return!0;const n=Ps.hasOwnProperty.call(t,Ds)&&t[Ds];if(n===Object)return!0;if(!tl(n))return!1;let r=Hs.get(n);return void 0===r&&(r=Function.toString.call(n),Hs.set(n,r)),r===Us}function Vs(e,t,n=!0){0===Gs(e)?(n?Reflect.ownKeys(e):Ps.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Gs(e){const t=e[Ns];return t?t.type_:Xs(e)?1:Qs(e)?2:Zs(e)?3:0}var Ks=(e,t,n=Gs(e))=>2===n?e.has(t):Ps[zs].hasOwnProperty.call(e,t),Js=(e,t,n=Gs(e))=>2===n?e.get(t):e[t],Ys=(e,t,n,r=Gs(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},Xs=Array.isArray,Qs=e=>e instanceof Map,Zs=e=>e instanceof Set,el=e=>"object"==typeof e,tl=e=>"function"==typeof e,nl=e=>"boolean"==typeof e,rl=e=>e.copy_||e.base_,il=e=>e.modified_?e.copy_:e.base_;function ol(e,t){if(Qs(e))return new Map(e);if(Zs(e))return new Set(e);if(Xs(e))return Array[zs].slice.call(e);const n=Ws(e);if(!0===t||"class_only"===t&&!n){const t=Ps.getOwnPropertyDescriptors(e);delete t[Ns];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[$s]&&(o[$s]=!0,o[Rs]=!0),(o.get||o.set)&&(t[i]={[Rs]:!0,[$s]:!0,[js]:o[js],[Fs]:e[i]})}return Ps.create(Ls(e),t)}{const t=Ls(e);if(null!==t&&n)return{...e};const r=Ps.create(t);return Ps.assign(r,e)}}function al(e,t=!1){return ll(e)||qs(e)||!Bs(e)||(Gs(e)>1&&Ps.defineProperties(e,{set:sl,add:sl,clear:sl,delete:sl}),Ps.freeze(e),t&&Vs(e,(e,t)=>{al(t,!0)},!1)),e}var sl={[Fs]:function(){_s(2)}};function ll(e){return null===e||!el(e)||Ps.isFrozen(e)}var cl="MapSet",ul="Patches",dl="ArrayMethods",pl={};function hl(e){const t=pl[e];return t||_s(0),t}var fl,ml=e=>!!pl[e],gl=()=>fl;function yl(e,t){t&&(e.patchPlugin_=hl(ul),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bl(e){vl(e),e.drafts_.forEach(kl),e.drafts_=null}function vl(e){e===fl&&(fl=e.parent_)}var wl=e=>fl={drafts_:[],parent_:fl,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:ml(cl)?hl(cl):void 0,arrayMethodsPlugin_:ml(dl)?hl(dl):void 0};function kl(e){const t=e[Ns];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function xl(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[Ns].modified_&&(bl(t),_s(4)),Bs(e)&&(e=Sl(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Ns].base_,e,t)}else e=Sl(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&al(t,n)}(t,e,!0),bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ms?e:void 0}function Sl(e,t){if(ll(t))return t;const n=t[Ns];if(!n)return Ml(t,e.handledSet_,e);if(!Cl(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Il(n,e)}return n.copy_}function Tl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Cl=(e,t)=>e.scope_===t,El=[];function Al(e,t,n,r){const i=rl(e),o=e.type_;if(void 0!==r&&Js(i,r,o)===t)return void Ys(i,r,n,o);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;Vs(i,(e,n)=>{if(qs(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??El;for(const s of a)Ys(i,s,n,o)}function Il(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Tl(e)}}function Ml(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||qs(e)||t.has(e)||!Bs(e)||ll(e)||(t.add(e),Vs(e,(r,i)=>{if(qs(i)){const t=i[Ns];Cl(t,n)&&(Ys(e,r,il(t),e.type_),Tl(t))}else Bs(i)&&Ml(i,t,n)})),e}var Ol={get(e,t){if(t===Ns)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=rl(e);if(!Ks(i,t,e.type_))return function(e,t,n){const r=Pl(t,n);return r?Fs in r?r[Fs]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!Bs(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===_l(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Bs(n)||n[Ns])&&e.baseRefs_.has(n)}(e,t,o)){Dl(e);const n=1===e.type_?+t:t,r=zl(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in rl(e),ownKeys:e=>Reflect.ownKeys(rl(e)),set(e,t,n){const r=Pl(rl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=_l(rl(e),t),i=r?.[Ns];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Ks(e.base_,t,e.type_)))return!0;Dl(e),Ll(e)}return e.copy_[t]===n&&(void 0!==n||Ks(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(qs(n)){const i=n[Ns];Cl(i,r)&&i.callbacks_.push(function(){Dl(e),Al(e,n,il(i),t)})}else Bs(n)&&e.callbacks_.push(function(){const i=rl(e);3===e.type_?i.has(n)&&Ml(n,r.handledSet_,r):Js(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&Ml(Js(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Dl(e),void 0!==_l(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Ll(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=rl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[$s]:!0,[Rs]:1!==e.type_||"length"!==t,[js]:r[js],[Fs]:n[t]}:r},defineProperty(){_s(11)},getPrototypeOf:e=>Ls(e.base_),setPrototypeOf(){_s(12)}},Nl={};for(let NN in Ol){let e=Ol[NN];Nl[NN]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function _l(e,t){const n=e[Ns];return(n?rl(n):e)[t]}function Pl(e,t){if(!(t in e))return;let n=Ls(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ls(n)}}function Ll(e){e.modified_||(e.modified_=!0,e.parent_&&Ll(e.parent_))}function Dl(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=ol(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function zl(e,t,n,r){const[i,o]=Qs(t)?hl(cl).proxyMap_(t,n):Zs(t)?hl(cl).proxySet_(t,n):function(e,t){const n=Xs(e),r={type_:n?1:0,scope_:t?t.scope_:gl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Ol;n&&(i=[r],o=Nl);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??gl()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Cl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=il(i);Al(e,i.draft_??i,o,n),Il(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function Rl(e){if(!Bs(e)||ll(e))return e;const t=e[Ns];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ol(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ol(e,!0);return Vs(n,(e,t)=>{Ys(n,e,Rl(t))},r),t&&(t.finalized_=!1),n}Nl.deleteProperty=function(e,t){return Nl.set.call(this,e,t,void 0)},Nl.set=function(e,t,n){return Ol.set.call(this,e[0],t,n,e[0])},globalThis.Iterator;var jl=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(tl(e)&&!tl(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(tl(t)||_s(6),void 0===n||tl(n)||_s(7),Bs(e)){const i=wl(this),o=zl(0,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?bl(i):vl(i)}return yl(i,n),xl(r,i)}if(!e||!el(e)){if(r=t(e),void 0===r&&(r=e),r===Ms&&(r=void 0),this.autoFreeze_&&al(r,!0),n){const t=[],i=[];hl(ul).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}_s(1)},this.produceWithPatches=(e,t)=>{if(tl(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},nl(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),nl(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),nl(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Bs(e)||_s(8),qs(e)&&(qs(t=e)||_s(10),e=Rl(t));const n=wl(this),r=zl(0,e,void 0);return r[Ns].isManual_=!0,vl(n),r}finishDraft(e,t){const n=e&&e[Ns];n&&n.isManual_||_s(9);const{scope_:r}=n;return yl(r,t),xl(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=hl(ul).applyPatches_;return qs(e)?r(e,t):this.produce(e,e=>r(e,t))}},$l=jl.produce,Fl=(e,t)=>`${e}_${t}`,ql=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=Ot(),o=i(),a=k(()=>`${e}_${((e,t=!0,n=!0)=>{let r="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),n&&(i=`${i}0123456789`);let o=i.length;for(let a=0;a<e;a++)r+=i.charAt(Math.floor(Math.random()*o));return r})(8)}`,[e]);g(()=>{if(t)return o(`sources.${a}`,{id:a,meta:{id:e,source:t,name:n,fields:r}}),()=>o(`sources.${a}`,void 0,{unmount:!0})},[a,t]),g(()=>{t&&o(`sources.${a}.meta.fields`,r,{raw:!0})},[r,t,a,o])},Bl=e=>{let t=x(e);return t.current!==e&&!ai(t.current,e)&&(t.current=e),t.current},Ul=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:o}=n;if(!Array.isArray(o)||0===o.length)return{...e,[r]:i};let a=o.find(e=>Po(e.when,t));return{...e,[r]:a?a.value:i}},{}):{},Hl=()=>{let{environment:e}=X(),[[t,n,r,i]]=_t(["schema.variables","navigation.routeParams","navigation.queryParams","navigation.hostname"]);return Bl(k(()=>Ul(t,{routeParams:n,queryParams:r,hostname:i,environment:e}),[e,i,r,n,t]))},Wl=W("DevToolsContext",{logs:[],providers:{}}),Vl="data-plitzi-devtools",Gl=(e,t=2)=>String(e).padStart(t,"0"),Kl=()=>typeof window<"u",Jl=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;#n=/* @__PURE__ */new Set;#r=[];recentLimit=200;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}addListener(e,{replay:t=!1}={}){if(t)for(let n of this.#r)e(n);return this.#n.add(e),()=>{this.#n.delete(e)}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#i(e,t,n,r){if(!this.callbackInternal&&!Kl())return;let i=this.getTime(!0);if(Kl()){let o={logType:e,category:t,message:n,params:r,time:i};this.#r.push(o),this.#r.length>this.recentLimit&&this.#r.shift();for(let e of this.#n)e(o)}if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#o()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#o(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?(e=>`${Gl(e.getHours())}:${Gl(e.getMinutes())}:${Gl(e.getSeconds())}.${Gl(e.getMilliseconds(),3)}`)(t):t}info(e,t,n){this.#i("info",e,t,n)}warning(e,t,n){this.#i("warning",e,t,n)}danger(e,t,n){this.#i("danger",e,t,n)}success(e,t,n){this.#i("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Yl(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Jl.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Xl="[A-Za-z_][A-Za-z0-9_]*",Ql=RegExp(`^${Xl}$`),Zl=(/* @__PURE__ */RegExp(`^!?${Xl}$`),new Set(["__proto__","constructor","prototype"])),ec=e=>Ql.test(e)&&!Zl.has(e),tc=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},nc=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},rc=(e,t)=>{let n=tc(e),r=(e=>Object.entries(e).filter(([e])=>ec(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},ic=["server","sdk","qa"],oc=(e,t)=>{let n=((e,t)=>Array.isArray(e.rules)?e.rules.findIndex(e=>(e=>"object"==typeof e&&!!e&&"rules"in e&&Array.isArray(e.rules)&&e.rules.some(e=>!("object"!=typeof e||!e||"enabled"in e&&!1===e.enabled)))(e.when)&&((e,t)=>!!Po(e,t))(e.when,t)):-1)(e,t);return-1===n?{value:e.value,layer:"space"}:{value:e.rules[n].value,layer:"space",rule:n}},ac=(e,t={},n={})=>Object.fromEntries(Object.entries(e??{}).map(([e,r])=>[e,ic.reduce((t,r)=>{let i=n[r]?.[e];return"boolean"==typeof i?{value:i,layer:r}:t},oc(r,t))])),sc=e=>Object.fromEntries(Object.entries(e).map(([e,{value:t}])=>[e,t])),lc=(e,t)=>!e||(t[e.name]??!1)===e.is,cc="data-plitzi-fonts",uc=W("PlitziServiceContext",{}),dc=()=>{let e=h(uc);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},pc=e=>{let{children:t,value:n}=e;/* @__PURE__ */
|
|
25
|
+
return I(uc,{value:n,children:t})},hc={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},fc=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",MASK_SIZE:"mask-size",MASK_POSITION:"mask-position",MASK_REPEAT:"mask-repeat",MASK_COMPOSITE:"mask-composite",WEBKIT_MASK_IMAGE:"-webkit-mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",TRANSITION_BEHAVIOR:"transition-behavior",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",ANIMATION_TIMELINE:"animation-timeline",ANIMATION_RANGE:"animation-range",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",TRANSLATE:"translate",ROTATE:"rotate",SCALE:"scale",TRANSFORM_STYLE:"transform-style",PERSPECTIVE:"perspective",PERSPECTIVE_ORIGIN:"perspective-origin",BACKFACE_VISIBILITY:"backface-visibility",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",SCROLL_SNAP_TYPE:"scroll-snap-type",SCROLL_SNAP_ALIGN:"scroll-snap-align",SCROLL_SNAP_STOP:"scroll-snap-stop",SCROLL_PADDING_TOP:"scroll-padding-top",SCROLL_MARGIN_TOP:"scroll-margin-top",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",CONTENT:"content",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",SCROLLBAR_WIDTH:"scrollbar-width",SCROLLBAR_COLOR:"scrollbar-color",CONTAINER_TYPE:"container-type",CONTAINER_NAME:"container-name",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",FONT_VARIANT_NUMERIC:"font-variant-numeric",FONT_FEATURE_SETTINGS:"font-feature-settings",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WRITING_MODE:"writing-mode",TEXT_ORIENTATION:"text-orientation",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",WEBKIT_TEXT_FILL_COLOR:"-webkit-text-fill-color",WEBKIT_BACKGROUND_CLIP:"-webkit-background-clip",BOX_DECORATION_BREAK:"box-decoration-break",WEBKIT_BOX_DECORATION_BREAK:"-webkit-box-decoration-break",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),{desktop:1024,tablet:768,mobile:0}),mc=e=>0===fc[e]?"0":`${String(fc[e]/16)}rem`,gc=e=>e<=fc.tablet?"mobile":e<=fc.desktop?"tablet":"desktop",yc="plitzi-sdk-runtime",bc=e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{}),vc="https://fonts.googleapis.com",wc={woff2:"font/woff2",woff:"font/woff"},kc=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},xc=e=>{try{return new URL(e).origin}catch{return}},Sc={"<":"\\3c ",">":"\\3e "},Tc=e=>`"${e.replace(/[\\"<>]/g,e=>Sc[e]??`\\${e}`)}"`,Cc=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,Ec=e=>encodeURIComponent(e).replace(/%20/g,"+"),Ac=(e,t)=>["@font-face{",`font-family:${Tc(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${Tc(t.url)}) format(${Tc(t.format)});`,t.unicodeRange&&Cc.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),Ic="/*plitzi:style-cache*/",Mc="/*plitzi:style-cache-end*/",Oc="plitzi-component--hidden",Nc=(e,t)=>{let n=(e=>e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+|-+$/g,"")||"section")(e),r=n;for(let i=2;t.has(r);i+=1)r=`${n}-${String(i)}`;return t.add(r),r},_c="props",Pc={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[],components:{}},Lc=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},Dc=(e,t,n)=>{let r=[],i=/* @__PURE__ */new Set,o=t,a=n;for(;o&&!i.has(o)&&r.length<16;){let t=e(o);if("layoutContainer"!==t?.definition.type)break;i.add(o),r.push({layout:o,slot:a||o}),o=Lc(t,"layout"),a=Lc(t,"layoutContainer")}return r},zc=(e,t,n,r)=>{if(void 0===t)return[];let i=n?new Set(n):void 0,o=[],a=/* @__PURE__ */new Set,s=e.flat[t],l=e=>"string"==typeof e?e:"",c=[t,...s?Dc(t=>e.flat[t],l(s.attributes.layout),l(s.attributes.layoutContainer)).map(e=>e.layout):[]];for(;c.length>0;){let t=c.pop();if(void 0===t||a.has(t))continue;a.add(t);let n=e.flat[t];if(!n||r&&!lc(n.definition.flag,r))continue;"server"===n.definition.runtime&&(!i||i.has(n.id))&&o.push(n);let{items:s}=n.definition;s&&c.push(...s)}return o},Rc=W("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"}),jc=W("NetworkInternalContext",{}),$c=e=>({...e.enter?{enter:e.enter}:{},...e.on?{on:e.on}:{},..."number"==typeof e.duration?{duration:e.duration}:{},..."number"==typeof e.delay?{delay:e.delay}:{},..."number"==typeof e.stagger?{stagger:e.stagger}:{},...e.loop?{loop:e.loop}:{}}),Fc=({definition:e,...t})=>{let{parentId:n,items:r,bindings:i,interactions:o,initialState:a,runtime:s,loadStrategy:l,flag:c,anchor:u,motion:d,quiet:p,...h}=e;return{...t,definition:{...h,...null==n?{}:{parentId:n},...null==r?{}:{items:r},...null==i?{}:{bindings:i},...null==o?{}:{interactions:o},...null==a?{}:{initialState:a},...null==s?{}:{runtime:s},...null==l?{}:{loadStrategy:l},...null==c?{}:{flag:c},...null==u?{}:{anchor:u},...null==d?{}:{motion:$c(d)},...null==p?{}:{quiet:p}}}},qc=e=>({...e,flat:Object.fromEntries(e.flat.map(e=>[e.id,Fc(e)]))}),Bc={},Uc={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n variables\n cache\n }\n # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it\n # would have been handed in an SSR bootstrap travels here instead.\n render {\n overQuota\n }\n }\n }\n"},Hc="theme",Wc=["dark","light"],Vc=[...Wc,"system"],Gc=(e="theme")=>We({mode:"system",scheme:"light",areas:{}},{id:e}),Kc=Gc(),Jc=(e,t)=>"system"===e?t:e,Yc=(e,t=Kc)=>{t.batch(()=>{t.setState("mode",e),t.setState("areas",{})})},Xc=(e,t=Kc)=>{t.setState("scheme",e)},Qc=W("ThemeScopeContext",void 0),Zc="(prefers-color-scheme: dark)",eu=({state:e})=>(Pt(["theme.mode","theme.resolved","theme.areas"],[e.mode,Jc(e.mode,e.scheme),e.areas]),null),tu=({defaultTheme:e="system",theme:t,scope:n="document",cookieName:r=Hc,children:i})=>{let o="container"===n,a=b(),[s]=S(()=>o?Gc(`theme${a}`):void 0),l=s??Kc,c=x({mode:e,remembered:!1});wt(()=>{let n=o?void 0:((e=Hc)=>{try{return((e,t=Hc)=>{let n=ci(e,t);return(e=>Vc.includes(e))(n)?n:void 0})(document.cookie,e)}catch{return}})(r),i=t??n??e;c.current={mode:i,remembered:void 0!==n},l.batch(()=>{Xc(window.matchMedia(Zc).matches?"dark":"light",l),Yc(i,l)})},[e,t,r,o,l]);let u=T(l.subscribe,l.getState,l.getState),d=void 0!==h(mt);g(()=>{let e=window.matchMedia(Zc),t=()=>Xc(e.matches?"dark":"light",l);return e.addEventListener("change",t),t(),()=>e.removeEventListener("change",t)},[l]),g(()=>{if(o)return;let e=()=>{let{mode:e}=l.getState();(c.current.remembered||e!==c.current.mode)&&(((e,t=Hc)=>{try{document.cookie=`${t}=${encodeURIComponent(e)};path=/;max-age=31536000;SameSite=Lax`}catch{}})(e,r),c.current.remembered=!0),((e,t)=>{for(let n of Wc)t.classList.toggle(n,e===n)})(e,document.documentElement)};return e(),l.subscribe(e)},[r,o,l]);let p=d?/* @__PURE__ */I(eu,{state:u}):null;return o?/* @__PURE__ */M(Qc,{value:s,children:[p,i]}):/* @__PURE__ */M(A,{children:[p,i]})},nu="canvas",ru=e=>{let t=h(Qc)??Kc,n=T(t.subscribe,t.getState,t.getState),r=((e,t)=>(t?e.areas[t]:void 0)??e.mode)(n,e),i=Jc(r,n.scheme),o=f(n=>e?((e,t,n=Kc)=>{n.setState(`areas.${e}`,t)})(e,n,t):Yc(n,t),[e,t]),a=f(()=>o("dark"===i?"light":"dark"),[i,o]);return k(()=>({theme:r,resolvedTheme:i,setTheme:o,toggleTheme:a}),[r,i,o,a])},iu=(e,t)=>{let n="string"==typeof e?{path:e,caseSensitive:!1,end:!0}:{path:e.path,caseSensitive:e.caseSensitive??!1,end:e.end??!0},[r,i]=((e,t,n)=>{let r=[],i=`^${e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,o)=>{if(r.push({paramName:t,isOptional:void 0!==n}),void 0===n)return"/([^\\/]+)";let a=o.charAt(i+e.length);return a&&"/"!==a?"/([^\\/]*)":"(?:/([^\\/]*))?"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2")}`;return e.endsWith("*")?(r.push({paramName:"*",isOptional:!1}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]})(n.path,n.caseSensitive,n.end),o=t.match(r);if(!o)return null;let a=o[0],s=o.slice(1),l=a.replace(/(.)\/+$/,"$1");return{params:i.reduce((e,{paramName:t,isOptional:n},r)=>{let i=s[r];if("*"===t){let e=i??"";l=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return n&&!i?(e[t]=void 0,e):(e[t]=(i??"").replace(/%2F/g,"/"),e)},{}),pathname:a,pathnameBase:l,pattern:n}},ou=e=>/^https?:\/\//i.test(e),au=e=>e.replaceAll(/\/+/g,"/"),su=e=>au(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi,":$1")),lu=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${lu(e,r)}/${n}`:n};function cu(e,t,n,r=!1){let i=n.replace(/^\/+/,""),{slug:o="",folder:a,default:s}=e[i]?.attributes??{slug:i,folder:"",default:!1};if(s&&!r)return{"/":n,[`/${n}`]:n};if(s&&r)return"/";if(!a&&!r)return{[su(`/${o}`)]:n,[su(`/${n}`)]:n};if(!a&&r)return au(`/${o}`);if(!t.find(e=>e.id===a))return r?au(`/${o}`):{[su(`/${o}`)]:n,[su(`/${n}`)]:n};let l=[lu(t.reduce((e,t)=>({...e,[t.id]:t}),{}),a),o].filter(Boolean).join("/");return r?au(`/${l}`):{[su(`/${l}`)]:n,[su(`/${n}`)]:n}}var uu=(e,t,n)=>{let r=n.indexOf("#");if(r>0)return`${uu(e,t,n.slice(0,r))}${n.slice(r)}`;let i=e[n];if(!i)return n;let{slug:o,default:a}=i.attributes;return"string"==typeof o?cu(e,t,n,!0):a?"/":`/${n}`},du=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),pu=(e={},t=[],n,r="",i=!0)=>Object.keys(e).reduce((o,a)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[a],u=e[a].attributes.unauthorizedPageRedirect;if(!l&&i)return o;u&&=(e=>ou(e)||e.includes("{{"))(u)?u:cu(e,t,u,!0);let d=cu(e,t,a),p="*"===e[a].attributes.slug,h=Object.keys(d).map(e=>({pageId:a,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${a}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:du(s,n,i),...p?{notFound:!0}:{}}));return[...o,...h]},[]).sort((e,t)=>!!e.notFound==!!t.notFound?e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1:e.notFound?1:-1),hu=(e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=iu({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=e=>e.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e)??e.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),o=i(r.filter(({path:e})=>!e.notFound))??i(r.filter(({path:e})=>e.notFound));if(!o)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:a,matchResult:s,path:{hasAccess:l,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,notFound:d}}=o;return!l&&"redirect"===c&&u?{action:{type:"redirect",path:u},pathMatch:void 0}:l?{action:{type:d?"notFound":"normal",path:void 0},pathMatch:s,pageId:a}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}},fu=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],mu=e=>`rsc.data.${e}`,gu=()=>typeof window>"u"?"":`${window.location.pathname}${window.location.search}`,yu="*",bu=/* @__PURE__ */new Map,vu=/* @__PURE__ */new WeakMap,wu=()=>({seq:0,inFlight:/* @__PURE__ */new Set,asked:/* @__PURE__ */new Map}),ku=e=>{let t=e.get("rsc.instance");if("string"==typeof t&&t){let e=bu.get(t);if(e)return e;let n=wu();return bu.set(t,n),n}let n=vu.get(e);if(n)return n;let r=wu();return vu.set(e,r),r},xu=(e,t)=>{let n={};t.inFlight.forEach(e=>{e.here&&(e.ids??[yu]).forEach(e=>{n[e]=!0})}),e.set("rsc.refreshing",n)},Su=async(e,t,n,{location:r,fresh:i=!1}={})=>{let{enabled:o,endpoint:a}=e.get("rsc")??{};if(!o||!a||typeof window>"u")return;let s=r??gu(),l=e.get("schema"),c=e.get("runtime.sources.auth"),u=r?((e,t,n)=>{if(!e)return;let r=e.pages.reduce((t,n)=>(n in e.flat&&(t[n]=e.flat[n]),t),{});return hu(pu(r,e.pageFolders,n),t.split("?")[0],n).pageId})(l,r,!!c?.details):e.get("navigation.currentPageId"),d=r?void 0:e.get("runtime.sources.flags");if(!l)return;let p=t?.length?((e,t,n,r)=>{let i=new Set(zc(e,t,[...n],r).map(({id:e})=>e));return n.filter(e=>i.has(e))})(l,u,t,d):void 0;if(p?!p.length:!((e,t,n)=>zc(e,t,void 0,n).length>0)(l,u,d))return;let h=new URLSearchParams({location:s});p?.length&&h.set("ids",p.join(",")),Object.entries(n??{}).forEach(([e,t])=>h.set(e,t));let f=`${a}?${h.toString()}`,m=ku(e),g=[...m.inFlight].find(e=>e.url===f&&(e.fresh||!i));if(g)return g.promise;m.inFlight.forEach(e=>{((e,t)=>!e||!!t&&t.every(t=>e.includes(t)))(p,e.ids)&&e.controller.abort()});let y=++m.seq;p?.length?p.forEach(e=>m.asked.set(e,y)):(m.asked.clear(),m.asked.set(yu,y));let b=new AbortController,v={url:f,...p?.length?{ids:p}:{},here:s===gu(),fresh:i,seq:y,controller:b,promise:Promise.resolve()},w=async t=>{let n=await fetch(f,{...i?{cache:"no-cache",headers:{Accept:"application/json","Cache-Control":"no-cache"}}:{headers:{Accept:"application/json"}},signal:b.signal});if(!n.ok){let r=ti(n.status,await n.json().catch(()=>{}));return r&&await Zr({reason:r,url:a})&&!t?w(!0):void e.set("rsc.stale",!0)}let{serverData:r,actionRuns:o}=await n.json();o?.length&<(o),((e,t,n,r,i)=>{let{ids:o,seq:a}=n;e.batch(()=>{if(o?.length)Object.entries(r).forEach(([n,r])=>{(t.asked.get(n)??0)<=a&&(t.asked.get(yu)??0)<=a&&e.set(mu(n),r)});else{let n=e.get("rsc.data")??{},i=e=>e!==yu&&(t.asked.get(e)??0)>a,o=Object.fromEntries([...Object.entries(r).filter(([e])=>!i(e)),...Object.entries(n).filter(([e])=>i(e))]);e.set("rsc.data",o)}e.set("rsc.loaded",!0),e.set("rsc.stale",!1),e.set("rsc.location",i)})})(e,m,v,r??{},s)};return v.promise=w(!1).catch(()=>{b.signal.aborted||e.set("rsc.stale",!0)}).finally(()=>{m.inFlight.delete(v),xu(e,m)}),m.inFlight.add(v),xu(e,m),v.promise},Tu=()=>{let e=Nt();return f((t,n,{fresh:r}={})=>Su(e,t,n,{fresh:r}),[e])},Cu=e=>new Set(Array.isArray(e?.paintedState)?e.paintedState.filter(e=>"string"==typeof e&&""!==e):[]),Eu=(e,t)=>nr(e)?Object.fromEntries(Object.entries(e).filter(([e,n])=>t.has(e)&&void 0!==n)):{},Au=e=>{try{document.cookie=`${e}=;path=/;max-age=0;SameSite=Lax`}catch{}},Iu=/* @__PURE__ */new Set(["init","initLoading","authenticating"]),Mu=e=>{let t=e.runtime?.sources.auth;if(t){if(void 0===t.status)return{kind:"browser"};if(!Iu.has(t.status))return t.isAuthenticated&&void 0!==t.details?.id?{kind:"account",id:String(t.details.id)}:{kind:"guest"}}},Ou=e=>{switch(e.kind){case"account":return`user:${e.id}`;case"guest":return"guest";case"browser":return""}},Nu=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))),_u=(e,t)=>nr(e)?Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))):{},Pu=e=>e.schema?.settings,Lu=e=>new Set((e?.transientState??[]).filter(e=>"string"==typeof e&&""!==e)),Du=(e,t)=>{let n,r=((e,t)=>{let n=t?.split(":")[1];return n?`plitzi_${e}_painted_${n}`:`plitzi_${e}_painted`})(t,typeof window>"u"?void 0:window.location.host),i=!1;return()=>{let t=e.getState();if(typeof document>"u"||t.render?.isHydrating&&!t.render.hydrated)return;let o=Pu(t),a=Cu(o),s=Mu(t);if(!o?.keepState||0===a.size||void 0===s)return;let l=Ou(s),c=t.runtime?.state;if(!i){i=!0;let t=(e=>((e,t)=>{let n=ci(e,t);if(void 0!==n)try{let e=JSON.parse(n);return nr(e)&&"string"==typeof e.owner&&nr(e.values)?{owner:e.owner,values:e.values}:void 0}catch{return}})(ui(),e))(r);if(t&&t.owner!==l&&(Au(r),nr(c)&&[...a].some(e=>e in c)))return void e.setState("runtime.state",Nu(c,a));n=t?.owner===l?JSON.stringify(Eu(t.values,a)):void 0}let u=Eu(c,a),d=JSON.stringify(u);if(d!==n){if(n=d,0===Object.keys(u).length)return void Au(r);"too-large"===((e,t)=>{let n=encodeURIComponent(JSON.stringify(t));if(n.length>3072)return Au(e),"too-large";try{return document.cookie=`${e}=${n};path=/;max-age=31536000;SameSite=Lax`,"written"}catch{return"unavailable"}})(r,{owner:l,values:u})&&Jl.warning("store",`settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...a].join(", ")}. Declare only what the first paint shows.`,{storeName:"runtime",path:"runtime.state",prev:void 0,next:u})}}},zu=e=>{let t=(e=>{let{key:t,storage:n,paths:r,partialize:i,partializePath:o,version:a=0,migrate:s,merge:l,mergePath:c,enabled:u}=e,d="function"==typeof n?n:void 0,p="function"==typeof n?void 0:ge(n);if(!d&&!p)return()=>{};let h=e=>{if(!d)return p;let t=d(e);return t?ge(t):void 0},f=e=>{if(r){let t={};for(let n of r){let r=ae(e,n);t[n]=o?o(n,r,e):r}return t}return i?i(e):e};return e=>{if(ee(u,e.getState()))return;let n=!1,i=()=>{if(n)return;let i=h(e.getState());i&&(n=!0,function(e,t,n,{version:r,paths:i,migrate:o,merge:a,mergePath:s}){let l=n?.getItem(t);if(l)try{let t=JSON.parse(l),n=t.version!==r;if(n&&!o)return;let c=n&&o?o(t.state,t.version):t.state;if(i){let t=c;return void e.batch(()=>{for(let n of i)if(n in t){let r=s?s(n,t[n],ae(e.getState(),n),e.getState()):t[n];e.setState(n,r)}})}let u=c;e.setState(void 0,a?a(u,e.getState()):u)}catch{n?.removeItem(t)}}(e,t,i,{version:a,paths:r,migrate:s,merge:l,mergePath:c}))};return{hydrate:i,onChange:n=>{i(),(e=>!r||r.some(t=>se(e,t)))(n.path)&&(e=>{let n=e.getState(),r=h(n);if(!r)return;let i={version:a,state:f(n)};r.setItem(t,JSON.stringify(i))})(e)}}}})({key:`plitzi_${e}_state`,paths:["runtime.state"],partializePath:(e,t,n)=>nr(t)?Nu(t,Lu(Pu(n))):t,mergePath:(e,t,n,r)=>{let i=Lu(Pu(r));return i.size>0&&nr(t)?{...Nu(t,i),..._u(n,i)}:t},storage:e=>{let{render:t}=e;if(t?.isHydrating&&!t.hydrated)return!1;let n=Pu(e),r=Mu(e);if(!n?.keepState||void 0===r)return!1;let i=(e=>{try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}})("sessionStorage"===n.stateStorage?"session":"local");return!!i&&((e,t)=>({getItem:n=>{let r=e.getItem(n);if(null===r)return null;try{let e=JSON.parse(r);if(e.owner===t&&"string"==typeof e.payload)return e.payload}catch{}return e.removeItem(n),null},setItem:(n,r)=>e.setItem(n,JSON.stringify({owner:t,payload:r})),removeItem:t=>e.removeItem(t)}))(i,Ou(r))}});return n=>{let r=t(n),i=n.getState().runtime?.state,o=Mu(n.getState()),a=Du(n,e);return{...r,onChange:e=>{let t=o,s=Mu(n.getState());if(void 0!==s&&(o=s),"account"===t?.kind&&void 0!==s&&Ou(s)!==Ou(t)){let e=nr(i)?Nu(i,Cu(Pu(n.getState()))):i;n.setState("runtime.state",e)}r?.onChange?.(e),a()}}}},Ru=typeof window>"u",ju={},$u=()=>()=>{},Fu=()=>!0,qu=()=>!1,Bu=({id:e,definition:t,plitziElementLayout:n,children:r,previewMode:o,visible:a=!0})=>{let[[s,l]]=_t(["schema.flat","rsc.enabled"],{mode:"mount"}),[c=ju]=_t("runtime.sources.flags"),{components:d,componentDefinitions:p}=h(Fr),{contexts:{PluginsContext:m}}=dc(),{plugins:g}=h(m),{items:y}=t,b=p.current[t.type],v=t.loadStrategy??b?.definition.loadStrategy??"eager",w=n||r||y?.length,S=x(!1);a&&(S.current=!0);let C=!o||"eager"===v||a||"lazy"===v&&S.current,E=n?`${n.type}:${n.rootId}:${n.slots.join(",")}`:"",A=T($u,Fu,qu),M=n?.slots.includes(e)??!1,O=(e=>{let t=h(Gr),n=f(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):Kr,[e,t]),r=f(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return T(n,r,r)})(M?e:void 0);return k(()=>{if(!w||!C)return;let e=(y??[]).filter(e=>{let t=s[e];if(!t||!lc(t.definition.flag,c))return!1;if(!o||!l)return!0;let n=t.definition.runtime??"shared";return!(!A&&"client"===n)}).map(e=>{let{rootId:t,type:r,runtime:i}=sr(s,`${e}.definition`,{}),a=sr(n,"rootId",t),c=r in d.current||!!Wr({type:r,plugins:g}),u=Vr({key:!o&&n?`${e}_${E}`:e,plitziElementLayout:n,type:r,internalProps:{id:e,rootId:a},components:d.current,plugins:g});return l&&"server"===i&&!Ru&&o?/* @__PURE__ */I(Xr,{id:e,frozen:!(A&&c),children:u},e):u});return M&&e.push(/* @__PURE__ */I(i,{children:O},"#layout-body")),Array.isArray(r)?e.push(...r.filter(u)):u(r)&&e.push(/* @__PURE__ */I(i,{children:r},"#children")),y?1===e.length?e[0]:e:void 0},[w,C,y,c,n,r,s,o,l,A,E,d,g,e,M,O])},Uu=/* @__PURE__ */new Map,Hu={settled:/* @__PURE__ */new Set([_c])},Wu=(e,t,n={},r={})=>{let i,{attributes:o,definition:a}=e,{rootId:s,plitziElementLayout:l}=t;t.attributes&&(o={...o,...t.attributes});let c=o;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(a.bindings)){let t=((e,t,n={})=>{let{attributes:r,definition:i}=t,{bindings:o}=i;return!o||"object"==typeof o&&!Object.keys(o).length?{attributes:r,style:{},definition:i}:$l({attributes:r,style:n,definition:i},t=>{Object.keys(o).forEach(n=>{o[n]&&Array.isArray(o[n])&&o[n].length&&o[n].forEach(r=>{let{source:i,transformers:o,when:a,enabled:s=!0}=r,{to:l}=r;if(!l||a&&!Po(a,e,!1,!0)||!s)return;"style"===n&&(l=function(e){if(!e)return"";let t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/[_\s-]+/g," ").trim().split(/\s+/);return 0===t.length?"":t.map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}(l));let{fromValue:c,toValue:u}=((e,t,n,r,i)=>{let o="initialState"===r?`definition.${r}.${i}`:`${r}.${i}`;return{fromValue:t?sr(e,t):void 0,toValue:sr(n,o,t?sr(e,t):void 0)}})(e,i,t,n,l),d=c;o&&Array.isArray(o)&&o.length>0&&o.forEach(n=>{let{action:r,params:i,enabled:o=!0}=n;if(!o)return;let a=Ho[r];a&&(d=a.callback(d,((e,t)=>{if(!t)return t;let n=t;for(let[r,i]of Object.entries(e.params)){let e=t[r];"true"!==e&&"false"!==e||"checkbox"!==("function"==typeof i.type?i.type(t):i.type)||(n===t&&(n={...t}),n[r]="true"===e)}return n})(a,i)??{},t,{...e,sourceTo:u}))}),"initialState"===n&&"visibility"===l&&i&&void 0!==sr(e,i)&&(d=$o(d)),("boolean"==typeof d||"number"==typeof d||d)&&lr(t,"initialState"===n?`definition.${n}.${l}`:`${n}.${l}`,d)})})})})(n,{...e,attributes:o},i);({attributes:o,definition:a,style:i}=t)}else i={};let u=Object.keys(o).filter(e=>{let t=o[e];return"string"==typeof t&&t===c[e]&&Zn(t)});return u.length>0&&(o=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:o={},origin:a="",navigation:s,...l}=n,c={...o,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:a}},u={...e};for(let d of t)u[d]=Fn(e[d],c,Hu);return u})(o,u,n)),o={...o,...J(r,["visibility","styleSelectors"])},a={...a,styleSelectors:{...a.styleSelectors,...a.initialState?.styleSelectors,...r.styleSelectors??{}}},a.styleSelectors=(e=>{let t=e.initialState?.styleVariant;return Object.fromEntries(Object.entries(e.styleSelectors).map(([n,r])=>{let i="base"===n?`plitzi__${e.type}`:`plitzi__${e.type}-${n}`;if("string"!=typeof r)return[n,r];!(e=>{let t=Uu.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),Uu.set(e,t)),t})(e.type).test(r)&&t?.[e.type]?.[n]&&(r=r?`${e.type} ${r}`:e.type);let o=r.replace(/\S+/g,r=>{let i=t?.[r]?.[n];if(!i)return r;let o=Array.isArray(i)?i:[i];return r===e.type&&"base"===n?o.map(e=>`${r}--${e}`).join(" "):r===e.type&&"base"!==n?o.map(e=>`${r}-${n}--${e}`).join(" "):`${r} ${o.map(e=>`${r}--${e}`).join(" ")}`});return o?[n,`${i} ${o}`]:[n,i]}))})(a),{...t,rootId:sr(l,"rootId",s),attributes:{...o,...J(t,["id","rootId","attributes","definition","plitziElementLayout"])},definition:a,elementState:{...a.initialState,...r},style:i}},Vu=e=>Object.values(e??{}).filter(e=>"string"==typeof e&&Zn(e)),Gu=({element:e,children:t,internalProps:n,previewMode:r=!1,parentVisible:i=!0})=>{let{id:o}=n,{state:a,setElementState:s}=(({id:e,bindings:t,previewMode:n})=>{let{scopePath:r}=Nt(),i=k(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(e,r),[e,r]),[o]=_t(i),a=o??jr,s=Dt(),l=k(()=>(t?.attributes&&Array.isArray(t.attributes)?t.attributes:[]).filter(e=>!1!==e.enabled).map(e=>sr(e,"to","")),[t]),c=f(e=>!!n&&(s(i,t=>{if(!e)return{};let n="function"==typeof e?e(t??jr):e;return l.length&&(n=fr(n,l)),n}),!0),[l,i,n,s]);return g(()=>{if(n&&r)return()=>s(i,void 0)},[n,r,i,s,e]),{state:a,setElementState:c}})({id:o,bindings:e.definition.bindings,previewMode:r}),l=k(()=>{let t=[...Vu(e.attributes),...Vu(n.attributes)];return t.length>0?(e=>["variables",...new Set(e.flatMap(e=>tr(e)))])(t):void 0},[e.attributes,n.attributes]),[[c,u,d]]=_t(["navigation.routeParams","navigation.queryParams","navigation.origin"],{enabled:void 0!==l}),p=(({bindings:e,sources:t})=>{let n=k(()=>{let n=new Set(t??[]);for(let t of Object.values(e??{}))if(Array.isArray(t))for(let e of t)for(let t of rr(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},[e,t]),r=k(()=>n.map(e=>`runtime.sources.${e}`),[n]),[i]=_t(r);return k(()=>{let e={};return n.forEach((t,n)=>{void 0!==i[n]&&((e,t,n)=>{let r=t.split("."),i=e;for(let o of r.slice(0,-1)){let e=i[o],t=nr(e)?e:{};i[o]=t,i=t}i[r[r.length-1]]=n})(e,t,i[n])}),e},[n,i])})({bindings:e.definition.bindings,sources:l}),h=k(()=>({...Wu(e,n,{...p,routeParams:c,queryParams:u,origin:d},a),setElementState:s}),[e,n,p,c,u,d,a,s]);return{internalProps:h,customProps:k(()=>J(h,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"]),[h]),children:Bu({id:o,definition:h.definition,plitziElementLayout:h.plitziElementLayout,children:t,previewMode:r,visible:i&&K(h.elementState.visibility)})}},Ku=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */I("div",{children:"Something broke! Please refresh and try again."}):e}},Ju=W("EventBridgeContext",{}),Yu=Object.freeze({}),Xu=Object.freeze({}),Qu=e=>{if(void 0===e)return"undefined";if(null===e)return"null";let t=typeof e;if("function"===t)return"ƒ";if("string"===t){let t=e;return JSON.stringify(t.length>40?`${t.slice(0,40)}…`:t)}return"symbol"===t?e.toString():"number"===t||"boolean"===t||"bigint"===t?`${e}`:Array.isArray(e)?0===e.length?"[]":`[…${e.length}]`:"$$typeof"in e?"<ReactElement>":"{…}"},Zu=e=>{if("object"!=typeof e||!e)return Qu(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(Qu).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${Qu(t[e])}`).join(", ")}${n.length>4?", …":""} }`},ed=(e,t)=>{if(Object.is(e,t))return!0;if(null===e||null===t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.is(e[n],t[n]))},td=We({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),nd=((e={})=>{let{max:t=100,enabled:n}=e,r=new Z,i=[],o=0,a=()=>{r.forEach(e=>e())},s=e=>{o+=1;let n={seq:o,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},r=i.length>=t?i.slice(i.length-t+1):i.slice();r.push(n),i=r,a()};return{middleware:e=>{if(!ee(n,e.getState()))return{onChange:s}},record:s,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>o,subscribe:e=>r.add(e),clear:()=>{i=[],a()}}})({max:30}),rd=[],id=/* @__PURE__ */new Map,od=/* @__PURE__ */new Map,ad=/* @__PURE__ */new Map,sd=/* @__PURE__ */new Map,ld=!0,cd=/* @__PURE__ */new Map,ud=/* @__PURE__ */new Map,dd=0,pd=/* @__PURE__ */new Map,hd=!1,fd=!1,md=0,gd=!1,yd=!1,bd="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},vd=()=>{ld&&(ld=!1,td.setState("tree",(()=>{let e={};for(let[t,n]of sd)e[t]={parentId:od.get(t),baseDuration:n,elementId:ad.get(t)??t,mountedAt:cd.get(t),unmountedAt:ud.get(t)};return e})())),td.setState("hydrated",yd),td.setState("commits",rd)},wd=e=>{od.delete(e),ad.delete(e),sd.delete(e),cd.delete(e),ud.delete(e),ld=!0},kd=()=>{if(gd=!1,id.size>0){let e=[...id.values()].sort((e,t)=>e.timestamp-t.timestamp);id.clear(),(rd=[...rd,...e]).length>200&&(rd=rd.slice(rd.length-200)),(e=>{for(let[t,n]of ud)n<=e&&wd(t)})(rd[0].commitId)}fd&&vd()},xd=()=>{let e=nd.entriesSince(dd);dd=nd.lastSeq();let t=/* @__PURE__ */new Map;for(let n of e){if(void 0===n.path)continue;let e=t.get(n.path);e?e.next=n.nextValue:t.set(n.path,{prev:n.prevValue,next:n.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${Zu(t.prev)} → ${Zu(t.next)}`}))},Sd={onRender:(e,t,n,r,i,o)=>{hd||(hd=!0,td.setState("enabled",!0));let a=!sd.has(e);sd.set(e,r);let s=pd.get(e);pd.delete(e);let l={id:e,elementId:ad.get(e)??e,parentId:od.get(e),phase:t,actualDuration:n,baseDuration:r,changedProps:s},c=id.get(o);c?(c.elements.push(l),c.elementCount+=1,c.duration=Math.max(c.duration,n)):(md+=1,id.set(o,{commitId:md,timestamp:o,duration:n,elementCount:1,elements:[l],causes:xd()})),a&&(cd.set(e,id.get(o)?.commitId??md),ld=!0),gd||(gd=!0,bd(kd))},lastCommitId:()=>md,commitsSince:e=>{let t=[...id.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...rd,...t].filter(t=>t.commitId>e)},linkParent:(e,t,n)=>{(!od.has(e)||od.get(e)!==t)&&(ld=!0),od.size>=2e4&&!od.has(e)&&(od.clear(),ad.clear(),sd.clear(),cd.clear(),ud.clear(),ld=!0),od.set(e,t),ad.set(e,n)},markMounted:e=>{ud.delete(e)&&(ld=!0)},markUnmounted:e=>{sd.has(e)?(ud.set(e,md),ld=!0,gd||(gd=!0,bd(kd))):wd(e)},recordProps:(e,t)=>{pd.set(e,t)},recordStoreChange:e=>{nd.record(e)},setHydrated:()=>{yd||(yd=!0,fd&&td.setState("hydrated",!0))},start:()=>{fd=!0,kd(),vd()},stop:()=>{fd=!1},clear:()=>{rd=[],id.clear(),dd=nd.lastSeq(),pd.clear(),md=0;for(let e of[...ud.keys()])wd(e);cd.clear(),ld=!0,vd()}},Td=/* @__PURE__ */$({default:()=>Cd}),Cd=e=>{let t=e.displayName||e.name,n=t=>{let n=x(void 0),r=x(void 0),{id:i,rootId:a}=t.internalProps,s=h(G),l=s?.visible??!0,c=`${i}${b()}`,u=s?.traceId??c,d=k(()=>({id:i,rootId:a,visible:l,traceId:u,plitziJsxSkipHOC:!0}),[i,a,l,u]),p=k(()=>({visible:l,traceId:u}),[l,u]);if(t.plitziJsxSkipHOC)/* @__PURE__ */return I(G,{value:p,children:/* @__PURE__ */I(V,{value:d,children:/* @__PURE__ */I(e,{...t})})});let{settings:{previewMode:f,debugMode:m},root:{baseElementId:y}}=dc();g(()=>{if(m)return Sd.markMounted(c),()=>Sd.markUnmounted(c)},[m,c]);let[v]=_t(`schema.flat.${i}`);if(!v)throw Error(`Element ${i} not found, Page ${y}`);let{internalProps:w,customProps:S,children:T}=Gu({element:v,internalProps:t.internalProps,children:t.children,previewMode:f,parentVisible:l}),{attributes:C,definition:E,style:A,plitziElementLayout:M,elementState:O,setElementState:N}=w;((e,t=Yu,n=Xu,r=Ju,i=!1)=>{let{eventBridge:o}=h(r);g(()=>{if(i||!o||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&o.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&o.off(e,t,n)}},[e,t,o,n,i])})("element",k(()=>({[`${i}_setState`]:N}),[i,N]));let _=l&&K(O.visibility),P=k(()=>({id:i,rootId:a,visible:_,traceId:c,attributes:C,definition:E,plitziElementLayout:M,style:A,elementState:O,setElementState:N}),[C,E,O,i,M,a,A,N,_,c]),L=k(()=>({visible:_,traceId:c}),[_,c]),D=k(()=>{let r={...w.attributes,...t.extraProps,...S,...J(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return T&&(r={...r,children:T}),/* @__PURE__ */I(Ku,{children:/* @__PURE__ */I(e,{...r,ref:n})})},[w.attributes,t,S,T]),z=/* @__PURE__ */I(G,{value:L,children:/* @__PURE__ */I(V,{value:P,children:D})});if(m){Sd.linkParent(c,s?.traceId,i);let e={attributes:C,definition:E,style:A,elementState:O,plitziElementLayout:M,children:T,...S,...t.extraProps,...J(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return Sd.recordProps(c,((e,t)=>{if(!e)return[];let n=[],r=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r){let r=e[i],o=t[i];if(!Object.is(r,o)&&(n.push({key:i,prev:Zu(r),next:Zu(o),ref:ed(r,o)}),n.length>=12))break}return n})(r.current,e)),r.current=e,/* @__PURE__ */I(o,{id:c,onRender:Sd.onRender,children:z})}return z};return n.displayName=`withElement(${t})`,n},Ed=()=>{let e=h(V);if(void 0===e)throw Error("Element data not found. Make sure the element is rendered under withElement.");return e},Ad=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:o,params:a,serverMarker:s,motion:l,testMarker:u,events:d,children:p})=>""===e?p:c(e,{ref:t,style:n,className:r,...i,...o?{id:o}:{},...a,...l,...d,...s,...u},p),Id={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},Md=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),Od=(e,t)=>({type:t.builderType??Id[t.type],label:t.label??Md(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??Md(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),Nd=/* @__PURE__ */new WeakMap,_d=e=>{let t=Nd.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Od(e,t)])),Nd.set(e,t)),t},Pd=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:_d(t.params),...r}),Ld=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,Pd(r,e[r],t[r],n[r]??{})])),Dd=["smooth","auto"],zd=["start","center","end","nearest"],Rd=/^(-?\d+(?:\.\d+)?)(px|%)?$/,jd=(e,t)=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;let n=Rd.exec(e.trim());if(!n)return;let r=Number(n[1]);return"%"===n[2]?r/100*t:r},$d=(e,t,n)=>{let r=Math.max(t-n,0);if("start"===e)return 0;if("end"===e)return r;let i=jd(e,r);return void 0===i?void 0:Math.min(Math.max(i,0),r)},Fd={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...Dd]},qd={scrollBy:{title:"Scroll By",type:"callback",strictParams:!0,params:{x:{type:"text",description:'How far across: pixels ("240") or a share of what the box shows ("80%"); negative goes back.',default:""},y:{type:"text",description:"How far down, the same way; negative goes up.",default:""},behavior:Fd}},scrollTo:{title:"Scroll To",type:"callback",strictParams:!0,params:{x:{type:"text",description:'Where across: "start", "end", pixels from the start, or a share of the way ("50%"). Empty stays.',default:""},y:{type:"text",description:"Where down, the same way. Empty stays.",default:""},behavior:Fd}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...zd]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...zd]},behavior:Fd}}},Bd={setState:{title:"Update Element (set attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to change on the element: "attribute" sets one of its props (the common case — e.g. content, disabled); "state" sets element state (visibility or a style selector). REQUIRED — always set it.',default:"attribute",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to set. When category="attribute", an attribute/prop key of THIS element (e.g. "content", "disabled"). When category="state", "visibility" or "styleSelectors.<selector>". REQUIRED.',required:!0},value:{type:"scalar",description:'The value to set — its type follows the target attribute: a real boolean (true/false) for a boolean attribute, a number for a numeric one, otherwise a string (the strings "true"/"false" also coerce). There is NO separate `type` param (that belongs to the global state setState, not this one). REQUIRED.',when:e=>!!e.category,required:!0},revertOnFinish:{type:"boolean",description:'When true, this change is UNDONE automatically when the whole flow finishes. Use it for a TEMPORARY change (a "loading…" label, disabling a button while it works) instead of adding manual restore steps at the end of the flow.',default:!1,label:"Revert changes after interaction"}}},toggleState:{title:"Toggle Element (flip attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to flip on the element: "attribute" flips one of its props (e.g. disabled); "state" flips element state ("visibility", or "styleSelectors.<selector>" for an expanded/collapsed look). REQUIRED.',default:"state",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to flip. When category="attribute", an attribute/prop key of THIS element. When category="state", "visibility" or "styleSelectors.<selector>". Anything not already true counts as false, so a field that has never been set flips ON first. REQUIRED.',required:!0},revertOnFinish:{type:"boolean",description:"When true, the flip is UNDONE automatically when the whole flow finishes — a change that lasts only as long as the flow does.",default:!1,label:"Revert changes after interaction"}}},...qd},Ud=(e,t)=>n=>{let{category:r}=n;return"attribute"===r?Object.keys(e).map(e=>({value:e,label:e})):"state"===r?[{value:"visibility",label:"Visibility"},...Object.keys(t.styleSelectors).map(e=>({value:`styleSelectors.${e}`,label:`Selector - ${e}`}))]:[]},Hd=e=>{if("string"!=typeof e)return e;let t=e.toLowerCase();return"true"===t||"false"===t||"yes"===t||"no"===t?"true"===t||"yes"===t:e},Wd=["ctrl","alt","shift","meta"],Vd={ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",shift:"shift",meta:"meta",cmd:"meta",command:"meta",mod:"mod"},Gd={esc:"escape",space:"space",spacebar:"space",plus:"+",minus:"-",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",return:"enter"},Kd=/* @__PURE__ */new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown",...Array.from({length:12},(e,t)=>`f${t+1}`)]),Jd=(e,t)=>[...Wd.filter(t=>e.has(t)),t].join("+"),Yd=(e,t=!1)=>{let n=e.split(",").map(e=>((e,t)=>{let n=e.trim().toLowerCase();if(!n)return{problem:"an empty shortcut (two commas in a row, or one at the end)"};let r=n.endsWith("++")?[...n.slice(0,-2).split("+"),"+"]:n.split("+"),i="+"===n?["+"]:r.filter(e=>""!==e),o=/* @__PURE__ */new Set,a=[];for(let l of i){if(Object.hasOwn(Vd,l)){let e=Vd[l];o.add("mod"===e?t?"meta":"ctrl":e);continue}a.push(Object.hasOwn(Gd,l)?Gd[l]:l)}if(1!==a.length)return{problem:`"${e.trim()}" names ${a.length?`${a.length} keys (${a.join(", ")})`:"no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"`};let[s]=a;return 1===s.length||Kd.has(s)?{combo:Jd(o,s)}:{problem:`"${s}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...Kd].slice(0,15).join(", ")}, f1…f12)`}})(e,t));return{combos:n.flatMap(e=>e.combo?[e.combo]:[]),problems:n.flatMap(e=>e.problem?[e.problem]:[])}},Xd=/* @__PURE__ */new Set(["a","z","y","c","x","v"]),Qd=/* @__PURE__ */new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","backspace","delete"]),Zd=e=>Dd.find(t=>t===e)??"smooth",ep=(e,t)=>zd.find(t=>t===e)??t,tp={onLoad:{action:"onLoad",title:"On Load",type:"trigger",preview:{},params:{}},onClick:{action:"onClick",title:"On Click",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onPointerDown:{action:"onPointerDown",title:"On Pointer Down",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseEnter:{action:"onMouseEnter",title:"On Mouse Enter",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseLeave:{action:"onMouseLeave",title:"On Mouse Leave",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onHover:{action:"onHover",title:"On Hover",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onFocus:{action:"onFocus",title:"On Focus",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onBlur:{action:"onBlur",title:"On Blur",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onInterval:{action:"onInterval",title:"On Interval",type:"trigger",preview:{interval:"",count:""},params:{interval:{canBind:!1,defaultValue:"5000",type:"text",label:"Every (milliseconds, at least 250)"}}},onKey:{action:"onKey",title:"On Key",type:"trigger",preview:{key:"",shortcuts:""},params:{keys:{canBind:!1,defaultValue:"",type:"text",label:"Keys (e.g. f, shift+f, mod+k, escape)"}}},onScroll:{action:"onScroll",title:"On Scroll",type:"trigger",preview:{x:"",y:"",atStart:"",atEnd:""},params:{}},onFlowEnd:{action:"onFlowEnd",title:"On Server Action End",type:"trigger",preview:{actionId:"",runId:"",status:"",output:{}},params:{}},onFlowError:{action:"onFlowError",title:"On Server Action Error",type:"trigger",preview:{actionId:"",runId:"",error:"",reason:""},params:{}},onFlowProgress:{action:"onFlowProgress",title:"On Server Action Progress",type:"trigger",preview:{actionId:"",runId:"",chunk:""},params:{}}},np=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"],rp=/* @__PURE__ */new WeakSet,ip=({elementContext:e,InteractionsContext:t,previewMode:n,debugMode:r,baseElementId:i,className:o,interactionTriggers:a,interactionCallbacks:s,otherProps:l,ref:c})=>{let{id:u,className:d,attributes:p,definition:y,definition:{interactions:b},plitziElementLayout:v,elementState:w,setElementState:S}=e,{interactionsManager:T,useInteractions:C}=h(t),E=f((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e);let o=(e=>"nativeEvent"in e&&nr(e.nativeEvent)?e.nativeEvent:e)(e);rp.has(o)||(i||rp.add(o),T.interactionTrigger(t,n,{event:e}))},[T]),A=k(()=>n&&b?Object.values(b).filter(e=>"trigger"===e.type&&e.action&&np.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=sr(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>E(e,u,t.action,l[t.action],n)}},{}):{},[u,b,l,n,E]),I=m(mt),M=f(()=>{let e=I?.getPath("runtime.sources");return((e,t,n)=>{let r=nr(t)?t:{};return(e=>nr(e)&&Object.values(e).every(e=>"string"==typeof e))(n)?{...e,state:r,computed:li(n,e,r)}:{...e,state:r}})(nr(e)?e:qr,I?.getPath("runtime.state"),I?.getPath("schema.settings.computed"))},[I]),O=f(()=>({dataSource:M()}),[M]),N=k(()=>({...tp,...a}),[a]),_=x(null),P=c??_,L=(({attributes:e,definition:t,setElementState:n})=>{let r=f((e,t)=>{let r,i;return n(n=>(r=n,i=$l(n,r=>lr(r,e,t(sr(n,e)))),i)),{prevState:r,nextState:i}},[n]),i=f(e=>{if(!e.key||void 0===e.value)return{prevState:void 0,nextState:void 0};let{key:t}=e,n=Hd(e.value);return r(t,()=>n)},[r]),o=f(e=>{if(!e.key)return{prevState:void 0,nextState:void 0};let{key:t}=e;return r(t,e=>!0!==Hd(e))},[r]),a=f((e,t)=>{let r=t?.prevState;e.revertOnFinish&&r&&n(r)},[n]);return k(()=>((e,t,n,r,i)=>{let o=Bd.setState,a=_d(o.params),s=Bd.toggleState,l=_d(s.params),c={type:"select",options:Ud(e,t),when:e=>"attribute"===e.category||"state"===e.category};return{setState:Pd("setState",o,n,{title:`Update ${t.label}`,postCallback:r,params:{...a,key:{...a.key,...c},value:{...a.value,type:t=>"boolean"==typeof e[t.key]?"select":"text",options:t=>{let{key:n}=t;return"boolean"==typeof e[n]?[{value:"true",label:"True"},{value:"false",label:"False"}]:Object.keys(e).map(e=>({value:e,label:e}))}}}}),toggleState:Pd("toggleState",s,i,{title:`Toggle ${t.label}`,postCallback:r,params:{...l,key:{...l.key,...c}}})}})(e,t,i,a,o),[e,t,i,a,o])})({attributes:p,definition:y,setElementState:S}),D=(({id:e,label:t,nodeRef:n,interactions:r,previewMode:i,interactionsManager:o})=>{let a=k(()=>Ld(qd,{scrollBy:e=>{let t=n.current;t?.scrollBy({left:jd(e.x,t.clientWidth)??0,top:jd(e.y,t.clientHeight)??0,behavior:Zd(e.behavior)})},scrollTo:e=>{let t=n.current;t&&t.scrollTo({left:$d(e.x,t.scrollWidth,t.clientWidth)??t.scrollLeft,top:$d(e.y,t.scrollHeight,t.clientHeight)??t.scrollTop,behavior:Zd(e.behavior)})},scrollIntoView:e=>{n.current?.scrollIntoView({block:ep(e.block,"start"),inline:ep(e.inline,"nearest"),behavior:Zd(e.behavior)})}},{scrollBy:{title:`Scroll ${t} by`},scrollTo:{title:`Scroll ${t} to`},scrollIntoView:{title:`Scroll to ${t}`}}),[t,n]),s=k(()=>Object.values(r??{}).some(e=>"trigger"===e.type&&"onScroll"===e.action&&e.enabled),[r]);return g(()=>{let t=n.current;if(!i||!s||!t||typeof window>"u")return;let r=0,a=()=>{r=0;let n=(e=>{let t=e.scrollWidth-e.clientWidth>1,n=t?e.scrollLeft:e.scrollTop,r=t?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;return{x:Math.round(e.scrollLeft),y:Math.round(e.scrollTop),atStart:n<=1,atEnd:n>=r-1}})(t);o.interactionTrigger(e,"onScroll",n)},l=()=>{0===r&&(r=window.requestAnimationFrame(a))};return t.addEventListener("scroll",l,{passive:!0}),r=window.requestAnimationFrame(a),()=>{t.removeEventListener("scroll",l),window.cancelAnimationFrame(r)}},[e,o,s,n,i]),a})({id:u,label:y.label,nodeRef:P,interactions:b,previewMode:n,interactionsManager:T});C({id:u,interactions:b,triggers:N,callbacks:k(()=>({...s,...D,...L}),[s,D,L]),getAdditionalParams:O}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let{keys:t}=e.params;return"trigger"===e.type&&"onKey"===e.action&&e.enabled&&"string"==typeof t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length)return;let t=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),o=i.map(e=>({spec:e,combos:Yd(e,t).combos})),a=t=>{if(t.isComposing)return;let n=(e=>{let t=e.ctrlKey||e.altKey||e.metaKey,n=/^(?:Key|Digit)([A-Z0-9])$/.exec(e.code),r=t&&n?n[1]:e.key,i=" "===r?"space":r.toLowerCase(),o=1===i.length&&!/[a-z0-9]/.test(i),a=/* @__PURE__ */new Set;return e.ctrlKey&&a.add("ctrl"),e.altKey&&a.add("alt"),e.shiftKey&&!o&&a.add("shift"),e.metaKey&&a.add("meta"),Jd(a,i)})(t),i=t.ctrlKey||t.metaKey||t.altKey;if((e=>e instanceof Element&&null!==e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))(t.target)&&(!i&&"escape"!==n||(e=>{let t=e.split("+"),n=e.endsWith("++")?"+":t[t.length-1];return Qd.has(n)||Xd.has(n)&&(e.includes("ctrl+")||e.includes("meta+"))})(n)))return;let a=o.filter(e=>e.combos.includes(n)).map(e=>e.spec);if(!a.length)return;t.preventDefault();let s={key:n,shortcuts:a};r.interactionTrigger(e,"onKey",s)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let t=yo(e.params.interval);return"trigger"===e.type&&"onInterval"===e.action&&e.enabled&&t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length||typeof document>"u")return;let t=new Map(i.map(e=>[e,0])),o=[],a=()=>{o.forEach(e=>clearInterval(e)),o=[]},s=()=>{a(),"visible"===document.visibilityState&&(o=i.map(n=>setInterval(()=>{let i=(t.get(n)??0)+1;t.set(n,i);let o={interval:n,count:i};r.interactionTrigger(e,"onInterval",o)},n)))};return s(),document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s),a()}},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),g(()=>{if(!n||!b||!Object.keys(b).length)return;let e=!1;return queueMicrotask(()=>{e||T.interactionTrigger(u,"onLoad",{})}),()=>{e=!0}},[]),g(()=>{if(r)return Jl.addProviderMethod(`getElementDataSource-${u}`,M),()=>{Jl.removeProviderMethod(`getElementDataSource-${u}`)}},[r,M,u]);let z=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:o,elementState:a})=>{let{items:s}=o,l=K(a.visibility);return k(()=>U(t,{[Oc]:!l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i?.slots.includes(e)},o.styleSelectors.base),[t,l,n,i,s,r,e,o.styleSelectors.base])})({id:u,className:o,previewMode:n,baseElementId:i,definition:y,elementState:w,plitziElementLayout:v});return{className:U(d,z),events:A,nodeRef:P}},op={fade:[{at:0,opacity:0}],"fade-up":[{at:0,opacity:0,translate:"0 24px"}],"fade-down":[{at:0,opacity:0,translate:"0 -24px"}],"slide-left":[{at:0,opacity:0,translate:"32px 0"}],"slide-right":[{at:0,opacity:0,translate:"-32px 0"}],"slide-up":[{at:0,opacity:0,translate:"0 72px"}],scale:[{at:0,opacity:0,scale:"0.94"}],"zoom-in":[{at:0,opacity:0,scale:"0.6"}],"zoom-out":[{at:0,opacity:0,scale:"1.25"}],pop:[{at:0,opacity:0,scale:"0.5"},{at:55,opacity:1,scale:"1.08"},{at:78,scale:"0.97"}],"bounce-in":[{at:0,opacity:0,translate:"0 -64px"},{at:55,opacity:1,translate:"0 10px"},{at:75,translate:"0 -5px"},{at:90,translate:"0 2px"}],tilt:[{at:0,opacity:0,translate:"0 32px",rotate:"-6deg"}],"spin-in":[{at:0,opacity:0,scale:"0.4",rotate:"-180deg"}]},ap=(Object.fromEntries(["fade","fade-up","fade-down","slide-left","slide-right","slide-up","scale","zoom-in","zoom-out","pop","bounce-in","tilt","spin-in"].map(e=>{let[{at:t,...n}]=op[e];return[e,n]})),(e,t)=>{let n=2*t*Math.PI,r=Math.round(Math.sin(n)*e*10)/10,i=Math.round(-Math.cos(n)*e*10)/10;return`translate(${String(r)}px, ${String(i)}px)`}),sp=(Array.from({length:9},(e,t)=>({at:100*t/8,transform:ap(6,t/8)})),"data-motion-seen"),lp=(["[data-motion-loop] { animation-play-state: running, running !important; }",'[data-motion-on="view"][data-motion-enter], [data-motion-on="view"][data-motion-stagger] > * { animation-play-state: running, running !important; }','[data-motion-on="scroll"][data-motion-enter], [data-motion-on="scroll"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }'].join("\n"),e=>"animationName"in e&&"string"==typeof e.animationName&&e.animationName.startsWith("plitzi-motion-")),cp=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:o,style:a,...s})=>{let l=k(()=>((e="")=>{if(e)return"object"==typeof e?e:Object.fromEntries(e.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n]=e.split(":").map(e=>e.trim());return[t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),n]}))})(a),[a]),c=Ed(),u=dc(),d=u.settings.previewMode??!0,p=!!u.settings.debugMode;if(c.plitziJsxSkipHOC)return Ad({tag:n,refProp:e,style:l,className:r,otherProps:s,children:t});let{root:{baseElementId:h},contexts:f}=u,m=f.InteractionsContext,{id:g,rootId:y,style:b,plitziElementLayout:v,definition:{type:w,label:x,runtime:S,anchor:T,parentId:C,motion:E}}=c,A=(e=>{if(!e)return{attributes:{},style:{}};let t={},n={};return e.enter&&(t[void 0===e.stagger?"data-motion-enter":"data-motion-stagger"]=e.enter,t["data-motion-on"]=e.on??"load"),e.loop&&(t["data-motion-loop"]=e.loop),void 0!==e.duration&&(n["--plitzi-motion-duration"]=`${String(e.duration)}ms`),void 0!==e.delay&&(n["--plitzi-motion-delay"]=`${String(e.delay)}ms`),void 0!==e.stagger&&(n["--plitzi-motion-stagger"]=`${String(e.stagger)}ms`),{attributes:t,style:n}})(E),I="server"===S?{"data-rsc-id":g}:void 0,M="component"!==v?.type||C||v.rootId===g?void 0:v.rootId,O=!1===u.settings.testAttributes?void 0:{"data-plitzi-el":g,...void 0===M?{}:{"data-plitzi-instance":M}},N=p||!d&&w&&y===h?{"data-id":g,"data-name":x||w||"unknown","data-root-id":y,"data-type":w||"unknown","data-root-render-element":!0}:{};if(!m)return Ad({tag:n,refProp:e,style:{...b,...l,...A.style},className:r,otherProps:s,anchor:T,params:N,serverMarker:I,motion:A.attributes,testMarker:O,children:t});let _=ip({elementContext:c,InteractionsContext:m,previewMode:d,debugMode:p,baseElementId:h,className:r,interactionTriggers:i,interactionCallbacks:o,otherProps:s,ref:e});return Ad({tag:n,refProp:_.nodeRef,style:{...b,...l,...A.style},className:_.className,otherProps:s,anchor:T,params:N,serverMarker:I,motion:A.attributes,testMarker:O,events:_.events,children:t})},up=/*#__PURE__*/function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),dp=/*#__PURE__*/function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),pp={rel:["amphtml","canonical","alternate"]},hp={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},fp={type:["application/ld+json"]},mp=Object.values(dp),gp={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},yp=(()=>{const e={};for(const[t,n]of Object.entries(gp))e[n]=t;return e})(),bp="data-rh",vp=!("undefined"==typeof window||!window.document.createElement);function wp(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function kp(e){let t=wp(e,dp.TITLE);const n=wp(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=wp(e,"defaultTitle");return(t||r)??void 0}function xp(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function Sp(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function Tp(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&console.warn(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===up.REL&&"canonical"===e[n].toLowerCase()||i===up.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==up.INNER_HTML&&i!==up.CSS_TEXT&&i!==up.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][o]&&(i[n][o]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const o=Object.keys(i);for(const t of o){const e={...r[t],...i[t]};r[t]=e}return e},[]).reverse()}function Cp(e){return Array.isArray(e)?e.join(""):e}function Ep(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function Ap(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)Ep(r,t)?n.priority.push(r):n.default.push(r);return n}function Ip(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function Mp(e){let t=Tp(dp.LINK,[up.REL,up.HREF],e),n=Tp("meta",[up.NAME,"charSet","httpEquiv",up.PROPERTY,"itemProp"],e),r=Tp("script",[up.SRC,up.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let o;if(i){const e=Ap(t,pp);t=e.default;const i=Ap(n,hp);n=i.default;const a=Ap(r,fp);r=a.default,o={links:e.priority,meta:i.priority,script:a.priority}}return{base:Sp(e),bodyAttributes:xp("bodyAttributes",e),defer:wp(e,"defer"),encodeSpecialCharacters:wp(e,"encodeSpecialCharacters")??!0,htmlAttributes:xp("htmlAttributes",e),links:t,meta:n,noscript:Tp("noscript",[up.INNER_HTML],e),onChangeClientState:wp(e,"onChangeClientState"),priority:o,script:r,style:Tp("style",[up.CSS_TEXT],e),title:kp(e),titleAttributes:xp("titleAttributes",e)}}function Op(e){return yp[e]??e}function Np(e,t){const n=document.head||document.querySelector(dp.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${bp}]`)],o=[];for(const a of t){const t=document.createElement(e);for(const[e,r]of Object.entries(a))if(Object.prototype.hasOwnProperty.call(a,e)){const n=yp[e]??e;n===up.INNER_HTML?t.innerHTML=r:n===up.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=a.cssText:t.appendChild(document.createTextNode(a.cssText)):t.setAttribute(n,r??"")}t.setAttribute(bp,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){o.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),o.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:o,oldTags:i}}function _p(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(bp),i=r?r.split(","):[],o=[...i],a=[];for(const s of Object.keys(t))a.push(yp[s]??s);for(const[s,l]of Object.entries(t)){const e=yp[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=o.indexOf(e);-1!==t&&o.splice(t,1)}for(let s=o.length-1;s>=0;s-=1)n.removeAttribute(o[s]);i.length===o.length?n.removeAttribute(bp):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute(bp,a.join(","))}function Pp(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:o,links:a,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:h,titleAttributes:f}=e;_p(dp.BODY,r??{}),_p(dp.HTML,o??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=Cp(e)),_p(dp.TITLE,t)}(h,f);const m={baseTag:Np(dp.BASE,n?[n]:[]),linkTags:Np(dp.LINK,[...u?.links??[],...a??[]]),metaTags:Np(dp.META,[...u?.meta??[],...s??[]]),noscriptTags:Np(dp.NOSCRIPT,l??[]),scriptTags:Np(dp.SCRIPT,[...u?.script??[],...d??[]]),styleTags:Np(dp.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:h??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var Lp=[dp.NOSCRIPT,dp.SCRIPT,dp.STYLE],Dp=(e,t=!0)=>t?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e;function zp(e){let t="";for(const[n,r]of Object.entries(e)){const e=Op(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function Rp(e,t,n){let r="";for(const i of t){let t="";const o=Object.entries(i);for(const[e,r]of o)if(e!==up.INNER_HTML&&e!==up.CSS_TEXT){const i=yp[e]??e;let o;o=void 0===r?i:`${i}="${Dp("string"==typeof r?r:String(r),n)}"`,t?t+=` ${o}`:t=o}const a=i.innerHTML??i.cssText??"",s=!Lp.includes(e);r+=`<${e} ${bp}="true" ${t}${s?"/>":`>${a}</${e}>`}`}return r}function jp(e,t={}){const n={};t.addHelmetDataAttr&&(n[bp]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=gp[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function $p(e,t,n){/*#__PURE__*/
|
|
26
|
+
return c(e,jp(t,{addHelmetDataAttr:!0,addKey:n}))}function Fp(e,t){const n=[];for(let r=0;r<t.length;++r)n.push($p(e,t[r],r));return n}var qp=/*#__PURE__*/l(void 0),Bp=({children:e,onServerState:t})=>{const n=x(null);if(null===n.current){const e={firstRender:!0,helmets:[],state:void 0};t&&(e.serverState??=function(e){const t=()=>(e.state??=Mp(e.helmets),e.state);return{base:{toComponent(){const e=t().base;return e?Fp("base",[e]):[]},toString(){const e=t();return e.base?Rp("base",[e.base],e.encodeSpecialCharacters):""}},bodyAttributes:{toComponent:()=>jp(t().bodyAttributes??{}),toString:()=>zp(t().bodyAttributes??{})},htmlAttributes:{toComponent:()=>jp(t().htmlAttributes??{}),toString:()=>zp(t().htmlAttributes??{})},link:{toComponent:()=>Fp("link",t().links??[]),toString(){const e=t();return Rp("link",e.links??[],e.encodeSpecialCharacters)}},meta:{toComponent:()=>Fp("meta",t().meta??[]),toString(){const e=t();return Rp("meta",e.meta??[],e.encodeSpecialCharacters)}},noscript:{toComponent:()=>Fp("noscript",t().noscript??[]),toString(){const e=t();return Rp("noscript",e.noscript??[],e.encodeSpecialCharacters)}},priority:{toComponent(){const e=t();return[...Fp("meta",e.priority?.meta??[]),...Fp("link",e.priority?.links??[]),...Fp("script",e.priority?.script??[])]},toString(){const e=t(),n=Rp("meta",e.priority?.meta??[],e.encodeSpecialCharacters),r=Rp("link",e.priority?.links??[],e.encodeSpecialCharacters),i=Rp("script",e.priority?.script??[],e.encodeSpecialCharacters);let o=n;return r&&(o&&(o+=" "),o+=r),i&&(o&&(o+=" "),o+=i),o}},script:{toComponent:()=>Fp("script",t().script??[]),toString(){const e=t();return Rp("script",e.script??[],e.encodeSpecialCharacters)}},style:{toComponent:()=>Fp("style",t().style??[]),toString(){const e=t();return Rp("style",e.style??[],e.encodeSpecialCharacters)}},title:{toComponent(){const e=t();return n=e.title??"",r=e.titleAttributes??{},[/*#__PURE__*/I("title",{...jp(r,{addHelmetDataAttr:!0}),children:n},n)];var n,r},toString(){const e=t();return((e,t,n)=>{let r=zp(t);r&&(r=` ${r}`);const i=Cp(e);return`<title ${bp}="true"${r}>${Dp(i,n)}</title>`})(e.title??"",e.titleAttributes??{},e.encodeSpecialCharacters)}}}}(e),t(e.serverState)),n.current=e}const r=n.current,[i]=S(()=>({clientApply(){vp&&!r.state&&(r.state=Mp(r.helmets),r.state.defer?r.nextAnimFrameId??=requestAnimationFrame(()=>{r.state??=Mp(r.helmets),Pp(r.state,r.firstRender),r.firstRender=!1,delete r.nextAnimFrameId}):(void 0!==r.nextAnimFrameId&&(cancelAnimationFrame(r.nextAnimFrameId),delete r.nextAnimFrameId),Pp(r.state,r.firstRender),r.firstRender=!1))},update(e,t){const n=r.helmets.findIndex(t=>t[0]===e);n>=0?(delete r.state,t?r.helmets[n][1]=t:r.helmets.splice(n,1)):t&&(delete r.state,r.helmets.push([e,t]))}}));/*#__PURE__*/
|
|
27
|
+
return I(qp,{value:i,children:e})};function Up(e){const t=gp[e];return t&&console.warn(`"${e}" is not a valid JSX prop, replace it by "${t}"`),t??e}function Hp(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.slice():r;return t}(e);for(const n of Object.values(e))if(Array.isArray(n)){for(const e of n)if(e)for(const t of Object.keys(e)){const n=Up(t);n!==t&&(e[n]=e[t],delete e[t])}}else if(n&&"object"==typeof n){const e=n;for(const t of Object.keys(e)){const n=Up(t);n!==t&&(e[n]=e[t],delete e[t])}}return n.forEach(e.children,e=>{if(null==e)return;if("object"!=typeof e||!("props"in e))throw Error(`"${typeof e}" is not a valid <Helmet> descendant`);let n;const r={};if(e.props)for(const[t,a]of Object.entries(e.props))"children"===t?n=a:r[Up(t)]=a;let{type:i}=e;function o(e){"string"!=typeof e&&console.error(`child of ${i} element should be a string`)}switch("symbol"==typeof i&&(i=i.toString()),function(e,t){if("string"!=typeof e)throw Error("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");if(!mp.includes(e))throw Error(`Only elements types ${mp.join(", ")} are allowed. Helmet does not support rendering <${e}> elements. Refer to our API for more information.`);if(t&&"string"!=typeof t&&!Array.isArray(t))throw Error(`Helmet expects a string as a child of <${e}>. Did you forget to wrap your children in braces? ( <${e}>{\`\`}</${e}> ) Refer to our API for more information.`)}(i,n),i){case dp.BASE:t.base=r;break;case dp.BODY:t.bodyAttributes=r;break;case dp.FRAGMENT:!function(e,t){const n=e;for(const[r,i]of Object.entries(t))if(Array.isArray(i)){const e=n[r];n[r]=e?e.concat(i):i}else n[r]=i}(t,Hp({children:n}));break;case dp.HTML:t.htmlAttributes=r;break;case dp.LINK:case dp.META:if(n)throw Error(`<${i} /> elements are self-closing and can not contain children. Refer to our API for more information.`);Ip(t,i,r);break;case dp.NOSCRIPT:case dp.SCRIPT:void 0!==n&&(o(n),r.innerHTML=n),Ip(t,i,r);break;case dp.STYLE:o(n),r.cssText=n,Ip(t,i,r);break;case dp.TITLE:t.titleAttributes=r,"string"==typeof n?t.title=n:Array.isArray(n)&&(t.title=n.join(""));case dp.HEAD:}}),delete t.children,t}var Wp=e=>{const t=N(8),n=h(qp);if(!n)throw Error("<Helmet> component must be within a <HelmetProvider> children tree");const r=b();let i,o,a;return n.update(r,Hp(e)),t[0]!==n||t[1]!==r||t[2]!==e?(i=()=>{n.update(r,Hp(e)),n.clientApply()},t[0]=n,t[1]=r,t[2]=e,t[3]=i):i=t[3],g(i),t[4]!==n||t[5]!==r?(o=()=>()=>{n.update(r,void 0),n.clientApply()},a=[n,r],t[4]=n,t[5]=r,t[6]=o,t[7]=a):(o=t[6],a=t[7]),g(o,a),null},Vp=({className:e,children:t,direction:n="column",wrap:r,items:i,justify:o,gap:a,grow:s,shrink:l,basis:c,...u})=>(e=fs("ContainerCollapsable",{className:e,componentKey:"content"}),/* @__PURE__ */I(ms,{className:e,direction:n,wrap:r,items:i,justify:o,gap:a,shrink:l,basis:c,grow:s,...u,children:t})),Gp=/* @__PURE__ */I("i",{className:"fas fa-plus"}),Kp=/* @__PURE__ */I("i",{className:"fas fa-minus"}),Jp=({children:e,className:t,title:n="Title",collapsed:r=!1,iconCollapsed:i=Gp,iconExpanded:o=Kp,placement:a="left",onClick:s,...l})=>{let c=fs("ContainerCollapsable",{className:t,componentKey:["header","headerContainer","headerTitle","headerIconContainer","headerSlot","headerSlotContainer"]});/* @__PURE__ */
|
|
28
|
+
return M("div",{className:c.header,onClick:s,...l,children:[/* @__PURE__ */M("div",{className:c.headerContainer,children:["left"===a&&/* @__PURE__ */M("div",{className:c.headerIconContainer,children:[r&&i,!r&&o]}),/* @__PURE__ */I("div",{className:c.headerTitle,children:n})]}),/* @__PURE__ */M("div",{className:c.headerSlotContainer,children:[/* @__PURE__ */I("div",{className:c.headerSlot,children:e}),"right"===a&&/* @__PURE__ */M("div",{className:c.headerIconContainer,children:[r&&i,!r&&o]})]})]})},Yp=({className:e="",collapsed:t=!1,children:r,direction:i="column",wrap:o,items:a,justify:l,gap:c,grow:d,shrink:p,basis:h,onChange:m,...g})=>{let[y,b]=S(t);e=fs("ContainerCollapsable",{className:e,componentKey:"root"}),Cs(()=>{b(t)},[t]);let v=f(e=>{e.stopPropagation(),b(!y),m?.(!y)},[y,m]),{header:w,content:x}=k(()=>{let e={header:void 0,content:void 0};return n.forEach(r,t=>{u(t)&&(t.type===Jp?e.header=s(t,{...t.props,collapsed:y,onClick:v}):t.type===Vp&&(e.content=s(t)))}),e},[r,y,v]);/* @__PURE__ */
|
|
29
|
+
return M(ms,{className:e,direction:i,wrap:o,items:a,justify:l,gap:c,shrink:p,basis:h,grow:!!d&&!y,...g,children:[w,!y&&x]})};Yp.Header=Jp,Yp.Content=Vp;var Xp={root:kr(""),header:kr("flex justify-between items-center cursor-pointer select-none gap-2 px-2 py-1 transition-colors duration-150 hover:bg-gray-50 dark:hover:bg-zinc-800/60 text-zinc-800 dark:text-zinc-200"),headerContainer:kr("flex items-center gap-2 min-w-0"),headerSlot:kr(""),headerSlotContainer:kr("flex items-center gap-2 shrink-0"),headerTitle:kr("m-0 flex items-center grow cursor-pointer truncate text-sm font-medium text-zinc-700 dark:text-zinc-300"),headerIconContainer:kr("flex items-center justify-center w-4 shrink-0 text-zinc-400 dark:text-zinc-500"),content:kr("")},Qp=Yp,Zp={root:kr("relative flex flex-col"),rootInternal:kr("flex flex-col grow overflow-auto"),handlerContainer:kr("absolute flex justify-center items-center z-40",{variants:{intent:{},position:{n:"w-auto h-1 left-0 right-0 top-0 bg-gray-200 dark:bg-zinc-800",s:"w-auto h-1 left-0 right-0 bottom-0 bg-gray-200 dark:bg-zinc-800",e:"h-auto w-1 top-0 bottom-0 right-0 bg-gray-200 dark:bg-zinc-800",w:"h-auto w-1 top-0 left-0 bottom-0 bg-gray-200 dark:bg-zinc-800",sw:"",nw:"",se:"-right-4 -bottom-4",ne:""},hover:{true:"hidden group-5-hover:flex",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}}),handler:kr("transition-[width,background-color] duration-500",{variants:{intent:{},position:{n:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",s:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",e:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ew-resize",w:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-ui cursor-ew-resize",sw:"",nw:"",se:"h-3 w-3 cursor-se-resize border-b-4 border-r-4 border-zinc-400 dark:border-zinc-700 hover:border-primary-ui hover:dark:border-primary-ui active:pointer-events-none rounded-br-lg",ne:""},hover:{true:"",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}})},eh=["se"],th=({ref:e,className:t,parentRef:n,hoverMode:r=!1,autoGrow:i=!0,width:o=1/0,height:a=1/0,grid:s,resizeHandles:l=eh,transformScale:c=1,axis:u="both",lockAspectRatio:d=!1,minConstraintsX:p=100,minConstraintsY:h=100,maxConstraintsX:m=1/0,maxConstraintsY:y=1/0,children:b,handle:w,onChange:T,...C})=>{let E=fs("ContainerResizable",{className:t,componentKey:["root","rootInternal"]}),[A,O]=S(o),[N,_]=S(a),[P,L]=S(0),[D,z]=S(),[R,j]=S(0),[$,F]=S(0),[q,B]=S(0),H=x(null);v(e,()=>H.current,[H]);let W=x(null),V=k(()=>T?mr(T,150):void 0,[T]),G=f(()=>!n?.current&&typeof document<"u"?document.body:n?.current,[n]),K=f((e,t,n=!1)=>{let[r,i]=[[p,h],[m,y]];if(d)if(t===N){let n=A/N;e=(t=e/n)*n}else{let n=N/A;t=(e=t/n)*n}r[0]&&r[1]&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i[0]&&i[1]&&(e=Math.min(i[0],e),t=Math.min(i[1],t));let o=H.current?.getBoundingClientRect();return!n&&o&&(o.x+e>window.innerWidth&&(e=window.innerWidth-o.x),o.y+t>window.innerHeight&&(t=window.innerHeight-o.y)),[e,t]},[N,d,m,y,p,h,A]),J=f(e=>{e.stopPropagation(),e.preventDefault();let t=e.clientX,n=e.clientY,r=(t-P)/c,i=(n-q)/c,o=("both"===u||"x"===u)&&-1===["n","s"].indexOf(D??""),a=("both"===u||"y"===u)&&-1===["e","w"].indexOf(D??""),l=D?.includes("w")||D?.includes("n");if(Array.isArray(s)&&([r,i]=((e,t,n)=>[Math.round(e/n[0])*n[0],Math.round(t/n[1])*n[1]])(r,i,s),!r&&!i))return;let d=R+(o?r:0),p=$+(a?i:0);l&&(d=R-(o?r:0),p=$-(a?i:0)),(d!==R||p!==$)&&([d,p]=K(d,p,l),V?.(d,p),R!==1/0&&W.current&&(W.current.style.width=`${d}px`),$!==1/0&&W.current&&(W.current.style.height=`${p}px`))},[u,P,q,D,s,$,R,K,c,V]),Y=f(e=>{e.stopPropagation(),e.preventDefault(),z(void 0),A!==1/0&&O(W.current?.offsetWidth??A),N!==1/0&&_(W.current?.offsetHeight??N),typeof document<"u"&&(document.body.style.userSelect=""),G()?.classList.remove("resizing")},[G,N,A]),X=f(e=>t=>{if(!H.current)return;t.preventDefault(),typeof document<"u"&&(document.body.style.userSelect="none"),G()?.classList.add("resizing"),z(e),L(t.clientX),B(t.clientY);let{width:n,height:r}=H.current.getBoundingClientRect();j(-1===A?n:A),F(-1===N?r:N)},[G,N,A]);g(()=>(D&&(window.addEventListener("mousemove",J,!1),window.addEventListener("mouseup",Y,!1)),()=>{D&&(window.removeEventListener("mousemove",J,!1),window.removeEventListener("mouseup",Y,!1))}),[D]),g(()=>{O(o),_(a)},[o,a]);let Q=f(e=>w?"function"==typeof w?w(e):w:/* @__PURE__ */I("div",{className:Zp.handlerContainer({position:e,hover:r}),onMouseDown:X(e),children:/* @__PURE__ */I("div",{className:Zp.handler({position:e})})},e),[w,X,r]),Z=k(()=>l.map(e=>Q(e)),[l,Q]),ee={};return N!==1/0&&(ee.height=`${N}px`),A!==1/0&&(ee.width=`${A}px`),/* @__PURE__ */M("div",{...C,ref:H,className:U(E.root,{"group-5":r,grow:i}),children:[/* @__PURE__ */I("div",{ref:W,className:U(E.rootInternal,{"pt-1":l.includes("n"),"pb-1":l.includes("s"),"pl-1":l.includes("w"),"pr-1":l.includes("e")}),style:ee,children:b}),Z]})},nh=({children:e,className:t,size:n})=>(t=fs("ContainerTabs",{className:t,componentKey:"content",variants:{size:n}}),/* @__PURE__ */I("div",{className:t,children:e})),rh=({className:e,label:t="Tab Name",active:n,index:r=0,size:i,onSelect:o})=>{e=fs("ContainerTabs",{className:e,componentKey:"tab",variants:{active:n,size:i}});let a=f(()=>o?.(r),[r,o]);/* @__PURE__ */
|
|
30
|
+
return I("div",{className:e,onClick:a,children:t})},ih=({className:e,items:t=[],tabSelected:n=0,size:r,onSelect:i})=>(e=fs("ContainerTabs",{className:e,componentKey:"tabs",variants:{size:r}}),/* @__PURE__ */I("div",{className:e,children:t.map((e,t)=>/* @__PURE__ */I(rh,{label:e.label,active:n===t,index:t,size:r,onSelect:i},t))})),oh=({children:e,className:t,size:r})=>{t=fs("ContainerTabs",{className:t,componentKey:"root",variants:{size:r}});let[i,o]=S(0),a=f(e=>o(e),[]),{tabs:l,content:c}=k(()=>{let t={tabs:/* @__PURE__ */I(ih,{tabSelected:i,size:r,onSelect:a}),content:/* @__PURE__ */I(nh,{})},o=0;return n.forEach(e,e=>{if(u(e))if(e.type===ih){let n=e.props;t.tabs=s(e,{...n,key:"tabs",tabSelected:i,size:r,onSelect:a})}else if(e.type===nh&&o++===i){let n=e.props;t.content=s(e,{...n,key:`content-${i}`,size:r})}}),t},[i,a,e,r]);/* @__PURE__ */
|
|
31
|
+
return M("div",{className:t,children:[l,c]})};oh.Tabs=ih,oh.TabContent=nh;var ah={root:kr("flex flex-col"),content:kr("flex"),tabs:kr("flex bg-gray-100 dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg p-1 select-none gap-0.5"),tab:kr("flex items-center justify-center rounded-md basis-0 grow cursor-pointer py-1 px-3 text-sm font-medium transition-colors duration-150 select-none",{variants:{active:{true:"bg-white dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100 shadow-sm",false:"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{active:!1,size:"md"}})},sh=oh,lh={root:kr("",{variants:{size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{size:"md"}})},ch=({className:e="focus-visible:px-1 focus-visible:m-px focus-visible:outline-dashed focus-visible:outline-1",myWindow:t,value:n="",exitOnEnter:r=!0,exitOnEscape:i=!0,updateMode:o="blur",openMode:a="click",size:s,onChange:l,onEditOpen:c,onEditClose:u})=>{e=fs("ContentEditable",{className:e,componentKey:"root",variants:{size:s}});let d=x(null),p=k(()=>t||(typeof window<"u"?window:void 0),[t]);g(()=>{d.current&&d.current.textContent!==n&&(d.current.textContent=n)},[n]);let h=f(e=>{"change"===o&&l?.(e.target.textContent)},[l,o]),m=f(e=>{if(!p)return;let t=p.document.createRange(),n=p.getSelection();t.setStart(e,e.childNodes.length),t.collapse(!0),n?.removeAllRanges(),n?.addRange(t)},[p]),y=f(()=>{let e=d.current;e&&(("inherit"===e.contentEditable||"false"===e.contentEditable)&&m(e),"click"===a&&(e.setAttribute("contenteditable","true"),e.focus(),c?.()))},[a,m,c]),b=f(()=>{let e=d.current;e&&"doubleClick"===a&&(e.setAttribute("contenteditable","true"),e.focus(),c?.())},[a,c]),v=f(()=>{let e=d.current;e&&(e.setAttribute("contenteditable","false"),"blur"===o&&e.textContent!==n&&l?.(e.textContent),u?.())},[l,o,n,u]),w=f(e=>{e.stopPropagation(),r&&13===e.keyCode?(e.preventDefault(),e.target.blur()):i&&27===e.keyCode&&(e.preventDefault(),e.target.textContent=n,e.target.blur())},[r,i,n]);/* @__PURE__ */
|
|
32
|
+
return I("div",{className:e,ref:d,onClick:y,onDoubleClick:b,onBlur:v,onInput:h,onKeyDown:w})},uh={root:kr("text-zinc-900 dark:text-zinc-100",{variants:{as:{h1:"text-5xl font-extrabold",h2:"text-4xl font-extrabold",h3:"text-3xl font-bold",h4:"text-2xl font-bold",h5:"text-xl font-bold",h6:"text-lg font-bold"}},compoundVariants:[],defaultVariants:{as:"h1"}})},dh=({children:e,components:t,defaultColorMode:n="light",colorModeStorageKey:r,applyColorModeClass:i=!0,colorModeRoot:o})=>{let a="system"===n,[s,l]=S(()=>Wo(r,n));g(()=>{if(!a||typeof window>"u")return;let e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>l(e.matches?"dark":"light");return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[a]),g(()=>{if(!i||typeof document>"u")return;let e=o??document.documentElement;"dark"===s?e.classList.add("dark"):e.classList.remove("dark")},[s,i,o]);let c=f(()=>{a||l(e=>{let t="dark"===e?"light":"dark";if(r)try{localStorage.setItem(r,t)}catch{}return t})},[a,r]),u=f(e=>{if(!a&&(l(e),r))try{localStorage.setItem(r,e)}catch{}},[a,r]),d=k(()=>({theme:{components:t&&Object.keys(t).length>0?t:{}},colorMode:s,toggleColorMode:c,setColorMode:u}),[t,s,c,u]);/* @__PURE__ */
|
|
33
|
+
return I(Vo,{value:d,children:e})},ph=({children:e,components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:o})=>/* @__PURE__ */I(dh,{components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:o,children:e}),hh={root:kr("",{variants:{intent:{primary:"text-primary-text",custom:""},size:{xs:"text-xs",sm:"text-sm",md:"",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl",custom:""},weight:{100:"font-thin",thin:"font-thin",200:"font-extralight",extralight:"font-extralight",300:"font-light",light:"font-light",400:"",normal:"",500:"font-medium",medium:"font-medium",600:"font-semibold",semibold:"font-semibold",700:"font-bold",bold:"font-bold",800:"font-extrabold",extrabold:"font-extrabold",900:"font-black",black:"font-black"}},compoundVariants:[],defaultVariants:{intent:"custom",size:"md",weight:400}})},fh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,mh=/^[\\/]{2}/,gh="popstate";function yh(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function bh(e,t){if(!1===e||null==e)throw new Error(t)}function vh(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(YO){}}}function wh(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function kh(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Sh(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function xh({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Sh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Th(e,t,n="/"){return Ch(e,t,n,!1)}function Ch(e,t,n,r,i){let o=Fh(("string"==typeof t?Sh(t):t).pathname||"/",n);if(null==o)return null;let a=i??function(e){let t=Eh(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return vh(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(o);for(let c=0;null==s&&c<a.length;++c)s=zh(a[c],l,r);return s}function Eh(e,t=[],n=[],r="",i=!1){let o=(e,o,a=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;bh(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=Vh([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(bh(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Eh(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:Dh(c,e.index),routesMeta:u.map((e,t)=>{let[n,r]=$h(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of Ah(e.path))o(e,t,!0,n);else o(e,t)}),t}function Ah(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=Ah(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var Ih=/^:[\w-]+$/,Mh=3,Oh=2,Nh=1,_h=10,Ph=-2,Lh=e=>"*"===e;function Dh(e,t){let n=e.split("/"),r=n.length;return n.some(Lh)&&(r+=Ph),t&&(r+=Oh),n.filter(e=>!Lh(e)).reduce((e,t)=>e+(Ih.test(t)?Mh:""===t?Nh:_h),r)}function zh(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u={path:e.relativePath,caseSensitive:e.caseSensitive,end:l},d=e.matcher&&e.compiledParams?jh(u,c,e.matcher,e.compiledParams):Rh(u,c),p=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=Rh({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:Vh([o,d.pathname]),pathnameBase:Kh(Vh([o,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(o=Vh([o,d.pathnameBase]))}return a}function Rh(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=$h(e.path,e.caseSensitive,e.end);return jh(e,t,n,r)}function jh(e,t,n,r){let i=t.match(n);if(!i)return null;let o=i[0],a=Gh(o,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=Gh(o.slice(0,o.length-e.length),1)}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function $h(e,t=!1,n=!0){vh("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Fh(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function qh(e,t){let n=Gh(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Bh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Uh(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Hh(e,t,n,r=!1){let i;"string"==typeof e?i=Sh(e):(i={...e},bh(!i.pathname||!i.pathname.includes("?"),Bh("?","pathname","search",i)),bh(!i.pathname||!i.pathname.includes("#"),Bh("#","pathname","hash",i)),bh(!i.search||!i.search.includes("#"),Bh("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?Sh(e):e;return r?(r=Wh(r),n=r.startsWith("/")||r.startsWith("\\")?qh(r.substring(1),"/"):qh(r,t)):n=t,{pathname:n,search:Jh(i),hash:Yh(o)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Wh=e=>e.replace(/[\\/]{2,}/g,"/"),Vh=e=>Wh(e.join("/"));function Gh(e,t=0){let n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var Kh=e=>Gh(e).replace(/^\/*/,"/"),Jh=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yh=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Xh=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Qh(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Zh(e){return Vh(e.map(e=>e.route.path).filter(Boolean))||"/"}var ef="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function tf(e,t){let n=e;if("string"!=typeof n||!fh.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ef)try{let e=new URL(window.location.href),r=mh.test(n)?new URL((o=n,e.protocol+o.replace(/\\/g,"/"))):new URL(n),a=Fh(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(YO){vh(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var o;return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var nf=new URL("http://localhost");function rf(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),nf)}catch{return nf}}function of(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function af(e,t,n,r){let i=null;try{i=null==e?null:new URL(e,n)}catch{}let o=new URL(t,n),a=null!=i&&!of(i,n),s=!of(o,n);if("reject"===r){if(a||s)throw new Error("External navigation is not allowed")}else if(s&&(null==i||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}(e,i)||!of(i,o)))throw new Error("External navigation is not allowed")}var sf=["POST","PUT","PATCH","DELETE"],lf=(new Set(sf),["GET",...sf]);new Set(lf);var cf=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],uf=e.createContext(null);uf.displayName="DataRouter";var df=e.createContext(null);df.displayName="DataRouterState";var pf=e.createContext(!1);function hf(){return e.useContext(pf)}var ff=e.createContext({isTransitioning:!1});ff.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var mf=e.createContext(null);mf.displayName="Navigation";var gf=e.createContext(null);gf.displayName="Location";var yf=e.createContext({outlet:null,matches:[],isDataRoute:!1});yf.displayName="Route";var bf=e.createContext(null);bf.displayName="RouteError";var vf="REACT_ROUTER_ERROR";function wf(){return null!=e.useContext(gf)}function kf(){return bh(wf(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(gf).location}var xf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sf(t){e.useContext(mf).static||e.useLayoutEffect(t)}function Tf(){let{isDataRoute:t}=e.useContext(yf);return t?function(){let{router:t}=function(){let t=e.useContext(uf);return bh(t,_f("useNavigate")),t}(),n=Pf("useNavigate"),r=e.useRef(!1);return Sf(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{vh(r.current,xf),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){bh(wf(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(uf),{basename:n,navigator:r}=e.useContext(mf),{matches:i}=e.useContext(yf),{pathname:o}=kf(),a=JSON.stringify(Uh(i)),s=e.useRef(!1);return Sf(()=>{s.current=!0}),e.useCallback((e,i={})=>{if(vh(s.current,xf),!s.current)return;if("number"==typeof e)return void r.go(e);let l=Hh(e,JSON.parse(a),o,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:Vh([n,l.pathname])),af("string"==typeof e?e:xh(e),r.createHref(l),rf(r),"reject"),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,a,o,t])}()}function Cf(t,{relative:n}={}){let{matches:r}=e.useContext(yf),{pathname:i}=kf(),o=JSON.stringify(Uh(r));return e.useMemo(()=>Hh(t,JSON.parse(o),i,"path"===n),[t,o,i,n])}function Ef(){let t=function(){let t=e.useContext(bf),n=function(t){let n=e.useContext(df);return bh(n,_f(t)),n}("useRouteError"),r=Pf("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=Qh(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:a},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:a},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:o},r):null,s)}e.createContext(null);var Af=/* @__PURE__ */e.createElement(Ef,null),If=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${vf}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Xh(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(yf.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(bf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(Of,{error:t},n):n}};If.contextType=pf;var Mf=/* @__PURE__ */new WeakMap;function Of({children:t,error:n}){let{basename:r,navigator:i}=e.useContext(mf);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${vf}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let o=Mf.get(n);if(o)throw o;let a=tf(t.location,r),s=a.absoluteURL||a.to;if(af(t.location,s,rf(i),"allow-explicit"),function(e){try{return cf.includes(new URL(e).protocol)}catch{return!1}}(s))throw new Error("Invalid redirect location");if(ef&&!Mf.get(n)){if(!a.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:t.replace}));throw Mf.set(n,e),e}window.location.href=s}/* @__PURE__ */
|
|
34
|
+
return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return t}function Nf({routeContext:t,match:n,children:r}){let i=e.useContext(uf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(yf.Provider,{value:t},r)}function _f(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pf(t){let n=function(t){let n=e.useContext(yf);return bh(n,_f(t)),n}(t),r=n.matches[n.matches.length-1];return bh(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var Lf={};function Df(e,t,n){t||Lf[e]||(Lf[e]=!0,vh(!1,n))}function zf({basename:t,children:n,initialEntries:r,initialIndex:i,useTransitions:o}){let a=e.useRef();null==a.current&&(a.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let o=l(null==r?t.length-1:r),a="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[o]}function u(e,n=null,r,i){let o=kh(t?c().pathname:"/",e,n,r,i);return vh("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:xh(e)}return{get index(){return o},get action(){return a},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?Sh(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=yh(e)?e:u(e,n);o+=1,t.splice(o,t.length,r),i&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=yh(e)?e:u(e,n);t[o]=r,i&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=l(o+e),r=t[n];o=n,s&&s({action:a,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}({initialEntries:r,initialIndex:i,v5Compat:!0}));let s=a.current,[l,c]=e.useState({action:s.action,location:s.location}),u=e.useCallback(t=>{!1===o?c(t):e.startTransition(()=>c(t))},[o]);return e.useLayoutEffect(()=>s.listen(u),[s,u]),/* @__PURE__ */e.createElement(jf,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,useTransitions:o})}function Rf({to:t,replace:n,state:r,relative:i}){bh(wf(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:a}=e.useContext(mf);vh(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=e.useContext(yf),{pathname:l}=kf(),c=Tf(),u=Hh(t,Uh(s),l,"path"===i);af("string"==typeof t?t:xh(t),a.createHref(u),rf(a),"reject");let d=JSON.stringify(u);return e.useEffect(()=>{c(JSON.parse(d),{replace:n,state:r,relative:i})},[c,d,i,n,r]),null}function jf({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:o,static:a=!1,useTransitions:s}){bh(!wf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:o,static:a,useTransitions:s,future:{}}),[l,o,a,s]);"string"==typeof r&&(r=Sh(r));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:f="default",mask:m}=r,g=e.useMemo(()=>{let e=Fh(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:h,key:f,mask:m},navigationType:i}},[l,u,d,p,h,f,i,m]);return vh(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(mf.Provider,{value:c},/* @__PURE__ */e.createElement(gf.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:o,onError:a}){return function(t,n,r){bh(wf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(mf),{matches:o}=e.useContext(yf),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",u=a&&a.route;{let e=u&&u.path||"";Df(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=kf();if(n){let e="string"==typeof n?Sh(n):n;bh("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let h=d.pathname||"/",f=h;if("/"!==c){let e=c.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):Th(t,{pathname:f});vh(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),vh(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let o=t,a=i?.errors;if(null!=a){let e=o.findIndex(e=>e.route.id&&void 0!==a?.[e.route.id]);bh(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){r.isStatic&&(s=!0),o=l>=0?o.slice(0,l+1):[o[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Zh(i.matches),errorInfo:t})}:void 0;return o.reduceRight((t,r,c)=>{let d,p=!1,h=null,f=null;i&&(d=a&&r.route.id?a[r.route.id]:void 0,h=r.route.errorElement||Af,s&&(l<0&&0===c?(Df("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,f=null):l===c&&(p=!0,f=r.route.hydrateFallbackElement||null)));let m=n.concat(o.slice(0,c+1)),g=()=>{let n;return n=d?h:p?f:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(Nf,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(If,{location:i.location,revalidation:i.revalidation,component:h,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Vh([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:Vh([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return n&&g?/* @__PURE__ */e.createElement(gf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:o,onError:a,future:r})}),e.Component;var $f="get",Ff="application/x-www-form-urlencoded";function qf(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Bf=null,Uf=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hf(e){return null==e||Uf.has(e)?e:(vh(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ff}"`),null)}function Wf(e,t){if(!1===e||null==e)throw new Error(t)}function Vf(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===Fh(i.pathname,t)?i.pathname=`${Gh(t)}/_root.${r}`:i.pathname=`${Gh(i.pathname)}.${r}`,i}function Gf(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Kf(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Jf(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Yf(){let t=e.useContext(uf);return Wf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Xf(){let t=e.useContext(df);return Wf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qf=e.createContext(void 0);function Zf(){let t=e.useContext(Qf);return Wf(t,"You must render this element inside a <HydratedRouter> element"),t}function em(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function tm({page:t,...n}){let r=hf(),{nonce:i}=Zf(),{router:o}=Yf(),a=e.useMemo(()=>Th(o.routes,t,o.basename),[o.routes,t,o.basename]);return a?(null==n.nonce&&i&&(n={...n,nonce:i}),r?/* @__PURE__ */e.createElement(nm,{page:t,matches:a,...n}):/* @__PURE__ */e.createElement(rm,{page:t,matches:a,...n})):null}function nm({page:t,matches:n,...r}){let i=kf(),{future:o}=Zf(),{basename:a}=Yf(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=Vf(t,a,o.v8_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[a,o.v8_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
|
|
35
|
+
return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function rm({page:t,matches:n,...r}){let i=kf(),{future:o,manifest:a,routeModules:s}=Zf(),{basename:l}=Yf(),{loaderData:c,matches:u}=Xf(),d=e.useMemo(()=>Kf(t,n,u,a,i,"data"),[t,n,u,a,i]),p=e.useMemo(()=>Kf(t,n,u,a,i,"assets"),[t,n,u,a,i]),h=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=/* @__PURE__ */new Set,r=!1;if(n.forEach(t=>{let n=a.routes[t.route.id];n&&n.hasLoader&&(!d.some(e=>e.route.id===t.route.id)&&t.route.id in c&&s[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let u=Vf(t,l,o.v8_trailingSlashAwareDataRequests,"data");return r&&e.size>0&&u.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,o.v8_trailingSlashAwareDataRequests,c,i,a,d,n,t,s]),f=e.useMemo(()=>Jf(p,a),[p,a]),m=function(t){let{manifest:n,routeModules:r}=Zf(),[i,o]=e.useState([]);return e.useEffect(()=>{let e=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await(import(
|
|
36
36
|
/* @vite-ignore */
|
|
37
37
|
/* webpackIgnore: true */
|
|
38
|
-
e.module));return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(
|
|
39
|
-
return e.createElement(e.Fragment,null,h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}
|
|
40
|
-
return e.createElement(
|
|
41
|
-
return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,f=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h});g&&!1!==r?e.startTransition(()=>f()):f()},...f,"data-discover":w||"render"!==t?void 0:"true"})});function
|
|
42
|
-
return e.createElement(
|
|
43
|
-
/* @__PURE__ */I("b",{children:sr(l,`${D}.attributes.name`,D||"Unknown")})]}),{status:_.type,elementId:D})},[_.type,D,l]);const z=f(e=>
|
|
44
|
-
/* @__PURE__ */I("b",{children:u})," environment"]})),void v(!1);let n={};e.plugins.length>0&&(n=await
|
|
45
|
-
return M(A,{children:[/* @__PURE__ */I(
|
|
46
|
-
return I("div",{...n,ref:r,className:e,children:/* @__PURE__ */I(
|
|
47
|
-
/* @__PURE__ */I("meta",{name:"viewport",content:c,"asset-static":"true"}),!r&&o&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",children:o}),r&&o&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",dangerouslySetInnerHTML:{__html:o}})]}),k.head),b&&k&&u&&O(/* @__PURE__ */I(
|
|
38
|
+
e.module));return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Gf).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(t,n,r).then(t=>{e||o(t)}),()=>{e=!0}},[t,n,r]),i}(p);/* @__PURE__ */
|
|
39
|
+
return e.createElement(e.Fragment,null,h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}Qf.displayName="FrameworkContext";function im(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}e.Component;var om="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{om&&(window.__reactRouterVersion="7.18.4")}catch(YO){}function am({basename:t,children:n,useTransitions:r,window:i}){let o=e.useRef();null==o.current&&(o.current=function(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",l=null,c=u();function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:h.location,delta:t})}function p(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),bh(r,"No window.location.(origin|href) available to create URL");let i="string"==typeof t?t:xh(t);return i=i.replace(/ $/,"%20"),!n&&mh.test(i)&&(i=r+i),new URL(i,r)}(i,e)}null==c&&(c=0,a.replaceState({...a.state,idx:c},""));let h={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(gh,d),l=e,()=>{i.removeEventListener(gh,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=yh(e)?e:kh(h.location,e,t);n&&n(r,e),c=u()+1;let d=wh(r,c),p=h.createHref(r.mask||r);try{a.pushState(d,"",p)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;i.location.assign(p)}o&&l&&l({action:s,location:h.location,delta:1})},replace:function(e,t){s="REPLACE";let r=yh(e)?e:kh(h.location,e,t);n&&n(r,e),c=u();let i=wh(r,c),d=h.createHref(r.mask||r);a.replaceState(i,"",d),o&&l&&l({action:s,location:h.location,delta:0})},go:e=>a.go(e)};return h}(function(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:o}=n||e.location;return kh("",{pathname:r,search:i,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:xh(t)},null,e)}({window:i,v5Compat:!0}));let a=o.current,[s,l]=e.useState({action:a.action,location:a.location}),c=e.useCallback(t=>{!1===r?l(t):e.startTransition(()=>l(t))},[r]);return e.useLayoutEffect(()=>a.listen(c),[a,c]),/* @__PURE__ */e.createElement(jf,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,useTransitions:r})}var sm=e.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,mask:s,state:l,target:c,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h,...f},m){let{basename:g,navigator:y,useTransitions:b}=e.useContext(mf),v="string"==typeof u&&fh.test(u),w=tf(u,g),k=function(t,{relative:n}={}){bh(wf(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=e.useContext(mf),{hash:o,pathname:a,search:s}=Cf(t,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:Vh([r,a])),i.createHref({pathname:l,search:s,hash:o})}(u=w.to,{relative:i}),x=kf(),S=null;if(s){let e=Hh(s,[],x.mask?x.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:Vh([g,e.pathname])),S=y.createHref(e)}let[T,C,E]=function(t,n){let r=e.useContext(Qf),[i,o]=e.useState(!1),[a,s]=e.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,h=e.useRef(null);e.useEffect(()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let f=()=>{o(!0)},m=()=>{o(!1),s(!1)};return r?"intent"!==t?[a,h,{}]:[a,h,{onFocus:em(l,f),onBlur:em(c,m),onMouseEnter:em(u,f),onMouseLeave:em(d,m),onTouchStart:em(p,f)}]:[!1,h,{}]}(r,f),A=function(t,{target:n,replace:r,mask:i,state:o,preventScrollReset:a,relative:s,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Tf(),p=kf(),h=Cf(t,{relative:s});return e.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,n)){f.preventDefault();let n=void 0!==r?r:xh(p)===xh(h),m=()=>d(t,{replace:n,mask:i,state:o,preventScrollReset:a,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?e.startTransition(()=>m()):m()}},[p,d,h,r,i,o,n,t,a,s,l,c,u])}(u,{replace:a,mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,defaultShouldRevalidate:h,useTransitions:b}),I=!(w.isExternal||o),M=/* @__PURE__ */e.createElement("a",{...f,...E,href:(I?S:void 0)||w.absoluteURL||k,onClick:I?function(e){t&&t(e),e.defaultPrevented||A(e)}:t,ref:im(m,C),target:c,"data-discover":v||"render"!==n?void 0:"true"});return T&&!v?/* @__PURE__ */e.createElement(e.Fragment,null,M,/* @__PURE__ */e.createElement(tm,{page:k})):M});sm.displayName="Link";var lm=e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:s,children:l,...c},u){let d=Cf(a,{relative:c.relative}),p=kf(),h=e.useContext(df),{navigator:f,basename:m}=e.useContext(mf),g=null!=h&&function(t,{relative:n}={}){let r=e.useContext(ff);bh(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=um("useViewTransitionState"),o=Cf(t,{relative:n});if(!r.isTransitioning)return!1;let a=Fh(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=Fh(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=Rh(o.pathname,s)||null!=Rh(o.pathname,a)}(d)&&!0===s,y=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,b=p.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&m&&(v=Fh(v,m)||v);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,x=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(w),S=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),T={isActive:x,isPending:S,isTransitioning:g},C=x?t:void 0;k="function"==typeof r?r(T):[r,x?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(T):o;/* @__PURE__ */
|
|
40
|
+
return e.createElement(sm,{...c,"aria-current":C,className:k,ref:u,style:E,to:a,viewTransition:s},"function"==typeof l?l(T):l)});lm.displayName="NavLink";var cm=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:o,state:a,method:s=$f,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h,...f},m)=>{let{useTransitions:g}=e.useContext(mf),y=function(){let{router:t}=um("useSubmit"),{basename:n}=e.useContext(mf),r=Pf("useRouteId"),i=t.fetch,o=t.navigate;return e.useCallback(async(e,t={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,o,a;if(qf(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?Fh(a,t):null,n=e.getAttribute("method")||$f,i=Hf(e.getAttribute("enctype"))||Ff,o=new FormData(e)}else if(function(e){return qf(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return qf(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?Fh(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||$f,i=Hf(e.getAttribute("formenctype"))||Hf(a.getAttribute("enctype"))||Ff,o=new FormData(a,e),!function(){if(null===Bf)try{new FormData(document.createElement("form"),0),Bf=!1}catch(YO){Bf=!0}return Bf}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(qf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$f,r=null,i=Ff,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}(e,n);if(!1===t.navigate){let e=t.fetcherKey||pm();await i(e,r,t.action||a,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync})}else await o(t.action||a,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,o,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(mf),i=e.useContext(yf);bh(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),a={...Cf(t||".",{relative:n})},s=kf();if(null==t){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();a.search=n?`?${n}`:""}}return t&&"."!==t||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(a.pathname="/"===a.pathname?r:Vh([r,a.pathname])),xh(a)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",w="string"==typeof l&&fh.test(l);/* @__PURE__ */
|
|
41
|
+
return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,f=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h});g&&!1!==r?e.startTransition(()=>f()):f()},...f,"data-discover":w||"render"!==t?void 0:"true"})});function um(t){let n=e.useContext(uf);return bh(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}cm.displayName="Form";var dm=0,pm=()=>`__${String(++dm)}__`;function hm({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=Sh(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},o={createHref:fm,encodeLocation:mm,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
|
|
42
|
+
return e.createElement(jf,{basename:t,children:n,location:i,navigationType:"POP",navigator:o,static:!0,useTransitions:!1})}function fm(e){return"string"==typeof e?e:xh(e)}function mm(e){let t="string"==typeof e?e:xh(e);t=t.replace(/ $/,"%20");let n=fh.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var gm,ym=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],bm=()=>{const e=new URLSearchParams(window.location.search),t={};for(const n of ym){const r=e.get(n);r&&(t[n.slice(4)]=r)}return Object.keys(t).length>0?t:void 0},vm=()=>"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,wm=e=>{gm=e},km=(e,t)=>{gm?.track(e,t)},xm=({analytics:e})=>{const t=kf(),n=x(!0===e?.firstViewCounted);return g(()=>{if(!e?.endpoint||!e.key)return;const t=((e,t=20,n=5e3)=>{const r=[],i=`${e.endpoint.replace(/\/+$/,"")}/batch?k=${encodeURIComponent(e.key)}`;let o;const a=()=>{0!==r.length&&(e=>{const t=JSON.stringify({events:e});"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(i,t)||fetch(i,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:t,keepalive:!0,mode:"no-cors"}).catch(()=>{})})(r.splice(0,r.length))},s=e=>{r.push(e),r.length>=t&&a()},l=()=>({path:window.location.pathname,title:document.title||void 0});return"undefined"!=typeof window&&(o=setInterval(a,n),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&a()}),window.addEventListener("pagehide",a)),{trackRender:()=>{s({id:vm(),type:"render",ts:Date.now(),page:l(),ref:{referrer:document.referrer||void 0,utm:bm()}})},track:(e,t)=>{s({id:vm(),type:"interaction",ts:Date.now(),page:l(),name:e,props:t})},flush:a,stop:()=>{o&&(clearInterval(o),o=void 0),a()}}})(e);return wm(t),()=>{wm(void 0),t.stop()}},[e]),g(()=>{n.current?n.current=!1:gm?.trackRender()},[t.pathname,t.search]),null},Sm=W("AuthContext",{}),Tm=({server:e,routerLocation:t})=>{let n=k(()=>typeof window<"u"?window.location:sr(e,"location",{pathname:"/"}),[e]),r=k(()=>{if(!t)return n;let{origin:e,host:r,hostname:i,protocol:o,href:a}=n,{pathname:s,search:l}=t;return{origin:e,host:r,hostname:i,protocol:o,pathname:s,search:l,hash:"",href:e?`${e}${s}${l}`:a}},[n,t]),i=k(()=>function(e){!e&&typeof window<"u"&&(e=window.location.search);let t={};if(!e||0===e.length)return t;let n=e.replace("?","").split("&");for(let r=0;r<n.length;r++){let e=n[r].split("="),i=decodeURIComponent(e[0]),o=decodeURIComponent(e[1]);void 0===t[i]?t[i]=decodeURIComponent(o):"string"==typeof t[i]?t[i]=[t[i],decodeURIComponent(o)]:t[i].push(decodeURIComponent(o))}return t}(r.search),[r.search]),o=k(()=>r.hostname?r.hostname:"localhost",[r.hostname]),a=r.origin||"";return k(()=>({queryParams:i,hostname:o,origin:a,location:r}),[i,o,a,r])},Cm=({authenticated:e,user:t})=>{let n=t?.details,r={authenticated:!0===e};return n?{...r,email:n.email,username:n.username,roles:n.roles}:r},Em=["wheel","touchmove","keydown","pointerdown"],Am=e=>{const t=document.getElementById(e);return t?.scrollIntoView({block:"start"}),null!==t},Im=({children:e,currentPageId:t})=>{const{server:n}=h(Rc),r=Nt(),{renderMode:i,previewMode:o,environment:a}=X(),[[s,l,c,u,d]]=zt(["schema.pageFolders","pageDefinitions","schema.variables","schema.flags","flags.overrides"]),p=n.ssr?.renderResult,m="widget"!==i?kf():void 0,{queryParams:y,hostname:b,origin:v,location:w}=Tm({server:n,routerLocation:m}),S=x(l);S.current=l;const T=x(s);T.current=s;const{authenticated:C,user:E}=h(Sm),A="widget"!==i?Tf():void 0,O=x(A);g(()=>{O.current=A},[A]);const N=k(()=>pu(l,s,C,n.basePath,o),[l,s,C,n.basePath,o]),{action:_,pageId:P="",pathMatch:L}=k(()=>"widget"===i?{action:{type:"normal",path:""},pageId:t}:hu(N,w.pathname,C),[N,w.pathname,C,i,t]),D=t||P;(({hash:e,navigationKey:t,enabled:n})=>{g(()=>{const t=(e=>{const t=e.replace(/^#/,"");try{return decodeURIComponent(t)}catch{return t}})(e);if(!n||!t||"undefined"==typeof document||Am(t))return;const r=new AbortController,i=new MutationObserver(()=>{Am(t)&&r.abort()}),o=setTimeout(()=>r.abort(),3e3);return r.signal.addEventListener("abort",()=>{i.disconnect(),clearTimeout(o)}),i.observe(document.body,{childList:!0,subtree:!0}),Em.forEach(e=>window.addEventListener(e,()=>r.abort(),{once:!0,passive:!0,signal:r.signal})),()=>r.abort()},[e,t,n])})({hash:m?.hash??"",navigationKey:m?.key,enabled:o&&"widget"!==i}),g(()=>{Jl.info("navigation",/* @__PURE__ */M("span",{children:["Navigated to page"," ",
|
|
43
|
+
/* @__PURE__ */I("b",{children:sr(l,`${D}.attributes.name`,D||"Unknown")})]}),{status:_.type,elementId:D})},[_.type,D,l]);const z=f(e=>uu(S.current,T.current,e),[]),R=x(0),j=f((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=z(e),i=++R.current;if(!r.get("rsc.enabled"))return r.set("navigation.pendingLocation",""),void O.current?.(n);r.set("navigation.pendingLocation",n);const o=Su(r,void 0,void 0,{location:n}).finally(()=>{R.current===i&&r.set("navigation.pendingLocation","")}),a=()=>{R.current===i&&O.current?.(n)};Promise.race([o,new Promise(e=>setTimeout(e,1500))]).then(a,a)},[z,r]),$=k(()=>{const e=N.find(e=>e.pageId===D&&!e.isRaw);return e?{...fu(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...sr(L,"params",{})}:sr(L,"params",{})},[N,L,D]),F=Bl($),q=Bl(y),B=k(()=>new URLSearchParams(w.search),[w.search]),U=v?`${v}${w.pathname}${w.search}`:"",H=Object.hasOwn(l,D)?l[D].definition.flag:void 0,W=void 0!==H&&!lc(H,sc(ac(u,{environment:a,hostname:b,routeParams:F,queryParams:q,user:Cm({authenticated:C,user:E})},d))),V=W?((e,t)=>e.find(e=>e.hasAccess&&e.notFound&&iu({path:e.path,end:!0},t))?.pageId)(N,w.pathname)??"":D;if(Rt(["navigation.urlSearchParams","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId","navigation.navigate"],[B,F,q,b,v,U,V,j],{raw:!0}),"notFound"===_.type||W)return p&&(p.status=404),V?e:"Not Found";if("accessDenied"===_.type)return p&&(p.status=403),"Access Denied";if("redirect"===_.type){const e=Ul(c,{queryParams:y,routeParams:F,hostname:b,environment:a}),t=_.path?String(Fn(_.path,{variables:e},!1,!0)):"";if(t&&ou(t)){const e=new URL(t);return e.searchParams.has("redirect")||e.searchParams.set("redirect",(e=>e.href?e.href:`${e.protocol||"https:"}//${e.host||e.hostname}${e.pathname}${e.search}`)(w)),p?(p.redirect=e.toString(),null):(window.location.assign(e.toString()),null)}return p?(p.redirect=_.path??"",null):/* @__PURE__ */I(Rf,{to:_.path??"",replace:!0})}return e},Mm=(e,{src:t,type:n,isMain:r},i=!1)=>{let o,a=`${e}/${t}`,s=btoa(a);return o="style"===n&&a.endsWith(".css")?{type:"link",id:s,params:{href:a,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:a,type:"text/javascript"},isMain:r},i&&delete o.isMain,o},Om=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{definition:{name:o="Plitzi's Demo Plugin",owner:a="Plitzi",verified:s=!1,license:l="MIT",website:c="https://plitzi.com",backgroundColor:u="#4422ee",icon:d="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:p,assetsSettings:h,pluginSchema:f}=t;return Object.values(sr(t,"pluginSchema",{})).reduce((e,m)=>{let{definition:g,builder:y,defaultStyle:b,attributes:v}=m,w=[];return g.type===i&&(w=Object.keys(fr(f,[i]))),{...e,[g.type]:{attributes:v,builder:y,defaultStyle:b,definition:g,market:{owner:a,verified:s,license:l,website:c,backgroundColor:u,icon:d,category:o},resource:n,isMain:g.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(h).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>Mm(n,e,!0)),assets:Object.values(p).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>Mm(n,e)),subPlugins:w}}},{})}catch{return{}}},Nm=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[sr(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=sr(n,r);t={...t,...Om(e,i)}}),t},_m=class extends Error{failure;statusCode;constructor(e,t,n){super(e),this.name="GraphqlRequestError",this.failure=t,this.statusCode=n}},Pm=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:o="",instanceId:a,offlineMode:s=!1,offlineData:l,offlineDataType:c="json"})=>{const{environment:u,debugMode:d}=X(),p=$t(),m=s&&!!l&&!!l.schema,y=k(()=>((e,t)=>({request:async(n,r)=>{let i;try{i=await fetch(e,{method:"POST",headers:{accept:"application/graphql-response+json, application/json;q=0.9","content-type":"application/json","sdk-version":"0.38.9",authorization:t?`Bearer ${t}`:""},body:JSON.stringify({query:n,variables:r})})}catch(YO){throw new _m(YO instanceof Error?YO.message:"Network request failed","network")}const o=(e=>{try{return JSON.parse(e)}catch{return}})(await i.text());if(!i.ok){const t=ti(i.status,o);throw t&&Zr({reason:t,url:e}),new _m(`Response not successful: Received status code ${i.status}`,"http",i.status)}const a=(e=>{const t=nr(e)?e.errors:void 0;return Array.isArray(t)?t.map(e=>nr(e)&&"string"==typeof e.message?e.message:"Unknown error"):[]})(o);if(a.length)throw new _m(a.join("\n"),"graphql",i.status);if(!nr(o)||!nr(o.data))throw new _m("The server answered without data","graphql",i.status);return o.data}}))(t.serverUrl,r),[t.serverUrl,r]),[b,v]=S(!(s&&l)),[w,x]=S(void 0),{components:T}=h(Fr),[C,E]=S(()=>m&&"json"===c?{...l,plugins:{}}:{plugins:{}}),A=f(async(e,t)=>{try{return{success:!0,result:await y.request(Uc[e],{environment:u,...t})}}catch(YO){return{success:!1,result:void 0,error:YO instanceof Error?YO:String(YO)}}},[y,u]),O=f(async(e,t,n=!0)=>{const r=Bc[e];if(!r)return{success:!1,result:void 0,error:"Mutation Not Found"};try{return{success:!0,result:await y.request(r,n?{environment:u,...t}:t)}}catch(YO){return{success:!1,result:void 0,error:YO instanceof Error?YO:String(YO)}}},[y,u]),N=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await A("Init",{environment:u,revision:e});if(t.error)return v(!1),void x((e=>e instanceof _m?401===e.statusCode?"Access not authorized":"network"===e.failure?"Service not available":e.message:"string"==typeof e?e:e.message)(t.error));if(t.success&&t.result){const{Space:e}=ur(t.result);if(!e)return x(/* @__PURE__ */M("span",{children:["Space not found, publish to ",
|
|
44
|
+
/* @__PURE__ */I("b",{children:u})," environment"]})),void v(!1);let n={};e.plugins.length>0&&(n=await Nm(e.plugins.filter(e=>!T.current[e.type]))),p("render.overQuota",e.render?.overQuota??!1),E({schema:{...Pc,...qc(e.schema)},plugins:n,style:e.style})}v(!1)};g(()=>{s&&l?m&&(async()=>{let e={};l?.plugins&&l.plugins.length>0&&(e=await Nm(l.plugins.filter(e=>!T.current[e.type]))),E(t=>({...t,plugins:e})),v(!1)})():(v(e=>e||!0),N())},[m,s&&c,r,u,d]);const _=k(()=>({query:A,mutate:O,webKey:r,webId:i,server:t,environment:u,instanceId:a,userKey:o}),[A,O,r,i,t,u,a,o]);return w?/* @__PURE__ */I("div",{children:w}):b?null:/* @__PURE__ */I(Rc,{value:_,children:/* @__PURE__ */I(jc,{value:C,children:e})})},Lm=W("PluginsContext",{assets:{}}),Dm=({children:e,plugins:t,sdkStylePath:n="./plitzi-sdk.css",sdkIconsPath:r="./plitzi-sdk-icons.css"})=>{const{renderMode:i}=X(),[o,a]=S({}),s=h(jc),l=k(()=>t||s.plugins,[t,s]),{components:c}=h(Fr),u=f((e,t,n="")=>t?sr(l,`${e}.settings.${t}`,n):sr(l,`${e}.settings`,{}),[l]),d=f((e=[])=>{const t=e.reduce((e,t)=>{let n="";return n="script"===t.type?t.params.src:t.params.href,n?(n=btoa(n),{...e,[n]:{...t,key:n}}):e},{});0!==Object.keys(t).length&&a(e=>({...e,...t}))},[]),p=f((e=[])=>{const t=e.filter(e=>!function(e){return null==e||"number"!=typeof e&&"boolean"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e&&("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"==typeof e&&0===Object.keys(e).length)}(e)).map(e=>btoa(e));a(e=>fr(e,t))},[]),m=k(()=>(e=>Object.values(e).reduce((e,t)=>({...e,...sr(t,"assets",[]).filter(e=>"link"===e.type).reduce((e,t)=>({...e,[btoa(t.id)]:t}),{})}),{}))(l),[l]),g=k(()=>Object.keys(c.current).filter(e=>"local-custom"===c.current[e].origin).reduce((e,t)=>({...e,...sr(c,`${t}.assets`,[]).reduce((e,n,r)=>({...e,[`${t}-${r}`]:{type:"link",id:`${t}-${r}`,params:n}}),{})}),{}),[c.current]),y=k(()=>{const e={};return"iframe"!==i&&"shadow"!==i||(e["static-99"]={type:"link",id:"static-99",params:{type:"text/css",href:n,rel:"stylesheet"}},e["static-100"]={type:"link",id:"static-100",params:{type:"text/css",href:r,rel:"stylesheet"}}),{...e,...g,...m,...o}},[g,m,o,i,n,r]),b=k(()=>({assets:y,getSettings:u,plugins:l,registerCustomAssets:d,unregisterCustomAssets:p}),[y,u,l,d,p]),v=k(()=>Object.values({...m,...o}).map((e,t)=>/* @__PURE__ */I(e.type,{...e.params},t)),[m,o]);/* @__PURE__ */
|
|
45
|
+
return M(A,{children:[/* @__PURE__ */I(Wp,{children:("raw"===i||"widget"===i)&&v}),/* @__PURE__ */I(Lm,{value:b,children:e})]})},zm=({children:e,schema:t})=>{const n=h(jc),r=k(()=>({...Pc,...t||n.schema}),[t,n.schema]);Rt("schema",r);const i=k(()=>cr(sr(r,"flat",{}),sr(r,"pages",[])),[r.pages]);return Rt("pageDefinitions",i),e},Rm=l({});Rm.displayName="ContainerRootContext";var jm=({className:e="",children:t,...n})=>{let r=x(null),i=f(()=>r.current instanceof HTMLElement?r.current.getRootNode():void 0,[r]),o=f(()=>i()instanceof ShadowRoot,[i]),a=k(()=>({getHost:i,rootRef:r,isRootShadow:o}),[i,r,o]);/* @__PURE__ */
|
|
46
|
+
return I("div",{...n,ref:r,className:e,children:/* @__PURE__ */I(Rm,{value:a,children:t})})},$m=W("InteractionsContext",{}),Fm=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,qm=/^rgba?\(\s*(\d{1,3}%?\s*,\s*){2,3}\d{1,3}%?\s*\)$/,Bm=/^hsla?\(\s*\d{1,3}(deg|rad|turn)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|0?\.\d+|1))?\s*\)$/,Um=/* @__PURE__ */new Set(["black","white","red","green","blue","yellow","cyan","magenta","orange","purple","brown","pink","gray","lime","teal","navy","silver","maroon","olive","aqua","fuchsia"]),Hm=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),Wm=({ref:e,className:t="",ssrMode:r=!1,id:i="",css:o="",style:a,zoom:s=1,assets:l,viewport:c="width=device-width, initial-scale=1",children:u,contentDidMount:d,contentDidDismount:p,contentDidUpdate:h,onLoad:m})=>{t=fs("ContainerFrame",{className:t,componentKey:"root"});let y=x(null);v(e,()=>y.current,[y]);let[b,w]=S(!1),[k,T]=S(null),C=f((e,t,n)=>{let r=[...t.childNodes],i=n.getElementById("customStyle");Object.values(e).forEach(e=>{let o=n.createElement(e.type);e.id&&o.setAttribute("data-id",e.id),Object.keys(e.params).forEach(t=>{("link"===e.type||"script"===e.type)&&o.setAttribute(t,e.params[t])}),r.find(t=>"link"===e.type&&t.href===o.href||"script"===e.type&&t.src===o.src)||(t.insertBefore(o,i),r.push(o))})},[]),E=f((e,t)=>{let{head:n}=e,r=n.querySelectorAll('*:not([asset-static="true"])');Object.values(r).forEach(e=>{n.removeChild(e)}),t&&C(t,n,e)},[C]),[N]=S(()=>(e=>{if(!e)return"";let t=[];return Object.values(e).forEach(e=>{t.push(`<${e.type} ${Object.keys(e.params).map(t=>`${t}="${e.params[t]}"`).join(" ")}>`)}),t.join("")})(l)),_=f(()=>d?.(),[d]);g(()=>{b&&k&&E(k,l)},[b,l,k,E]);let P=f(()=>{let e=y.current&&k,t=y.current?.contentDocument===k;!e||t?b||(m?.(y.current),w(!0),T(y.current?.contentDocument)):T(y.current?.contentDocument)},[b,k,m]);return g(()=>{k&&(k.body.style.zoom=1===s?"":`${s}`)},[k,s]),/* @__PURE__ */M("iframe",{ref:y,className:t,title:"#",srcDoc:`<!DOCTYPE html><html><head>${N}</head><body></body></html>`,id:i,onLoad:P,style:a,children:[b&&k&&O(/* @__PURE__ */M(A,{children:[
|
|
47
|
+
/* @__PURE__ */I("meta",{name:"viewport",content:c,"asset-static":"true"}),!r&&o&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",children:o}),r&&o&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",dangerouslySetInnerHTML:{__html:o}})]}),k.head),b&&k&&u&&O(/* @__PURE__ */I(Hm,{contentDidMount:_,contentDidDismount:p,contentDidUpdate:h,children:n.only(u)}),k.body)]})},Vm=Object.defineProperty,Gm=(e,t)=>{let n={};for(var r in e)Vm(n,r,{get:e[r],enumerable:!0});return t||Vm(n,Symbol.toStringTag,{value:"Module"}),n},Km=Cd(({ref:e,content:t="",className:n=""})=>{let{settings:{previewMode:r}}=dc(),i=f(e=>new Promise((t,n)=>{if(typeof document>"u")return void n(/* @__PURE__ */Error("Document is not available"));let r=document.createElement("script"),i=e.hasAttribute("src");for(let{name:o,value:a}of e.attributes)r.setAttribute(o,a);i?(r.addEventListener("load",()=>t(r)),r.addEventListener("error",n)):r.textContent=e.innerText,e.replaceWith(r),i||t(r)}),[]),o=f(async e=>{if(!e)return;let t=e.querySelectorAll("script"),n=[],r=[];if(t.forEach(e=>{(e.hasAttribute("async")?r:n).push(()=>i(e))}),t.length){for(let e of r)e();for(let e of n)await e()}},[i]);return g(()=>{let t=e?.current;t&&r&&typeof window<"u"&&typeof document<"u"&&o(t)},[o,r,e]),/* @__PURE__ */I(cp,{ref:e,className:U("plitzi-component__block-html",n,{"block-html--empty":""===t||!t}),dangerouslySetInnerHTML:{__html:t}})}),Jm=Object.assign(Km,{type:"blockHtml",content:{attributes:{content:""},definition:{label:"HTML Block",type:"blockHtml",description:"Renders an arbitrary raw HTML string as a block. Escape hatch when no structured element fits.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"HTML Block",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),Ym=Cd(({ref:e,className:t="",props:n="{}",contentCache:r="",...i})=>{let{id:o,rootId:a,plitziElementLayout:s}=Ed(),[l,c]=S(),[u,d]=S(),p=k(()=>({id:o,rootId:a,plitziElementLayout:s}),[o,s,a]),h=k(()=>{let e=fr(i,["content","children"]);if(!n)return e;if("object"==typeof n)return{...n,...e};if("string"!=typeof n)return e;try{return{...JSON.parse(n),...e}}catch(e){console.error(e)}},[n,i]),m=f(async e=>{let t,n;try{e=`data:text/javascript;base64,${e}`,t=await(import(
|
|
48
48
|
/* @vite-ignore */
|
|
49
49
|
/* webpackIgnore: true */
|
|
50
|
-
e))}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&&(c(void 0),d("Component not found"))}},[l]);return g(()=>{m(r)},[r,m]),/* @__PURE__ */M(
|
|
51
|
-
/* @__PURE__ */I("b",{children:n})," Not Found"]}),m&&/* @__PURE__ */I("span",{children:"Settings Malformed"}),!n&&/* @__PURE__ */I("span",{children:"Custom Component"})]})}),
|
|
52
|
-
return I(
|
|
53
|
-
return M(
|
|
54
|
-
return M(
|
|
55
|
-
return M(
|
|
56
|
-
return M(
|
|
57
|
-
return t.createElement(u,
|
|
50
|
+
e))}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&&(c(void 0),d("Component not found"))}},[l]);return g(()=>{m(r)},[r,m]),/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__block-jsx",t,{"block-jsx--empty":""===r||!r||!l}),children:[!u&&h&&l&&/* @__PURE__ */I(l.default,{internalProps:p,...h}),u&&/* @__PURE__ */M("div",{children:["JSX Malformed ",u]}),!u&&!h&&/* @__PURE__ */I("div",{children:"Settings Malformed"})]})}),Xm=Object.assign(Ym,{type:"blockJsx",content:{attributes:{content:'import { useCallback } from "react";\nimport { JsxManager } from "@plitzi/plitzi-sdk";\n\nconst BlockJsx = ({ internalProps, content, content2 }) => {\n const handleClick = useCallback(() => {\n alert("Hello World");\n }, []);\n\n return (\n <div style={{ display: "flex", gap: "4px" }}>\n <JsxManager\n as="Heading"\n internalProps={internalProps}\n content={`${content} ${content2}`}\n />\n <button onClick={handleClick} style={{ border: "1px gray solid", cursor: "pointer" }}>\n Click Me\n </button>\n </div>\n );\n};\n\nexport default BlockJsx;',props:'{"content": "Hello", "content2": "World"}',contentCache:"aW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnOwppbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gInJlYWN0IjsKaW1wb3J0IHsgSnN4TWFuYWdlciB9IGZyb20gIkBwbGl0emkvcGxpdHppLXNkayI7CnZhciBCbG9ja0pzeCA9IGZ1bmN0aW9uIEJsb2NrSnN4KF9yZWYpIHsKICB2YXIgaW50ZXJuYWxQcm9wcyA9IF9yZWYuaW50ZXJuYWxQcm9wcywKICAgIGNvbnRlbnQgPSBfcmVmLmNvbnRlbnQsCiAgICBjb250ZW50MiA9IF9yZWYuY29udGVudDI7CiAgdmFyIGhhbmRsZUNsaWNrID0gdXNlQ2FsbGJhY2soZnVuY3Rpb24gKCkgewogICAgYWxlcnQoIkhlbGxvIFdvcmxkIik7CiAgfSwgW10pOwogIHJldHVybiAvKiNfX1BVUkVfXyovUmVhY3QuY3JlYXRlRWxlbWVudCgiZGl2IiwgewogICAgc3R5bGU6IHsKICAgICAgZGlzcGxheTogImZsZXgiLAogICAgICBnYXA6ICI0cHgiCiAgICB9CiAgfSwgLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoSnN4TWFuYWdlciwgewogICAgYXM6ICJIZWFkaW5nIiwKICAgIGludGVybmFsUHJvcHM6IGludGVybmFsUHJvcHMsCiAgICBjb250ZW50OiAiIi5jb25jYXQoY29udGVudCwgIiAiKS5jb25jYXQoY29udGVudDIpCiAgfSksIC8qI19fUFVSRV9fKi9SZWFjdC5jcmVhdGVFbGVtZW50KCJidXR0b24iLCB7CiAgICBvbkNsaWNrOiBoYW5kbGVDbGljaywKICAgIHN0eWxlOiB7CiAgICAgIGJvcmRlcjogIjFweCBncmF5IHNvbGlkIiwKICAgICAgY3Vyc29yOiAncG9pbnRlcicKICAgIH0KICB9LCAiQ2xpY2sgTWUiKSk7Cn07CmV4cG9ydCBkZWZhdWx0IEJsb2NrSnN4Ow==",allowEmptyRender:!1},definition:{label:"Block JSX",type:"blockJsx",description:"A compiled JSX block for advanced authoring.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-code"},defaultStyle:{name:"Block JSX",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),Qm=Cd(({ref:e,className:t="",renderType:n="",settings:r="{}",isPlugin:i=!1,assets:o="",scriptUrl:a=""})=>{let{id:s,rootId:l}=Ed(),{contexts:{PluginsContext:c}}=dc(),{registerCustomAssets:u,unregisterCustomAssets:d}=h(c),{components:p}=h(Fr),f=k(()=>{if(!r)return{};try{return JSON.parse(r)}catch{}return!1},[r]),m=!1===f,y=k(()=>({id:s,rootId:l,...m?{}:f}),[s,l,m,f]),b=k(()=>o?o.split("\n").filter(e=>!!e&&""!==e.trim()).map(e=>e.endsWith(".js")?{id:e,type:"script",params:{src:e,type:"text/javascript"}}:{id:e,type:"link",params:{href:e,rel:"stylesheet",type:"text/css"}}):[],[o]);if(g(()=>{if(0!==b.length)return u(b),()=>{d(b.map(e=>"script"===e.type?e.params.url:e.params.href))}},[b,u,d]),i&&a&&!m/* @__PURE__ */)return I(Hr,{url:a,internalProps:y,autoRegister:!1});let v=p.current[n];return v&&!m?/* @__PURE__ */I(v,{internalProps:y,extraProps:v.extraProps}):/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__custom",t),children:[n&&!m&&/* @__PURE__ */M("span",{children:["Custom Component ",
|
|
51
|
+
/* @__PURE__ */I("b",{children:n})," Not Found"]}),m&&/* @__PURE__ */I("span",{children:"Settings Malformed"}),!n&&/* @__PURE__ */I("span",{children:"Custom Component"})]})}),Zm=Object.assign(Qm,{type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,assets:"",scriptUrl:""},definition:{label:"Custom",type:"custom",description:"A custom element slot whose behaviour is supplied by a host/plugin component.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",displayMode:"desktop",style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}},settings:{}}}),eg=Cd(({ref:e,className:t="",subType:n="span",children:r,...i})=>{let o=Go(i),a=k(()=>Object.fromEntries(Object.entries(o).map(([e,t])=>[e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),t])),[o]);/* @__PURE__ */
|
|
52
|
+
return I(cp,{ref:e,tag:n,className:U(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...a,children:r})}),tg=Object.assign(eg,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"A single raw HTML tag with custom attributes.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),ng=p(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=h(Fr),{contexts:{PluginsContext:i}}=dc(),{plugins:o}=h(i);return Vr({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:o})}),rg=({children:e})=>{let{contexts:{InteractionsContext:t}}=dc(),n=h(t),r=k(()=>n.interactionsManager.createChildManager(),[n]),i=k(()=>({...n,interactionsManager:r}),[n,r]);return g(()=>()=>{n.interactionsManager.removeChildManager(r)},[n,r]),/* @__PURE__ */I(t,{value:i,children:e})},ig=(e,t)=>Object.fromEntries(Object.entries(e.props??{}).map(([e,n])=>[e,t[e]??n.default??null])),og=(e,t)=>U(e,{[Oc]:!K(t.visibility)}),ag=({instance:e,instanceId:t,items:n,plitziElementLayout:r,previewMode:i})=>{let o=k(()=>({...e,items:n}),[e,n]);return Bu({id:t,definition:o,plitziElementLayout:r,children:void 0,previewMode:i})},sg=({ref:e,className:t,componentId:n,previewMode:r})=>{let{id:i,attributes:o,definition:a,plitziElementLayout:s,elementState:l,definition:{styleSelectors:c}}=Ed(),[u]=_t("schema.components"),d=k(()=>a.items??[],[a.items]),p=k(()=>d.map(e=>`schema.flat.${e}.attributes.slot`),[d]),[h]=_t(p),f=b(),m=Object.hasOwn(u,n)?u[n]:void 0,g=k(()=>m?{schema:{flat:m.flat},runtime:{sources:{[_c]:ig(m,o)}}}:{},[m,o]),y=k(()=>({slots:m?.slots??[],rootId:i,type:"component"}),[m?.slots,i]),v=k(()=>{let e=m?.slots??[],t={};for(let n of e){let o=d.filter((t,r)=>{let i=h[r];return("string"==typeof i?i:e[0])===n});t[n]=/* @__PURE__ */I(ag,{instance:a,instanceId:i,items:o,plitziElementLayout:s,previewMode:r})}return t},[m?.slots,d,h,a,i,s,r]),w=og(c.base,l),x=k(()=>({id:m?.rootId??"",rootId:i,className:w}),[m?.rootId,i,w]),S=m?m.flat[m.rootId]:void 0,T=S&&/* @__PURE__ */I(rg,{children:/* @__PURE__ */I(Et,{inherit:"live",name:`Component:${n}:${i}`,segment:f,value:g,children:/* @__PURE__ */I(Jr,{bodies:v,children:/* @__PURE__ */I(ng,{type:S.definition.type,internalProps:x,plitziElementLayout:y},`${i}_${n}`)})})});return r&&T?T:/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[T,!r&&!S&&/* @__PURE__ */M("div",{className:"reference__label",children:["Component ",n," not found"]})]})},lg=({ref:e,className:t,referenceId:n,previewMode:r})=>{let{id:i,elementState:o,definition:{rootId:a,styleSelectors:s}}=Ed(),[l]=_t(`schema.flat.${n}`),c=l,u=b(),d=og(s.base,o),p=k(()=>({id:c?.id??"",rootId:a,className:d}),[c?.id,a,d]),h=c&&/* @__PURE__ */I(rg,{children:/* @__PURE__ */I(Et,{inherit:"live",name:`Reference:${i}`,segment:u,children:/* @__PURE__ */I(ng,{type:c.definition.type,internalProps:p},`${i}_${n}`)})});return r&&h?h:/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[h,!r&&!c&&/* @__PURE__ */I("div",{className:"reference__label",children:"Element Reference"})]})},cg=Cd(({ref:e,className:t="",referenceType:n="element",referenceId:r=""})=>{let{settings:{previewMode:i=!0}}=dc();return"component"===n?/* @__PURE__ */I(sg,{ref:e,className:t,componentId:r,previewMode:i}):/* @__PURE__ */I(lg,{ref:e,className:t,referenceId:r,previewMode:i})}),ug=Object.assign(cg,{type:"reference",content:{attributes:{referenceType:"element",referenceId:""},definition:{label:"Reference",type:"reference",description:"Places one of the components of the space, or renders another of its elements by id, in place.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),dg=({icon:e,className:t})=>e?/* @__PURE__ */I("i",{className:U("plitzi-element-icon",e,t),"aria-hidden":"true"}):null,pg=({content:e="",icon:t="",iconPlacement:n="before",iconClassName:r})=>/* @__PURE__ */M(A,{children:["before"===n&&/* @__PURE__ */I(dg,{icon:t,className:r}),e,"after"===n&&/* @__PURE__ */I(dg,{icon:t,className:r})]}),hg=Cd(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",icon:o="",iconPlacement:a="before",subType:s="button",disabled:l=!1,ariaExpanded:c,ariaPressed:u,controls:d,title:p,label:h})=>{let{settings:{previewMode:f}}=dc(),{definition:{styleSelectors:m}}=Ed();/* @__PURE__ */
|
|
53
|
+
return M(cp,{ref:e,tag:"button",type:f?s:"button",className:U("plitzi-component__button",t,{"container--empty--skip":!f&&!n&&(i||o)}),disabled:l,title:p||void 0,"aria-label":h||void 0,"aria-expanded":c,"aria-pressed":u,"aria-controls":d||void 0,children:["before"===r&&/* @__PURE__ */I(pg,{content:i,icon:o,iconPlacement:a,iconClassName:m.icon}),n,"after"===r&&/* @__PURE__ */I(pg,{content:i,icon:o,iconPlacement:a,iconClassName:m.icon})]})}),fg={"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"},mg={type:"button",attributeValues:{subType:["button","submit","reset"],contentPlacement:["before","after"],iconPlacement:["before","after"]},content:{attributes:{contentPlacement:"after",content:"Button",icon:"",iconPlacement:"before",subType:"button",disabled:!1},definition:{label:"Button",type:"button",description:"A clickable button. On its own it only renders; wire an interaction flow (trigger onClick → callbacks) to make it DO something. Its words are its `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-hand-pointer"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:fg}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:fg}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:fg}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:fg}}}}},settings:{}}},gg=Object.assign(hg,mg),yg=l(void 0);yg.displayName="DropdownContext";var bg='button, a[href], input, select, textarea, [role="button"]',vg=e=>{let t=e?.closest(".plitzi-component__dropdown");return t?[...t.querySelectorAll(bg)].find(t=>!e?.contains(t)):void 0},wg=Cd(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:o=!1,closeOnClickBackground:a=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=Ed(),{settings:{previewMode:h},utils:{getWindow:m}}=dc(),y=x(null),b=x(null),v=k(()=>m(),[m]),w=f(e=>{a&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[a,d]),T=f(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,C,E,,A]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:o=!1,closeOnClickPopup:a=!0,closeOnClickOutside:s=!1,offsetX:l=0,offsetY:c=0,myWindow:u,onChange:d})=>{let[p,h]=S(n??!1),[m,y]=S(()=>e?.current?.getBoundingClientRect()),b=k(()=>u||(typeof window<"u"?window:null),[u]),v=f(e=>{if(!(i||o||e.target instanceof Node&&t?.current?.contains(e.target))){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),h(e=>!e)}},[i,o,d,p,n,t]),w=f(e=>{if(!i&&!o&&a){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),h(e=>!e)}},[a,i,o,d,p,n]);g(()=>{let t=e?.current;if(!t||typeof window>"u"||!p)return;let n,r=()=>y(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[p,e]);let x=f(e=>{"Escape"===e.key&&(d?.(!p,void 0!==n),h(e=>!e))},[d,p,n]);g(()=>{if(!p||i||!s||!b)return;let r=r=>{let i=r.target instanceof Node?r.target:null;!i||e?.current?.contains(i)||t?.current?.contains(i)||(d?.(!1,void 0===n),void 0===n&&h(!1))};return b.addEventListener("pointerdown",r,!0),()=>b.removeEventListener("pointerdown",r,!0)},[p,i,s,b,e,t,d,n]),g(()=>{if(p&&!i)return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[p,x,i]);let T=f(e=>{if(!m||!b)return;let t=b.innerWidth,n=b.innerHeight,i=0,o=0;switch(r){case"top":i=m.top-e.height,o=m.left;break;case"bottom":default:i=m.bottom,o=m.left;break;case"left":i=m.top,o=m.left-e.width;break;case"right":i=m.top,o=m.right}return"bottom"===r?(i+=c,o+=l):"top"===r?(i-=c,o+=l):"left"===r?(i+=c,o-=l):"right"===r&&(i+=c,o+=l),"bottom"===r||"top"===r?(o+e.width>t?o=m.right-e.width:o<0&&(o=m.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=m.bottom-e.height:i<0&&(i=m.top),o=Math.max(0,Math.min(t-e.width,o))):(i=Math.max(0,Math.min(n-e.height,i)),o=Math.max(0,Math.min(t-e.width,o))),{top:i,left:o}},[m,b,r,c,l]);return Cs(()=>{h(n??!1)},[n]),[p,h,v,w,m,k(()=>{if(!p||!e?.current||!t?.current)return;let n=t.current.getBoundingClientRect();return T(n)},[p,e,t,T])]})({ref:e,popupRef:y,open:i,disabled:!h||u,closeOnClickPopup:s,closeOnClickOutside:a&&!o,placement:r,offsetX:c,offsetY:l,myWindow:v,onChange:T}),O=(({popupRef:e,open:t,positioned:n,enabled:r})=>{let i=x(!1),o=x(t),a=f(e=>{i.current=0===e.detail},[]);return g(()=>{let n=r?vg(e.current):void 0;n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",String(t)))}),g(()=>{let a=e.current,s=o.current&&!t;if(o.current=t,r&&a){if(s&&a.contains(a.ownerDocument.activeElement))return void vg(a)?.focus({preventScroll:!0});t&&n&&i.current&&!a.contains(a.ownerDocument.activeElement)&&(i.current=!1,a.querySelector(bg)?.focus({preventScroll:!0}))}},[r,t,n,e]),a})({popupRef:y,open:i,positioned:!!A,enabled:!!h&&!u}),N=f(e=>{O(e),C(e)},[O,C]),_=k(()=>({popupRef:y,openPopup:i,parameters:A,onClick:E}),[E,i,A]);/* @__PURE__ */
|
|
54
|
+
return M(cp,{ref:e,className:U("plitzi-component__dropdown",n,{"container--empty--skip":!h&&!t}),onClick:N,children:[/* @__PURE__ */I(yg,{value:_,children:t}),i&&o&&h&&/* @__PURE__ */I("div",{ref:b,className:U("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:w})]})}),kg=Cd(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:o,onClick:a}=h(yg);return v(e,()=>r.current??null,[r]),/* @__PURE__ */I(cp,{ref:r,className:U("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!o}),style:o,onClick:a,children:n})}),xg=Object.assign(kg,{type:"dropdownPopup",ancestorType:"dropdown",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"The floating panel revealed by a dropdown.",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-window-restore"},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"light-dark(white, oklch(0.21 0.006 285.885))","min-height":"24px","min-width":"24px","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),Sg=Object.assign(wg,{type:"dropdown",attributeValues:{popupPlacement:["left","right","top","bottom"]},content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:xg}}),Tg=Cd(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=Ed(),{settings:{previewMode:o},contexts:{BuilderContext:a}}=dc(),s=a?h(a):void 0,l=k(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||o?n:"Heading",[n,o]),c=f(e=>!o&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
|
|
55
|
+
return M(cp,{ref:e,tag:o?r:"div",className:U("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[o&&l,!o&&/* @__PURE__ */I(ch,{value:l,onChange:c,openMode:"doubleClick"})]})}),Cg=Object.assign(Tg,{type:"heading",attributeValues:{subType:["h1","h2","h3","h4","h5","h6"]},content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-weight":700}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"1.158"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"1.125"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"1.25"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"1.333"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"1.429"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"1.5"}}}}}},settings:{}}}),Eg=e=>e.length>1?e.replace(/\/+$/,""):e,Ag=Cd(({ref:e,children:t,className:n="",href:r="#",target:i="self",mode:o="page",hash:a="",label:s="",content:l="",contentPlacement:c="after",icon:u="",iconPlacement:d="before",current:p="page"})=>{let{style:h,definition:{styleSelectors:f}}=Ed(),{settings:{previewMode:m}}=dc(),[[g,y,b,v,w,x]]=zt(["pageDefinitions","schema.pageFolders","navigation.routeParams","navigation.queryParams","navigation.navigate","navigation.href"]),S=k(()=>{if("external"===o)return r;if("internal"===o){let e=`/${r}`.replaceAll(/[/]+/gim,"/");try{let t=Fn(e,{...v,...b},!0);return"string"==typeof t?t:e}catch{}return e}return cu(g,y,r,!0)},[o,r,g,y,v,b]),T="external"!==o&&a?`${S}#${a}`:S,C="external"===o?void 0:((e,t,n)=>{if(t&&e.startsWith("/"))try{let r=new URL(t),i=new URL(e,t),o=Eg(decodeURI(r.pathname)),a=Eg(decodeURI(i.pathname));return[...i.searchParams].every(([e,t])=>r.searchParams.getAll(e).includes(t))&&((e,t,n)=>t===e||"section"===n&&t.startsWith("/"===e?"/":`${e}/`))(a,o,n)?o===a?"page":"true":void 0}catch{return}})(S,x,p),E=k(()=>{let t={ref:e,style:h,target:`_${i}`,..."blank"===i?{rel:"noopener noreferrer"}:{},"aria-label":s||void 0,"aria-current":C,className:U("plitzi-component__link",n)};return m?{...t,href:T}:{...t,"href-disabled":T}},[e,h,i,s,C,n,m,T]);/* @__PURE__ */
|
|
56
|
+
return M(cp,{tag:"a",...E,onClick:e=>{if(!m)return;e.stopPropagation();let t="self"!==i||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button;("page"===o||"internal"===o)&&!t&&(e.preventDefault(),w(T))},children:["before"===c&&/* @__PURE__ */I(pg,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon}),t,"after"===c&&/* @__PURE__ */I(pg,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon})]})}),Ig=Object.assign(Ag,{type:"link",attributeValues:{mode:["page","internal","external"],target:["self","blank","parent","top"],contentPlacement:["before","after"],iconPlacement:["before","after"],current:["page","section"]},content:{attributes:{href:"#",target:"self",mode:"page",hash:"",label:"",content:"",contentPlacement:"after",icon:"",iconPlacement:"before",current:"page"},definition:{label:"Link",type:"link",description:"Navigation. Moves the user between pages of the site or to an external URL (its `mode`/`href` decide which). Use this to go page-to-page rather than a button + interaction. Its words are its own `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them. It marks itself current on the page it leads to (`aria-current`, the `current` style state); its `current` set to `section` keeps it current on every page under its path too — a menu entry for a section and its pages.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["link"]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-link"},defaultStyle:{name:"Link",displayMode:"desktop",style:{base:{default:{display:"inline-block",color:"light-dark(#333, oklch(0.92 0.004 286.32))","text-decoration":"none",cursor:"pointer"}}}},settings:{}}}),Mg=e=>"text"===e.type?e.value??"":(e.children??[]).map(Mg).join("");function Og(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Ng(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _g(e){return function(e){if(Array.isArray(e))return Ng(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ng(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ng(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pg(e){return Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pg(e)}function Lg(e,t,n){return(t=function(e){var t=function(e){if("object"!=Pg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(null,arguments)}function zg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zg(Object(n),!0).forEach(function(t){Lg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jg={};function $g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return jg[r]||(jg[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),jg[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Rg(Rg({},e),n[t])},t)}function Fg(e){return e.join(" ")}function qg(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,a=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,h=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return qg({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,a);if(a){var f=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&m.concat(l.className.filter(function(e){return!f.includes(e)}));p=Rg(Rg({},l),{},{className:Fg(g)||void 0,style:$g(l.className,Object.assign({},l.style,o),r)})}else p=Rg(Rg({},l),{},{className:Fg(l.className)});var y=h(n.children);/*#__PURE__*/
|
|
57
|
+
return t.createElement(u,Dg({key:s},p),y)}}var Bg=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ug(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ug(Object(n),!0).forEach(function(t){Lg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ug(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Wg=/\n/g;function Vg(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,a=e.numberStyle,s=void 0===a?{}:a,l=e.startingLineNumber;/*#__PURE__*/
|
|
58
58
|
return t.createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.startingLineNumber,r=e.style;return e.lines.map(function(e,i){var o=i+n;/*#__PURE__*/
|
|
59
|
-
return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Wg(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Vg(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Bg(Bg({},i),o)}function Gg(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,h=void 0!==p&&p?Bg({},"function"==typeof s?s(n):s):{};if(h.className=h.className?[].concat(Og(h.className.trim().split(/\s+/)),Og(c)):c,n&&o){var f=Vg(r,n,i);t.unshift(Wg(n,f))}return d&u&&(h.style=Bg({display:"flex"},h.style)),{type:"element",tagName:"span",properties:h,children:t}}function Kg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(Gg({children:[i],className:Og(new Set(t))}));else if(i.children){var o,a=t.concat((null===(o=i.properties)||void 0===o?void 0:o.className)||[]);Kg(i.children,a).forEach(function(e){return n.push(e)})}}return n}function Jg(e,t,n,r,i,o,a,s,l){var c,u=Kg(e.value),d=[],p=-1,h=0;function f(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,o){return Gg({children:e,lineNumber:o,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,o,c):function(e,t){if(r&&t&&i){var n=Vg(s,t,a);e.unshift(Wg(t,n))}return e}(e,o)}for(var m=function(){var e=u[h],t=e.children[0].value;if(t.match(Ug)){var n=t.split("\n");n.forEach(function(t,i){var a=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=f(u.slice(p+1,h).concat(Gg({children:[s],className:e.properties.className})),a);d.push(l)}else if(i===n.length-1){var c=u[h+1]&&u[h+1].children&&u[h+1].children[0],m={type:"text",value:"".concat(t)};if(c){var g=Gg({children:[m],className:e.properties.className});u.splice(h+1,0,g)}else{var y=f([m],a,e.properties.className);d.push(y)}}else{var b=f([s],a,e.properties.className);d.push(b)}}),p=h}h++};h<u.length;)m();if(p!==u.length-1){var g=u.slice(p+1,u.length);if(g&&g.length){var y=f(g,r&&d.length+o);d.push(y)}}return t?d:(c=[]).concat.apply(c,d)}function Yg(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return $g({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function Xg(e){return e&&void 0!==e.highlightAuto}var Qg=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function Zg(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qg(n,r,t)}function ey(e){return e.toLowerCase()}Qg.prototype.normal={},Qg.prototype.property={},Qg.prototype.space=void 0;var ty=class{constructor(e,t){this.attribute=t,this.property=e}};ty.prototype.attribute="",ty.prototype.booleanish=!1,ty.prototype.boolean=!1,ty.prototype.commaOrSpaceSeparated=!1,ty.prototype.commaSeparated=!1,ty.prototype.defined=!1,ty.prototype.mustUseProperty=!1,ty.prototype.number=!1,ty.prototype.overloadedBoolean=!1,ty.prototype.property="",ty.prototype.spaceSeparated=!1,ty.prototype.space=void 0;var ny=/* @__PURE__ */$({boolean:()=>iy,booleanish:()=>oy,commaOrSpaceSeparated:()=>uy,commaSeparated:()=>cy,number:()=>sy,overloadedBoolean:()=>ay,spaceSeparated:()=>ly}),ry=0,iy=dy(),oy=dy(),ay=dy(),sy=dy(),ly=dy(),cy=dy(),uy=dy();function dy(){return 2**++ry}var py=Object.keys(ny),hy=class extends ty{constructor(e,t,n,r){let i=-1;if(super(e,t),fy(this,"space",r),"number"==typeof n)for(;++i<py.length;){const e=py[i];fy(this,py[i],(n&ny[e])===ny[e])}}};function fy(e,t,n){n&&(e[t]=n)}function my(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new hy(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ey(r)]=r,n[ey(o.attribute)]=r}return new Qg(t,n,e.space)}hy.prototype.defined=!0;var gy=my({properties:{ariaActiveDescendant:null,ariaAtomic:oy,ariaAutoComplete:null,ariaBusy:oy,ariaChecked:oy,ariaColCount:sy,ariaColIndex:sy,ariaColSpan:sy,ariaControls:ly,ariaCurrent:null,ariaDescribedBy:ly,ariaDetails:null,ariaDisabled:oy,ariaDropEffect:ly,ariaErrorMessage:null,ariaExpanded:oy,ariaFlowTo:ly,ariaGrabbed:oy,ariaHasPopup:null,ariaHidden:oy,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ly,ariaLevel:sy,ariaLive:null,ariaModal:oy,ariaMultiLine:oy,ariaMultiSelectable:oy,ariaOrientation:null,ariaOwns:ly,ariaPlaceholder:null,ariaPosInSet:sy,ariaPressed:oy,ariaReadOnly:oy,ariaRelevant:null,ariaRequired:oy,ariaRoleDescription:ly,ariaRowCount:sy,ariaRowIndex:sy,ariaRowSpan:sy,ariaSelected:oy,ariaSetSize:sy,ariaSort:null,ariaValueMax:sy,ariaValueMin:sy,ariaValueNow:sy,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function yy(e,t){return t in e?e[t]:t}function by(e,t){return yy(e,t.toLowerCase())}var vy=my({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cy,acceptCharset:ly,accessKey:ly,action:null,allow:null,allowFullScreen:iy,allowPaymentRequest:iy,allowUserMedia:iy,alpha:iy,alt:null,as:null,async:iy,autoCapitalize:null,autoComplete:ly,autoFocus:iy,autoPlay:iy,blocking:ly,capture:null,charSet:null,checked:iy,cite:null,className:ly,closedBy:null,colorSpace:null,cols:sy,colSpan:sy,command:null,commandFor:null,content:null,contentEditable:oy,controls:iy,controlsList:ly,coords:sy|cy,crossOrigin:null,data:null,dateTime:null,decoding:null,default:iy,defer:iy,dir:null,dirName:null,disabled:iy,download:ay,draggable:oy,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:iy,formTarget:null,headers:ly,height:sy,hidden:ay,high:sy,href:null,hrefLang:null,htmlFor:ly,httpEquiv:ly,id:null,imageSizes:null,imageSrcSet:null,inert:iy,inputMode:null,integrity:null,is:null,isMap:iy,itemId:null,itemProp:ly,itemRef:ly,itemScope:iy,itemType:ly,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:iy,low:sy,manifest:null,max:null,maxLength:sy,media:null,method:null,min:null,minLength:sy,multiple:iy,muted:iy,name:null,nonce:null,noModule:iy,noValidate:iy,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:iy,optimum:sy,pattern:null,ping:ly,placeholder:null,playsInline:iy,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:iy,referrerPolicy:null,rel:ly,required:iy,reversed:iy,rows:sy,rowSpan:sy,sandbox:ly,scope:null,scoped:iy,seamless:iy,selected:iy,shadowRootClonable:iy,shadowRootCustomElementRegistry:iy,shadowRootDelegatesFocus:iy,shadowRootMode:null,shadowRootSerializable:iy,shape:null,size:sy,sizes:null,slot:null,span:sy,spellCheck:oy,src:null,srcDoc:null,srcLang:null,srcSet:null,start:sy,step:null,style:null,tabIndex:sy,target:null,title:null,translate:null,type:null,typeMustMatch:iy,useMap:null,value:oy,width:sy,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ly,axis:null,background:null,bgColor:null,border:sy,borderColor:null,bottomMargin:sy,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:iy,declare:iy,event:null,face:null,frame:null,frameBorder:null,hSpace:sy,leftMargin:sy,link:null,longDesc:null,lowSrc:null,marginHeight:sy,marginWidth:sy,noResize:iy,noHref:iy,noShade:iy,noWrap:iy,object:null,profile:null,prompt:null,rev:null,rightMargin:sy,rules:null,scheme:null,scrolling:oy,standby:null,summary:null,text:null,topMargin:sy,valueType:null,version:null,vAlign:null,vLink:null,vSpace:sy,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:iy,disablePictureInPicture:iy,disableRemotePlayback:iy,exportParts:cy,part:ly,prefix:null,property:null,results:sy,security:null,unselectable:null},space:"html",transform:by}),wy=my({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:uy,accentHeight:sy,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:sy,amplitude:sy,arabicForm:null,ascent:sy,attributeName:null,attributeType:null,azimuth:sy,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:sy,by:null,calcMode:null,capHeight:sy,className:ly,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:sy,diffuseConstant:sy,direction:null,display:null,dur:null,divisor:sy,dominantBaseline:null,download:iy,dx:null,dy:null,edgeMode:null,editable:null,elevation:sy,enableBackground:null,end:null,event:null,exponent:sy,externalResourcesRequired:null,fill:null,fillOpacity:sy,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cy,g2:cy,glyphName:cy,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:sy,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:sy,horizOriginX:sy,horizOriginY:sy,id:null,ideographic:sy,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:sy,k:sy,k1:sy,k2:sy,k3:sy,k4:sy,kernelMatrix:uy,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:sy,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:sy,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:sy,overlineThickness:sy,paintOrder:null,panose1:null,path:null,pathLength:sy,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ly,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:sy,pointsAtY:sy,pointsAtZ:sy,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:uy,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:uy,rev:uy,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:uy,requiredFeatures:uy,requiredFonts:uy,requiredFormats:uy,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:sy,specularExponent:sy,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:sy,strikethroughThickness:sy,string:null,stroke:null,strokeDashArray:uy,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:sy,strokeOpacity:sy,strokeWidth:null,style:null,surfaceScale:sy,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:uy,tabIndex:sy,tableValues:null,target:null,targetX:sy,targetY:sy,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:uy,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:sy,underlineThickness:sy,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:sy,values:null,vAlphabetic:sy,vMathematical:sy,vectorEffect:null,vHanging:sy,vIdeographic:sy,version:null,vertAdvY:sy,vertOriginX:sy,vertOriginY:sy,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:sy,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yy}),ky=my({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),xy=my({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:by}),Sy=my({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Ty={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Cy=/[A-Z]/g,Ey=/-[a-z]/g,Ay=/^data[-\w.:]+$/i;function Iy(e,t){const n=ey(t);let r=t,i=ty;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Ay.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Ey,Oy);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Ey.test(e)){let n=e.replace(Cy,My);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=hy}return new i(r,t)}function My(e){return"-"+e.toLowerCase()}function Oy(e){return e.charAt(1).toUpperCase()}var Ny=Zg([gy,vy,ky,xy,Sy],"html"),_y=Zg([gy,wy,ky,xy,Sy],"svg");function Py(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(i,r).trim();!e&&o||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var Ly=/[#.]/g;function Dy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function zy(e,t,n){const r=n?function(e){const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...o){let a;if(null==n){a={type:"root",children:[]};const e=i;o.unshift(e)}else{a=function(e,t){const n=e||"",r={};let i,o,a=0;for(;a<n.length;){Ly.lastIndex=a;const e=Ly.exec(n),t=n.slice(a,e?e.index:n.length);t&&(i?"#"===i?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,a+=t.length),e&&(i=e[0],a++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=a.tagName.toLowerCase(),l=r?r.get(s):void 0;if(a.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!(!("children"in e)||!Array.isArray(e.children))}(i))o.unshift(i);else for(const[t,n]of Object.entries(i))Ry(e,a.properties,t,n)}for(const e of o)jy(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function Ry(e,t,n,r){const i=Iy(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?Dy(r):i.commaSeparated?Py(r):i.commaOrSpaceSeparated?Dy(Py(r).join(" ")):$y(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push($y(i,i.property,t));o=e}"className"===i.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function jy(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)jy(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?jy(e,t.children):e.push(t)}}function $y(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||ey(n)===ey(t)))return!0}return n}var Fy=zy(Ny,"div"),qy=(zy(_y,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]),By={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Uy(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function Hy(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Wy(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Uy(e)}var Vy={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Gy={}.hasOwnProperty;function Ky(e){return!!Gy.call(Vy,e)&&Vy[e]}var Jy=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Yy(e,t){const n=t||{},r="string"==typeof n.additional?n.additional.charCodeAt(0):n.additional,i=[];let o,a,s=0,l=-1,c="";n.position&&("start"in n.position||"indent"in n.position?(a=n.position.indent,o=n.position.start):o=n.position);let u,d=(o?o.line:0)||1,p=(o?o.column:0)||1,h=f();for(s--;++s<=e.length;)if(10===u&&(p=(a?a[l]:0)||1),u=e.charCodeAt(s),38===u){const t=e.charCodeAt(s+1);if(9===t||10===t||12===t||32===t||38===t||60===t||Number.isNaN(t)||r&&t===r){c+=String.fromCharCode(u),p++;continue}const o=s+1;let a,l=o,d=o;if(35===t){d=++l;const t=e.charCodeAt(d);88===t||120===t?(a="hexadecimal",d=++l):a="decimal"}else a="named";let y="",b="",v="";const w="named"===a?Wy:"decimal"===a?Uy:Hy;for(d--;++d<=e.length;){const t=e.charCodeAt(d);if(!w(t))break;v+=String.fromCharCode(t),"named"===a&&qy.includes(v)&&(y=v,b=Ky(v))}let k=59===e.charCodeAt(d);if(k){d++;const e="named"===a&&Ky(v);e&&(y=v,b=e)}let x=1+d-o,S="";if(k||!1!==n.nonTerminated)if(v)if("named"===a){if(k&&!b)m(5,1);else if(y!==v&&(d=l+y.length,x=1+d-l,k=!1),!k){const t=y?1:3;if(n.attribute){const n=e.charCodeAt(d);61===n?(m(t,x),b=""):Wy(n)?b="":m(t,x)}else m(t,x)}S=b}else{k||m(2,x);let e=Number.parseInt(v,"hexadecimal"===a?16:10);if(Xy(e))m(7,x),S=String.fromCharCode(65533);else if(e in By)m(6,x),S=By[e];else{let t="";Qy(e)&&m(6,x),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==a&&m(4,x);if(S){g(),h=f(),s=d-1,p+=d-o+1,i.push(S);const t=f();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,S,{start:h,end:t},e.slice(o-1,d)),h=t}else v=e.slice(o-1,d),c+=v,p+=v.length,s=d-1}else 10===u&&(d++,l++,p=0),Number.isNaN(u)?g():(c+=String.fromCharCode(u),p++);return i.join("");function f(){return{line:d,column:p,offset:s+((o?o.offset:0)||0)}}function m(e,t){let r;n.warning&&(r=f(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Jy[e],r,e))}function g(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:h,end:f()}),c="")}}function Xy(e){return e>=55296&&e<=57343||e>1114111}function Qy(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var Zy=0,eb={},tb={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Zy}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},tb.util.type(t)){case"Object":if(i=tb.util.objId(t),n[i])return n[i];for(var o in r={},n[i]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case"Array":return i=tb.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:eb,plaintext:eb,text:eb,txt:eb,extend:function(e,t){var n=tb.util.clone(tb.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||tb.languages)[e],o={};for(var a in i)if(i.hasOwnProperty(a)){if(a==t)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);n.hasOwnProperty(a)||(o[a]=i[a])}var l=r[e];return r[e]=o,tb.languages.DFS(tb.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,i){i=i||{};var o=tb.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var s=t[a],l=tb.util.type(s);"Object"!==l||i[o(s)]?"Array"!==l||i[o(s)]||(i[o(s)]=!0,e(s,n,a,i)):(i[o(s)]=!0,e(s,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(tb.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=tb.tokenize(r.code,r.grammar),tb.hooks.run("after-tokenize",r),nb.stringify(tb.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new ob;return ab(i,i.head,e),ib(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=tb.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=tb.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:nb};function nb(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function rb(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var o=i[1].length;i.index+=o,i[0]=i[0].slice(o)}return i}function ib(e,t,n,r,i,o){for(var a in n)if(n.hasOwnProperty(a)&&n[a]){var s=n[a];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(o&&o.cause==a+","+l)return;var c=s[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,h=c.alias;if(p&&!c.pattern.global){var f=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,f+"g")}for(var m=c.pattern||c,g=r.next,y=i;g!==t.tail&&!(o&&y>=o.reach);y+=g.value.length,g=g.next){var b=g.value;if(t.length>e.length)return;if(!(b instanceof nb)){var v,w=1;if(p){if(!(v=rb(m,y,e,d))||v.index>=e.length)break;var k=v.index,x=v.index+v[0].length,S=y;for(S+=g.value.length;k>=S;)S+=(g=g.next).value.length;if(y=S-=g.value.length,g.value instanceof nb)continue;for(var T=g;T!==t.tail&&(S<x||"string"==typeof T.value);T=T.next)w++,S+=T.value.length;w--,b=e.slice(y,S),v.index-=y}else if(!(v=rb(m,0,b,d)))continue;k=v.index;var C=v[0],E=b.slice(0,k),A=b.slice(k+C.length),I=y+b.length;o&&I>o.reach&&(o.reach=I);var M=g.prev;if(E&&(M=ab(t,M,E),y+=E.length),sb(t,M,w),g=ab(t,M,new nb(a,u?tb.tokenize(C,u):C,h,C)),A&&ab(t,g,A),w>1){var O={cause:a+","+l,reach:I};ib(e,t,n,g.prev,y,O),o&&O.reach>o.reach&&(o.reach=O.reach)}}}}}}function ob(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function ab(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function sb(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}var lb=tb;function cb(){}cb.prototype=lb;var ub=new cb;ub.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Object.hasOwn(ub.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=ub.languages[r]}return{type:"root",children:lb.highlight.call(ub,e,n,r)}},ub.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(ub.languages,e.displayName)||e(ub)},ub.alias=function(e,t){const n=ub.languages;let r,i={};for(r in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,r)){const e=i[r],t="string"==typeof e?[e]:e;let o=-1;for(;++o<t.length;)n[t[o]]=n[r]}},ub.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(ub.languages,e)},ub.listLanguages=function(){const e=ub.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&"object"==typeof e[n]&&t.push(n);return t},ub.util.encode=function(e){return e},ub.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}const r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),ub.hooks.run("wrap",r),Fy(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=Yy(e[t]));return e}(r.attributes),r.content)};var db,pb,hb=(db=ub,pb={},function(e){var n,r,i=e.language,o=e.children,a=e.style,s=void 0===a?pb:a,l=e.customStyle,c=void 0===l?{}:l,u=e.codeTagProps,d=void 0===u?{className:i?"language-".concat(i):void 0,style:Bg(Bg({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:u,p=e.useInlineStyles,h=void 0===p||p,f=e.showLineNumbers,m=void 0!==f&&f,g=e.showInlineLineNumbers,y=void 0===g||g,b=e.startingLineNumber,v=void 0===b?1:b,w=e.lineNumberContainerStyle,k=e.lineNumberStyle,x=void 0===k?{}:k,S=e.wrapLines,T=e.wrapLongLines,C=void 0!==T&&T,E=e.lineProps,A=void 0===E?{}:E,I=e.renderer,M=e.PreTag,O=void 0===M?"pre":M,N=e.CodeTag,_=void 0===N?"code":N,P=e.code,L=void 0===P?(Array.isArray(o)?o[0]:o)||"":P,D=e.astGenerator,z=function(e,t){if(null==e)return{};var n,r,i=Ig(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Fg);D=D||db;var R=m?/*#__PURE__*/t.createElement(Hg,{containerStyle:w,codeStyle:d.style||{},numberStyle:x,startingLineNumber:v,codeString:L}):null,j=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},$=Xg(D)?"hljs":"prismjs",F=h?Object.assign({},z,{style:Object.assign({},j,c)}):Object.assign({},z,{className:z.className?"".concat($," ").concat(z.className):$,style:Object.assign({},c)});if(d.style=Bg(C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},d.style),!D)/*#__PURE__*/return t.createElement(O,F,R,/*#__PURE__*/t.createElement(_,d,L));(void 0===S&&I||C)&&(S=!0),I=I||Yg;var q=[{type:"text",value:L}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Xg(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(VO){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:q});null===B.language&&(B.value=q);var U=Jg(B,S,A,m,y,v,v+(null!==(n=null===(r=L.match(/\n/g))||void 0===r?void 0:r.length)&&void 0!==n?n:0),x,C);/*#__PURE__*/
|
|
60
|
-
return t.createElement(O,F,/*#__PURE__*/t.createElement(_,d,!y&&R,I({rows:U,stylesheet:s,useInlineStyles:h})))});
|
|
61
|
-
return M("div",{className:U("markdown-code",n.codeBlockFrame),"data-language":e,children:[/* @__PURE__ */M("div",{className:U("markdown-code-header",n.codeBlockHeader),children:[/* @__PURE__ */I("span",{className:U("markdown-code-language",n.codeBlockLanguage),children:e??"text"}),/* @__PURE__ */I("button",{type:"button",className:U("markdown-code-copy",n.codeBlockCopy),onClick:a,"aria-live":"polite",children:i?"Copied":"Copy"})]}),r]})},mb={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}},gb={h1:"heading1",h2:"heading2",h3:"heading3",h4:"heading4",h5:"heading5",h6:"heading6"},yb=/language-(\w+)/,bb=(e,t)=>({className:n,...r})=>c(e,{...fr(r,["node"]),className:U(n,t)||void 0}),vb=(e,{classNames:t,headingLinks:n})=>({children:r,node:i,className:o,...a})=>/* @__PURE__ */M(e,{...a,className:U(o,t.heading,t[gb[e]])||void 0,children:[n&&a.id&&/* @__PURE__ */I("a",{className:U("anchor",t.anchor),href:`#${a.id}`,"aria-label":`Link to “${i?Ag(i):a.id}”`,children:/* @__PURE__ */I("span",{className:"octicon octicon-link","aria-hidden":"true"})}),r]}),wb=/* @__PURE__ */new Set(["h1","h2","h3","h4","h5","h6"]),kb=e=>()=>t=>{let n=/* @__PURE__ */new Set,r=t=>{"element"===t.type&&t.tagName&&wb.has(t.tagName)&&(t.properties={...t.properties,id:e(Ag(t).trim(),n)}),t.children?.forEach(r)};r(t)},xb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tb={};function Cb(e,t){return((t||Tb).jsx?Sb:xb).test(e)}var Eb=/[ \t\n\f\r]/g;function Ab(e){return""===e.replace(Eb,"")}var Ib=/* @__PURE__ */j((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function h(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function f(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function k(){var e=f(),t=y(o);if(t){if(w(),!y(a))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=k();)!1!==e&&(t.push(e),v(t));return t}()}}),Mb=/* @__PURE__ */j(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),o="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;o?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(Ib())}),Ob=/* @__PURE__ */j(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(o,s):e.replace(i,s)).replace(n,a))}}),Nb=/* @__PURE__ */j((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Mb()),r=Ob();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),_b=Lb("end"),Pb=Lb("start");function Lb(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Db(e){return e&&"object"==typeof e?"position"in e||"type"in e?Rb(e.position):"start"in e||"end"in e?Rb(e):"line"in e||"column"in e?zb(e):"":""}function zb(e){return jb(e&&e.line)+":"+jb(e&&e.column)}function Rb(e){return zb(e&&e.start)+"-"+zb(e&&e.end)}function jb(e){return e&&"number"==typeof e?e:1}var $b=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=Db(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};$b.prototype.file="",$b.prototype.name="",$b.prototype.reason="",$b.prototype.message="",$b.prototype.stack="",$b.prototype.column=void 0,$b.prototype.line=void 0,$b.prototype.ancestors=void 0,$b.prototype.cause=void 0,$b.prototype.fatal=void 0,$b.prototype.place=void 0,$b.prototype.ruleId=void 0,$b.prototype.source=void 0;var Fb=/* @__PURE__ */F(Nb(),1),qb={}.hasOwnProperty,Bb=/* @__PURE__ */new Map,Ub=/[A-Z]/g,Hb=/* @__PURE__ */new Set(["table","tbody","thead","tfoot","tr"]),Wb=/* @__PURE__ */new Set(["td","th"]),Vb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gb(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=_y,e.schema=i),e.ancestors.push(t);const o=Qb(e,t.tagName,!1),a=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&qb.call(t.properties,i)){const o=Xb(e,i,t.properties[i]);if(o){const[i,a]=o;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof a&&Wb.has(t.tagName)?r=a:n[i]=a}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=Yb(e,t);return Hb.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ab(t.value):Ab(t));var t})),Kb(e,a,o,t),Jb(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
|
|
62
|
-
/* @__PURE__ */return n.type,e.evaluater.evaluateExpression(n.expression)}
|
|
59
|
+
return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Gg(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Kg(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Hg(Hg({},i),o)}function Jg(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,h=void 0!==p&&p?Hg({},"function"==typeof s?s(n):s):{};if(h.className=h.className?[].concat(_g(h.className.trim().split(/\s+/)),_g(c)):c,n&&o){var f=Kg(r,n,i);t.unshift(Gg(n,f))}return d&u&&(h.style=Hg({display:"flex"},h.style)),{type:"element",tagName:"span",properties:h,children:t}}function Yg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(Jg({children:[i],className:_g(new Set(t))}));else if(i.children){var o,a=t.concat((null===(o=i.properties)||void 0===o?void 0:o.className)||[]);Yg(i.children,a).forEach(function(e){return n.push(e)})}}return n}function Xg(e,t,n,r,i,o,a,s,l){var c,u=Yg(e.value),d=[],p=-1,h=0;function f(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,o){return Jg({children:e,lineNumber:o,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,o,c):function(e,t){if(r&&t&&i){var n=Kg(s,t,a);e.unshift(Gg(t,n))}return e}(e,o)}for(var m=function(){var e=u[h],t=e.children[0].value;if(t.match(Wg)){var n=t.split("\n");n.forEach(function(t,i){var a=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=f(u.slice(p+1,h).concat(Jg({children:[s],className:e.properties.className})),a);d.push(l)}else if(i===n.length-1){var c=u[h+1]&&u[h+1].children&&u[h+1].children[0],m={type:"text",value:"".concat(t)};if(c){var g=Jg({children:[m],className:e.properties.className});u.splice(h+1,0,g)}else{var y=f([m],a,e.properties.className);d.push(y)}}else{var b=f([s],a,e.properties.className);d.push(b)}}),p=h}h++};h<u.length;)m();if(p!==u.length-1){var g=u.slice(p+1,u.length);if(g&&g.length){var y=f(g,r&&d.length+o);d.push(y)}}return t?d:(c=[]).concat.apply(c,d)}function Qg(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return qg({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function Zg(e){return e&&void 0!==e.highlightAuto}var ey=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function ty(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ey(n,r,t)}function ny(e){return e.toLowerCase()}ey.prototype.normal={},ey.prototype.property={},ey.prototype.space=void 0;var ry=class{constructor(e,t){this.attribute=t,this.property=e}};ry.prototype.attribute="",ry.prototype.booleanish=!1,ry.prototype.boolean=!1,ry.prototype.commaOrSpaceSeparated=!1,ry.prototype.commaSeparated=!1,ry.prototype.defined=!1,ry.prototype.mustUseProperty=!1,ry.prototype.number=!1,ry.prototype.overloadedBoolean=!1,ry.prototype.property="",ry.prototype.spaceSeparated=!1,ry.prototype.space=void 0;var iy=/* @__PURE__ */$({boolean:()=>ay,booleanish:()=>sy,commaOrSpaceSeparated:()=>py,commaSeparated:()=>dy,number:()=>cy,overloadedBoolean:()=>ly,spaceSeparated:()=>uy}),oy=0,ay=hy(),sy=hy(),ly=hy(),cy=hy(),uy=hy(),dy=hy(),py=hy();function hy(){return 2**++oy}var fy=Object.keys(iy),my=class extends ry{constructor(e,t,n,r){let i=-1;if(super(e,t),gy(this,"space",r),"number"==typeof n)for(;++i<fy.length;){const e=fy[i];gy(this,fy[i],(n&iy[e])===iy[e])}}};function gy(e,t,n){n&&(e[t]=n)}function yy(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new my(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ny(r)]=r,n[ny(o.attribute)]=r}return new ey(t,n,e.space)}my.prototype.defined=!0;var by=yy({properties:{ariaActiveDescendant:null,ariaAtomic:sy,ariaAutoComplete:null,ariaBusy:sy,ariaChecked:sy,ariaColCount:cy,ariaColIndex:cy,ariaColSpan:cy,ariaControls:uy,ariaCurrent:null,ariaDescribedBy:uy,ariaDetails:null,ariaDisabled:sy,ariaDropEffect:uy,ariaErrorMessage:null,ariaExpanded:sy,ariaFlowTo:uy,ariaGrabbed:sy,ariaHasPopup:null,ariaHidden:sy,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:uy,ariaLevel:cy,ariaLive:null,ariaModal:sy,ariaMultiLine:sy,ariaMultiSelectable:sy,ariaOrientation:null,ariaOwns:uy,ariaPlaceholder:null,ariaPosInSet:cy,ariaPressed:sy,ariaReadOnly:sy,ariaRelevant:null,ariaRequired:sy,ariaRoleDescription:uy,ariaRowCount:cy,ariaRowIndex:cy,ariaRowSpan:cy,ariaSelected:sy,ariaSetSize:cy,ariaSort:null,ariaValueMax:cy,ariaValueMin:cy,ariaValueNow:cy,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function vy(e,t){return t in e?e[t]:t}function wy(e,t){return vy(e,t.toLowerCase())}var ky=yy({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:dy,acceptCharset:uy,accessKey:uy,action:null,allow:null,allowFullScreen:ay,allowPaymentRequest:ay,allowUserMedia:ay,alpha:ay,alt:null,as:null,async:ay,autoCapitalize:null,autoComplete:uy,autoFocus:ay,autoPlay:ay,blocking:uy,capture:null,charSet:null,checked:ay,cite:null,className:uy,closedBy:null,colorSpace:null,cols:cy,colSpan:cy,command:null,commandFor:null,content:null,contentEditable:sy,controls:ay,controlsList:uy,coords:cy|dy,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ay,defer:ay,dir:null,dirName:null,disabled:ay,download:ly,draggable:sy,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ay,formTarget:null,headers:uy,height:cy,hidden:ly,high:cy,href:null,hrefLang:null,htmlFor:uy,httpEquiv:uy,id:null,imageSizes:null,imageSrcSet:null,inert:ay,inputMode:null,integrity:null,is:null,isMap:ay,itemId:null,itemProp:uy,itemRef:uy,itemScope:ay,itemType:uy,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ay,low:cy,manifest:null,max:null,maxLength:cy,media:null,method:null,min:null,minLength:cy,multiple:ay,muted:ay,name:null,nonce:null,noModule:ay,noValidate:ay,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ay,optimum:cy,pattern:null,ping:uy,placeholder:null,playsInline:ay,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ay,referrerPolicy:null,rel:uy,required:ay,reversed:ay,rows:cy,rowSpan:cy,sandbox:uy,scope:null,scoped:ay,seamless:ay,selected:ay,shadowRootClonable:ay,shadowRootCustomElementRegistry:ay,shadowRootDelegatesFocus:ay,shadowRootMode:null,shadowRootSerializable:ay,shape:null,size:cy,sizes:null,slot:null,span:cy,spellCheck:sy,src:null,srcDoc:null,srcLang:null,srcSet:null,start:cy,step:null,style:null,tabIndex:cy,target:null,title:null,translate:null,type:null,typeMustMatch:ay,useMap:null,value:sy,width:cy,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:uy,axis:null,background:null,bgColor:null,border:cy,borderColor:null,bottomMargin:cy,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ay,declare:ay,event:null,face:null,frame:null,frameBorder:null,hSpace:cy,leftMargin:cy,link:null,longDesc:null,lowSrc:null,marginHeight:cy,marginWidth:cy,noResize:ay,noHref:ay,noShade:ay,noWrap:ay,object:null,profile:null,prompt:null,rev:null,rightMargin:cy,rules:null,scheme:null,scrolling:sy,standby:null,summary:null,text:null,topMargin:cy,valueType:null,version:null,vAlign:null,vLink:null,vSpace:cy,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ay,disablePictureInPicture:ay,disableRemotePlayback:ay,exportParts:dy,part:uy,prefix:null,property:null,results:cy,security:null,unselectable:null},space:"html",transform:wy}),xy=yy({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:py,accentHeight:cy,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:cy,amplitude:cy,arabicForm:null,ascent:cy,attributeName:null,attributeType:null,azimuth:cy,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:cy,by:null,calcMode:null,capHeight:cy,className:uy,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:cy,diffuseConstant:cy,direction:null,display:null,dur:null,divisor:cy,dominantBaseline:null,download:ay,dx:null,dy:null,edgeMode:null,editable:null,elevation:cy,enableBackground:null,end:null,event:null,exponent:cy,externalResourcesRequired:null,fill:null,fillOpacity:cy,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:dy,g2:dy,glyphName:dy,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:cy,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:cy,horizOriginX:cy,horizOriginY:cy,id:null,ideographic:cy,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:cy,k:cy,k1:cy,k2:cy,k3:cy,k4:cy,kernelMatrix:py,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:cy,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:cy,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:cy,overlineThickness:cy,paintOrder:null,panose1:null,path:null,pathLength:cy,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:uy,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:cy,pointsAtY:cy,pointsAtZ:cy,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:py,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:py,rev:py,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:py,requiredFeatures:py,requiredFonts:py,requiredFormats:py,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:cy,specularExponent:cy,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:cy,strikethroughThickness:cy,string:null,stroke:null,strokeDashArray:py,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:cy,strokeOpacity:cy,strokeWidth:null,style:null,surfaceScale:cy,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:py,tabIndex:cy,tableValues:null,target:null,targetX:cy,targetY:cy,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:py,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:cy,underlineThickness:cy,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:cy,values:null,vAlphabetic:cy,vMathematical:cy,vectorEffect:null,vHanging:cy,vIdeographic:cy,version:null,vertAdvY:cy,vertOriginX:cy,vertOriginY:cy,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:cy,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vy}),Sy=yy({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Ty=yy({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wy}),Cy=yy({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Ey={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ay=/[A-Z]/g,Iy=/-[a-z]/g,My=/^data[-\w.:]+$/i;function Oy(e,t){const n=ny(t);let r=t,i=ry;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&My.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Iy,_y);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Iy.test(e)){let n=e.replace(Ay,Ny);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=my}return new i(r,t)}function Ny(e){return"-"+e.toLowerCase()}function _y(e){return e.charAt(1).toUpperCase()}var Py=ty([by,ky,Sy,Ty,Cy],"html"),Ly=ty([by,xy,Sy,Ty,Cy],"svg");function Dy(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(i,r).trim();!e&&o||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var zy=/[#.]/g;function Ry(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jy(e,t,n){const r=n?function(e){const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...o){let a;if(null==n){a={type:"root",children:[]};const e=i;o.unshift(e)}else{a=function(e,t){const n=e||"",r={};let i,o,a=0;for(;a<n.length;){zy.lastIndex=a;const e=zy.exec(n),t=n.slice(a,e?e.index:n.length);t&&(i?"#"===i?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,a+=t.length),e&&(i=e[0],a++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=a.tagName.toLowerCase(),l=r?r.get(s):void 0;if(a.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!(!("children"in e)||!Array.isArray(e.children))}(i))o.unshift(i);else for(const[t,n]of Object.entries(i))$y(e,a.properties,t,n)}for(const e of o)Fy(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function $y(e,t,n,r){const i=Oy(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?Ry(r):i.commaSeparated?Dy(r):i.commaOrSpaceSeparated?Ry(Dy(r).join(" ")):qy(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(qy(i,i.property,t));o=e}"className"===i.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function Fy(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Fy(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Fy(e,t.children):e.push(t)}}function qy(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||ny(n)===ny(t)))return!0}return n}var By=jy(Py,"div"),Uy=(jy(Ly,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]),Hy={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Wy(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function Vy(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Gy(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Wy(e)}var Ky={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Jy={}.hasOwnProperty;function Yy(e){return!!Jy.call(Ky,e)&&Ky[e]}var Xy=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Qy(e,t){const n=t||{},r="string"==typeof n.additional?n.additional.charCodeAt(0):n.additional,i=[];let o,a,s=0,l=-1,c="";n.position&&("start"in n.position||"indent"in n.position?(a=n.position.indent,o=n.position.start):o=n.position);let u,d=(o?o.line:0)||1,p=(o?o.column:0)||1,h=f();for(s--;++s<=e.length;)if(10===u&&(p=(a?a[l]:0)||1),u=e.charCodeAt(s),38===u){const t=e.charCodeAt(s+1);if(9===t||10===t||12===t||32===t||38===t||60===t||Number.isNaN(t)||r&&t===r){c+=String.fromCharCode(u),p++;continue}const o=s+1;let a,l=o,d=o;if(35===t){d=++l;const t=e.charCodeAt(d);88===t||120===t?(a="hexadecimal",d=++l):a="decimal"}else a="named";let y="",b="",v="";const w="named"===a?Gy:"decimal"===a?Wy:Vy;for(d--;++d<=e.length;){const t=e.charCodeAt(d);if(!w(t))break;v+=String.fromCharCode(t),"named"===a&&Uy.includes(v)&&(y=v,b=Yy(v))}let k=59===e.charCodeAt(d);if(k){d++;const e="named"===a&&Yy(v);e&&(y=v,b=e)}let x=1+d-o,S="";if(k||!1!==n.nonTerminated)if(v)if("named"===a){if(k&&!b)m(5,1);else if(y!==v&&(d=l+y.length,x=1+d-l,k=!1),!k){const t=y?1:3;if(n.attribute){const n=e.charCodeAt(d);61===n?(m(t,x),b=""):Gy(n)?b="":m(t,x)}else m(t,x)}S=b}else{k||m(2,x);let e=Number.parseInt(v,"hexadecimal"===a?16:10);if(Zy(e))m(7,x),S=String.fromCharCode(65533);else if(e in Hy)m(6,x),S=Hy[e];else{let t="";eb(e)&&m(6,x),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==a&&m(4,x);if(S){g(),h=f(),s=d-1,p+=d-o+1,i.push(S);const t=f();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,S,{start:h,end:t},e.slice(o-1,d)),h=t}else v=e.slice(o-1,d),c+=v,p+=v.length,s=d-1}else 10===u&&(d++,l++,p=0),Number.isNaN(u)?g():(c+=String.fromCharCode(u),p++);return i.join("");function f(){return{line:d,column:p,offset:s+((o?o.offset:0)||0)}}function m(e,t){let r;n.warning&&(r=f(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Xy[e],r,e))}function g(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:h,end:f()}),c="")}}function Zy(e){return e>=55296&&e<=57343||e>1114111}function eb(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var tb=0,nb={},rb={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++tb}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},rb.util.type(t)){case"Object":if(i=rb.util.objId(t),n[i])return n[i];for(var o in r={},n[i]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case"Array":return i=rb.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:nb,plaintext:nb,text:nb,txt:nb,extend:function(e,t){var n=rb.util.clone(rb.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||rb.languages)[e],o={};for(var a in i)if(i.hasOwnProperty(a)){if(a==t)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);n.hasOwnProperty(a)||(o[a]=i[a])}var l=r[e];return r[e]=o,rb.languages.DFS(rb.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,i){i=i||{};var o=rb.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var s=t[a],l=rb.util.type(s);"Object"!==l||i[o(s)]?"Array"!==l||i[o(s)]||(i[o(s)]=!0,e(s,n,a,i)):(i[o(s)]=!0,e(s,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(rb.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=rb.tokenize(r.code,r.grammar),rb.hooks.run("after-tokenize",r),ib.stringify(rb.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new sb;return lb(i,i.head,e),ab(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=rb.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=rb.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:ib};function ib(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function ob(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var o=i[1].length;i.index+=o,i[0]=i[0].slice(o)}return i}function ab(e,t,n,r,i,o){for(var a in n)if(n.hasOwnProperty(a)&&n[a]){var s=n[a];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(o&&o.cause==a+","+l)return;var c=s[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,h=c.alias;if(p&&!c.pattern.global){var f=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,f+"g")}for(var m=c.pattern||c,g=r.next,y=i;g!==t.tail&&!(o&&y>=o.reach);y+=g.value.length,g=g.next){var b=g.value;if(t.length>e.length)return;if(!(b instanceof ib)){var v,w=1;if(p){if(!(v=ob(m,y,e,d))||v.index>=e.length)break;var k=v.index,x=v.index+v[0].length,S=y;for(S+=g.value.length;k>=S;)S+=(g=g.next).value.length;if(y=S-=g.value.length,g.value instanceof ib)continue;for(var T=g;T!==t.tail&&(S<x||"string"==typeof T.value);T=T.next)w++,S+=T.value.length;w--,b=e.slice(y,S),v.index-=y}else if(!(v=ob(m,0,b,d)))continue;k=v.index;var C=v[0],E=b.slice(0,k),A=b.slice(k+C.length),I=y+b.length;o&&I>o.reach&&(o.reach=I);var M=g.prev;if(E&&(M=lb(t,M,E),y+=E.length),cb(t,M,w),g=lb(t,M,new ib(a,u?rb.tokenize(C,u):C,h,C)),A&&lb(t,g,A),w>1){var O={cause:a+","+l,reach:I};ab(e,t,n,g.prev,y,O),o&&O.reach>o.reach&&(o.reach=O.reach)}}}}}}function sb(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function lb(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function cb(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}var ub=rb;function db(){}db.prototype=ub;var pb=new db;pb.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Object.hasOwn(pb.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=pb.languages[r]}return{type:"root",children:ub.highlight.call(pb,e,n,r)}},pb.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(pb.languages,e.displayName)||e(pb)},pb.alias=function(e,t){const n=pb.languages;let r,i={};for(r in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,r)){const e=i[r],t="string"==typeof e?[e]:e;let o=-1;for(;++o<t.length;)n[t[o]]=n[r]}},pb.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(pb.languages,e)},pb.listLanguages=function(){const e=pb.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&"object"==typeof e[n]&&t.push(n);return t},pb.util.encode=function(e){return e},pb.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}const r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),pb.hooks.run("wrap",r),By(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=Qy(e[t]));return e}(r.attributes),r.content)};var hb,fb,mb=(hb=pb,fb={},function(e){var n,r,i=e.language,o=e.children,a=e.style,s=void 0===a?fb:a,l=e.customStyle,c=void 0===l?{}:l,u=e.codeTagProps,d=void 0===u?{className:i?"language-".concat(i):void 0,style:Hg(Hg({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:u,p=e.useInlineStyles,h=void 0===p||p,f=e.showLineNumbers,m=void 0!==f&&f,g=e.showInlineLineNumbers,y=void 0===g||g,b=e.startingLineNumber,v=void 0===b?1:b,w=e.lineNumberContainerStyle,k=e.lineNumberStyle,x=void 0===k?{}:k,S=e.wrapLines,T=e.wrapLongLines,C=void 0!==T&&T,E=e.lineProps,A=void 0===E?{}:E,I=e.renderer,M=e.PreTag,O=void 0===M?"pre":M,N=e.CodeTag,_=void 0===N?"code":N,P=e.code,L=void 0===P?(Array.isArray(o)?o[0]:o)||"":P,D=e.astGenerator,z=function(e,t){if(null==e)return{};var n,r,i=Og(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Bg);D=D||hb;var R=m?/*#__PURE__*/t.createElement(Vg,{containerStyle:w,codeStyle:d.style||{},numberStyle:x,startingLineNumber:v,codeString:L}):null,j=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},$=Zg(D)?"hljs":"prismjs",F=h?Object.assign({},z,{style:Object.assign({},j,c)}):Object.assign({},z,{className:z.className?"".concat($," ").concat(z.className):$,style:Object.assign({},c)});if(d.style=Hg(C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},d.style),!D)/*#__PURE__*/return t.createElement(O,F,R,/*#__PURE__*/t.createElement(_,d,L));(void 0===S&&I||C)&&(S=!0),I=I||Qg;var q=[{type:"text",value:L}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Zg(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(YO){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:q});null===B.language&&(B.value=q);var U=Xg(B,S,A,m,y,v,v+(null!==(n=null===(r=L.match(/\n/g))||void 0===r?void 0:r.length)&&void 0!==n?n:0),x,C);/*#__PURE__*/
|
|
60
|
+
return t.createElement(O,F,/*#__PURE__*/t.createElement(_,d,!y&&R,I({rows:U,stylesheet:s,useInlineStyles:h})))});mb.registerLanguage=function(e,t){return pb.register(t)},mb.alias=function(e,t){return pb.alias(e,t)};var gb=({language:e,code:t,classNames:n,children:r})=>{let[i,o]=S(!1);g(()=>{if(!i)return;let e=setTimeout(()=>o(!1),2e3);return()=>clearTimeout(e)},[i]);let a=f(()=>{navigator.clipboard.writeText(t).then(()=>o(!0))},[t]);/* @__PURE__ */
|
|
61
|
+
return M("div",{className:U("markdown-code",n.codeBlockFrame),"data-language":e,children:[/* @__PURE__ */M("div",{className:U("markdown-code-header",n.codeBlockHeader),children:[/* @__PURE__ */I("span",{className:U("markdown-code-language",n.codeBlockLanguage),children:e??"text"}),/* @__PURE__ */I("button",{type:"button",className:U("markdown-code-copy",n.codeBlockCopy),onClick:a,"aria-live":"polite",children:i?"Copied":"Copy"})]}),r]})},yb={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}},bb={h1:"heading1",h2:"heading2",h3:"heading3",h4:"heading4",h5:"heading5",h6:"heading6"},vb=/language-(\w+)/,wb=(e,t)=>({className:n,...r})=>c(e,{...fr(r,["node"]),className:U(n,t)||void 0}),kb=(e,{classNames:t,headingLinks:n})=>({children:r,node:i,className:o,...a})=>/* @__PURE__ */M(e,{...a,className:U(o,t.heading,t[bb[e]])||void 0,children:[n&&a.id&&/* @__PURE__ */I("a",{className:U("anchor",t.anchor),href:`#${a.id}`,"aria-label":`Link to “${i?Mg(i):a.id}”`,children:/* @__PURE__ */I("span",{className:"octicon octicon-link","aria-hidden":"true"})}),r]}),xb=/* @__PURE__ */new Set(["h1","h2","h3","h4","h5","h6"]),Sb=e=>()=>t=>{let n=/* @__PURE__ */new Set,r=t=>{"element"===t.type&&t.tagName&&xb.has(t.tagName)&&(t.properties={...t.properties,id:e(Mg(t).trim(),n)}),t.children?.forEach(r)};r(t)},Tb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Eb={};function Ab(e,t){return((t||Eb).jsx?Cb:Tb).test(e)}var Ib=/[ \t\n\f\r]/g;function Mb(e){return""===e.replace(Ib,"")}var Ob=/* @__PURE__ */j((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function h(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function f(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function k(){var e=f(),t=y(o);if(t){if(w(),!y(a))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=k();)!1!==e&&(t.push(e),v(t));return t}()}}),Nb=/* @__PURE__ */j(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),o="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;o?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(Ob())}),_b=/* @__PURE__ */j(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(o,s):e.replace(i,s)).replace(n,a))}}),Pb=/* @__PURE__ */j((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Nb()),r=_b();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),Lb=zb("end"),Db=zb("start");function zb(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Rb(e){return e&&"object"==typeof e?"position"in e||"type"in e?$b(e.position):"start"in e||"end"in e?$b(e):"line"in e||"column"in e?jb(e):"":""}function jb(e){return Fb(e&&e.line)+":"+Fb(e&&e.column)}function $b(e){return jb(e&&e.start)+"-"+jb(e&&e.end)}function Fb(e){return e&&"number"==typeof e?e:1}var qb=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=Rb(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};qb.prototype.file="",qb.prototype.name="",qb.prototype.reason="",qb.prototype.message="",qb.prototype.stack="",qb.prototype.column=void 0,qb.prototype.line=void 0,qb.prototype.ancestors=void 0,qb.prototype.cause=void 0,qb.prototype.fatal=void 0,qb.prototype.place=void 0,qb.prototype.ruleId=void 0,qb.prototype.source=void 0;var Bb=/* @__PURE__ */F(Pb(),1),Ub={}.hasOwnProperty,Hb=/* @__PURE__ */new Map,Wb=/[A-Z]/g,Vb=/* @__PURE__ */new Set(["table","tbody","thead","tfoot","tr"]),Gb=/* @__PURE__ */new Set(["td","th"]),Kb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jb(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Ly,e.schema=i),e.ancestors.push(t);const o=ev(e,t.tagName,!1),a=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&Ub.call(t.properties,i)){const o=Zb(e,i,t.properties[i]);if(o){const[i,a]=o;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof a&&Gb.has(t.tagName)?r=a:n[i]=a}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=Qb(e,t);return Vb.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Mb(t.value):Mb(t));var t})),Yb(e,a,o,t),Xb(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
|
|
62
|
+
/* @__PURE__ */return n.type,e.evaluater.evaluateExpression(n.expression)}tv(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=Ly,e.schema=i),e.ancestors.push(t);const o=null===t.name?e.Fragment:ev(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];
|
|
63
63
|
/* @__PURE__ */t.type;const i=t.expression;
|
|
64
64
|
/* @__PURE__ */i.type;const o=i.properties[0];
|
|
65
|
-
/* @__PURE__ */o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else
|
|
66
|
-
/* @__PURE__ */t.type,o=e.evaluater.evaluateExpression(t.expression)}else
|
|
67
|
-
/* @__PURE__ */r=n}else r=Cb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return qb.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zb(e)}function Zb(e,t){const n=new $b("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Vb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ev(e){let t=e.replace(Ub,tv);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function tv(e){return"-"+e.toLowerCase()}var nv={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rv={};function iv(e,t){const n=t||rv;return ov(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ov(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return av(e.children,t,n)}return Array.isArray(e)?av(e,t,n):""}function av(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ov(e[i],t,n);return r.join("")}function sv(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function lv(e,t){return e.length>0?(sv(e,e.length,0,t),e):t}var cv={}.hasOwnProperty;function uv(e){const t={};let n=-1;for(;++n<e.length;)dv(t,e[n]);return t}function dv(e,t){let n;for(n in t){const r=(cv.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){cv.call(r,o)||(r[o]=[]);const e=i[o];pv(r[o],Array.isArray(e)?e:e?[e]:[])}}}function pv(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);sv(e,0,0,r)}function hv(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function fv(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var mv=Av(/[A-Za-z]/),gv=Av(/[\dA-Za-z]/),yv=Av(/[#-'*+\--9=?A-Z^-~]/);function bv(e){return null!==e&&(e<32||127===e)}var vv=Av(/\d/),wv=Av(/[\dA-Fa-f]/),kv=Av(/[!-/:-@[-`{-~]/);function xv(e){return null!==e&&e<-2}function Sv(e){return null!==e&&(e<0||32===e)}function Tv(e){return-2===e||-1===e||32===e}var Cv=Av(/\p{P}|\p{S}/u),Ev=Av(/\s/);function Av(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Iv(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&gv(e.charCodeAt(n+1))&&gv(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Mv(e,t,n,r){const i=r?r-1:1/0;let o=0;return function(r){return Tv(r)?(e.enter(n),a(r)):t(r)};function a(r){return Tv(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}function Ov(e,t,n,r,i,o){let a=0;return function(t){return o>0&&Tv(t)?(e.enter(r),s(t)):l(t)};function s(t){return Tv(t)&&a<o?(e.consume(t),a++,s):(e.exit(r),l(t))}function l(e){return a>=i?t(e):n(e)}}var Nv={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Mv(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):xv(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},_v=class{constructor(){this.index=/* @__PURE__ */new Map,this.map=[]}add(e,t,n){Pv(this,e,t,n,!1)}addBefore(e,t,n){Pv(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Pv(e,t,n,r,i){if(0===n&&0===r.length)return;const o=e.index.get(t);if(o)return o[1]+=n,void(i?(r.push(...o[2]),o[2]=r):o[2].push(...r));const a=[t,n,r];e.map.push(a),e.index.set(t,a)}var Lv={tokenize:function(e){const t=this,n=[];let r,i,o,a=0;return s;function s(r){if(a<n.length){const i=n[a];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;const l=new _v;return l.add(o+1,0,t.events.slice(n)),l.add(n,s-n,[]),l.consume(t.events),c(e)}return s(e)}function c(i){if(a===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return f(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dv,u,d)(i)}function u(e){return r&&b(),y(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,f(e)}function p(n){return t.containerState={},e.attempt(Dv,h,f)(n)}function h(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function f(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):xv(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;const c=new _v;c.add(l+1,0,t.events.slice(n)),c.add(n,e-n,[]),c.consume(t.events)}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Dv={tokenize:function(e,t,n){return Mv(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function zv(e){return null===e||Sv(e)||Ev(e)?1:Cv(e)?2:void 0}function Rv(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var jv={name:"attention",resolveAll:function(e,t){let n,r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._close){let i=r;for(;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,a={...e[i][1].end},s={...e[r][1].start};$v(a,-o),$v(s,o);const l={type:o>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},c={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:s},u={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},d={type:o>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[i][1].end={...l.start},e[r][1].start={...c.end},n=[],e[i][1].end.offset-e[i][1].start.offset&&(n=lv(n,[["enter",e[i][1],t],["exit",e[i][1],t]])),n=lv(n,[["enter",d,t],["enter",l,t],["exit",l,t],["enter",u,t]]),n=lv(n,Rv(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=lv(n,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",d,t]]);let p=0;e[r][1].end.offset-e[r][1].start.offset&&(p=2,n=lv(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),sv(e,i-1,r-i+3,n),r=i+n.length-p-2;break}}for(r=-1;++r<e.length;)"attentionSequence"===e[r][1].type&&(e[r][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zv(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const l=e.exit("attentionSequence"),c=zv(s),u=!c||2===c&&i||n.includes(s)&&42!==s&&95!==s,d=!i||2===i&&c||n.includes(r)&&42!==r&&95!==r;return l._open=Boolean(42===o?u:u&&(i||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function $v(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Fv={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return mv(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||gv(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||gv(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||bv(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):yv(t)?(e.consume(t),l):n(t)}function c(e){return gv(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||gv(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},qv={partial:!0,tokenize:function(e,t,n){return function(t){return Tv(t)?Mv(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||xv(e)?t(e):n(e)}}},Bv={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Tv(t)?Mv(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(Bv,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Tv(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},Uv={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return kv(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Hv={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=gv,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=wv,c):(e.enter("characterReferenceValue"),i=7,o=vv,c(t))}function c(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==gv||Ky(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&a++<i?(e.consume(s),c):n(s)}}},Wv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Vv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),Tv(t)?Mv(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Tv(t)?Mv(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||xv(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Tv(t)?Mv(e,c,"whitespace")(t):c(t))}function c(n){return null===n||xv(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Wv,h,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||xv(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Tv(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Mv(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||xv(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||xv(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function h(t){return e.attempt(i,b,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Tv(t)?Mv(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||xv(t)?e.check(Wv,h,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||xv(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},Gv={name:"codeIndented",tokenize:function(e,t,n){return function(t){return e.enter("codeIndented"),Ov(e,r,n,"linePrefix",4,4)(t)};function r(t){return null===t?o(t):xv(t)?e.attempt(Kv,r,o)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||xv(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),i)}function o(n){return e.exit("codeIndented"),t(n)}}},Kv={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):xv(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ov(e,t,o,"linePrefix",4,4)(a)}function o(e){return xv(e)?i(e):n(e)}}},Jv={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):xv(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||xv(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},Yv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xv(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xv(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xv(this.left,t.reverse())}}};function Xv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qv(e){const t={};let n,r,i,o,a,s,l,c=-1;const u=new Yv(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Zv(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(o=u.get(i),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return sv(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Zv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,p=-1,h=n,f=0,m=0;const g=[m];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[f+l[p][0]]=f+l[p][1],f+=l[p][1]-l[p][0]-1;return c}var ew={resolve:function(e){return Qv(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):xv(t)?e.check(tw,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},tw={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Mv(e,i,"linePrefix")};function i(i){if(null===i||xv(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function nw(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||bv(t)?n(t):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||xv(t)?n(t):(e.consume(t),92===t?h:p)}function h(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function f(i){return u||null!==i&&41!==i&&!Sv(i)?u<c&&40===i?(e.consume(i),u++,f):41===i?(e.consume(i),u--,f):null===i||32===i||40===i||bv(i)?n(i):(e.consume(i),92===i?m:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function rw(e,t,n,r,i,o){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):xv(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||xv(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Tv(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function iw(e,t,n,r,i,o){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s):n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):xv(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Mv(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||xv(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function ow(e,t){let n;return function r(i){return xv(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Tv(i)?Mv(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var aw={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return rw.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=fv(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Sv(t)?ow(e,s)(t):s(t)}function s(t){return nw(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(sw,c,c)(t)}function c(t){return Tv(t)?Mv(e,u,"whitespace")(t):u(t)}function u(o){return null===o||xv(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},sw={partial:!0,tokenize:function(e,t,n){return function(t){return Sv(t)?ow(e,r)(t):n(t)};function r(t){return iw(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Tv(t)?Mv(e,o,"whitespace")(t):o(t)}function o(e){return null===e||xv(e)?t(e):n(e)}}},lw={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return xv(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},cw={name:"headingAtx",resolve:function(e,t){let n=e.length-2,r=3;if("whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};sv(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Sv(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||xv(n)?(e.exit("atxHeading"),t(n)):Tv(n)?Mv(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Sv(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}},uw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],dw=["pre","script","style","textarea"],pw={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,o,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,h):63===s?(e.consume(s),i=3,r.interrupt?t:L):mv(s)?(e.consume(s),a=String.fromCharCode(s),f):n(s)}function u(o){return 45===o?(e.consume(o),i=2,d):91===o?(e.consume(o),i=5,s=0,p):mv(o)?(e.consume(o),i=4,r.interrupt?t:L):n(o)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:L):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:E:p):n(i)}function h(t){return mv(t)?(e.consume(t),a=String.fromCharCode(t),f):n(t)}function f(s){if(null===s||47===s||62===s||Sv(s)){const l=47===s,c=a.toLowerCase();return l||o||!dw.includes(c)?uw.includes(a.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(i=1,r.interrupt?t(s):E(s))}return 45===s||gv(s)?(e.consume(s),a+=String.fromCharCode(s),f):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:E):n(i)}function g(t){return Tv(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||mv(t)?(e.consume(t),b):Tv(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||gv(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):Tv(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):Tv(t)?(e.consume(t),w):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||xv(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Sv(t)?v(t):(e.consume(t),x)}function S(e){return 47===e||62===e||Tv(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||xv(t)?E(t):Tv(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===i?(e.consume(t),O):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),D):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),P):!xv(t)||6!==i&&7!==i?null===t||xv(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(hw,z,A)(t))}function A(t){return e.check(Wv,I,z)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return null===t||xv(t)?A(t):(e.enter("htmlFlowData"),E(t))}function O(t){return 45===t?(e.consume(t),L):E(t)}function N(t){return 47===t?(e.consume(t),a="",_):E(t)}function _(t){if(62===t){const n=a.toLowerCase();return dw.includes(n)?(e.consume(t),D):E(t)}return mv(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),_):E(t)}function P(t){return 93===t?(e.consume(t),L):E(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===i?(e.consume(t),L):E(t)}function D(t){return null===t||xv(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),D)}function z(n){return e.exit("htmlFlow"),t(n)}}},hw={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(qv,t,n)}}},fw={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):mv(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,h):mv(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):xv(t)?(a=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function h(t){return t==="CDATA[".charCodeAt(o++)?(e.consume(t),6===o?f:h):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):xv(t)?(a=f,_(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):f(t)}function y(t){return null===t||62===t?N(t):xv(t)?(a=y,_(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):xv(t)?(a=b,_(t)):(e.consume(t),b)}function v(e){return 62===e?N(e):b(e)}function w(t){return mv(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||gv(t)?(e.consume(t),k):x(t)}function x(t){return xv(t)?(a=x,_(t)):Tv(t)?(e.consume(t),x):N(t)}function S(t){return 45===t||gv(t)?(e.consume(t),S):47===t||62===t||Sv(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),N):58===t||95===t||mv(t)?(e.consume(t),C):xv(t)?(a=T,_(t)):Tv(t)?(e.consume(t),T):N(t)}function C(t){return 45===t||46===t||58===t||95===t||gv(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),A):xv(t)?(a=E,_(t)):Tv(t)?(e.consume(t),E):T(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,I):xv(t)?(a=A,_(t)):Tv(t)?(e.consume(t),A):(e.consume(t),M)}function I(t){return t===i?(e.consume(t),i=void 0,O):null===t?n(t):xv(t)?(a=I,_(t)):(e.consume(t),I)}function M(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Sv(t)?T(t):(e.consume(t),M)}function O(e){return 47===e||62===e||Sv(e)?T(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Tv(t)?Mv(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),a(t)}}},mw={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&sv(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o=e.length,a=0;for(;o--;){const t=e[o][1];if(n){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[o][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[o][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(n=o,"labelLink"!==t.type)){a=2;break}}else"labelEnd"===t.type&&(r=o)}const s={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[r][1].end}},c={type:"labelText",start:{...e[n+a+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",s,t],["enter",l,t]],i=lv(i,e.slice(n+1,n+a+3)),i=lv(i,[["enter",c,t]]),i=lv(i,Rv(t.parser.constructs.insideSpan.null,e.slice(n+a+4,r-3),t)),i=lv(i,[["exit",c,t],e[r-2],e[r-1],["exit",l,t]]),i=lv(i,e.slice(r+1)),i=lv(i,[["exit",s,t]]),sv(e,n,e.length,i),e},tokenize:function(e,t,n){const r=this,i=r._labelStarts;let o,a;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return function(t){return o?o._inactive?u(t):(a=r.parser.defined.includes(fv(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(gw,c,a?c:u)(t):91===t?e.attempt(yw,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(bw,c,u)(t)}function c(e){return i.pop(),t(e)}function u(e){return o._balanced=!0,n(e)}}},gw={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Sv(t)?ow(e,i)(t):i(t)}function i(t){return 41===t?c(t):nw(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Sv(t)?ow(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?iw(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Sv(t)?ow(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},yw={tokenize:function(e,t,n){const r=this;return function(t){return rw.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(fv(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},bw={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},vw={name:"labelStartImage",resolveAll:mw.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},ww={name:"labelStartLink",resolveAll:mw.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},kw={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Mv(e,t,"linePrefix")}}},xw={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||xv(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),Tv(t)?Mv(e,o,"whitespace")(t):o(t))}}},Sw={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(qv,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Mv(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Tv(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cw,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Mv(e,e.attempt(Sw,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:vv(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(xw,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return vv(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(qv,r.interrupt?n:c,e.attempt(Tw,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Tv(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Tw={partial:!0,tokenize:function(e,t,n){const r=this;return Mv(e,function(e){const i=r.events[r.events.length-1];return!Tv(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Cw={partial:!0,tokenize:function(e,t,n){const r=this;return Mv(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},Ew={name:"setextUnderline",resolveTo:function(e,t){const n=new _v;let r,i,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(i=a)}else"content"===e[a][1].type&&n.add(a,1,[]),o||"definition"!==e[a][1].type||(o=a);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(n.add(i,0,[["enter",s,t]]),n.add(o+1,0,[["exit",e[r][1],t]]),e[r][1].end={...e[o][1].end}):e[r][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Tv(t)?Mv(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||xv(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Aw={tokenize:function(e){const t=this,n=e.attempt(qv,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,Mv(e,e.attempt(this.parser.constructs.flow,r,e.attempt(ew,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Iw={resolveAll:_w()},Mw=Nw("string"),Ow=Nw("text");function Nw(e){return{resolveAll:_w("text"===e?Pw:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function _w(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Pw(e,t){const n=new _v;let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const i=e[r-1][1],o=t.sliceStream(i);let a,s=o.length,l=-1,c=0;for(;s--;){const e=o[s];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)a=!0,c++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const o={type:r===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...o.start},i.start.offset===i.end.offset?Object.assign(i,o):n.add(r,0,[["enter",o,t],["exit",o,t]])}r++}return n.consume(e),e}var Lw=/* @__PURE__ */$({attentionMarkers:()=>Bw,contentInitial:()=>zw,disable:()=>Uw,document:()=>Dw,flow:()=>jw,flowInitial:()=>Rw,insideSpan:()=>qw,string:()=>$w,text:()=>Fw}),Dw={42:Sw,43:Sw,45:Sw,48:Sw,49:Sw,50:Sw,51:Sw,52:Sw,53:Sw,54:Sw,55:Sw,56:Sw,57:Sw,62:Bv},zw={91:aw},Rw={[-2]:Gv,[-1]:Gv,32:Gv},jw={35:cw,42:xw,45:[Ew,xw],60:pw,61:Ew,95:xw,96:Vv,126:Vv},$w={38:Hv,92:Uv},Fw={[-5]:kw,[-4]:kw,[-3]:kw,33:vw,38:Hv,42:jv,60:[Fv,fw],91:ww,92:[lw,Uv],93:mw,95:jv,96:Jv},qw={null:[jv,Iw]},Bw={null:[42,95]},Uw={null:[]};function Hw(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(f),consume:function(e){xv(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return a=lv(a,e),function(){for(;r._index<a.length;){const e=a[r._index];if("string"==typeof e){const t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)h(e.charCodeAt(r._bufferIndex))}else h(e)}}(),null!==a[a.length-1]?[]:(g(t,0),c.events=Rv(o,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function h(e){u=u(e)}function f(e,t){t.restore()}function m(e,t){return function(n,i,o){let a,u,d,h;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return a=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){return h=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,h),i}function b(e){return h.restore(),++u<a.length?m(a[u]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&sv(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var Ww=/[\0\t\n\r]/g,Vw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gw(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return hv(n.slice(t?2:1),t?16:10)}return Ky(n)||e}var Kw={}.hasOwnProperty;function Jw(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(v),autolinkProtocol:d,autolinkEmail:d,atxHeading:o(g),blockQuote:o(function(){return{type:"blockquote",children:[],position:void 0}}),characterEscape:d,characterReference:d,codeFenced:o(m),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(m,a),codeText:o(function(){return{type:"inlineCode",value:"",position:void 0}},a),codeTextData:d,data:d,codeFlowValue:d,definition:o(function(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(function(){return{type:"emphasis",children:[],position:void 0}}),hardBreakEscape:o(y),hardBreakTrailing:o(y),htmlFlow:o(b,a),htmlFlowData:d,htmlText:o(b,a),htmlTextData:d,image:o(function(){return{type:"image",title:null,url:"",alt:null,position:void 0}}),label:a,link:o(v),listItem:o(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[],position:void 0}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:o(w,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:o(w),paragraph:o(function(){return{type:"paragraph",children:[],position:void 0}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(g),strong:o(function(){return{type:"strong",children:[],position:void 0}}),thematicBreak:o(function(){return{type:"thematicBreak",position:void 0}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=hv(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Ky(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=Yw(e.end)},codeFenced:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:l(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fv(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(h),hardBreakTrailing:l(h),htmlFlow:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Vw,Gw)}(t),n.identifier=fv(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=Yw(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fv(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};Xw(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let o={type:"root",children:[],position:void 0};const l={stack:[o],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},d=[],p=[];let h=-1;for(;++h<e.length;)p.push(e[h]),"listOrdered"!==e[h][1].type&&"listUnordered"!==e[h][1].type||("enter"===e[h][0]?d.push(p.length-1):i(p,d.pop()));for(e=p,h=-1;++h<e.length;){const n=t[e[h][0]];"enter"===e[h][0]&&t.beforeEnter.length>0&&r(t.beforeEnter,{...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1]),Kw.call(n,e[h][1].type)&&n[e[h][1].type].call({...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1]),"exit"===e[h][0]&&t.afterExit.length>0&&r(t.afterExit,{...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1])}if(l.tokenStack.length>0){const e=l.tokenStack[l.tokenStack.length-1];(e[1]||Zw).call(l,void 0,e[0])}for(o.position={start:Yw(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Yw(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},h=-1;++h<t.transforms.length;)o=t.transforms[h](o)||o;return o};function r(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function i(e,t){const n=e.length-1;let r,i,o,a,s=t-1,l=-1,c=!1;const u=[];for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let n=s;for(i=void 0;n--;){const t=e[n];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=n}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),u.push({at:i||s,event:["exit",r,t[2]]})}if("listItemPrefix"===t[1].type){const e={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=e,u.push({at:s,event:["enter",e,t[2]]}),o=void 0,a=!0}}}const d=e.splice(t);let p=0;for(s=-1;++s<d.length;){for(;p<u.length&&u[p].at===t+s;)e.push(u[p++].event);e.push(d[s])}e[t][1]._spread=c}function o(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Yw(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Db({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Zw).call(this,e,r[0])),n.position.end=Yw(e.end)}function u(){return iv(this.stack.pop())}function d(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:"",position:void 0},n.position={start:Yw(e.start),end:void 0},t.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Yw(e.end)}function h(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function g(){return{type:"heading",depth:0,children:[],position:void 0}}function y(){return{type:"break",position:void 0}}function b(){return{type:"html",value:"",position:void 0}}function v(){return{type:"link",title:null,url:"",children:[],position:void 0}}function w(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[],position:void 0}}}(n)(function(e){for(;!Qv(e););return e}(function(e){const t={constructs:uv([Lw,...(e||{}).extensions||[]]),content:n(Nv),defined:[],document:n(Lv),flow:n(Aw),lazy:{},string:n(Mw),text:n(Ow)};return t;function n(e){return function(n){return Hw(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,a){i=n+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i));const s=[];let l=0;for(n="",r&&(65279===i.charCodeAt(0)&&l++,r=void 0);l<i.length;){Ww.lastIndex=l;const r=Ww.exec(i),o=r&&void 0!==r.index?r.index:i.length,a=i.charCodeAt(o);if(!r){n=i.slice(l);break}if(10===a&&l===o&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<o&&(s.push(i.slice(l,o)),t+=o-l),a){case 0:s.push(65533),t++;break;case 9:{const e=4*Math.ceil(t/4);for(s.push(-2);t++<e;)s.push(-1);break}case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=o+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Yw(e){return{line:e.line,column:e.column,offset:e.offset}}function Xw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xw(e,r):Qw(e,r)}}function Qw(e,t){let n;for(n in t)if(Kw.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Zw(e,t){if(e)throw new Error("Cannot close `"+e.type+"` ("+Db({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Db({start:t.start,end:t.end})+") is open");throw new Error("Cannot close document, a token (`"+t.type+"`, "+Db({start:t.start,end:t.end})+") is still open")}function ek(e){const t=this;t.parser=function(n){return Jw(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tk(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function nk(e){const t=e.spread;return null==t?e.children.length>1:t}function rk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ik(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ik(t.slice(i),i>0,!1)),o.join("")}function ik(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var ok={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Iv(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tk(e,t);const i={src:Iv(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Iv(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tk(e,t);const i={href:Iv(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Iv(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nk(n[r])}return t}(n):nk(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Pb(t.children[1]),a=_b(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:rk(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ak,yaml:ak,definition:ak,footnoteDefinition:ak};function ak(){}var{defineProperty:sk}=Object,lk="object"==typeof self?self:globalThis,ck=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new lk[e](t)},uk=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case 0:case-1:return n(a,i);case 1:{const e=n([],i);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of a){const i=r(t),o=r(n);"__proto__"===i?sk(e,i,{value:o,configurable:!0,enumerable:!0,writable:!0}):e[i]=o}return e}case 3:return n(new Date(a),i);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n("function"==typeof lk[e]?ck(e,t):new Error(t),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}case"-0":return-0}return n(ck(o,a),i)};return r})(/* @__PURE__ */new Map,e)(0),dk="",{toString:pk}={},{keys:hk,is:fk}=Object,mk=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=pk.call(e).slice(8,-1);switch(n){case"Array":return[1,dk];case"Object":return[2,dk];case"Date":return[3,dk];case"RegExp":return[4,dk];case"Map":return[5,dk];case"Set":return[6,dk];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:e instanceof Error?[7,e.name||"Error"]:[2,n]},gk=([e,t])=>0===e&&("function"===t||"symbol"===t),yk=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},o=a=>{if(n.has(a))return n.get(a);let[s,l]=mk(a);switch(s){case 0:{let t=a;switch(l){case"bigint":s=8,t=a.toString();break;case"number":if(!a&&fk(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return i([-1],a)}return i([s,t],a)}case 1:{if(l){let e=a;return"DataView"===l?e=new Uint8Array(a.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(a)),i([l,[...e]],a)}const e=[],t=i([s,e],a);for(const n of a)e.push(o(n));return t}case 2:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const n=[],r=i([s,n],a);for(const t of hk(a))!e&&gk(mk(a[t]))||n.push([o(t),o(a[t])]);return r}case 3:return i([s,isNaN(a.getTime())?dk:a.toISOString()],a);case 4:{const{source:e,flags:t}=a;return i([s,{source:e,flags:t}],a)}case 5:{const t=[],n=i([s,t],a);for(const[r,i]of a)(e||!gk(mk(r))&&!gk(mk(i)))&&t.push([o(r),o(i)]);return n}case 6:{const t=[],n=i([s,t],a);for(const r of a)!e&&gk(mk(r))||t.push(o(r));return n}}const{message:c}=a;return i([s,{name:l,message:c}],a)};return o})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},bk="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?uk(yk(e,t)):structuredClone(e):(e,t)=>uk(yk(e,t));function vk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function wk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var kk=function(e){if(null==e)return Sk;if("function"==typeof e)return xk(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kk(e[n]);return xk(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return xk(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return t=e,xk(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function xk(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Sk(){return!0}var Tk=[];function Ck(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const o=kk(i),a=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Tk;if((!t||o(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Tk:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function Ek(e,t,n,r){let i,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,i=n):(o=t,a=n,i=r),Ck(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},i)}var Ak={}.hasOwnProperty,Ik={};function Mk(e,t){const n=t||Ik,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,o={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Lk(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Lk(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Nk,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...ok,...n.handlers},one:function(e,t){const n=e.type,r=o.handlers[n];if(Ak.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=bk(n);return r.children=o.all(e),r}return bk(e)}return(o.options.unknownHandler||_k)(o,e,t)},options:n,patch:Ok,wrap:Pk};return Ek(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o}function Ok(e,t){e.position&&(t.position=function(e){const t=Pb(e),n=_b(e);if(t&&n)return{start:t,end:n}}(e))}function Nk(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,bk(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function _k(e,t){const n=t.data||{},r=!("value"in t)||Ak.call(n,"hProperties")||Ak.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Pk(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Lk(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Dk(e,t){const n=Mk(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vk,r=e.options.footnoteBackLabel||wk,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const o=e.all(i),a=String(i.identifier).toUpperCase(),c=Iv(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=o[o.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else o.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(i,f),s.push(f)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...bk(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:"\n"},i),o}function zk(e,t){return e&&"run"in e?async function(n,r){const i=Dk(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Dk(n,{file:r,...e||t})}}function Rk(e){if(e)throw e}var jk=/* @__PURE__ */j((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,o,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(f&&i&&(s(i)||(o=a(i)))?(o?(o=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(f,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function $k(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Fk=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Wk(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)},qk=function(e){if(Wk(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},Bk=function(e){Wk(e);let t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}return o<0||r<0||0===a||1===a&&o===r-1&&o===i+1?"":e.slice(o,r)},Uk=function(...e){let t,n=-1;for(;++n<e.length;)Wk(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Wk(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",o=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},Hk="/";function Wk(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Vk=function(){return"/"};function Gk(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var Kk=["history","path","basename","stem","extname","dirname"],Jk=class{constructor(e){let t;t=e?Gk(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Vk(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Kk.length;){const e=Kk[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Kk.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Fk(this.path):void 0}set basename(e){Xk(e,"basename"),Yk(e,"basename"),this.path=Uk(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?qk(this.path):void 0}set dirname(e){Qk(this.basename,"dirname"),this.path=Uk(e||"",this.basename)}get extname(){return"string"==typeof this.path?Bk(this.path):void 0}set extname(e){if(Yk(e,"extname"),Qk(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Uk(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Gk(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Gk(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Xk(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Fk(this.path,this.extname):void 0}set stem(e){Xk(e,"stem"),Yk(e,"stem"),this.path=Uk(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new $b(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Yk(e,t){if(e&&e.includes(Hk))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hk+"`")}function Xk(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Qk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var Zk=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ex=/* @__PURE__ */F(jk(),1),tx={}.hasOwnProperty,nx=(new class e extends Zk{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(o,...a){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return function(...t){const a=e.length>t.length;let s;a&&t.push(r);try{s=e.apply(this,t)}catch(o){if(a&&n)throw o;return r(o)}a||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,ex.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(ox("data",this.frozen),this.namespace[e]=t,this):tx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ox("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=lx(e),n=this.parser||this.Parser;return rx("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),rx("process",this.parser||this.Parser),ix("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const o=lx(e),a=n.parse(o);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(a,o,function(e,t,r){if(e||!t||!r)return s(e);const i=t,o=n.stringify(i,r);var a;"string"==typeof(a=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),rx("processSync",this.parser||this.Parser),ix("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Rk(e),t=r}),sx("processSync","process",n),t}run(e,t,n){ax(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){const a=lx(t);r.run(e,a,function(t,r,a){const s=r||e;t?o(t):i?i(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Rk(e),n=t,r=!0}),sx("runSync","run",r),n}stringify(e,t){this.freeze();const n=lx(t),r=this.compiler||this.Compiler;return ix("stringify",r),ax(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ox("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=(0,ex.default)(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const a=n[i][1];$k(a)&&$k(r)&&(r=(0,ex.default)(!0,a,r)),n[i]=[e,r,...o]}}}}).freeze();function rx(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function ix(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ox(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ax(e){if(!$k(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function sx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lx(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Jk(e)}var cx=[],ux={allowDangerousHtml:!0},dx=/^(https?|ircs?|mailto|xmpp)$/i,px=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hx(e){const t=function(e){const t=e.rehypePlugins||cx,n=e.remarkPlugins||cx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ux}:ux;return nx().use(ek).use(n).use(zk,r).use(t)}(e),n=function(e){const t=e.children||"",n=new Jk;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||fx;for(const c of px)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return Ek(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return a?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in nv)if(Object.hasOwn(nv,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=nv[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,i)),a&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,o){const a=Array.isArray(i.children),s=Pb(n);return t(r,i,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,o){const a=Array.isArray(i.children)?n:t;return o?a(r,i,o):a(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?_y:Ny,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Gb(i,e,void 0);return o&&"string"!=typeof o?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}(e,{Fragment:A,components:i,ignoreInvalidStyle:!0,jsx:I,jsxs:M,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function fx(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||dx.test(e.slice(0,t))?e:""}function mx(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function gx(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function yx(e){return"function"==typeof e?e:function(){return e}}var bx="phrasing",vx=["autolink","link","image","label"];function wx(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kx(e){this.config.enter.autolinkProtocol.call(this,e)}function xx(e){this.config.exit.autolinkProtocol.call(this,e)}function Sx(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];
|
|
68
|
-
/* @__PURE__ */t.type,t.url="http://"+this.sliceSerialize(e)}function Tx(e){this.config.exit.autolinkEmail.call(this,e)}function Cx(e){this.exit(e)}function Ex(e){!function(e,t,n){const r=kk((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([gx(e[0]),yx(e[1])])}return t}(t);let o=-1;for(;++o<i.length;)Ck(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[o][0],a=i[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let o=a(...d,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ax],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ix]],{ignore:["link","linkReference"]})}function Ax(e,t,n,r,i){let o="";if(!Mx(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=mx(e,"(");let o=mx(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Ix(e,t,n,r){return!(!Mx(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Mx(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Ev(n)||Cv(n))&&(!t||47!==n)}function Ox(){this.buffer()}function Nx(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _x(){this.buffer()}function Px(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Lx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Dx(e){this.exit(e)}function zx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rx(e){this.exit(e)}function jx(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function $x(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const o=r.createTracker(i);let a=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");return a+=o.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),a+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?qx:Fx))),s(),a},footnoteReference:jx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Fx(e,t,n){return 0===t?e:qx(e,0,n)}function qx(e,t,n){return(n?"":" ")+e}jx.peek=function(){return"["};var Bx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Ux(e){this.enter({type:"delete",children:[],position:void 0},e)}function Hx(e){this.exit(e)}function Wx(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",a=n.enter("strikethrough");let s=i.move(o);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(o),a(),s}function Vx(e){return e.length}function Gx(e){return null==e?"":String(e)}function Kx(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Wx.attention=function(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}},Wx.peek=function(){return"~"};var Jx=kk(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Yx(e,t,n){return">"+(n?"":" ")+e}function Xx(e,t){return Qx(e,t.inConstruct,!0)&&!Qx(e,t.notInConstruct,!1)}function Qx(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Zx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const e=n.unsafe[i];if("\n"===e.character&&!e.before&&!e.after&&Xx(n.stack,e))return/[\t ]/.test(r.before)?"":" "}return"\\\n"}function eS(e,t,n){return(n?"":" ")+e}function tS(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function nS(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function rS(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function iS(e){return e.value||""}function oS(e,t,n,r){const i=tS(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function aS(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function sS(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function lS(e,t){const n=iv(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function cS(e,t,n,r){const i=tS(n),o='"'===i?"Quote":"Apostrophe",a=n.createTracker(r);if(lS(e,n)){const t=n.stack;n.stack=t.filter(function(e){return"phrasing"!==e});const r=n.enter("autolink");let i=a.move("<");return i+=a.move(n.containerPhrasing(e,{before:i,after:">",...a.current()})),i+=a.move(">"),r(),n.stack=t,i}const s=n.enter("link");let l=n.enter("label"),c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function uS(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function dS(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function pS(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hS(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}function fS(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}rS.attention=function(e,t){return{construct:"emphasis",markers:"*"===nS(t)?["*","_"]:["_","*"],sizes:[1]}},rS.peek=function(e,t,n){return n.options.emphasis||"*"},iS.peek=function(){return"<"},oS.peek=function(){return"!"},aS.peek=function(){return"!"},sS.peek=function(){return"`"},cS.peek=function(e,t,n){return lS(e,n)?"<":"["},uS.peek=function(){return"["},fS.attention=function(e,t){return{construct:"strong",markers:"*"===hS(t)?["*","_"]:["_","*"],sizes:[2]}},fS.peek=function(e,t,n){return n.options.strong||"*"};var mS={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),Yx);return i(),a},break:Zx,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,eS);return e(),t}const a=n.createTracker(r),s=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}(o,i)+1,3)),l=n.enter("codeFenced"),c="`"===i?"GraveAccent":"Tilde";let u=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${c}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${c}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(s),l(),u},definition:function(e,t,n,r){const i=tS(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),a(),c},emphasis:rS,hardBreak:Zx,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Ek(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),Boolean((!e.depth||e.depth<3)&&iv(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});const u=c.charCodeAt(0);return 9!==u&&32!==u||(c=function(e){return"&#x"+e.toString(16).toUpperCase()+";"}(u)+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:iS,image:oS,imageReference:aS,inlineCode:sS,link:cS,linkReference:uS,list:function(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):dS(n);const s=e.ordered?"."===a?")":".":function(e){const t=dS(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),pS(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||dS(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?o:o+" ".repeat(a-o.length))+e});return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a},root:function(e,t,n,r){if(!e.children.some(function(e){return Jx(e)}))return n.containerFlow(e,r);const i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),o},strong:fS,text:function(e,t,n,r){const i=t?t.children:[],o=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})},thematicBreak:function(e,t,n){const r=(pS(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function gS(e){const t=e._align;
|
|
69
|
-
/* @__PURE__ */this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function
|
|
70
|
-
/* @__PURE__ */n.type,n.value=t,this.exit(e)}function
|
|
71
|
-
/* @__PURE__ */t.type,t.checked="taskListCheckValueChecked"===e.type}function
|
|
72
|
-
/* @__PURE__ */e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ES(e,t,n,r){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=mS.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}for(var AS={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},IS={tokenize:function(e,t,n){let r,i,o;return a;function a(t){return 46===t||95===t?e.check(OS,l,s)(t):null===t||Sv(t)||Ev(t)||45!==t&&Cv(t)?l(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},MS={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(OS,t,o)(a):null===a||Sv(a)||Ev(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},OS={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||Sv(a)||Ev(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||Sv(e)||Ev(e)?t(e):r(e)}function o(e){return mv(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):mv(t)?(e.consume(t),a):n(t)}},partial:!0},NS={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return gv(e)?n(e):t(e)}},partial:!0},_S={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!RS.call(r,r.previous)||qS(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AS,e.attempt(IS,e.attempt(MS,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:RS},PS={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",o=!1;return function(t){return 72!==t&&104!==t||!jS.call(r,r.previous)||qS(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a)};function a(t){if(mv(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||bv(t)||Sv(t)||Ev(t)||Cv(t)?n(t):e.attempt(IS,e.attempt(MS,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:jS},LS={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,o;return function(t){return FS(t)&&$S.call(r,r.previous)&&!qS(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):n(t)};function a(t){return FS(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(NS,c,l)(t):45===t||95===t||gv(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(a){return o&&i&&mv(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:$S},DS={},zS=48;zS<123;)DS[zS]=LS,58===++zS?zS=65:91===zS&&(zS=97);function RS(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Sv(e)}function jS(e){return!mv(e)}function $S(e){return!(47===e||FS(e))}function FS(e){return 43===e||45===e||46===e||95===e||gv(e)}function qS(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}DS[43]=LS,DS[45]=LS,DS[46]=LS,DS[95]=LS,DS[72]=[LS,PS],DS[104]=[LS,PS],DS[87]=[LS,_S],DS[119]=[LS,_S];var BS={tokenize:function(e,t,n){const r=this;return Mv(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function US(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return n(i);const s=fv(r.sliceSerialize({start:a.end,end:r.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function HS(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function WS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!o||null===s||91===s||Sv(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(fv(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Sv(s)||(o=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function VS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||Sv(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=fv(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Sv(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),Mv(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function GS(e,t,n){return e.check(qv,t,e.attempt(BS,t,n))}function KS(e){e.exit("gfmFootnoteDefinition")}function JS(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,o=this.events;let a=0;return function(t){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),s(t))};function s(o){const l=zv(i);if(126===o)return a>1?r(o):(e.consume(o),a++,s);if(a<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=zv(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&sv(a,a.length,0,Rv(s,e.slice(r+1,n),t)),sv(a,a.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),sv(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}var YS=class{constructor(){this.map=[],this.index=/* @__PURE__ */new Map}add(e,t,n){!function(e,t,n,r){if(0===n&&0===r.length)return;const i=e.index.get(t);if(i)return i[1]+=n,void i[2].push(...r);const o=[t,n,r];e.map.push(o),e.index.set(t,o)}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function XS(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function QS(e,t,n){const r=this;let i,o=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const{type:e}=r.events[t][1];if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?w:s;return o===w&&r.parser.lazy[r.now().line]?n(e):o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,a+=1),l(e)}(t)}function l(t){return null===t?n(t):xv(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Tv(t)?Mv(e,l,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Sv(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Tv(t)?Mv(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?f(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):v(t)}function h(t){return Tv(t)?Mv(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||xv(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Tv(t)?Mv(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||xv(n))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||xv(n)?(e.exit("tableRow"),t(n)):Tv(n)?Mv(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Sv(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function ZS(e,t){let n,r,i,o=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new YS;for(;++o<e.length;){const h=e[o],f=h[1];"enter"===h[0]?"tableHead"===f.type?(u=!1,0!==d&&(tT(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(a=!0,i=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===f.type?2:r?3:1):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],i=eT(p,t,l,s,void 0,i)),l=c,c=[l[1],o,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=eT(p,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=o)):"tableHead"===f.type?(u=!0,d=o):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=o,0!==l[1]?(c[0]=c[1],i=eT(p,t,l,s,o,i)):0!==c[1]&&(i=eT(p,t,c,s,o,i)),s=0):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=o)}for(0!==d&&tT(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=XS(t.events,o))}return e}function eT(e,t,n,r,i,o){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},nT(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=nT(t.events,n[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const i=nT(t.events,n[2]),o=nT(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},nT(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function tT(e,t,n,r,i){const o=[],a=nT(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function nT(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var rT={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return Sv(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return xv(r)?t(r):Tv(r)?e.check({tokenize:iT},t,n)(r):n(r)}}};function iT(e,t,n){return Mv(e,function(e){return null===e?n(e):t(e)},"whitespace")}var oT={},aT={},sT=[function(e){const t=e||oT,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return uv([{text:DS},{document:{91:{name:"gfmFootnoteDefinition",tokenize:VS,continuation:{tokenize:GS},exit:KS}},text:{91:{name:"gfmFootnoteCall",tokenize:WS},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:US,resolveTo:HS}}},JS(e),{flow:{null:{name:"table",tokenize:QS,resolveAll:ZS}}},{text:{91:rT}}])}(t)),i.push([{transforms:[Ex],enter:{literalAutolink:wx,literalAutolinkEmail:kx,literalAutolinkHttp:kx,literalAutolinkWww:kx},exit:{literalAutolink:Cx,literalAutolinkEmail:Tx,literalAutolinkHttp:xx,literalAutolinkWww:Sx}},{enter:{gfmFootnoteCallString:Ox,gfmFootnoteCall:Nx,gfmFootnoteDefinitionLabelString:_x,gfmFootnoteDefinition:Px},exit:{gfmFootnoteCallString:Lx,gfmFootnoteCall:Dx,gfmFootnoteDefinitionLabelString:zx,gfmFootnoteDefinition:Rx}},{canContainEols:["delete"],enter:{strikethrough:Ux},exit:{strikethrough:Hx}},{enter:{table:gS,tableData:wS,tableHeader:wS,tableRow:bS},exit:{codeText:kS,table:yS,tableData:vS,tableHeader:vS,tableRow:vS}},{exit:{taskListCheckValueChecked:TS,taskListCheckValueUnchecked:TS,paragraph:CS}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bx,notInConstruct:vx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bx,notInConstruct:vx},{character:":",before:"[ps]",after:"\\/",inConstruct:bx,notInConstruct:vx}]},$x(e),{handlers:{delete:Wx},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Bx}]},SS(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ES}}]}}(t))}],lT=/* @__PURE__ */"heading.heading1.heading2.heading3.heading4.heading5.heading6.paragraph.link.strong.emphasis.list.listItem.quote.divider.code.codeBlock.codeBlockFrame.codeBlockHeader.codeBlockLanguage.codeBlockCopy.image.table.tableHead.tableRow.tableHeaderCell.tableCell.anchor".split("."),cT=({className:e,children:t="",wrapLines:n=!0,showLineNumbers:r=!0,headingAnchor:i,headingLinks:o=!0,classNames:a=aT})=>{let s=k(()=>i?[kb(i)]:[],[i]),l=k(()=>(e=>{let{classNames:t,wrapLines:n,showLineNumbers:r}=e;return{h1:vb("h1",e),h2:vb("h2",e),h3:vb("h3",e),h4:vb("h4",e),h5:vb("h5",e),h6:vb("h6",e),p:bb("p",t.paragraph),a:bb("a",t.link),strong:bb("strong",t.strong),em:bb("em",t.emphasis),ul:bb("ul",t.list),ol:bb("ol",t.list),li:bb("li",t.listItem),blockquote:bb("blockquote",t.quote),hr:bb("hr",t.divider),img:bb("img",t.image),table:bb("table",t.table),thead:bb("thead",t.tableHead),tr:bb("tr",t.tableRow),th:bb("th",t.tableHeaderCell),td:bb("td",t.tableCell),pre:({children:e,node:n,className:r,...i})=>{let o=/* @__PURE__ */I("pre",{...i,className:U(r,t.codeBlock)||void 0,children:e}),a=n?.children.find(e=>"element"===e.type&&"code"===e.tagName);if(!a||"element"!==a.type)return o;let s=a.properties.className,l=Array.isArray(s)?s.map(String).map(e=>yb.exec(e)?.[1]).find(Boolean):void 0;/* @__PURE__ */
|
|
73
|
-
return I(
|
|
74
|
-
return I("div",{className:U("markdown",e),children:/* @__PURE__ */I(
|
|
75
|
-
return I(
|
|
76
|
-
return M(
|
|
77
|
-
return M(
|
|
78
|
-
return M(
|
|
79
|
-
return I(
|
|
65
|
+
/* @__PURE__ */o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else tv(e,t.position);else{const i=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];
|
|
66
|
+
/* @__PURE__ */t.type,o=e.evaluater.evaluateExpression(t.expression)}else tv(e,t.position);else o=null===r.value||r.value;n[i]=o}return n}(e,t),s=Qb(e,t);return Yb(e,a,o,t),Xb(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tv(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Xb(r,Qb(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Yb(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xb(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Qb(e,t){const n=[];let r=-1;const i=e.passKeys?/* @__PURE__ */new Map:Hb;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=i.get(e)||0;a=e+"-"+t,i.set(e,t+1)}}const s=Jb(e,o,a);void 0!==s&&n.push(s)}return n}function Zb(e,t,n){const r=Oy(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,Bb.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new qb("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Kb+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Ub.call(e,n)&&(t[nv(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Ey[r.property]||r.property:r.attribute,n]}}function ev(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=Ab(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}
|
|
67
|
+
/* @__PURE__ */r=n}else r=Ab(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Ub.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tv(e)}function tv(e,t){const n=new qb("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Kb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nv(e){let t=e.replace(Wb,rv);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rv(e){return"-"+e.toLowerCase()}var iv={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ov={};function av(e,t){const n=t||ov;return sv(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function sv(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lv(e.children,t,n)}return Array.isArray(e)?lv(e,t,n):""}function lv(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sv(e[i],t,n);return r.join("")}function cv(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function uv(e,t){return e.length>0?(cv(e,e.length,0,t),e):t}var dv={}.hasOwnProperty;function pv(e){const t={};let n=-1;for(;++n<e.length;)hv(t,e[n]);return t}function hv(e,t){let n;for(n in t){const r=(dv.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){dv.call(r,o)||(r[o]=[]);const e=i[o];fv(r[o],Array.isArray(e)?e:e?[e]:[])}}}function fv(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);cv(e,0,0,r)}function mv(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function gv(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var yv=Mv(/[A-Za-z]/),bv=Mv(/[\dA-Za-z]/),vv=Mv(/[#-'*+\--9=?A-Z^-~]/);function wv(e){return null!==e&&(e<32||127===e)}var kv=Mv(/\d/),xv=Mv(/[\dA-Fa-f]/),Sv=Mv(/[!-/:-@[-`{-~]/);function Tv(e){return null!==e&&e<-2}function Cv(e){return null!==e&&(e<0||32===e)}function Ev(e){return-2===e||-1===e||32===e}var Av=Mv(/\p{P}|\p{S}/u),Iv=Mv(/\s/);function Mv(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Ov(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&bv(e.charCodeAt(n+1))&&bv(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Nv(e,t,n,r){const i=r?r-1:1/0;let o=0;return function(r){return Ev(r)?(e.enter(n),a(r)):t(r)};function a(r){return Ev(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}function _v(e,t,n,r,i,o){let a=0;return function(t){return o>0&&Ev(t)?(e.enter(r),s(t)):l(t)};function s(t){return Ev(t)&&a<o?(e.consume(t),a++,s):(e.exit(r),l(t))}function l(e){return a>=i?t(e):n(e)}}var Pv={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Nv(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Tv(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},Lv=class{constructor(){this.index=/* @__PURE__ */new Map,this.map=[]}add(e,t,n){Dv(this,e,t,n,!1)}addBefore(e,t,n){Dv(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Dv(e,t,n,r,i){if(0===n&&0===r.length)return;const o=e.index.get(t);if(o)return o[1]+=n,void(i?(r.push(...o[2]),o[2]=r):o[2].push(...r));const a=[t,n,r];e.map.push(a),e.index.set(t,a)}var zv={tokenize:function(e){const t=this,n=[];let r,i,o,a=0;return s;function s(r){if(a<n.length){const i=n[a];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;const l=new Lv;return l.add(o+1,0,t.events.slice(n)),l.add(n,s-n,[]),l.consume(t.events),c(e)}return s(e)}function c(i){if(a===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return f(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Rv,u,d)(i)}function u(e){return r&&b(),y(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,f(e)}function p(n){return t.containerState={},e.attempt(Rv,h,f)(n)}function h(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function f(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Tv(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;const c=new Lv;c.add(l+1,0,t.events.slice(n)),c.add(n,e-n,[]),c.consume(t.events)}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Rv={tokenize:function(e,t,n){return Nv(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function jv(e){return null===e||Cv(e)||Iv(e)?1:Av(e)?2:void 0}function $v(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Fv={name:"attention",resolveAll:function(e,t){let n,r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._close){let i=r;for(;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,a={...e[i][1].end},s={...e[r][1].start};qv(a,-o),qv(s,o);const l={type:o>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},c={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:s},u={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},d={type:o>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[i][1].end={...l.start},e[r][1].start={...c.end},n=[],e[i][1].end.offset-e[i][1].start.offset&&(n=uv(n,[["enter",e[i][1],t],["exit",e[i][1],t]])),n=uv(n,[["enter",d,t],["enter",l,t],["exit",l,t],["enter",u,t]]),n=uv(n,$v(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=uv(n,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",d,t]]);let p=0;e[r][1].end.offset-e[r][1].start.offset&&(p=2,n=uv(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),cv(e,i-1,r-i+3,n),r=i+n.length-p-2;break}}for(r=-1;++r<e.length;)"attentionSequence"===e[r][1].type&&(e[r][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jv(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const l=e.exit("attentionSequence"),c=jv(s),u=!c||2===c&&i||n.includes(s)&&42!==s&&95!==s,d=!i||2===i&&c||n.includes(r)&&42!==r&&95!==r;return l._open=Boolean(42===o?u:u&&(i||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function qv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Bv={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return yv(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||bv(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||bv(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wv(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):vv(t)?(e.consume(t),l):n(t)}function c(e){return bv(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||bv(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Uv={partial:!0,tokenize:function(e,t,n){return function(t){return Ev(t)?Nv(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Tv(e)?t(e):n(e)}}},Hv={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Ev(t)?Nv(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(Hv,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Ev(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},Wv={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Sv(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Vv={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=bv,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=xv,c):(e.enter("characterReferenceValue"),i=7,o=kv,c(t))}function c(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==bv||Yy(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&a++<i?(e.consume(s),c):n(s)}}},Gv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Kv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),Ev(t)?Nv(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Ev(t)?Nv(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Tv(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Ev(t)?Nv(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Tv(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Gv,h,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Tv(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Ev(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Nv(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||Tv(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Tv(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function h(t){return e.attempt(i,b,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Ev(t)?Nv(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||Tv(t)?e.check(Gv,h,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Tv(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},Jv={name:"codeIndented",tokenize:function(e,t,n){return function(t){return e.enter("codeIndented"),_v(e,r,n,"linePrefix",4,4)(t)};function r(t){return null===t?o(t):Tv(t)?e.attempt(Yv,r,o)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Tv(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),i)}function o(n){return e.exit("codeIndented"),t(n)}}},Yv={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Tv(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_v(e,t,o,"linePrefix",4,4)(a)}function o(e){return Tv(e)?i(e):n(e)}}},Xv={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Tv(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Tv(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},Qv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Zv(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Zv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Zv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Zv(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Zv(this.left,t.reverse())}}};function Zv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ew(e){const t={};let n,r,i,o,a,s,l,c=-1;const u=new Qv(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,tw(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(o=u.get(i),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return cv(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function tw(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,p=-1,h=n,f=0,m=0;const g=[m];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[f+l[p][0]]=f+l[p][1],f+=l[p][1]-l[p][0]-1;return c}var nw={resolve:function(e){return ew(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Tv(t)?e.check(rw,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},rw={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Nv(e,i,"linePrefix")};function i(i){if(null===i||Tv(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function iw(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||wv(t)?n(t):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Tv(t)?n(t):(e.consume(t),92===t?h:p)}function h(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function f(i){return u||null!==i&&41!==i&&!Cv(i)?u<c&&40===i?(e.consume(i),u++,f):41===i?(e.consume(i),u--,f):null===i||32===i||40===i||wv(i)?n(i):(e.consume(i),92===i?m:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function ow(e,t,n,r,i,o){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Tv(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Tv(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Ev(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function aw(e,t,n,r,i,o){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s):n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):Tv(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Nv(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||Tv(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function sw(e,t){let n;return function r(i){return Tv(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ev(i)?Nv(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var lw={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return ow.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=gv(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Cv(t)?sw(e,s)(t):s(t)}function s(t){return iw(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(cw,c,c)(t)}function c(t){return Ev(t)?Nv(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Tv(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},cw={partial:!0,tokenize:function(e,t,n){return function(t){return Cv(t)?sw(e,r)(t):n(t)};function r(t){return aw(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Ev(t)?Nv(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Tv(e)?t(e):n(e)}}},uw={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Tv(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},dw={name:"headingAtx",resolve:function(e,t){let n=e.length-2,r=3;if("whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};cv(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Cv(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Tv(n)?(e.exit("atxHeading"),t(n)):Ev(n)?Nv(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Cv(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}},pw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hw=["pre","script","style","textarea"],fw={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,o,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,h):63===s?(e.consume(s),i=3,r.interrupt?t:L):yv(s)?(e.consume(s),a=String.fromCharCode(s),f):n(s)}function u(o){return 45===o?(e.consume(o),i=2,d):91===o?(e.consume(o),i=5,s=0,p):yv(o)?(e.consume(o),i=4,r.interrupt?t:L):n(o)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:L):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:E:p):n(i)}function h(t){return yv(t)?(e.consume(t),a=String.fromCharCode(t),f):n(t)}function f(s){if(null===s||47===s||62===s||Cv(s)){const l=47===s,c=a.toLowerCase();return l||o||!hw.includes(c)?pw.includes(a.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(i=1,r.interrupt?t(s):E(s))}return 45===s||bv(s)?(e.consume(s),a+=String.fromCharCode(s),f):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:E):n(i)}function g(t){return Ev(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||yv(t)?(e.consume(t),b):Ev(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||bv(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):Ev(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):Ev(t)?(e.consume(t),w):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||Tv(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Cv(t)?v(t):(e.consume(t),x)}function S(e){return 47===e||62===e||Ev(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||Tv(t)?E(t):Ev(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===i?(e.consume(t),O):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),D):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),P):!Tv(t)||6!==i&&7!==i?null===t||Tv(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(mw,z,A)(t))}function A(t){return e.check(Gv,I,z)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return null===t||Tv(t)?A(t):(e.enter("htmlFlowData"),E(t))}function O(t){return 45===t?(e.consume(t),L):E(t)}function N(t){return 47===t?(e.consume(t),a="",_):E(t)}function _(t){if(62===t){const n=a.toLowerCase();return hw.includes(n)?(e.consume(t),D):E(t)}return yv(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),_):E(t)}function P(t){return 93===t?(e.consume(t),L):E(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===i?(e.consume(t),L):E(t)}function D(t){return null===t||Tv(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),D)}function z(n){return e.exit("htmlFlow"),t(n)}}},mw={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Uv,t,n)}}},gw={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):yv(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,h):yv(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Tv(t)?(a=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function h(t){return t==="CDATA[".charCodeAt(o++)?(e.consume(t),6===o?f:h):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):Tv(t)?(a=f,_(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):f(t)}function y(t){return null===t||62===t?N(t):Tv(t)?(a=y,_(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Tv(t)?(a=b,_(t)):(e.consume(t),b)}function v(e){return 62===e?N(e):b(e)}function w(t){return yv(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||bv(t)?(e.consume(t),k):x(t)}function x(t){return Tv(t)?(a=x,_(t)):Ev(t)?(e.consume(t),x):N(t)}function S(t){return 45===t||bv(t)?(e.consume(t),S):47===t||62===t||Cv(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),N):58===t||95===t||yv(t)?(e.consume(t),C):Tv(t)?(a=T,_(t)):Ev(t)?(e.consume(t),T):N(t)}function C(t){return 45===t||46===t||58===t||95===t||bv(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),A):Tv(t)?(a=E,_(t)):Ev(t)?(e.consume(t),E):T(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,I):Tv(t)?(a=A,_(t)):Ev(t)?(e.consume(t),A):(e.consume(t),M)}function I(t){return t===i?(e.consume(t),i=void 0,O):null===t?n(t):Tv(t)?(a=I,_(t)):(e.consume(t),I)}function M(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Cv(t)?T(t):(e.consume(t),M)}function O(e){return 47===e||62===e||Cv(e)?T(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Ev(t)?Nv(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),a(t)}}},yw={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&cv(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o=e.length,a=0;for(;o--;){const t=e[o][1];if(n){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[o][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[o][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(n=o,"labelLink"!==t.type)){a=2;break}}else"labelEnd"===t.type&&(r=o)}const s={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[r][1].end}},c={type:"labelText",start:{...e[n+a+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",s,t],["enter",l,t]],i=uv(i,e.slice(n+1,n+a+3)),i=uv(i,[["enter",c,t]]),i=uv(i,$v(t.parser.constructs.insideSpan.null,e.slice(n+a+4,r-3),t)),i=uv(i,[["exit",c,t],e[r-2],e[r-1],["exit",l,t]]),i=uv(i,e.slice(r+1)),i=uv(i,[["exit",s,t]]),cv(e,n,e.length,i),e},tokenize:function(e,t,n){const r=this,i=r._labelStarts;let o,a;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return function(t){return o?o._inactive?u(t):(a=r.parser.defined.includes(gv(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(bw,c,a?c:u)(t):91===t?e.attempt(vw,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(ww,c,u)(t)}function c(e){return i.pop(),t(e)}function u(e){return o._balanced=!0,n(e)}}},bw={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Cv(t)?sw(e,i)(t):i(t)}function i(t){return 41===t?c(t):iw(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Cv(t)?sw(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?aw(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Cv(t)?sw(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},vw={tokenize:function(e,t,n){const r=this;return function(t){return ow.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(gv(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},ww={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},kw={name:"labelStartImage",resolveAll:yw.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},xw={name:"labelStartLink",resolveAll:yw.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},Sw={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Nv(e,t,"linePrefix")}}},Tw={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||Tv(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),Ev(t)?Nv(e,o,"whitespace")(t):o(t))}}},Cw={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Uv,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Nv(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Ev(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Aw,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Nv(e,e.attempt(Cw,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:kv(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Tw,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return kv(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Uv,r.interrupt?n:c,e.attempt(Ew,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Ev(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Ew={partial:!0,tokenize:function(e,t,n){const r=this;return Nv(e,function(e){const i=r.events[r.events.length-1];return!Ev(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Aw={partial:!0,tokenize:function(e,t,n){const r=this;return Nv(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},Iw={name:"setextUnderline",resolveTo:function(e,t){const n=new Lv;let r,i,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(i=a)}else"content"===e[a][1].type&&n.add(a,1,[]),o||"definition"!==e[a][1].type||(o=a);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(n.add(i,0,[["enter",s,t]]),n.add(o+1,0,[["exit",e[r][1],t]]),e[r][1].end={...e[o][1].end}):e[r][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Ev(t)?Nv(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||Tv(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Mw={tokenize:function(e){const t=this,n=e.attempt(Uv,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,Nv(e,e.attempt(this.parser.constructs.flow,r,e.attempt(nw,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Ow={resolveAll:Lw()},Nw=Pw("string"),_w=Pw("text");function Pw(e){return{resolveAll:Lw("text"===e?Dw:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Lw(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Dw(e,t){const n=new Lv;let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const i=e[r-1][1],o=t.sliceStream(i);let a,s=o.length,l=-1,c=0;for(;s--;){const e=o[s];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)a=!0,c++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const o={type:r===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...o.start},i.start.offset===i.end.offset?Object.assign(i,o):n.add(r,0,[["enter",o,t],["exit",o,t]])}r++}return n.consume(e),e}var zw=/* @__PURE__ */$({attentionMarkers:()=>Hw,contentInitial:()=>jw,disable:()=>Ww,document:()=>Rw,flow:()=>Fw,flowInitial:()=>$w,insideSpan:()=>Uw,string:()=>qw,text:()=>Bw}),Rw={42:Cw,43:Cw,45:Cw,48:Cw,49:Cw,50:Cw,51:Cw,52:Cw,53:Cw,54:Cw,55:Cw,56:Cw,57:Cw,62:Hv},jw={91:lw},$w={[-2]:Jv,[-1]:Jv,32:Jv},Fw={35:dw,42:Tw,45:[Iw,Tw],60:fw,61:Iw,95:Tw,96:Kv,126:Kv},qw={38:Vv,92:Wv},Bw={[-5]:Sw,[-4]:Sw,[-3]:Sw,33:kw,38:Vv,42:Fv,60:[Bv,gw],91:xw,92:[uw,Wv],93:yw,95:Fv,96:Xv},Uw={null:[Fv,Ow]},Hw={null:[42,95]},Ww={null:[]};function Vw(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(f),consume:function(e){Tv(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return a=uv(a,e),function(){for(;r._index<a.length;){const e=a[r._index];if("string"==typeof e){const t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)h(e.charCodeAt(r._bufferIndex))}else h(e)}}(),null!==a[a.length-1]?[]:(g(t,0),c.events=$v(o,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function h(e){u=u(e)}function f(e,t){t.restore()}function m(e,t){return function(n,i,o){let a,u,d,h;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return a=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){return h=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,h),i}function b(e){return h.restore(),++u<a.length?m(a[u]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&cv(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var Gw=/[\0\t\n\r]/g,Kw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Jw(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return mv(n.slice(t?2:1),t?16:10)}return Yy(n)||e}var Yw={}.hasOwnProperty;function Xw(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(v),autolinkProtocol:d,autolinkEmail:d,atxHeading:o(g),blockQuote:o(function(){return{type:"blockquote",children:[],position:void 0}}),characterEscape:d,characterReference:d,codeFenced:o(m),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(m,a),codeText:o(function(){return{type:"inlineCode",value:"",position:void 0}},a),codeTextData:d,data:d,codeFlowValue:d,definition:o(function(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(function(){return{type:"emphasis",children:[],position:void 0}}),hardBreakEscape:o(y),hardBreakTrailing:o(y),htmlFlow:o(b,a),htmlFlowData:d,htmlText:o(b,a),htmlTextData:d,image:o(function(){return{type:"image",title:null,url:"",alt:null,position:void 0}}),label:a,link:o(v),listItem:o(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[],position:void 0}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:o(w,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:o(w),paragraph:o(function(){return{type:"paragraph",children:[],position:void 0}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(g),strong:o(function(){return{type:"strong",children:[],position:void 0}}),thematicBreak:o(function(){return{type:"thematicBreak",position:void 0}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=mv(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Yy(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=Qw(e.end)},codeFenced:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:l(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=gv(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(h),hardBreakTrailing:l(h),htmlFlow:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Kw,Jw)}(t),n.identifier=gv(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=Qw(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=gv(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};Zw(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let o={type:"root",children:[],position:void 0};const l={stack:[o],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},d=[],p=[];let h=-1;for(;++h<e.length;)p.push(e[h]),"listOrdered"!==e[h][1].type&&"listUnordered"!==e[h][1].type||("enter"===e[h][0]?d.push(p.length-1):i(p,d.pop()));for(e=p,h=-1;++h<e.length;){const n=t[e[h][0]];"enter"===e[h][0]&&t.beforeEnter.length>0&&r(t.beforeEnter,{...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1]),Yw.call(n,e[h][1].type)&&n[e[h][1].type].call({...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1]),"exit"===e[h][0]&&t.afterExit.length>0&&r(t.afterExit,{...l,sliceSerialize:e[h][2].sliceSerialize},e[h][1])}if(l.tokenStack.length>0){const e=l.tokenStack[l.tokenStack.length-1];(e[1]||tk).call(l,void 0,e[0])}for(o.position={start:Qw(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Qw(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},h=-1;++h<t.transforms.length;)o=t.transforms[h](o)||o;return o};function r(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function i(e,t){const n=e.length-1;let r,i,o,a,s=t-1,l=-1,c=!1;const u=[];for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let n=s;for(i=void 0;n--;){const t=e[n];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=n}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),u.push({at:i||s,event:["exit",r,t[2]]})}if("listItemPrefix"===t[1].type){const e={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=e,u.push({at:s,event:["enter",e,t[2]]}),o=void 0,a=!0}}}const d=e.splice(t);let p=0;for(s=-1;++s<d.length;){for(;p<u.length&&u[p].at===t+s;)e.push(u[p++].event);e.push(d[s])}e[t][1]._spread=c}function o(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Qw(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Rb({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tk).call(this,e,r[0])),n.position.end=Qw(e.end)}function u(){return av(this.stack.pop())}function d(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:"",position:void 0},n.position={start:Qw(e.start),end:void 0},t.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Qw(e.end)}function h(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function g(){return{type:"heading",depth:0,children:[],position:void 0}}function y(){return{type:"break",position:void 0}}function b(){return{type:"html",value:"",position:void 0}}function v(){return{type:"link",title:null,url:"",children:[],position:void 0}}function w(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[],position:void 0}}}(n)(function(e){for(;!ew(e););return e}(function(e){const t={constructs:pv([zw,...(e||{}).extensions||[]]),content:n(Pv),defined:[],document:n(zv),flow:n(Mw),lazy:{},string:n(Nw),text:n(_w)};return t;function n(e){return function(n){return Vw(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,a){i=n+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i));const s=[];let l=0;for(n="",r&&(65279===i.charCodeAt(0)&&l++,r=void 0);l<i.length;){Gw.lastIndex=l;const r=Gw.exec(i),o=r&&void 0!==r.index?r.index:i.length,a=i.charCodeAt(o);if(!r){n=i.slice(l);break}if(10===a&&l===o&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<o&&(s.push(i.slice(l,o)),t+=o-l),a){case 0:s.push(65533),t++;break;case 9:{const e=4*Math.ceil(t/4);for(s.push(-2);t++<e;)s.push(-1);break}case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=o+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Qw(e){return{line:e.line,column:e.column,offset:e.offset}}function Zw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Zw(e,r):ek(e,r)}}function ek(e,t){let n;for(n in t)if(Yw.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tk(e,t){if(e)throw new Error("Cannot close `"+e.type+"` ("+Rb({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rb({start:t.start,end:t.end})+") is open");throw new Error("Cannot close document, a token (`"+t.type+"`, "+Rb({start:t.start,end:t.end})+") is still open")}function nk(e){const t=this;t.parser=function(n){return Xw(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rk(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function ik(e){const t=e.spread;return null==t?e.children.length>1:t}function ok(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ak(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ak(t.slice(i),i>0,!1)),o.join("")}function ak(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var sk={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ov(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rk(e,t);const i={src:Ov(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Ov(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rk(e,t);const i={href:Ov(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Ov(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ik(n[r])}return t}(n):ik(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Db(t.children[1]),a=Lb(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:ok(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:lk,yaml:lk,definition:lk,footnoteDefinition:lk};function lk(){}var{defineProperty:ck}=Object,uk="object"==typeof self?self:globalThis,dk=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new uk[e](t)},pk=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case 0:case-1:return n(a,i);case 1:{const e=n([],i);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of a){const i=r(t),o=r(n);"__proto__"===i?ck(e,i,{value:o,configurable:!0,enumerable:!0,writable:!0}):e[i]=o}return e}case 3:return n(new Date(a),i);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n("function"==typeof uk[e]?dk(e,t):new Error(t),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}case"-0":return-0}return n(dk(o,a),i)};return r})(/* @__PURE__ */new Map,e)(0),hk="",{toString:fk}={},{keys:mk,is:gk}=Object,yk=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=fk.call(e).slice(8,-1);switch(n){case"Array":return[1,hk];case"Object":return[2,hk];case"Date":return[3,hk];case"RegExp":return[4,hk];case"Map":return[5,hk];case"Set":return[6,hk];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:e instanceof Error?[7,e.name||"Error"]:[2,n]},bk=([e,t])=>0===e&&("function"===t||"symbol"===t),vk=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},o=a=>{if(n.has(a))return n.get(a);let[s,l]=yk(a);switch(s){case 0:{let t=a;switch(l){case"bigint":s=8,t=a.toString();break;case"number":if(!a&&gk(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return i([-1],a)}return i([s,t],a)}case 1:{if(l){let e=a;return"DataView"===l?e=new Uint8Array(a.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(a)),i([l,[...e]],a)}const e=[],t=i([s,e],a);for(const n of a)e.push(o(n));return t}case 2:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const n=[],r=i([s,n],a);for(const t of mk(a))!e&&bk(yk(a[t]))||n.push([o(t),o(a[t])]);return r}case 3:return i([s,isNaN(a.getTime())?hk:a.toISOString()],a);case 4:{const{source:e,flags:t}=a;return i([s,{source:e,flags:t}],a)}case 5:{const t=[],n=i([s,t],a);for(const[r,i]of a)(e||!bk(yk(r))&&!bk(yk(i)))&&t.push([o(r),o(i)]);return n}case 6:{const t=[],n=i([s,t],a);for(const r of a)!e&&bk(yk(r))||t.push(o(r));return n}}const{message:c}=a;return i([s,{name:l,message:c}],a)};return o})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},wk="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?pk(vk(e,t)):structuredClone(e):(e,t)=>pk(vk(e,t));function kk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var Sk=function(e){if(null==e)return Ck;if("function"==typeof e)return Tk(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Sk(e[n]);return Tk(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return Tk(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return t=e,Tk(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function Tk(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Ck(){return!0}var Ek=[];function Ak(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const o=Sk(i),a=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Ek;if((!t||o(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Ek:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function Ik(e,t,n,r){let i,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,i=n):(o=t,a=n,i=r),Ak(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},i)}var Mk={}.hasOwnProperty,Ok={};function Nk(e,t){const n=t||Ok,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,o={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=zk(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=zk(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Pk,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...sk,...n.handlers},one:function(e,t){const n=e.type,r=o.handlers[n];if(Mk.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=wk(n);return r.children=o.all(e),r}return wk(e)}return(o.options.unknownHandler||Lk)(o,e,t)},options:n,patch:_k,wrap:Dk};return Ik(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o}function _k(e,t){e.position&&(t.position=function(e){const t=Db(e),n=Lb(e);if(t&&n)return{start:t,end:n}}(e))}function Pk(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,wk(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Lk(e,t){const n=t.data||{},r=!("value"in t)||Mk.call(n,"hProperties")||Mk.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Dk(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function zk(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Rk(e,t){const n=Nk(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kk,r=e.options.footnoteBackLabel||xk,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const o=e.all(i),a=String(i.identifier).toUpperCase(),c=Ov(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=o[o.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else o.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(i,f),s.push(f)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wk(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:"\n"},i),o}function jk(e,t){return e&&"run"in e?async function(n,r){const i=Rk(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Rk(n,{file:r,...e||t})}}function $k(e){if(e)throw e}var Fk=/* @__PURE__ */j((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,o,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(f&&i&&(s(i)||(o=a(i)))?(o?(o=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(f,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function qk(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Bk=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Gk(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)},Uk=function(e){if(Gk(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},Hk=function(e){Gk(e);let t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}return o<0||r<0||0===a||1===a&&o===r-1&&o===i+1?"":e.slice(o,r)},Wk=function(...e){let t,n=-1;for(;++n<e.length;)Gk(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Gk(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",o=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},Vk="/";function Gk(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Kk=function(){return"/"};function Jk(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var Yk=["history","path","basename","stem","extname","dirname"],Xk=class{constructor(e){let t;t=e?Jk(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Kk(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Yk.length;){const e=Yk[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Yk.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Bk(this.path):void 0}set basename(e){Zk(e,"basename"),Qk(e,"basename"),this.path=Wk(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Uk(this.path):void 0}set dirname(e){ex(this.basename,"dirname"),this.path=Wk(e||"",this.basename)}get extname(){return"string"==typeof this.path?Hk(this.path):void 0}set extname(e){if(Qk(e,"extname"),ex(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wk(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Jk(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Jk(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Zk(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Bk(this.path,this.extname):void 0}set stem(e){Zk(e,"stem"),Qk(e,"stem"),this.path=Wk(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new qb(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Qk(e,t){if(e&&e.includes(Vk))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vk+"`")}function Zk(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ex(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var tx=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nx=/* @__PURE__ */F(Fk(),1),rx={}.hasOwnProperty,ix=(new class e extends tx{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(o,...a){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return function(...t){const a=e.length>t.length;let s;a&&t.push(r);try{s=e.apply(this,t)}catch(o){if(a&&n)throw o;return r(o)}a||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,nx.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(sx("data",this.frozen),this.namespace[e]=t,this):rx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(sx("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=ux(e),n=this.parser||this.Parser;return ox("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ox("process",this.parser||this.Parser),ax("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const o=ux(e),a=n.parse(o);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(a,o,function(e,t,r){if(e||!t||!r)return s(e);const i=t,o=n.stringify(i,r);var a;"string"==typeof(a=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ox("processSync",this.parser||this.Parser),ax("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,$k(e),t=r}),cx("processSync","process",n),t}run(e,t,n){lx(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){const a=ux(t);r.run(e,a,function(t,r,a){const s=r||e;t?o(t):i?i(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){$k(e),n=t,r=!0}),cx("runSync","run",r),n}stringify(e,t){this.freeze();const n=ux(t),r=this.compiler||this.Compiler;return ax("stringify",r),lx(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(sx("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=(0,nx.default)(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const a=n[i][1];qk(a)&&qk(r)&&(r=(0,nx.default)(!0,a,r)),n[i]=[e,r,...o]}}}}).freeze();function ox(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function ax(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function sx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lx(e){if(!qk(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function cx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ux(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Xk(e)}var dx=[],px={allowDangerousHtml:!0},hx=/^(https?|ircs?|mailto|xmpp)$/i,fx=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mx(e){const t=function(e){const t=e.rehypePlugins||dx,n=e.remarkPlugins||dx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...px}:px;return ix().use(nk).use(n).use(jk,r).use(t)}(e),n=function(e){const t=e.children||"",n=new Xk;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||gx;for(const c of fx)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return Ik(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return a?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in iv)if(Object.hasOwn(iv,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=iv[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,i)),a&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,o){const a=Array.isArray(i.children),s=Db(n);return t(r,i,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,o){const a=Array.isArray(i.children)?n:t;return o?a(r,i,o):a(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Ly:Py,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Jb(i,e,void 0);return o&&"string"!=typeof o?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}(e,{Fragment:A,components:i,ignoreInvalidStyle:!0,jsx:I,jsxs:M,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function gx(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||hx.test(e.slice(0,t))?e:""}function yx(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function bx(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function vx(e){return"function"==typeof e?e:function(){return e}}var wx="phrasing",kx=["autolink","link","image","label"];function xx(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sx(e){this.config.enter.autolinkProtocol.call(this,e)}function Tx(e){this.config.exit.autolinkProtocol.call(this,e)}function Cx(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];
|
|
68
|
+
/* @__PURE__ */t.type,t.url="http://"+this.sliceSerialize(e)}function Ex(e){this.config.exit.autolinkEmail.call(this,e)}function Ax(e){this.exit(e)}function Ix(e){!function(e,t,n){const r=Sk((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([bx(e[0]),vx(e[1])])}return t}(t);let o=-1;for(;++o<i.length;)Ak(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[o][0],a=i[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let o=a(...d,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mx],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ox]],{ignore:["link","linkReference"]})}function Mx(e,t,n,r,i){let o="";if(!Nx(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=yx(e,"(");let o=yx(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Ox(e,t,n,r){return!(!Nx(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Nx(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Iv(n)||Av(n))&&(!t||47!==n)}function _x(){this.buffer()}function Px(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lx(){this.buffer()}function Dx(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rx(e){this.exit(e)}function jx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $x(e){this.exit(e)}function Fx(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function qx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const o=r.createTracker(i);let a=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");return a+=o.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),a+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?Ux:Bx))),s(),a},footnoteReference:Fx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Bx(e,t,n){return 0===t?e:Ux(e,0,n)}function Ux(e,t,n){return(n?"":" ")+e}Fx.peek=function(){return"["};var Hx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Wx(e){this.enter({type:"delete",children:[],position:void 0},e)}function Vx(e){this.exit(e)}function Gx(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",a=n.enter("strikethrough");let s=i.move(o);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(o),a(),s}function Kx(e){return e.length}function Jx(e){return null==e?"":String(e)}function Yx(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Gx.attention=function(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}},Gx.peek=function(){return"~"};var Xx=Sk(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Qx(e,t,n){return">"+(n?"":" ")+e}function Zx(e,t){return eS(e,t.inConstruct,!0)&&!eS(e,t.notInConstruct,!1)}function eS(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tS(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const e=n.unsafe[i];if("\n"===e.character&&!e.before&&!e.after&&Zx(n.stack,e))return/[\t ]/.test(r.before)?"":" "}return"\\\n"}function nS(e,t,n){return(n?"":" ")+e}function rS(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function iS(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function oS(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function aS(e){return e.value||""}function sS(e,t,n,r){const i=rS(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function lS(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function cS(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function uS(e,t){const n=av(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function dS(e,t,n,r){const i=rS(n),o='"'===i?"Quote":"Apostrophe",a=n.createTracker(r);if(uS(e,n)){const t=n.stack;n.stack=t.filter(function(e){return"phrasing"!==e});const r=n.enter("autolink");let i=a.move("<");return i+=a.move(n.containerPhrasing(e,{before:i,after:">",...a.current()})),i+=a.move(">"),r(),n.stack=t,i}const s=n.enter("link");let l=n.enter("label"),c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function pS(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function hS(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fS(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mS(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}function gS(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}oS.attention=function(e,t){return{construct:"emphasis",markers:"*"===iS(t)?["*","_"]:["_","*"],sizes:[1]}},oS.peek=function(e,t,n){return n.options.emphasis||"*"},aS.peek=function(){return"<"},sS.peek=function(){return"!"},lS.peek=function(){return"!"},cS.peek=function(){return"`"},dS.peek=function(e,t,n){return uS(e,n)?"<":"["},pS.peek=function(){return"["},gS.attention=function(e,t){return{construct:"strong",markers:"*"===mS(t)?["*","_"]:["_","*"],sizes:[2]}},gS.peek=function(e,t,n){return n.options.strong||"*"};var yS={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),Qx);return i(),a},break:tS,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,nS);return e(),t}const a=n.createTracker(r),s=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}(o,i)+1,3)),l=n.enter("codeFenced"),c="`"===i?"GraveAccent":"Tilde";let u=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${c}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${c}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(s),l(),u},definition:function(e,t,n,r){const i=rS(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),a(),c},emphasis:oS,hardBreak:tS,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Ik(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),Boolean((!e.depth||e.depth<3)&&av(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});const u=c.charCodeAt(0);return 9!==u&&32!==u||(c=function(e){return"&#x"+e.toString(16).toUpperCase()+";"}(u)+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:aS,image:sS,imageReference:lS,inlineCode:cS,link:dS,linkReference:pS,list:function(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):hS(n);const s=e.ordered?"."===a?")":".":function(e){const t=hS(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),fS(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||hS(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?o:o+" ".repeat(a-o.length))+e});return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a},root:function(e,t,n,r){if(!e.children.some(function(e){return Xx(e)}))return n.containerFlow(e,r);const i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),o},strong:gS,text:function(e,t,n,r){const i=t?t.children:[],o=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})},thematicBreak:function(e,t,n){const r=(fS(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function bS(e){const t=e._align;
|
|
69
|
+
/* @__PURE__ */this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function vS(e){this.exit(e),this.data.inTable=void 0}function wS(e){this.enter({type:"tableRow",children:[]},e)}function kS(e){this.exit(e)}function xS(e){this.enter({type:"tableCell",children:[]},e)}function SS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,TS));const n=this.stack[this.stack.length-1];
|
|
70
|
+
/* @__PURE__ */n.type,n.value=t,this.exit(e)}function TS(e,t){return"|"===t?t:e}function CS(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=yS.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<r.length;)o[i]=l(r[i],t,n);return a(),o}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const i=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Kx,o=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const a=Jx(e[u][o]);if(!1!==n.alignDelimiters){const e=i(a);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)o[d]=Yx(r[d]);else{const e=Yx(r);for(;++d<c;)o[d]=e}d=-1;const p=[],h=[];for(;++d<c;){const e=o[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>l[d]&&(l[d]=i),h[d]=i),p[d]=a}a.splice(1,0,p),s.splice(1,0,h),u=-1;const f=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const i=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}f.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return f.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<r.length;)o[i]=a(r[i],0,t,n);return s(),o}}function ES(e){const t=this.stack[this.stack.length-2];
|
|
71
|
+
/* @__PURE__ */t.type,t.checked="taskListCheckValueChecked"===e.type}function AS(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];
|
|
72
|
+
/* @__PURE__ */e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function IS(e,t,n,r){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=yS.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}for(var MS={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},OS={tokenize:function(e,t,n){let r,i,o;return a;function a(t){return 46===t||95===t?e.check(_S,l,s)(t):null===t||Cv(t)||Iv(t)||45!==t&&Av(t)?l(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},NS={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(_S,t,o)(a):null===a||Cv(a)||Iv(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},_S={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||Cv(a)||Iv(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||Cv(e)||Iv(e)?t(e):r(e)}function o(e){return yv(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):yv(t)?(e.consume(t),a):n(t)}},partial:!0},PS={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return bv(e)?n(e):t(e)}},partial:!0},LS={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!$S.call(r,r.previous)||US(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(MS,e.attempt(OS,e.attempt(NS,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:$S},DS={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",o=!1;return function(t){return 72!==t&&104!==t||!FS.call(r,r.previous)||US(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a)};function a(t){if(yv(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||wv(t)||Cv(t)||Iv(t)||Av(t)?n(t):e.attempt(OS,e.attempt(NS,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:FS},zS={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,o;return function(t){return BS(t)&&qS.call(r,r.previous)&&!US(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):n(t)};function a(t){return BS(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(PS,c,l)(t):45===t||95===t||bv(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(a){return o&&i&&yv(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:qS},RS={},jS=48;jS<123;)RS[jS]=zS,58===++jS?jS=65:91===jS&&(jS=97);function $S(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Cv(e)}function FS(e){return!yv(e)}function qS(e){return!(47===e||BS(e))}function BS(e){return 43===e||45===e||46===e||95===e||bv(e)}function US(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}RS[43]=zS,RS[45]=zS,RS[46]=zS,RS[95]=zS,RS[72]=[zS,DS],RS[104]=[zS,DS],RS[87]=[zS,LS],RS[119]=[zS,LS];var HS={tokenize:function(e,t,n){const r=this;return Nv(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function WS(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return n(i);const s=gv(r.sliceSerialize({start:a.end,end:r.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function VS(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function GS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!o||null===s||91===s||Cv(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(gv(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Cv(s)||(o=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function KS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||Cv(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=gv(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Cv(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),Nv(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function JS(e,t,n){return e.check(Uv,t,e.attempt(HS,t,n))}function YS(e){e.exit("gfmFootnoteDefinition")}function XS(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,o=this.events;let a=0;return function(t){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),s(t))};function s(o){const l=jv(i);if(126===o)return a>1?r(o):(e.consume(o),a++,s);if(a<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=jv(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&cv(a,a.length,0,$v(s,e.slice(r+1,n),t)),cv(a,a.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),cv(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}var QS=class{constructor(){this.map=[],this.index=/* @__PURE__ */new Map}add(e,t,n){!function(e,t,n,r){if(0===n&&0===r.length)return;const i=e.index.get(t);if(i)return i[1]+=n,void i[2].push(...r);const o=[t,n,r];e.map.push(o),e.index.set(t,o)}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ZS(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function eT(e,t,n){const r=this;let i,o=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const{type:e}=r.events[t][1];if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?w:s;return o===w&&r.parser.lazy[r.now().line]?n(e):o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,a+=1),l(e)}(t)}function l(t){return null===t?n(t):Tv(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Ev(t)?Nv(e,l,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Cv(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Ev(t)?Nv(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?f(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):v(t)}function h(t){return Ev(t)?Nv(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||Tv(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Ev(t)?Nv(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||Tv(n))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||Tv(n)?(e.exit("tableRow"),t(n)):Ev(n)?Nv(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Cv(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function tT(e,t){let n,r,i,o=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new QS;for(;++o<e.length;){const h=e[o],f=h[1];"enter"===h[0]?"tableHead"===f.type?(u=!1,0!==d&&(rT(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(a=!0,i=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===f.type?2:r?3:1):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],i=nT(p,t,l,s,void 0,i)),l=c,c=[l[1],o,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=nT(p,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=o)):"tableHead"===f.type?(u=!0,d=o):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=o,0!==l[1]?(c[0]=c[1],i=nT(p,t,l,s,o,i)):0!==c[1]&&(i=nT(p,t,c,s,o,i)),s=0):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=o)}for(0!==d&&rT(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=ZS(t.events,o))}return e}function nT(e,t,n,r,i,o){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},iT(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=iT(t.events,n[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const i=iT(t.events,n[2]),o=iT(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},iT(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function rT(e,t,n,r,i){const o=[],a=iT(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function iT(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var oT={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return Cv(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return Tv(r)?t(r):Ev(r)?e.check({tokenize:aT},t,n)(r):n(r)}}};function aT(e,t,n){return Nv(e,function(e){return null===e?n(e):t(e)},"whitespace")}var sT={},lT={},cT=[function(e){const t=e||sT,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return pv([{text:RS},{document:{91:{name:"gfmFootnoteDefinition",tokenize:KS,continuation:{tokenize:JS},exit:YS}},text:{91:{name:"gfmFootnoteCall",tokenize:GS},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WS,resolveTo:VS}}},XS(e),{flow:{null:{name:"table",tokenize:eT,resolveAll:tT}}},{text:{91:oT}}])}(t)),i.push([{transforms:[Ix],enter:{literalAutolink:xx,literalAutolinkEmail:Sx,literalAutolinkHttp:Sx,literalAutolinkWww:Sx},exit:{literalAutolink:Ax,literalAutolinkEmail:Ex,literalAutolinkHttp:Tx,literalAutolinkWww:Cx}},{enter:{gfmFootnoteCallString:_x,gfmFootnoteCall:Px,gfmFootnoteDefinitionLabelString:Lx,gfmFootnoteDefinition:Dx},exit:{gfmFootnoteCallString:zx,gfmFootnoteCall:Rx,gfmFootnoteDefinitionLabelString:jx,gfmFootnoteDefinition:$x}},{canContainEols:["delete"],enter:{strikethrough:Wx},exit:{strikethrough:Vx}},{enter:{table:bS,tableData:xS,tableHeader:xS,tableRow:wS},exit:{codeText:SS,table:vS,tableData:kS,tableHeader:kS,tableRow:kS}},{exit:{taskListCheckValueChecked:ES,taskListCheckValueUnchecked:ES,paragraph:AS}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wx,notInConstruct:kx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wx,notInConstruct:kx},{character:":",before:"[ps]",after:"\\/",inConstruct:wx,notInConstruct:kx}]},qx(e),{handlers:{delete:Gx},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hx}]},CS(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:IS}}]}}(t))}],uT=/* @__PURE__ */"heading.heading1.heading2.heading3.heading4.heading5.heading6.paragraph.link.strong.emphasis.list.listItem.quote.divider.code.codeBlock.codeBlockFrame.codeBlockHeader.codeBlockLanguage.codeBlockCopy.image.table.tableHead.tableRow.tableHeaderCell.tableCell.anchor".split("."),dT=({className:e,children:t="",wrapLines:n=!0,showLineNumbers:r=!0,headingAnchor:i,headingLinks:o=!0,classNames:a=lT})=>{let s=k(()=>i?[Sb(i)]:[],[i]),l=k(()=>(e=>{let{classNames:t,wrapLines:n,showLineNumbers:r}=e;return{h1:kb("h1",e),h2:kb("h2",e),h3:kb("h3",e),h4:kb("h4",e),h5:kb("h5",e),h6:kb("h6",e),p:wb("p",t.paragraph),a:wb("a",t.link),strong:wb("strong",t.strong),em:wb("em",t.emphasis),ul:wb("ul",t.list),ol:wb("ol",t.list),li:wb("li",t.listItem),blockquote:wb("blockquote",t.quote),hr:wb("hr",t.divider),img:wb("img",t.image),table:wb("table",t.table),thead:wb("thead",t.tableHead),tr:wb("tr",t.tableRow),th:wb("th",t.tableHeaderCell),td:wb("td",t.tableCell),pre:({children:e,node:n,className:r,...i})=>{let o=/* @__PURE__ */I("pre",{...i,className:U(r,t.codeBlock)||void 0,children:e}),a=n?.children.find(e=>"element"===e.type&&"code"===e.tagName);if(!a||"element"!==a.type)return o;let s=a.properties.className,l=Array.isArray(s)?s.map(String).map(e=>vb.exec(e)?.[1]).find(Boolean):void 0;/* @__PURE__ */
|
|
73
|
+
return I(gb,{language:l,code:Mg(a).replace(/\n$/,""),classNames:t,children:o})},code:({children:e,className:i,...o})=>{let a=fr(o,["node"]),s=vb.exec(i||"");return s?/* @__PURE__ */I(mb,{PreTag:"div",language:s[1],style:yb,wrapLines:n,showLineNumbers:r,children:"string"==typeof e?e.replace(/\n$/,""):""}):/* @__PURE__ */I("code",{...a,className:U(i,t.code)||void 0,children:e})}}})({classNames:a,headingLinks:o,wrapLines:n,showLineNumbers:r}),[a,o,n,r]);/* @__PURE__ */
|
|
74
|
+
return I("div",{className:U("markdown",e),children:/* @__PURE__ */I(mx,{remarkPlugins:cT,rehypePlugins:s,components:l,children:t})})},pT=e=>{let t={};for(let n of uT){let r=e[n];r&&(t[n]=r)}return Bl(t)},hT=Cd(({ref:e,content:t="Markdown",className:n="",headingLinks:r=!0})=>{let{settings:{previewMode:i}}=dc(),{definition:{styleSelectors:o}}=Ed(),a=pT(o);/* @__PURE__ */
|
|
75
|
+
return I(cp,{ref:e,className:U("plitzi-component__markdown",{"plitzi-component__markdown--edit-mode":!i},n),children:/* @__PURE__ */I(dT,{headingAnchor:Nc,headingLinks:r,classNames:a,children:t})})}),fT=Object.assign(hT,{type:"markdown",content:{attributes:{content:"Markdown",headingLinks:!0},definition:{label:"Markdown",type:"markdown",description:"Renders a Markdown source string (GitHub-flavoured) as HTML, inside a `div.markdown`. Each part of it takes a class through the slot named for it: `heading` (every `h1`–`h6`) and `heading1`…`heading6` (that level only, beside it — a property goes on one of the two, never both), `paragraph`, `link`, `strong`, `emphasis` (`em`), `list` (`ul`/`ol`), `listItem`, `quote` (`blockquote`), `divider` (`hr`), `code` (inline), `image`, `table`, `tableHead` (`thead`), `tableRow`, `tableHeaderCell` (`th`) and `tableCell` (`td`). A fenced block is `codeBlock` (its `pre`) in `codeBlockFrame`, under `codeBlockHeader`, which holds `codeBlockLanguage` and the `codeBlockCopy` button. Every heading carries an id made of its words, which `/page#its-words` lands on, and starts with an empty link to itself — `a.anchor > span.octicon-link`, the `anchor` slot; `headingLinks: false` leaves the link out and keeps the id. Unstyled, it reads as a document — headings, lists, code, tables — from the base layer of the SDK, which a class on the slot of a part replaces property by property.",bindings:{},styleSelectors:{base:"",heading:"",heading1:"",heading2:"",heading3:"",heading4:"",heading5:"",heading6:"",paragraph:"",link:"",strong:"",emphasis:"",list:"",listItem:"",quote:"",divider:"",code:"",codeBlock:"",codeBlockFrame:"",codeBlockHeader:"",codeBlockLanguage:"",codeBlockCopy:"",image:"",table:"",tableHead:"",tableRow:"",tableHeaderCell:"",tableCell:"",anchor:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-markdown"},defaultStyle:{name:"Markdown",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),mT=Cd(({ref:e,content:t="Paragraph",className:n=""})=>{let{id:r}=Ed(),{settings:{previewMode:i},contexts:{BuilderContext:o}}=dc(),a=o?h(o):void 0,s=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Paragraph",[t,i]),l=f(e=>a?.updateElement(r,"content",e),[a,r]);/* @__PURE__ */
|
|
76
|
+
return M(cp,{ref:e,tag:i?"p":"div",className:U("plitzi-component__paragraph",n),children:[i&&s,!i&&/* @__PURE__ */I(ch,{className:"",value:s,onChange:l,openMode:"doubleClick"})]})}),gT=Object.assign(mT,{type:"paragraph",content:{attributes:{content:"Paragraph"},definition:{label:"Paragraph",type:"paragraph",description:"A block of body text (a <p>). Use for longer prose passages.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paragraph"},defaultStyle:{name:"Paragraph",displayMode:"desktop",style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}},settings:{}}}),yT={h1:["heading","heading1"],h2:["heading","heading2"],h3:["heading","heading3"],h4:["heading","heading4"],h5:["heading","heading5"],h6:["heading","heading6"],p:["paragraph"],a:["link"],strong:["strong"],b:["strong"],em:["emphasis"],i:["emphasis"],ul:["list"],ol:["list"],li:["listItem"],blockquote:["quote"],hr:["divider"],code:["code"],pre:["codeBlock"],img:["image"],table:["table"],thead:["tableHead"],tr:["tableRow"],th:["tableHeaderCell"],td:["tableCell"]},bT=/<(\/?)([a-zA-Z][a-zA-Z0-9]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g,vT=/\sclass\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+)/i,wT=/^["']|["']$/g,kT=/\s*\/$/,xT=/<\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>/gi,ST=/<\s*\/?\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>/gi,TT=/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,CT=/\s(href|src|xlink:href)\s*=\s*(?:"\s*(?:javascript|data|vbscript)\s*:[^"]*"|'\s*(?:javascript|data|vbscript)\s*:[^']*'|(?:javascript|data|vbscript)\s*:[^\s>]*)/gi,ET=e=>e.replace(xT,"").replace(ST,"").replace(TT,"").replace(CT,""),AT=Cd(({ref:e,className:t="",content:n="",format:r="html",mediaBaseUrl:i=""})=>{let{settings:{previewMode:o}}=dc(),{definition:{styleSelectors:a}}=Ed(),s=pT(a),l=k(()=>"html"===r?((e,t)=>{if(!Object.values(t).some(Boolean))return e;let n=0;return e.replace(bT,(e,r,i,o)=>{let a=i.toLowerCase();if("pre"===a&&(n=Math.max(n+(r?-1:1),0)),r||"code"===a&&n>0)return e;let s=U((yT[a]??[]).map(e=>t[e]));return s?`<${i}${((e,t)=>{let n=vT.exec(e);if(n){let r=n[1].replace(wT,"");return e.replace(vT,` class="${U(r,t)}"`)}let r=kT.exec(e)?.[0]??"";return`${e.slice(0,e.length-r.length)} class="${t}"${r}`})(o,s)}>`:e})})(((e,t)=>{if(!t)return e;let n=t.replace(/\/+$/,"");return e.replace(/\s(src|href)\s*=\s*"(\/(?!\/)[^"]*)"/gi,(e,t,r)=>` ${t}="${n}${r}"`)})(ET(n),i),s):"",[r,n,i,s]);/* @__PURE__ */
|
|
77
|
+
return M(cp,{ref:e,className:U("plitzi-component__rich-text",{"plitzi-component__rich-text--edit-mode":!o},t),children:["html"===r&&/* @__PURE__ */I("div",{dangerouslySetInnerHTML:{__html:l}}),"markdown"===r&&/* @__PURE__ */I(dT,{classNames:s,children:n}),"text"===r&&/* @__PURE__ */I("div",{className:"plitzi-component__rich-text-plain",children:n})]})}),IT=Object.assign(AT,{type:"richText",attributeValues:{format:["html","markdown","text"]},content:{attributes:{content:"",format:"html",mediaBaseUrl:""},definition:{label:"Rich Text",type:"richText",description:"Renders a body field coming from a CMS — HTML, markdown or plain text. Scripts and event handlers are stripped before rendering, so third-party content cannot execute. The parts of an HTML or markdown body take a class through the slots a `markdown` has, by the same names: `heading` and `heading1`…`heading6` (a property on one of the two, never both), `paragraph`, `link`, `strong` (`strong`/`b`), `emphasis` (`em`/`i`), `list`, `listItem`, `quote`, `divider`, `code` (inline), `codeBlock` (`pre`), `image`, `table`, `tableHead`, `tableRow`, `tableHeaderCell`, `tableCell`; the fenced block of a markdown body also sits in `codeBlockFrame`, under `codeBlockHeader` with `codeBlockLanguage` and `codeBlockCopy`. Unstyled, a body reads as a document from the base layer of the SDK, which a class on the slot of a part replaces property by property.",items:[],bindings:{},styleSelectors:{base:"",heading:"",heading1:"",heading2:"",heading3:"",heading4:"",heading5:"",heading6:"",paragraph:"",link:"",strong:"",emphasis:"",list:"",listItem:"",quote:"",divider:"",code:"",codeBlock:"",codeBlockFrame:"",codeBlockHeader:"",codeBlockLanguage:"",codeBlockCopy:"",image:"",table:"",tableHead:"",tableRow:"",tableHeaderCell:"",tableCell:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-file-lines"},defaultStyle:{name:"Rich Text",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),MT=Cd(({ref:e,content:t="Text",className:n="",title:r="",decorative:i=!1})=>{let{id:o}=Ed(),{settings:{previewMode:a},contexts:{BuilderContext:s}}=dc(),l=s?h(s):void 0,c=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||a?"number"==typeof t?`${t}`:t:"Text",[t,a]),u=f(e=>l?.updateElement(o,"content",e),[l,o]);/* @__PURE__ */
|
|
78
|
+
return M(cp,{ref:e,className:U("plitzi-component__text",n),title:r||void 0,...i?{"aria-hidden":!0}:{},children:[a&&c,!a&&/* @__PURE__ */I(ch,{className:"focus-visible:outline-hidden",value:c,onChange:u,openMode:"doubleClick"})]})}),OT=Object.assign(MT,{type:"text",content:{attributes:{content:"Text"},definition:{label:"Text",type:"text",description:"Inline plain-text content. Use for short runs of copy; bind its content to data for dynamic text.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Text",displayMode:"desktop",style:{base:{default:{display:"inline"}}}},settings:{}}}),NT={"margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","padding-left":"0px",display:"inline-flex","align-items":"center","background-color":"transparent",color:"inherit","font-family":"inherit","font-size":"inherit","font-style":"inherit","font-weight":"inherit","line-height":"inherit","letter-spacing":"inherit",cursor:"pointer"},_T={type:"themeToggle",attributeValues:{subType:["switch","segmented"]},triggers:{onThemeChange:{action:"onThemeChange",title:"On Theme Change",type:"trigger",params:{},preview:{theme:"dark"}}},content:{attributes:{subType:"switch",lightLabel:"Light",darkLabel:"Dark",systemLabel:"System",showSystem:!1},definition:{label:"Theme Toggle",type:"themeToggle",description:"Lets a visitor choose light or dark. It writes the choice on the document root, where a space stylesheet is already looking for it, and remembers it — so the machine decides until somebody says otherwise. It ships no colours of its own: its buttons carry no browser look and take the colour and type around them — style them with the space own classes. A `segmented` one marks the chosen option with `aria-pressed`, which is the `current` state of its `option` slot. It shows the icon of the scheme in use by default; key a rule off `data-theme-icon` to change that. A `switch` marks the icon of the scheme in use — the one chosen, or the machine one while none is — with `aria-current`, the `current` state of its `icon` slot.",items:[],bindings:{},styleSelectors:{base:"",icon:"",option:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-circle-half-stroke"},defaultStyle:{name:"Theme Toggle",displayMode:"desktop",style:{base:{default:NT},icon:{default:{}},option:{default:{...NT,"row-gap":"4px","column-gap":"4px"}}},subTypes:{}},settings:{}}},PT=()=>()=>{},LT=()=>!0,DT=()=>!1,zT=()=>/* @__PURE__ */M("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[/* @__PURE__ */I("circle",{cx:"12",cy:"12",r:"4.2"}),/* @__PURE__ */I("path",{strokeLinecap:"round",d:"M12 2.6v2.2M12 19.2v2.2M4.2 12H2M22 12h-2.2M6.3 6.3 4.8 4.8M19.2 19.2l-1.5-1.5M17.7 6.3l1.5-1.5M4.8 19.2l1.5-1.5"})]}),RT=()=>/* @__PURE__ */I("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:/* @__PURE__ */I("path",{strokeLinejoin:"round",d:"M20.5 14.3A8.6 8.6 0 0 1 9.7 3.5a8.6 8.6 0 1 0 10.8 10.8Z"})}),jT=Cd(({ref:e,className:t="",subType:n="switch",lightLabel:r="Light",darkLabel:i="Dark",systemLabel:o="System",showSystem:a=!1})=>{let{theme:s,resolvedTheme:l,setTheme:c,toggleTheme:u}=ru(),{id:d,definition:{styleSelectors:p}}=Ed(),{settings:{previewMode:m},contexts:{InteractionsContext:y}}=dc(),{interactionsManager:b}=h(y),v=T(PT,LT,DT),w=f(e=>t=>{t.preventDefault(),m&&c(e)},[m,c]),S=f(e=>{e.preventDefault(),m&&u()},[m,u]),C=k(()=>[...a?[{value:"system",label:o,icon:null}]:[],{value:"light",label:r,icon:/* @__PURE__ */I(zT,{})},{value:"dark",label:i,icon:/* @__PURE__ */I(RT,{})}],[a,o,r,i]),E=x(null);return g(()=>{let e=E.current;E.current=s,null!==e&&e!==s&&b.interactionTrigger(d,"onThemeChange",{theme:s})},[s,b,d]),"segmented"===n?/* @__PURE__ */I(cp,{ref:e,tag:"div",role:"group","aria-label":`${r} / ${i}`,className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--segmented",t),interactionTriggers:_T.triggers,children:C.map(e=>/* @__PURE__ */M("button",{type:"button",className:U("plitzi-component__theme-toggle-option",p.option),"data-active":v&&s===e.value?"true":void 0,"aria-pressed":v?s===e.value:void 0,"data-theme-option":e.value,onClick:w(e.value),children:[e.icon,/* @__PURE__ */I("span",{children:e.label})]},e.value))}):/* @__PURE__ */M(cp,{ref:e,tag:"button",className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--switch",t),interactionTriggers:_T.triggers,type:"button",onClick:S,"aria-label":`${r} / ${i}`,title:`${r} / ${i}`,children:[/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",p.icon),"data-theme-icon":"light","aria-current":v&&"light"===l?"true":void 0,children:/* @__PURE__ */I(zT,{})}),/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",p.icon),"data-theme-icon":"dark","aria-current":v&&"dark"===l?"true":void 0,children:/* @__PURE__ */I(RT,{})})]})}),$T=Object.assign(jT,_T),FT={type:"form",attributeValues:{method:["get","post"]},sourceType:"apiContainer",triggers:{onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:{},actionUrl:"",method:""}}},callbacks:{performReset:{action:"performReset",title:"Reset Form",type:"callback",params:{}},setFieldValue:{action:"setFieldValue",title:"Set Field Value",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},value:{type:"text",defaultValue:""}}},setFieldError:{action:"setFieldError",title:"Set Field Error",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},error:{type:"text",defaultValue:""}}}},content:{attributes:{method:"get",actionUrl:"",managedByInteractions:!1,noValidate:!1,errors:{},values:{}},definition:{label:"Form",type:"form",description:"A <form> that groups form controls and handles submission; wire its submit through an interaction flow.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-rectangle-list"},defaultStyle:{name:"Form",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}},qT=Cd(({ref:e,className:t="",children:n,method:r="get",actionUrl:i="",managedByInteractions:o=!1,noValidate:a=!1,errors:s=qr,values:l=qr})=>{let[c,u]=S({}),d=x(/* @__PURE__ */new Map),p=x(!1),{id:m,definition:{label:y="Form"},setElementState:b}=Ed(),v=Fl(FT.sourceType,m),{settings:{previewMode:w},contexts:{InteractionsContext:T}}=dc(),{interactionsManager:C}=h(T),E=f(e=>u(t=>({...t,[e.name]:e})),[u]);g(()=>(p.current=!1,()=>{p.current=!0}),[]);let A=f(e=>{p.current||(u(t=>$l(t,t=>{t[e]&&delete t[e]})),e&&b(t=>({...t,values:fr(t,`values.${e}`),errors:fr(t,`errors.${e}`)})))},[b]),M=f((e,t)=>{d.current.set(e,t)},[]),O=f(e=>{d.current.delete(e)},[]),N=f((e,t="")=>{e&&(null===t&&(t=""),b(n=>n.errors&&n.errors[e]?{...n,values:{...n.values,[e]:t},errors:fr(n.errors,[e])}:{...n,values:{...n.values,[e]:t}}))},[b]),_=f((e,t)=>{e&&b(n=>t||sr(n,`errors.${e}`)?!t&&n.errors&&n.errors[e]?{...n,errors:fr(n,[`errors.${e}`])}:{...n,errors:{...n.errors,[e]:t}}:n)},[b]),P=f(()=>Object.values(c).filter(e=>!!e.name).reduce((e,t)=>[...e,{path:`fields.${t.name}.id`,name:`${t.name} ID`},{path:`values.${t.name}`,name:`${t.name} Value`},{path:`errors.${t.name}`,name:`${t.name} Error Message`}],[]),[c]),L=k(()=>({runtime:{sources:{form:{errors:s,values:l,registerField:E,unregisterField:A,registerValidator:M,unregisterValidator:O,setFieldValue:N,setFieldError:_},[v]:{values:l,errors:s}}}}),[v,s,l,E,A,M,O,N,_]);ql({id:m,source:v,name:y||`Form - ${m}`,fields:P});let D=k(()=>({onSubmit:{...FT.triggers.onSubmit,preview:{...FT.triggers.onSubmit.preview,values:Object.values(c).reduce((e,t)=>({...e,[t.name]:""}),{})}}}),[c]),z=f(e=>{let t=[...d.current].reduce((e,[t,n])=>{let r=n(l);return r?{...e,[t]:r}:e},{});if(b(e=>({...e,errors:t})),Object.keys(t).length>0)return e.stopPropagation(),void e.preventDefault();if(!o||(e.stopPropagation(),e.preventDefault(),!w))return;let n=Object.values(c).reduce((e,{name:t})=>({...e,[t]:l[t]}),{});C.interactionTrigger(m,"onSubmit",{values:n,actionUrl:i,method:r})},[b,o,w,c,C,m,i,r,l]),R=f(e=>{o&&(e instanceof Event&&(e.stopPropagation(),e.preventDefault()),b(e=>({...e,values:{},errors:{}})))},[b,o]),j=f(e=>{let{name:t,value:n}=e;N(t,n)},[N]),$=f(e=>{let{name:t,error:n}=e;_(t,n)},[_]),F=k(()=>{let{performReset:e,setFieldValue:t,setFieldError:n}=FT.callbacks,r=Object.values(c).map(e=>({value:e.name,label:e.name}));return{performReset:{...e,title:`Reset ${y}`,callback:R},setFieldValue:{...t,title:`Set Field Value ${y}`,callback:j,params:{...t.params,name:{...t.params.name,options:r}}},setFieldError:{...n,title:`Set Field Error ${y}`,callback:$,params:{...n.params,name:{...n.params.name,options:r}}}}},[y,R,j,c,$]);/* @__PURE__ */
|
|
79
|
+
return I(cp,{tag:"form",ref:e,noValidate:a,method:r,className:U("plitzi-component__form",t),interactionTriggers:D,interactionCallbacks:F,onSubmit:z,onReset:R,action:i,children:/* @__PURE__ */I(Et,{inherit:"live",name:`Form:${m}`,value:L,children:n})})}),BT=e=>/* @__PURE__ */M("svg",{...e,viewBox:"0 0 19 18",fill:"none",children:[
|
|
80
80
|
/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 12.5C0.447715 12.5 0 12.9477 0 13.5V16.5C0 17.0523 0.447715 17.5 1 17.5H18C18.5523 17.5 19 17.0523 19 16.5V13.5C19 12.9477 18.5523 12.5 18 12.5H1ZM17 14.5H2V15.5H17V14.5Z",fill:"currentColor"}),
|
|
81
81
|
/* @__PURE__ */I("path",{d:"M0 10.5C0 9.94772 0.447715 9.5 1 9.5H11C11.5523 9.5 12 9.94772 12 10.5C12 11.0523 11.5523 11.5 11 11.5H1C0.447715 11.5 0 11.0523 0 10.5Z",fill:"currentColor"}),
|
|
82
82
|
/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 3.5C0.447715 3.5 0 3.94772 0 4.5V7.5C0 8.05228 0.447715 8.5 1 8.5H18C18.5523 8.5 19 8.05228 19 7.5V4.5C19 3.94772 18.5523 3.5 18 3.5H1ZM17 5.5H2V6.5H17V5.5Z",fill:"currentColor"}),
|
|
83
|
-
/* @__PURE__ */I("path",{d:"M0 1.5C0 0.947715 0.447715 0.5 1 0.5H11C11.5523 0.5 12 0.947715 12 1.5C12 2.05228 11.5523 2.5 11 2.5H1C0.447715 2.5 0 2.05228 0 1.5Z",fill:"currentColor"})]}),
|
|
84
|
-
return M("label",i?{ref:e,className:U(`form-control__label-${r}`,s),htmlFor:n,style:a?
|
|
85
|
-
return I("input",{className:U(`form-control__${t}-container`,e),id:n,role:"switch"===t?"switch":void 0,"aria-invalid":!!c||void 0,"aria-describedby":c,name:r,type:"checkbox",value:"true",checked:i,required:o,disabled:a,onChange:s,onBlur:u})},
|
|
86
|
-
return M("div",{className:U("form-control__input-container",e),onClick:T,children:[/* @__PURE__ */I("input",{ref:w,className:U("input-container__input",t),id:r,"aria-invalid":!!y||void 0,"aria-describedby":y,name:i,type:"password"===s&&b?"text":s,placeholder:o,value:a,required:u,maxLength:d>0?d:void 0,autoComplete:l?"on":"off",disabled:p,readOnly:h,onChange:m,onBlur:C}),"password"===s&&/* @__PURE__ */I("button",{type:"button",className:U("form-input__icon",n),"aria-pressed":b,title:"Show password",onClick:k,children:/* @__PURE__ */I("i",{className:b?"fa-solid fa-eye-slash":"fa-solid fa-eye","aria-hidden":"true"})})]})},
|
|
87
|
-
return I("div",{className:U("form-control__select-container",o),onClick:p,children:/* @__PURE__ */M("select",{ref:d,id:e,"aria-invalid":!!u||void 0,"aria-describedby":u,name:t,onChange:l,value:i,className:U("select-container__select",a),disabled:s,onClick:h,onBlur:m,children:[r&&/* @__PURE__ */I("option",{value:"",children:r}),g.map((e,t)=>/* @__PURE__ */I("option",{value:e.value,children:e.label},t))]})})},
|
|
88
|
-
return I("textarea",{ref:h,className:U("form-control__textarea-container",e),id:t,"aria-invalid":!!p||void 0,"aria-describedby":p,name:n,placeholder:r,value:i,readOnly:c,required:a,maxLength:s>0?s:void 0,disabled:l,onChange:u,onBlur:g,onClick:m})},
|
|
89
|
-
return I(
|
|
90
|
-
/* @__PURE__ */I("b",{children:n})," Not Found"]}),!n&&"Component Not Found"]})})},
|
|
91
|
-
return I(
|
|
92
|
-
return I(
|
|
93
|
-
return I(sp,s?{tag:"video",draggable:!1,ref:e,className:U("plitzi-component__video",a),src:t,autoPlay:n,playsInline:r,loop:i,muted:o}:{ref:e,className:U("plitzi-component__video video--edit-mode",a),children:/* @__PURE__ */I("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:o,children:/* @__PURE__ */I("track",{kind:"captions"})})})}),YC=Object.assign(JC,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Embeds a video from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),XC={type:"apiContainer",attributeValues:{subType:["","div","header","footer","nav","main","section","article","aside","address","figure"],method:["get","post","put","delete","patch"],credentials:["include","omit","same-origin"],pagination:["none","url","append"]},sourceType:"apiContainer",triggers:{onApiError:{action:"onApiError",title:"On Api Error",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}},onApiSuccess:{action:"onApiSuccess",title:"On Api Success",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}}},callbacks:{performQuery:{action:"performQuery",title:"Perform Query",type:"callback",preview:{},params:{input:{label:"Input (server providers)",type:"codemirror-json",defaultValue:"{}",description:"Values handed to a server-driven provider with its request, beside the page’s own route and query params — a search, a filter. Kept for the pages it loads after (`loadMore`, `goToPage`) until the next query."}}},cancelQuery:{action:"cancelQuery",title:"Cancel Query",type:"callback",preview:{},params:{}},loadMore:{action:"loadMore",title:"Load More",type:"callback",preview:{},params:{}},goToPage:{action:"goToPage",title:"Go To Page",type:"callback",preview:{},params:{page:{label:"Page",defaultValue:"1",type:"text"}}},writeRecord:{action:"writeRecord",title:"Write Record",type:"callback",preview:{action:"create"},params:{action:{label:"Endpoint",defaultValue:"create",type:"text"},recordId:{label:"Record Id",defaultValue:"",type:"text"}}}},content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"",credentials:"same-origin",connector:"",resource:"",limit:"10",singleRecord:!1,filters:[],pagination:"none",pageParam:"page",renderWhileLoading:!1,cache:!1,staleTime:30,gcTime:300},definition:{label:"Api Container",type:"apiContainer",description:'Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: "div"`, `section`, …); otherwise style its parent or a child.',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},QC=()=>{let{id:e,rootId:t}=Td(),[[n=!1,r=!1,i=!1,o,a,s,l,c]]=_t(["rsc.enabled","rsc.loaded","rsc.stale","rsc.location",hu(e),"navigation.currentPageId","schema.pages","rsc.refreshing"]),u=xu(),d=Nt(),p=f(()=>((e,t)=>{vu(e).inFlight.forEach(e=>{(!t||e.ids?.some(e=>t.includes(e)))&&e.controller.abort()})})(d,[e]),[d,e]),h=void 0!==o&&o!==fu()||void 0!==t&&t!==s&&Array.isArray(l)&&l.includes(t),m=x(void 0);!h&&void 0!==a&&(m.current=a);let g=h&&void 0!==m.current?m.current:a;return{enabled:n,loaded:r,stale:i,location:o,elementData:g??null,isServerElement:void 0!==g,refreshing:!0===c?.[e]||!0===c?.["*"],refresh:u,cancel:p}},ZC=(e,t,n)=>n?void 0===e.record:Array.isArray(e.records)?0===t.length:(e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e.data),eE=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t||"{}")}catch{return}if("object"==typeof t&&t&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).flatMap(([e,t])=>"string"==typeof t||"number"==typeof t||"boolean"==typeof t?[[e,String(t)]]:[]))},tE=3e5,nE=e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)},rE=e=>`entries.${nE(e)}`,iE=new class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=We({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(rE(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(rE(e))}usage(e){let t=this.runtimes.get(nE(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(nE(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=tE){let n=this.ensure(e);return n.gcTime=t,n.holds++,this.cancelGc(n),()=>{n.holds--,this.scheduleGc(n)}}observe(e,t){let n=this.ensure(e),{isCacheable:r}=t,i={meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))};return n.observers.add(i),this.cancelGc(n),(!this.hasAnswer(e)||this.store.isStale(rE(e)))&&this.fetch(n,i),()=>{n.observers.delete(i),this.scheduleGc(n)}}async fetchQuery(e,t){let n=this.ensure(e);if(void 0!==t.gcTime&&(n.gcTime=t.gcTime),this.hasAnswer(e)&&!this.store.isStale(rE(e)))return this.scheduleGc(n),this.getEntry(e)?.data;let{isCacheable:r}=t;await this.fetch(n,{meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))});let i=this.getEntry(e)?.data;return this.scheduleGc(n),i}cancel(e){let t=this.runtimes.get(nE(e));if(!t?.controller)return!1;t.controller.abort(),t.controller=void 0,t.inFlight=void 0;let n=rE(e);return this.getEntry(e)?this.store.setState(`${n}.isFetching`,!1):this.markUnasked(t),!0}refetch(e){let t=this.runtimes.get(nE(e));return t?this.invalidateOne(t):Promise.resolve()}invalidate(e){let t=[];return this.runtimes.forEach(n=>{let r=this.getEntry(n.key);!r||e&&!e({url:r.url,tags:r.tags})||t.push(this.invalidateOne(n))}),Promise.all(t).then(()=>{})}reset({refetch:e=!0}={}){if(this.epochValue++,this.runtimes.forEach(e=>{e.version++,e.inFlight=void 0,e.controller?.abort(),e.controller=void 0}),this.store.setState("entries",{}),!e)return this.runtimes.forEach(e=>this.markUnasked(e)),Promise.resolve();let t=[];return this.runtimes.forEach(e=>t.push(this.fetchActive(e))),Promise.all(t).then(()=>{})}markUnasked(e){let t=e.observers.values().next();if(t.done)return;let n={key:e.key,url:t.value.meta.url,tags:[...e.tags],isFetching:!1};this.store.setState(rE(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(rE(e.key)).length&&e.version++,this.fetchActive(e)}onExpired(e){let t=this.runtimes.get(e.slice(8).split(".")[0]);t&&(t.version++,this.fetchActive(t))}fetchActive(e){let t=e.observers.values().next();return t.done?Promise.resolve():this.fetch(e,t.value)}fetch(e,t){if(e.inFlight)return e.inFlight;let{key:n}=e,{url:r}=t.meta;t.meta.tags?.forEach(t=>e.tags.add(t));let i=[...e.tags],o=rE(n);this.getEntry(n)?this.store.setState(`${o}.isFetching`,!0):this.store.setState(o,{key:n,url:r,tags:i,isFetching:!0});let a=this.epochValue,s=e.version,l=new AbortController,c=c=>{if(a!==this.epochValue||this.runtimes.get(nE(n))!==e||e.controller!==l)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let u=s!==e.version;if("error"in c){let e=this.getEntry(n);this.store.setState(o,{key:n,url:r,tags:i,data:e?.data,error:c.error,isFetching:!1},{ttl:0})}else{let a=!u&&(t.isCacheable?.(c.data)??!0);this.store.setState(o,{key:n,url:r,tags:i,data:c.data,isFetching:!1},{ttl:a?this.ttlOf(e,t):0})}return u?this.fetchActive(e):Promise.resolve()};return e.controller=l,e.inFlight=t.fetcher(l.signal).then(e=>c({data:e}),e=>c({error:e})),e.inFlight}ttlOf(e,t){let n=e.observers.size>0?1/0:t.staleTime;return e.observers.forEach(e=>{n=Math.min(n,e.staleTime)}),n}ensure(e){let t=nE(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){if(!(e.holds>0||e.observers.size>0)){if(this.cancelGc(e),e.gcTime<=0)return void this.collect(e);e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)}}collect(e){let t=nE(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(rE(e.key),void 0,{unmount:!0}))}},oE=/* @__PURE__ */new Set,aE=e=>Promise.allSettled([...oE].filter(t=>!e||e(t)).map(e=>e.refresh())).then(()=>{}),{useStore:sE}=Ot(),lE=()=>typeof location>"u"?void 0:location.href,cE=e=>{try{return new URL(e,lE()).origin}catch{return}},uE=(e,t)=>({id:n,url:r})=>(!t||void 0!==r)&&e({url:r??"",tags:[n]}),dE=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim()):"string"==typeof e?e.split(",").map(e=>e.trim()).filter(Boolean):[],pE=e=>{try{return new URL(e,lE()).href}catch{return e}},hE=(e={})=>{let t=e.url||e.elements?.length?(({url:e,elements:t})=>{let n=e?pE(e):void 0;return e=>(void 0===n||pE(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))})(e):void 0;return Promise.all([iE.invalidate(t),aE(t&&uE(t,!!e.url))]).then(()=>{})},fE=({method:e,url:t,credentials:n,headers:r})=>JSON.stringify([e.toLowerCase(),t,n,Object.entries(r).filter(([e])=>"content-type"!==e.toLowerCase()).sort(([e],[t])=>e<t?-1:+(e>t))]),mE=({mode:e,fallback:t,elements:n,url:r})=>{let i="origin"===e||"all"===e||"elements"===e||"none"===e?e:t;if("none"===i)return Promise.resolve();if("elements"===i){let e=dE(n);return e.length>0?hE({elements:e}):Promise.resolve()}return"origin"===i&&r?(e=>{let t=cE(e);if(!t)return Promise.resolve();let n=e=>cE(e.url)===t;return Promise.all([iE.invalidate(n),aE(uE(n,!0))]).then(()=>{})})(r):hE()},gE=async(e,t,n,r,i,o=!1)=>{if(!e)return{status:400,data:"URL is required"};let a=new Headers(r);a.has("Accept")||a.set("Accept","application/json");let s={method:t,credentials:n,headers:a,signal:i};"get"!==t&&(s.body="{}",a.has("Content-Type")||a.set("Content-Type","application/json"));try{let a=await fetch(e,s),l=await a.json(),c=ti(a.status,l);return c&&await Zr({reason:c,url:e})&&!o&&!i.aborted?await gE(e,t,n,r,i,!0):{status:a.status,data:l}}catch(e){if(i.aborted)throw e;return console.error(e.message),{status:500,data:e.message}}},yE=e=>e.status<400,bE=(e,t)=>{let n="number"==typeof e?e:Number(e);return 1e3*(Number.isFinite(n)&&n>=0?n:t)},vE=e=>Ur(e).map(e=>({path:e,name:e.split(".").slice(-2).join(" ")})),wE=Sd(({ref:e,className:t="",children:r,query:i="",method:o="get",accessToken:a="",when:s=qr,headers:l=qr,mockData:c="{}",subType:d="",credentials:p="same-origin",singleRecord:m=!1,pagination:y="none",pageParam:v="page",renderWhileLoading:w=!1,loadingSlot:T="",cache:C=!1,staleTime:E=30,gcTime:A=300,refreshSeconds:M=0,connector:O="",action:N="",input:_})=>{let{id:P,visible:L,definition:{label:D="Api Container",runtime:z,items:R}}=Td(),j="server"===z,{loaded:$,stale:F,location:q,elementData:B,refreshing:H,refresh:W,cancel:V}=QC(),G=Fl(XC.sourceType,P),{settings:{previewMode:K},contexts:{InteractionsContext:J}}=uc(),{interactionsManager:Y}=h(J),[[X,Q,Z]]=zt(["navigation.routeParams","navigation.queryParams","navigation.navigate"]),ee=k(()=>a?{...l,Authorization:`Bearer ${a}`}:l,[l,a]),te=k(()=>!(j||!L||!(K&&i&&(s===qr||Po(s,{...X,...Q}))||!K&&(i||c&&"{}"!==c&&c!==qr))),[j,L,K,i,s,X,Q,c]),ne=k(()=>[P],[P]),{isLoading:re,isFetching:ie,data:oe,refetch:ae,cancel:se,isSuccess:le,isError:ce}=(({url:e="",method:t="get",mock:n,customHeaders:r=qr,enabled:i=!0,credentials:o="same-origin",cache:a=!1,staleTime:s=30,gcTime:l=300,tags:c})=>{let u=(e=>!!e&&"{}"!==e&&e!==qr)(n),d=b(),p=!u&&(!e||Zn(e)),h=k(()=>{if(u||p)return;let n=fE({method:t,url:e,credentials:o,headers:r});return a?n:`${n}#${d}`},[u,p,e,t,o,r,a,d]),m=f(n=>gE(e,t,o,r,n),[e,t,o,r]),y=(({key:e,meta:t,fetcher:n,enabled:r=!0,staleTime:i,gcTime:o=tE,isCacheable:a})=>{let s=void 0!==e,[l]=sE(rE(e??""),{store:iE.store,enabled:s}),c=s&&l?.key===e?l:void 0,u=void 0!==c&&iE.hasAnswer(c.key),d=x(n),p=x(a);g(()=>{d.current=n,p.current=a},[n,a]),g(()=>void 0===e?void 0:iE.hold(e,o),[e,o]);let{url:h}=t,m=t.tags?.join("\0")??"";g(()=>{if(r&&void 0!==e)return iE.observe(e,{meta:{url:h,tags:m?m.split("\0"):[]},staleTime:i,fetcher:e=>d.current(e),isCacheable:e=>p.current?.(e)??!0})},[r,e,h,m,i]);let y=u?c.data:void 0,b=x(void 0);void 0===y?b.current&&b.current.epoch!==iE.epoch&&(b.current=void 0):b.current={epoch:iE.epoch,data:y};let v=y??b.current?.data,w=(c?.isFetching??!1)||r&&s&&!u;return{data:v,isFetching:w,isLoading:w&&void 0===v,refetch:f(()=>{r&&void 0!==e&&iE.refetch(e)},[r,e]),cancel:f(()=>{void 0!==e&&iE.cancel(e)},[e])}})({key:h,meta:{url:e,tags:c},fetcher:m,enabled:i,staleTime:a?bE(s,30):0,gcTime:a?bE(l,300):0,isCacheable:yE}),v=k(()=>u?(e=>{if("string"!=typeof e)return{status:200,data:e};try{return{status:200,data:JSON.parse(e)}}catch(e){return{status:500,data:e.message}}})(n):void 0,[u,n]),w=i&&v?v:y.data,S=!v&&y.isFetching;return{isLoading:S&&void 0===w,isFetching:S,data:w,refetch:y.refetch,cancel:y.cancel,isSuccess:!p&&!S&&!!w&&w.status<400,isError:!p&&!S&&!!w&&w.status>=400}})({url:i,method:o,credentials:p,mock:K?void 0:c,customHeaders:ee,enabled:te,cache:C,staleTime:E,gcTime:A,tags:ne}),ue=j&&!!q&&q!==fu(),de=j&&$&&!ue&&null===B,pe=j&&!O&&!N,he=k(()=>j?B||($?qr:((e,t)=>{let n;if("string"!=typeof e)n=e;else try{n=JSON.parse(e||"{}")}catch{return qr}return t?{status:200,data:n}:n})(c,pe)):oe??qr,[j,oe,B,$,c,pe]),fe=j?ue||H:ie,me=j?ue:re,ge=x({}),ye=f((e,t)=>W(e,{...ge.current,...t}),[W]),be=f(async e=>{j?await W([P],ge.current,{fresh:e}):ae()},[j,ae,W,P]),ve=f(()=>be(!0),[be]),we=f(()=>be(!1),[be]);(({id:e,url:t,enabled:n,active:r,refresh:i})=>{let o=x(!1);g(()=>{if(n)return r&&o.current&&(o.current=!1,i()),(e=>{let t={...e};return oE.add(t),()=>{oE.delete(t)}})({id:e,url:t,refresh:()=>r?i():(o.current=!0,Promise.resolve())})},[n,r,e,t,i])})({id:P,url:pe&&i?i:void 0,enabled:j&&$,active:L,refresh:ve});let ke=f(async({input:e}={})=>{let t=eE(e);t&&(ge.current=t),await ve()},[ve]),xe=f(()=>{j?V():se()},[j,V,se]),[Se]=_t(`schema.flat.${P}.attributes.input`,{mode:"mount"});(({enabled:e,input:t,savedInput:n,performQuery:r})=>{let i=JSON.stringify(eE(t)??{}),o=x(JSON.stringify(eE(n)??{}));g(()=>{e&&i!==o.current&&(o.current=i,r({input:t}))},[e,i,t,r])})({enabled:j&&$,input:_,savedInput:Se,performQuery:ke}),(({seconds:e,enabled:t,refresh:n})=>{let r=x(n);r.current=n;let i=Number(e),o=t&&Number.isFinite(i)&&i>0;g(()=>{if(!o)return;let e=!1,t=setInterval(()=>{e||"hidden"===document.visibilityState||(e=!0,Promise.resolve().then(()=>r.current()).catch(()=>{}).finally(()=>{e=!1}))},1e3*i);return()=>clearInterval(t)},[o,i])})({seconds:M,enabled:L&&(j?$&&!ue:te),refresh:we});let Te=he,Ce=k(()=>Array.isArray(Te.records)?Te.records:[],[Te.records]),{records:Ee,isLoadingMore:Ae,goToPage:Ie,loadMore:Me}=(({elementId:e,mode:t,pageParam:n,records:r,page:i,refresh:o,navigate:a})=>{let[s,l]=S(r),[c,u]=S(!1),d=x(0);g(()=>{if("append"===t){if(i<=1)return d.current=1,void l(r);d.current!==i&&(d.current=i,l(e=>[...e,...r]))}},[t,i,r]);let p=f(async r=>{let i=Math.max(r,1);if("url"!==t){if(o){u(!0);try{await o([e],{[n]:String(i)})}finally{u(!1)}}}else a?.(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(n,i))},[t,a,n,o,e]),h=f(()=>p(i+1),[p,i]);return{records:"append"===t?s:r,isLoadingMore:c,goToPage:p,loadMore:h}})({elementId:P,mode:y,pageParam:v,records:Ce,page:Te.pageInfo?.page??1,refresh:ye,navigate:Z}),Oe=(({serverMode:e,isSuccess:t,isError:n,rscResolved:r,rscPending:i,elementData:o})=>e?r&&!i?null==o?"error":"success":void 0:t?"success":n?"error":void 0)({serverMode:j,isSuccess:le,isError:ce,rscResolved:$,rscPending:ue,elementData:B}),Ne=x(void 0);g(()=>{!fe&&P&&Oe&&(Ne.current?.data!==he||Ne.current.outcome!==Oe)&&(Ne.current={data:he,outcome:Oe},Y.interactionTrigger(P,"success"===Oe?"onApiSuccess":"onApiError",{url:i,method:o,...he}))},[he,P,Y,fe,o,Oe,i]);let _e=k(()=>({...he,...Array.isArray(Te.records)?{records:Ee}:qr,isLoading:fe||Ae,isEmpty:ZC(Te,Ee,m),hasError:de,errorMessage:de?"The data provider could not be reached":"",isStale:j&&F}),[he,Te.records,Te.record,Ee,fe,Ae,m,de,j,F]),Pe=f(()=>vE(_e),[_e]);ql({id:P,source:G,name:D||`API - ${P}`,fields:Pe});let{writeRecord:Le}=(({elementId:e,enabled:t,actionPath:n="/_action",onDone:r})=>({writeRecord:f(async(i={})=>{let{action:o,recordId:a,...s}=i;if(!t||"string"!=typeof o||!o)return;let l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({elementId:e,action:o,recordId:a,values:s})});if(!l.ok){let e=ti(l.status,await l.json().catch(()=>{}));throw e&&Zr({reason:e,url:n}),Error(`Write failed with status ${l.status}`)}let c=await l.json();return hE(),await(r?.()),c.record},[n,e,t,r])}))({elementId:P,enabled:j,onDone:ve}),De=k(()=>{let e={performQuery:{...XC.callbacks.performQuery,title:`Perform Query ${D}`,callback:ke},cancelQuery:{...XC.callbacks.cancelQuery,title:`Cancel Query ${D}`,callback:xe},loadMore:{...XC.callbacks.loadMore,title:`Load More ${D}`,callback:Me},goToPage:{...XC.callbacks.goToPage,title:`Go To Page ${D}`,callback:({page:e})=>Ie(Number(e)||1)}};return j&&(e.writeRecord={...XC.callbacks.writeRecord,title:`Write Record ${D}`,callback:Le}),e},[D,ke,xe,Me,Ie,j,Le]),ze=k(()=>T&&K?((e,t,r)=>n.toArray(e).filter(e=>{let n=u(e)&&"string"==typeof e.key&&e.key.endsWith(`$${t}`);return r?n:!n}))(r,T,me):r,[r,me,T,K]),Re=k(()=>G?{runtime:{sources:{[G]:_e}}}:qr,[_e,G]);/* @__PURE__ */
|
|
94
|
-
return I(sp,{ref:e,tag:K||R?.length?d:"div",className:U("plitzi-component__api-container",t),interactionTriggers:XC.triggers,interactionCallbacks:De,children:(!me||w||T)&&/* @__PURE__ */I(Et,{inherit:"live",name:`Api:${P}`,value:Re,children:ze})})}),kE=Object.assign(wE,XC),xE={type:"channel",attributeValues:{subType:["","div","section","aside","main"]},sourceType:"channel",triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:""}},onJoin:{action:"onJoin",title:"On Join",type:"trigger",params:{},preview:{from:"",user:"",state:{}}},onLeave:{action:"onLeave",title:"On Leave",type:"trigger",params:{},preview:{from:"",user:"",state:{}}}},callbacks:{publish:{action:"publish",title:"Publish",type:"callback",preview:{},params:{type:{label:"Type",defaultValue:"",type:"text"},data:{label:"Data (JSON or a template)",defaultValue:"",type:"text"}}},setPresence:{action:"setPresence",title:"Set Presence",type:"callback",preview:{},params:{data:{label:"State (JSON or a template)",defaultValue:"",type:"text"}}}},content:{attributes:{topic:"",grant:"",keep:20,subType:""},definition:{label:"Channel",type:"channel",description:"A realtime channel: every page on the same `topic` hears what any of them publishes, within milliseconds. The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`) and `last`. It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{name:"Channel",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},SE=[500,1e3,2e3,5e3,1e4],TE=e=>"object"==typeof e&&!!e&&"connection"in e&&"string"==typeof e.connection&&"refused"in e&&Array.isArray(e.refused),CE=e=>"object"==typeof e&&!!e&&"topic"in e&&"string"==typeof e.topic&&"type"in e&&"string"==typeof e.type,EE=e=>{let t="message",n=[];for(let r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&n.push(r.slice(6));if(n.length)try{return{event:t,data:JSON.parse(n.join("\n"))}}catch{return}},AE=(e,t,n)=>{"success"===e?Kl.success("realtime",t,n):"warning"===e?Kl.warning("realtime",t,n):"danger"===e?Kl.danger("realtime",t,n):Kl.info("realtime",t,n)},IE=/* @__PURE__ */new Map,ME=/* @__PURE__ */new WeakMap,OE=(e,{grant:t,presence:n,onMessage:r,onJoin:i,onLeave:o}={})=>{let[a]=_t("realtime.endpoint"),[s]=_t("realtime.transport"),l=k(()=>a&&typeof window<"u"?((e,t="sse")=>{let n=`${t} ${e}`,r=IE.get(n);if(r)return r;let i=((e,{transport:t="sse",fetchImpl:n=fetch,WebSocketImpl:r=globalThis.WebSocket}={})=>{let i,o,a,s=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u="idle",d=/* @__PURE__ */new Map,p=0,h="websocket"===t&&"function"==typeof r,f=()=>[...s.keys()].sort().join(","),m=e=>{u=e;let t=f().split(",").filter(Boolean),n=i?.transport??(h?"websocket":"sse");AE("open"===e?"success":"closed"===e?"warning":"info",`${e} · ${t.join(", ")||"no topics"}`,{event:"status",status:e,topics:t,transport:n}),c.forEach(t=>t(e))},g=e=>{for(let[t,n]of e)d.set(t,n),AE("danger",`${t} refused: ${n}`,{event:"refused",topic:t,reason:n})},y=e=>{"$revoked"===e.type&&"server"===e.from&&g([[e.topic,"revoked"]]),AE("info",`${e.topic} ← ${e.type}`,{event:"received",message:e}),s.get(e.topic)?.forEach(t=>t(e))},b=(e,t)=>{e.me=t.connection,d=/* @__PURE__ */new Map,g(t.refused.map(e=>[e.topic,e.reason])),p=0,m("open")},v=e=>{if(i!==e)return;m("connecting");let t=SE[Math.min(p,SE.length-1)];p+=1,a=setTimeout(x,t)},w=(t,r)=>{let o,a=new AbortController,s={topics:t,transport:"sse",close:()=>a.abort(),publish:async(t,r,a)=>{if(!o)return!1;let l=await n(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({token:o,topic:t,type:r,data:a})}).catch(()=>{});return 401===l?.status&&i===s&&x(),l?.ok??!1}};return n(`${e}?${r}`,{headers:{accept:"text/event-stream"},credentials:"same-origin",signal:a.signal}).then(async e=>{if(!e.ok)return d=/* @__PURE__ */new Map,g(t.split(",").map(t=>[t,`http_${String(e.status)}`])),void m("closed");throw await(async e=>{let t=e.body?.getReader();if(!t)return;let n=new TextDecoder,r="";for(;;){let{done:e,value:i}=await t.read();if(e)return;r+=n.decode(i,{stream:!0});let a=r.indexOf("\n\n");for(;-1!==a;){let e=EE(r.slice(0,a));r=r.slice(a+2),a=r.indexOf("\n\n"),"ready"===e?.event&&TE(e.data)?(o=e.data.token,b(s,e.data)):"message"===e?.event&&CE(e.data)&&y(e.data)}}})(e),Error("The realtime stream ended")}).catch(()=>{a.signal.aborted||v(s)}),s},k=(t,n)=>{let o=new r(((e,t)=>{let n=new URL(`${e}?${t}`,globalThis.location.href);return n.protocol="https:"===n.protocol?"wss:":"ws:",n.href})(e,n)),a=/* @__PURE__ */new Map,s=0,l=!1,c=!1,u=()=>{a.forEach(e=>e(!1)),a.clear()},d={topics:t,transport:"websocket",close:()=>{c=!0,u(),o.close()},publish:(e,t,n)=>new Promise(r=>{if(o.readyState!==o.OPEN)return void r(!1);s+=1;let i=s,l=setTimeout(()=>{a.delete(i),r(!1)},5e3);a.set(i,e=>{clearTimeout(l),r(e)}),o.send(JSON.stringify({id:i,topic:e,type:t,data:n}))})};return o.onmessage=e=>{let t=(e=>{try{let t=JSON.parse(String(e));return"object"==typeof t&&t&&"event"in t&&"string"==typeof t.event?{event:t.event,data:"data"in t?t.data:void 0}:void 0}catch{return}})(e.data);"ready"===t?.event&&TE(t.data)?(l=!0,b(d,t.data)):"message"===t?.event&&CE(t.data)?y(t.data):"ack"===t?.event&&(e=>"object"==typeof e&&!!e&&"id"in e&&"number"==typeof e.id&&"ok"in e&&"boolean"==typeof e.ok)(t.data)&&(a.get(t.data.id)?.(t.data.ok),a.delete(t.data.id))},o.onclose=()=>{if(u(),!c&&i===d){if(!l)return h=!1,void x();v(d)}},d};function x(){i?.close(),i=void 0;let e=f();if(!e)return void m("idle");m("connecting");let t=(e=>{let t=e.split(",").flatMap(e=>l.get(e)??[]);return`topics=${encodeURIComponent(e)}${t.length?`&grants=${encodeURIComponent(t.join(","))}`:""}`})(e);i=h?k(e,t):w(e,t)}let S=(e=!1)=>{clearTimeout(o),clearTimeout(a),o=setTimeout(()=>{(e||i?.topics!==f())&&x()},30)},T=e=>"open"===u&&!0===i?.topics.split(",").includes(e),C={subscribe:(e,t)=>{let n=s.get(e)??/* @__PURE__ */new Set;return n.add(t),s.set(e,n),S(),()=>{n.delete(t),n.size||(s.delete(e),l.delete(e),S())}},grant:(e,t)=>{if(l.get(e)===t)return;t?l.set(e,t):l.delete(e);let n=T(e)&&!d.has(e);t&&s.has(e)&&!n&&S(!0)},publish:async(e,t,n)=>{let r=!(!(await(e=>T(e)?Promise.resolve(!0):new Promise(t=>{let n=setTimeout(()=>{r(),t(!1)},5e3),r=C.onStatus(i=>{("closed"===i||T(e))&&(clearTimeout(n),r(),t("closed"!==i))})}))(e))||!i)&&await i.publish(e,t,n);return AE(r?"info":"danger",`${e} → ${t}${r?"":" (not delivered)"}`,{event:"published",topic:e,type:t,data:n,delivered:r}),r},onStatus:e=>(c.add(e),()=>c.delete(e)),get status(){return u},get me(){return i?.me},get transport(){return i?.transport??(h?"websocket":"sse")},refusal:e=>d.get(e)};return C})(e,{transport:t});return IE.set(n,i),i})(a,s):void 0,[a,s]),[c,u]=S(!1),[d,p]=S([]),h=x(void 0),m=x({onMessage:r,onJoin:i,onLeave:o});g(()=>{m.current={onMessage:r,onJoin:i,onLeave:o}}),g(()=>{l&&e&&t&&l.grant(e,t)},[l,e,t]),g(()=>{if(!l||!e)return;let t=((e,t,n)=>{let r=ME.get(e)??/* @__PURE__ */new Map;ME.set(e,r);let i=r.get(t)??((e,t,n)=>{let r,i=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set,a=/* @__PURE__ */new Set,s=!1,l=()=>[...s&&e.me?[{from:e.me,state:r,me:!0}]:[],...[...i.values()].map(e=>e.member)],c=()=>{let e=l();a.forEach(t=>t.onChange(e))},u=e=>{let t=e.flatMap(e=>{let t=i.get(e);return i.delete(e),t?[t.member]:[]});if(t.length){c();for(let e of t)a.forEach(t=>t.onDepart?.(e))}},d=()=>{s&&e.publish(t,"$presence",r)},p=e.subscribe(t,t=>{if(t.from!==e.me){if("$presence"===t.type){let e={from:t.from,...t.user?{user:t.user}:{},state:t.data,me:!1},n=!i.has(t.from)&&o.delete(t.from);i.set(t.from,{member:e,heardAt:Date.now()}),c(),n&&a.forEach(t=>t.onArrive?.(e))}else"$leave"===t.type?(o.delete(t.from),u([t.from])):"$join"===t.type?(o.add(t.from),d()):"$revoked"===t.type&&"server"===t.from&&(i.clear(),o.clear(),c());a.forEach(e=>e.onMessage?.(t))}}),h=e.onStatus(e=>{"open"===e&&(d(),c())}),f=setInterval(()=>{d();let e=Date.now();u([...i].filter(([,t])=>e-t.heardAt>65e3).map(([e])=>e))},2e4);return{members:l,set:e=>{r=e,s=!0,d(),c()},listeners:a,teardown:()=>{clearInterval(f),h(),p(),n()}}})(e,t,()=>r.delete(t));r.set(t,i),i.listeners.add(n);let o=i.members();return o.length&&n.onChange(o),{set:i.set,members:i.members,stop:()=>{i.listeners.delete(n)&&!i.listeners.size&&i.teardown()}}})(l,e,{onChange:p,onMessage:e=>{"$revoked"===e.type&&"server"===e.from&&u(!1),m.current.onMessage?.(e)},onArrive:e=>m.current.onJoin?.(e),onDepart:e=>m.current.onLeave?.(e)});h.current=t,u("open"===l.status&&!l.refusal(e));let n=l.onStatus(t=>u("open"===t&&!l.refusal(e)));return()=>{n(),t.stop(),h.current=void 0,p([]),u(!1)}},[l,e]);let y=void 0===n?void 0:JSON.stringify(n);g(()=>{void 0!==y&&h.current?.set(JSON.parse(y))},[y,l,e]);let b=f((t,n)=>l&&e?l.publish(e,t,n):Promise.resolve(!1),[l,e]),v=f(e=>h.current?.set(e),[]);return{connected:c,me:c?l?.me:void 0,members:d,publish:b,setPresence:v}},NE=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},_E=/* @__PURE__ */new Set(["$presence","$join","$leave"]),PE=Sd(({ref:e,className:t,children:n,topic:r="",grant:i="",presence:o,keep:a=20,subType:s=""})=>{let{id:l,definition:{label:c="Channel"}}=Td(),{settings:{previewMode:u},contexts:{InteractionsContext:d}}=uc(),{interactionsManager:p}=h(d),m=Math.max(0,Number(a)||0),[g,y]=S([]),b=f(e=>{_E.has(e.type)||(m>0&&y(t=>[...t,e].slice(-m)),p.interactionTrigger(l,"onMessage",{...e}))},[l,p,m]),v=f(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onJoin",{from:e,user:t??"",state:n})},[l,p]),w=f(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onLeave",{from:e,user:t??"",state:n})},[l,p]),x=OE(u&&r?r:void 0,{grant:i||void 0,presence:void 0===o||""===o?void 0:NE(o),onMessage:b,onJoin:v,onLeave:w}),T=k(()=>({publish:{...xE.callbacks.publish,callback:({type:e,data:t})=>"string"==typeof e&&e?x.publish(e,NE(t)):Promise.resolve(!1)},setPresence:{...xE.callbacks.setPresence,callback:({data:e})=>x.setPresence(NE(e))}}),[x]),C=Fl(xE.sourceType,l),E=k(()=>({connected:x.connected,me:x.me??"",members:x.members,messages:g,last:g.at(-1)??null}),[x.connected,x.me,x.members,g]),A=f(()=>vE(E),[E]);ql({id:l,source:C,name:c||`Channel - ${l}`,fields:A});let M=k(()=>C?{runtime:{sources:{[C]:E}}}:qr,[E,C]);/* @__PURE__ */
|
|
95
|
-
return I(
|
|
96
|
-
return I(
|
|
97
|
-
return M("div",{className:U("carousel__slide",a),role:"group","aria-roledescription":"slide","aria-label":`${String(r+1)} of ${String(i)}`,"aria-hidden":o||void 0,inert:o||void 0,children:[l&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:`Slide ${String(r+1)}`}),!l&&/* @__PURE__ */I(
|
|
98
|
-
return M("div",{ref:s,className:U("carousel__marquee",{"carousel__marquee--running":o&&void 0!==l,"carousel__marquee--pause-on-hover":i}),style:u,children:[t.map((r,i)=>/* @__PURE__ */I(
|
|
99
|
-
return I("div",{ref:r,className:"carousel__scroller",onScroll:s,children:t.map((r,i)=>/* @__PURE__ */I(
|
|
100
|
-
return M(
|
|
101
|
-
return I(
|
|
102
|
-
return M(
|
|
83
|
+
/* @__PURE__ */I("path",{d:"M0 1.5C0 0.947715 0.447715 0.5 1 0.5H11C11.5523 0.5 12 0.947715 12 1.5C12 2.05228 11.5523 2.5 11 2.5H1C0.447715 2.5 0 2.05228 0 1.5Z",fill:"currentColor"})]}),UT=Object.assign(qT,{...FT,content:{...FT.content,market:{...FT.content.market,icon:/* @__PURE__ */I(BT,{})}}}),HT={width:"100%",display:"flex","align-items":"center","border-right-color":"#6f7780","border-right-style":"solid","border-right-width":"1px","border-top-right-radius":"4px","border-bottom-color":"#6f7780","border-bottom-style":"solid","border-bottom-width":"1px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","border-left-color":"#6f7780","border-left-style":"solid","border-left-width":"1px","border-top-color":"#6f7780","border-top-style":"solid","border-top-width":"1px","user-select":"none","font-size":"14px","padding-left":"16px","padding-right":"16px","padding-top":"8px","padding-bottom":"8px",outline:"none",position:"relative"},WT={...HT,"line-height":"20px"},VT={display:"flex",cursor:"pointer","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},GT={...VT,"margin-bottom":"4px"},KT={display:"block",color:"red","margin-top":"4px"},JT={color:"red","margin-left":"4px"},YT={"border-top-style":"none","border-right-style":"none","border-bottom-style":"none","border-left-style":"none"},XT={height:"100%",width:"100%","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","padding-left":"0px",display:"block",...YT,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","box-shadow":"none"},QT={height:"100%",width:"100%",display:"block",...YT,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit",appearance:"none",cursor:"inherit","box-shadow":"none"},ZT={height:"100%","margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px","padding-right":"4px","padding-left":"4px",display:"flex","justify-content":"center","align-items":"center",...YT,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","font-weight":"inherit",cursor:"pointer"},eC={...HT,cursor:"pointer"},tC=(e,t,{field:n,icon:r}={})=>({name:e,displayMode:"desktop",style:{base:{default:{}},input:{default:t},...n?{field:{default:n}}:{},...r?{icon:{default:r}}:{},label:{default:GT},requiredMark:{default:JT},error:{default:KT}}}),nC={field:XT},rC={type:"formControl",attributeValues:{subType:["text","number","email","password","search","url","tel","date","time","checkbox","switch","select","textarea","hidden","color"]},triggers:{onChange:{action:"onChange",title:"On Change",type:"trigger",params:{},preview:{value:"",name:""}}},content:{attributes:{subType:"text",name:"",label:"Label",hideLabel:!1,placeholder:"",defaultValue:"",autoComplete:!0,autoFocus:!1,disabled:!1,options:[],required:!1,requiredMessage:"",minLength:0,minLengthMessage:"",maxLength:0,maxLengthMessage:"",formatMessage:"",pattern:"",patternMessage:"",matches:"",matchesMessage:"",readOnly:!1},definition:{label:"Form Control",type:"formControl",description:'A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. A select offers its `options`: `[{ label, value }, …]` — the text shown, and what the field takes. A `switch` is a checkbox announced and drawn as an on/off switch (`role="switch"`), for a setting that applies at once; both hold `true`/`false`, and a `defaultValue` of `"true"` starts them on. Its slots: `label`, `requiredMark` (the `*` that ends the label of a required field), `input` (the box a typed field or a select is drawn in — a textarea, checkbox or switch is its own box), `field` (the `<input>` or `<select>` inside that box), `icon` (the show/hide button of a password) and `error`. The thumb of a switch is no element a class reaches: the class on its `input` slot sets `--plitzi-switch-thumb` (off), `--plitzi-switch-thumb-checked` (on, white by default) and `--plitzi-switch-thumb-shadow`.',bindings:{},styleSelectors:{base:"",label:"",requiredMark:"",input:"",field:"",icon:"",error:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-i-cursor"},defaultStyle:{name:"Form Control",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hidden:tC("Form Control Hidden",{}),text:tC("Form Control Text",WT,nC),number:tC("Form Control Number",WT,nC),email:tC("Form Control Email",WT,nC),password:tC("Form Control Password",WT,{...nC,icon:ZT}),search:tC("Form Control Search",WT,nC),url:tC("Form Control URL",WT,nC),tel:tC("Form Control Phone",WT,nC),date:tC("Form Control Date",WT,nC),time:tC("Form Control Time",WT,nC),color:tC("Form Control Color",WT,nC),textarea:tC("Form Control Textarea",{...WT,color:"inherit",resize:"vertical"}),select:tC("Form Control Select",eC,{field:QT}),checkbox:{name:"Form Control Checkbox",displayMode:"desktop",style:{base:{default:{}},input:{default:{"margin-top":"0px","margin-bottom":"0px","margin-left":"0px","margin-right":"4px"}},label:{default:VT},requiredMark:{default:JT},error:{default:KT}}},switch:{name:"Form Control Switch",displayMode:"desktop",style:{base:{default:{}},input:{default:{height:"20px",width:"36px","margin-top":"0px","margin-bottom":"0px","margin-left":"0px","margin-right":"8px",position:"relative","flex-shrink":"0","border-top-color":"currentColor","border-top-style":"solid","border-top-width":"1px","border-right-color":"currentColor","border-right-style":"solid","border-right-width":"1px","border-bottom-color":"currentColor","border-bottom-style":"solid","border-bottom-width":"1px","border-left-color":"currentColor","border-left-style":"solid","border-left-width":"1px","border-top-left-radius":"10px","border-top-right-radius":"10px","border-bottom-left-radius":"10px","border-bottom-right-radius":"10px","background-color":"transparent",transition:"background-color 150ms ease",appearance:"none",cursor:"pointer"}},label:{default:{...VT,"align-items":"center"}},requiredMark:{default:JT},error:{default:KT}}}}},settings:{}}},iC={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},oC=({ref:e,children:t,targetInput:n="",type:r="text",previewMode:i=!0,required:o=!0,hidden:a=!1,className:s="",requiredClassName:l})=>{let c=f(e=>{i||e.preventDefault()},[i]);/* @__PURE__ */
|
|
84
|
+
return M("label",i?{ref:e,className:U(`form-control__label-${r}`,s),htmlFor:n,style:a?iC:void 0,children:[t,o&&t&&/* @__PURE__ */I("span",{className:U("form-control__label--required",l),children:"*"})]}:{ref:e,className:U(`form-control__label-${r}`,s),onClick:c,children:[t,o&&t&&/* @__PURE__ */I("span",{className:U("form-control__label--required",l),children:"*"})]})},aC=e=>!0===e||"true"===e,sC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,lC=/* @__PURE__ */new Map([["email",{matches:e=>sC.test(e),message:"Enter an email address"}]]),cC=e=>"string"==typeof e?e:"number"==typeof e?String(e):"",uC=(e,t,n)=>{if((e=>null==e||""===e||!1===e)(e))return t.required?t.requiredMessage||"This field is required":"";if("boolean"==typeof e)return"";let r=cC(e),i=Array.from(r).length;if(t.minLength>0&&i<t.minLength)return t.minLengthMessage||`Use at least ${t.minLength} characters`;if(t.maxLength>0&&i>t.maxLength)return t.maxLengthMessage||`Use at most ${t.maxLength} characters`;let o=lC.get(t.type);return o&&!o.matches(r)?t.formatMessage||o.message:t.pattern&&!((e,t)=>{try{return RegExp(`^(?:${t})$`,"u").test(e)}catch{return!1}})(r,t.pattern)?t.patternMessage||"This is not in the expected format":t.matches&&r!==cC(sr(n,t.matches,""))?t.matchesMessage||"This does not match":""},dC=({className:e="",variant:t="checkbox",id:n="",name:r="",checked:i=!1,required:o=!0,disabled:a=!1,onChange:s,onValidate:l,errorId:c})=>{let u=f(()=>l?.(),[l]);/* @__PURE__ */
|
|
85
|
+
return I("input",{className:U(`form-control__${t}-container`,e),id:n,role:"switch"===t?"switch":void 0,"aria-invalid":!!c||void 0,"aria-describedby":c,name:r,type:"checkbox",value:"true",checked:i,required:o,disabled:a,onChange:s,onBlur:u})},pC=({className:e="",id:t="",name:n="",value:r="",required:i=!0,disabled:o=!1,previewMode:a=!0})=>/* @__PURE__ */M("div",{className:U("form-control__input-hidden-container",e),children:[a&&/* @__PURE__ */I("input",{className:"input-container__input-hidden",id:t,name:n,type:"hidden",value:r,required:i,disabled:o}),!a&&/* @__PURE__ */I("div",{className:"input-container__input-hidden--no-preview",children:"hidden input"})]}),hC=(e,t)=>{g(()=>{t&&e.current?.focus()},[e,t])},fC=({className:e="",fieldClassName:t,iconClassName:n,id:r="",name:i="",placeholder:o="",value:a="",type:s="text",autoComplete:l=!1,autoFocus:c=!1,required:u=!0,maxLength:d=0,disabled:p=!1,readOnly:h=!1,onChange:m,onValidate:g,errorId:y})=>{let[b,v]=S(!1),w=x(null);hC(w,c);let k=f(()=>v(e=>!e),[v]),T=f(e=>{let t=w.current;if(t?.focus(),"color"===s&&t&&e.target!==t)try{t.showPicker()}catch{}},[w,s]),C=f(()=>g?.(),[g]);/* @__PURE__ */
|
|
86
|
+
return M("div",{className:U("form-control__input-container",e),onClick:T,children:[/* @__PURE__ */I("input",{ref:w,className:U("input-container__input",t),id:r,"aria-invalid":!!y||void 0,"aria-describedby":y,name:i,type:"password"===s&&b?"text":s,placeholder:o,value:a,required:u,maxLength:d>0?d:void 0,autoComplete:l?"on":"off",disabled:p,readOnly:h,onChange:m,onBlur:C}),"password"===s&&/* @__PURE__ */I("button",{type:"button",className:U("form-input__icon",n),"aria-pressed":b,title:"Show password",onClick:k,children:/* @__PURE__ */I("i",{className:b?"fa-solid fa-eye-slash":"fa-solid fa-eye","aria-hidden":"true"})})]})},mC=({id:e="",name:t,options:n=[],placeholder:r="",value:i="",className:o="",fieldClassName:a,disabled:s=!1,onChange:l,onValidate:c,errorId:u})=>{let d=x(null),p=f(()=>{d.current?.click()},[d]),h=f(e=>{e.stopPropagation()},[]),m=f(()=>c?.(),[c]),g=k(()=>Array.isArray(n)?n.map(e=>{if("string"==typeof e)return{value:e,label:e};if(void 0===e.value||void 0===e.label){let t=e.value??e.label??"";return{value:t,label:t}}return{value:e.value,label:e.label}}):[],[n]);/* @__PURE__ */
|
|
87
|
+
return I("div",{className:U("form-control__select-container",o),onClick:p,children:/* @__PURE__ */M("select",{ref:d,id:e,"aria-invalid":!!u||void 0,"aria-describedby":u,name:t,onChange:l,value:i,className:U("select-container__select",a),disabled:s,onClick:h,onBlur:m,children:[r&&/* @__PURE__ */I("option",{value:"",children:r}),g.map((e,t)=>/* @__PURE__ */I("option",{value:e.value,children:e.label},t))]})})},gC=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",autoFocus:o=!1,required:a=!0,maxLength:s=0,disabled:l=!1,readOnly:c=!1,onChange:u,onValidate:d,errorId:p})=>{let h=x(null);hC(h,o);let m=f(e=>{e.stopPropagation()},[]),g=f(()=>d?.(),[d]);/* @__PURE__ */
|
|
88
|
+
return I("textarea",{ref:h,className:U("form-control__textarea-container",e),id:t,"aria-invalid":!!p||void 0,"aria-describedby":p,name:n,placeholder:r,value:i,readOnly:c,required:a,maxLength:s>0?s:void 0,disabled:l,onChange:u,onBlur:g,onClick:m})},yC=Cd((e=>{let t=t=>{let{ref:n,name:r="",subType:i="text",defaultValue:o="",required:a=!0,requiredMessage:s="",minLength:l=0,minLengthMessage:c="",maxLength:u=0,maxLengthMessage:d="",formatMessage:p="",pattern:h="",patternMessage:m="",matches:y="",matchesMessage:b="",previewError:v=!1}=t,{settings:{previewMode:w}}=dc(),{useStore:x}=Ot(),[T]=x("runtime.sources.form"),[C,E]=S(o),[A,M]=S(o);!T&&A!==o&&(M(o),E(o));let O=T?.values,N=k(()=>T?sr(O,r,o):C,[T,O,r,o,C]),_=k(()=>!w&&v?"This is an error message":T?.errors[r]??"",[w,v,T?.errors,r]),P=k(()=>({required:a,requiredMessage:s,minLength:l,minLengthMessage:c,maxLength:u,maxLengthMessage:d,type:i,formatMessage:p,pattern:h,patternMessage:m,matches:y,matchesMessage:b}),[a,s,l,c,u,d,i,p,h,m,y,b]),L=T?.registerValidator,D=T?.unregisterValidator,z=T?.setFieldValue,R=T?.setFieldError;g(()=>{if(r&&L&&D)return L(r,e=>uC(sr(e,r,o),P,e)),()=>D(r)},[r,o,P,L,D]),g(()=>{z&&o&&N&&r&&z(r,N)},[o,r,z,N]);let j=f(e=>{let t="radio"===e.target.type||"checkbox"===e.target.type;z?z(r,t?e.target.checked:e.target.value):E(t?String(e.target.checked):e.target.value)},[z,r]),$=f(()=>R?.(r,uC(N,P,O??{})),[N,P,O,r,R]);return k(()=>/* @__PURE__ */I(e,{...t,ref:n,value:N,error:_,handleChange:j,handleValidate:$}),[t,n,_,N,j,$])};return t.displayName=`withFieldValue(${function(e){return e&&(e.displayName||e.name)||"Component"}(e)})`,t})(({ref:e,className:t="",subType:n="text",name:r="",label:i="Label",hideLabel:o=!1,placeholder:a="",autoComplete:s=!0,autoFocus:l=!1,disabled:c=!1,options:u=[],required:d=!1,maxLength:p=0,readOnly:m=!1,value:y="",error:b="",handleChange:v,handleValidate:w})=>{let{id:k,rootId:x,visible:S,definition:{styleSelectors:T}}=Ed(),{settings:{previewMode:C},contexts:{InteractionsContext:E}}=dc(),{interactionsManager:A}=h(E),{useStore:O}=Ot(),[N]=O("runtime.sources.form"),_=f(e=>{if(v?.(e),!C)return;let{target:t}=e,n=t instanceof HTMLInputElement&&"checkbox"===t.type?t.checked:t.value;A.interactionTrigger(k,"onChange",{value:n,name:r})},[v,C,A,k,r]),P=N?.registerField,L=N?.unregisterField,D=["checkbox","switch"].includes(n),z="hidden"===n,R=l&&C&&S,j=o&&C,$=b&&C?`${x}_${k}_error`:void 0,F=D&&/* @__PURE__ */I(dC,{variant:"switch"===n?"switch":"checkbox",id:`${x}_${k}`,name:r,checked:aC(y),className:T.input,required:d,disabled:c,onChange:_,onValidate:w,errorId:$});return g(()=>{if(P&&L)return P({name:r,path:r}),()=>L(r)},[r,P,L]),/* @__PURE__ */M(cp,{ref:e,interactionTriggers:rC.triggers,className:U("plitzi-component__form-control",{"form-control--invalid":b&&C,[`plitzi-component__form-control-${n}`]:n},t),children:[!D&&!z&&i&&/* @__PURE__ */I(oC,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,requiredClassName:T.requiredMark,type:n,required:d,hidden:j,children:i}),D&&i&&/* @__PURE__ */M(oC,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,requiredClassName:T.requiredMark,type:n,required:d,children:[F,j&&/* @__PURE__ */I("span",{style:iC,children:i}),!j&&i]}),D&&!i&&F,["text","number","email","password","search","url","tel","date","time","color"].includes(n)&&/* @__PURE__ */I(fC,{id:`${x}_${k}`,name:r,value:y,type:n,className:T.input,fieldClassName:T.field,iconClassName:T.icon,placeholder:a,autoComplete:"password"!==n&&s,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m||!C,onChange:_,onValidate:w,errorId:$}),"hidden"===n&&/* @__PURE__ */I(pC,{id:`${x}_${k}`,name:r,value:y,required:d,disabled:c,previewMode:C}),"select"===n&&/* @__PURE__ */I(mC,{id:`${x}_${k}`,name:r,onChange:_,onValidate:w,errorId:$,value:y,className:T.input,fieldClassName:T.field,placeholder:a,disabled:c,options:u}),"textarea"===n&&/* @__PURE__ */I(gC,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:a,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m,onChange:_,onValidate:w,errorId:$}),b&&/* @__PURE__ */I("div",{id:$,role:"alert",className:U("form-control__error-message",T.error),children:b})]})})),bC=Object.assign(yC,{...rC,content:{...rC.content,market:{...rC.content.market,icon:/* @__PURE__ */I(BT,{})}}}),vC=e=>"contents"===getComputedStyle(e).display,wC=e=>{if(!vC(e))return e.getBoundingClientRect();let t=[...e.children].map(wC).filter(e=>void 0!==e&&(e.width>0||e.height>0));if(0===t.length)return;let n=Math.min(...t.map(e=>e.left)),r=Math.min(...t.map(e=>e.top));return new DOMRect(n,r,Math.max(...t.map(e=>e.right))-n,Math.max(...t.map(e=>e.bottom))-r)},kC=e=>{if(!vC(e))return e;for(let t=e.parentElement;t;t=t.parentElement)if("static"!==getComputedStyle(t).position)return t;return e.ownerDocument.documentElement},xC=".plitzi-component--layout-body",SC=Cd(({ref:e,className:t="",children:n,subType:r="div"})=>{let{plitziElementLayout:i}=Ed(),{settings:{previewMode:o}}=dc(),a=f((e,t)=>{if(!e)return;if(!t)return void e.style.removeProperty("--child-clip");let n=wC(t);if(!n)return void e.style.removeProperty("--child-clip");let r=kC(e),i=r.getBoundingClientRect(),o=r.offsetWidth>0?i.width/r.offsetWidth:1,a=(n.top-i.top)/o-r.clientTop,s=(n.left-i.left)/o-r.clientLeft,l=s+n.width/o,c=a+n.height/o,u=`\n polygon(\n evenodd,\n /* outer rect */\n 0 0, 100% 0, 100% 100%, 0% 100%, 0 0,\n /* inner rect */ \n ${s}px ${a}px, ${l}px ${a}px, ${l}px ${c}px, ${s}px ${c}px, ${s}px ${a}px\n )`;e.style.setProperty("--child-clip",u)},[]);return g(()=>{let t=e?.current;if(!i||!t||o||t.parentElement?.closest(".plitzi-component__layout-container"))return;let n=null,r=gr(()=>{let e=(e=>[...e.querySelectorAll(xC)].find(e=>!e.querySelector(xC))??null)(t);e!==n&&(n&&s.unobserve(n),e&&s.observe(e),n=e),a(t,e)},50),s=new ResizeObserver(r);s.observe(t);let l=kC(t);l!==t&&s.observe(l);let c=new MutationObserver(r);return c.observe(t,{childList:!0,subtree:!0}),t.addEventListener("scroll",r,!0),r(),()=>{r.cancel(),s.disconnect(),c.disconnect(),t.removeEventListener("scroll",r,!0)}},[i,o,e,a]),/* @__PURE__ */I(cp,{ref:e,tag:r,className:U("plitzi-component__layout-container",t),children:n})}),TC=Object.assign(SC,{type:"layoutContainer",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure"]},content:{attributes:{subType:"div"},definition:{label:"Layout Container",type:"layoutContainer",description:"A reusable layout shell (header/footer chrome) shared across pages.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-border-all"},defaultStyle:{name:"Layout Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),CC=Cd(({ref:e,className:t=""})=>{let{definition:{label:n}}=Ed();/* @__PURE__ */
|
|
89
|
+
return I(cp,{ref:e,className:U("plitzi-component__loading",t),children:/* @__PURE__ */M("span",{children:[/* @__PURE__ */I("b",{children:n})," Loading..."]})})}),EC=Object.assign(CC,{type:"loading",content:{attributes:{},definition:{label:"Loading",type:"loading",description:"A loading placeholder shown while data or a suspense boundary resolves.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Loading",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),AC=/* @__PURE__ */$({NotFound:()=>IC,default:()=>MC}),IC=({ref:e,className:t=""})=>{let{definition:{label:n}}=Ed(),{settings:{isHydrating:r,previewMode:i}}=dc();if(!(typeof window>"u"||i||r))/* @__PURE__ */return I(cp,{ref:e,className:U("plitzi-component__not-found",t),children:/* @__PURE__ */M("span",{children:[n&&/* @__PURE__ */M(A,{children:["Component ",
|
|
90
|
+
/* @__PURE__ */I("b",{children:n})," Not Found"]}),!n&&"Component Not Found"]})})},MC=Cd(IC),OC=Object.assign(MC,{type:"notFound",content:{attributes:{},definition:{label:"Not Found",type:"notFound",description:"The 404 screen shown when no route matches.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Not Found",displayMode:"desktop",style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}},settings:{}}}),NC={type:"page",triggers:{onPageLoad:{action:"onPageLoad",title:"On Page Load",type:"trigger",params:{},preview:{pageId:"",routeParams:"",queryParams:""}}},content:{attributes:{enabled:!0,name:"Page",slug:"",folder:"",layout:"",layoutContainer:"",seoEnabled:!1,seoPageTitle:"Title",seoPageDescription:"Description"},definition:{label:"Page",type:"page",description:"The root of a routable screen. Managed through the page ops (upsertPage/deletePage), not added as a child element.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fas fa-file"},defaultStyle:{name:"Page",displayMode:"desktop",style:{base:{default:{display:"flex","flex-direction":"column","min-height":"100%","min-width":"100%","font-family":"Arial",color:"light-dark(#333, oklch(0.92 0.004 286.32))","font-size":"14px","font-weight":400,"line-height":"16px","text-align":"left"}}}},settings:{}}},_C=[],PC=Cd(({ref:e,seoEnabled:t=!1,seoPageTitle:n="Title",seoPageDescription:r="Description",className:i="",layout:o="",layoutContainer:a="",children:s})=>{let{id:l}=Ed(),{settings:{previewMode:c},contexts:{InteractionsContext:u}}=dc(),{interactionsManager:d}=h(u),{ownsHead:p}=X(),[[y,b]]=zt(["navigation.routeParams","navigation.queryParams"]),v=((e,t)=>{let n=m(mt),r=x(_C),i=f(e=>n?n.subscribePath("schema.flat",e):()=>{},[n]),o=f(()=>{let i=e&&n?Dc(e=>{let t=(e=>n.getPath(e))(`schema.flat.${e}`);return(e=>"object"==typeof e&&!!e&&"definition"in e&&"attributes"in e)(t)?t:void 0},e,t):_C;return((e,t)=>e.length===t.length&&e.every((e,n)=>e.layout===t[n].layout&&e.slot===t[n].slot))(r.current,i)||(r.current=i),r.current},[n,e,t]);return T(i,o,o)})(o,a),w=k(()=>(e=>e.map(e=>({...e,plitziElementLayout:{slots:[e.slot],rootId:e.slot,type:"layout"}})))(v),[v]),S=k(()=>((e,t,n)=>e.reduce((e,{layout:n,slot:r,plitziElementLayout:i})=>/* @__PURE__ */I(Jr,{bodies:{[r]:e},children:/* @__PURE__ */I(TC,{internalProps:{id:n,rootId:t,plitziElementLayout:i}})},r),n))(w,l,s),[w,l,s]);return g(()=>{let e=!1;return queueMicrotask(()=>{e||d.interactionTrigger(l,"onPageLoad",{pageId:l,routeParams:y,queryParams:b})}),()=>{e=!0}},[l,d,b,y]),/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__page",i),interactionTriggers:NC.triggers,children:[t&&c&&p&&/* @__PURE__ */M(Wp,{children:[!!n&&/* @__PURE__ */I("title",{children:n}),!!r&&/* @__PURE__ */I("meta",{name:"description",content:r})]}),S]})}),LC=Object.assign(PC,NC),DC=Cd(({ref:e,src:t="",title:n="",loading:r="lazy",allow:i="",sandbox:o,referrerPolicy:a="strict-origin-when-cross-origin",className:s=""})=>{let{settings:{previewMode:l}}=dc(),c=(e=>/^(https?:)?\/\//i.test(e)||e.startsWith("/")&&!e.startsWith("//")?e:void 0)(t),u={src:c,title:n,loading:r,referrerPolicy:a,...i?{allow:i}:{},...void 0===o?{}:{sandbox:o}};return l?/* @__PURE__ */I(cp,{tag:"iframe",ref:e,className:U("plitzi-component__embed",s),...u}):/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__embed embed--edit-mode",s),children:[c&&/* @__PURE__ */I("iframe",{...u}),/* @__PURE__ */I("div",{className:"embed__cover"})]})}),zC=Object.assign(DC,{type:"embed",content:{attributes:{src:"",title:"",loading:"lazy"},definition:{label:"Embed",type:"embed",description:"Another page inside this one — a map, a video player, a form — in a frame.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-window-maximize"},defaultStyle:{name:"Embed",displayMode:"desktop",style:{base:{default:{display:"block",width:"100%","aspect-ratio":"16 / 9","border-top-width":"0px","border-right-width":"0px","border-bottom-width":"0px","border-left-width":"0px"}}}},settings:{}}}),RC=Cd(({ref:e,className:t="",icon:n="fas fa-flag",size:r="fa-1x",iconAnimation:i="",label:o=""})=>{let a=o?{role:"img","aria-label":o}:{"aria-hidden":!0};/* @__PURE__ */
|
|
91
|
+
return I(cp,{ref:e,tag:"i",className:U("plitzi-component__fontawesome",t,n,r,i),...a})}),jC=Object.assign(RC,{type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",type:"fontAwesome",description:"Renders a Font Awesome icon by its icon name.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-font-awesome"},defaultStyle:{name:"Font Awesome",displayMode:"desktop",style:{base:{default:{display:"inline-block","font-size":"16px"}}}},settings:{}}}),$C=[320,480,640,768,960,1280,1600,1920],FC=(e,t,n)=>`${e}?url=${encodeURIComponent(t)}&w=${String(n)}`,qC=(e,t)=>$C.map(n=>`${FC(e,t,n)} ${String(n)}w`).join(", "),BC="data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" fill="none">\n <rect width="1200" height="1200" fill="#EAEAEA" rx="3"/>\n <path fill="#FAFAFA" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="#C9C9C9" stroke-width="2.418" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/>\n <path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/>\n <path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/>\n <path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/>\n <path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/>\n <path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <defs>\n <linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath>\n </defs>\n</svg>'),UC=Cd(({ref:e,className:t="",src:n,alt:r="",decorative:i=!1,fetchPriority:o="auto",loadMode:a,sizes:s="100vw",width:l,height:c,resize:u=!0})=>{let{settings:{previewMode:d}}=dc(),p=n||BC,h=i?"":r,[m,g]=S(void 0),y=m===p,b=f(()=>g(p),[p]),v=y?BC:p,w=y?{"data-plitzi-failed":p}:{},k="auto"===a?void 0:a,[x]=_t("images.endpoint"),T=d&&x&&u&&!y&&(e=>(e=>/^https?:\/\//i.test(e))(e)&&!/\.svgz?(?:[?#]|$)/i.test(e))(p)?{src:FC(x,p,1280),srcSet:qC(x,p),sizes:s}:{src:v},C={...l?{width:l}:{},...c?{height:c}:{}};/* @__PURE__ */
|
|
92
|
+
return I(cp,d?{tag:"img",draggable:!1,ref:e,className:U("plitzi-component__image",t),...T,...C,alt:h,loading:k,fetchPriority:o,onError:y?void 0:b,...w}:{ref:e,className:U("plitzi-component__image image--edit-mode",t),children:/* @__PURE__ */I("img",{draggable:!1,src:v,alt:h,loading:k,fetchPriority:o,onError:y?void 0:b,...w})})}),HC=Object.assign(UC,{type:"image",attributeValues:{fetchPriority:["high","low","auto"],loadMode:["auto","eager","lazy"]},content:{attributes:{src:"",alt:"",decorative:!1,fetchPriority:"auto",loadMode:"auto"},definition:{label:"Image",type:"image",description:"Displays an image from a URL. It starts 140px wide and as tall as the picture is for that width (`height: auto`, never wider than where it sits): a class that sets only a `width` or an `aspect-ratio` is obeyed, and `object-fit` decides how the picture fills a box that sets both.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-image"},defaultStyle:{name:"Image",displayMode:"desktop",style:{base:{default:{display:"block",width:"140px",height:"auto","max-width":"100%"}}}},settings:{}}}),WC=/<\s*foreignObject\b[\s\S]*?<\s*\/\s*foreignObject\s*>|<\s*\/?\s*foreignObject\b[^>]*>/gi,VC=/\s(to|from|values|by)\s*=\s*(?:"[^"]*javascript\s*:[^"]*"|'[^']*javascript\s*:[^']*')/gi,GC=/^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i,KC=/<svg\b[^>]*>/i,JC=Cd(({ref:e,content:t="",label:n="",className:r=""})=>{let{settings:{previewMode:i}}=dc(),o=k(()=>(e=>GC.test(e))(t)?(e=>e.replace(KC,e=>e.replace(/\s(width|height)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/^<svg\b/i,'<svg width="100%" height="100%"')))((e=>ET(e).replace(WC,"").replace(VC,""))(t)):"",[t]),a=n?{role:"img","aria-label":n}:{"aria-hidden":!0};return o||i?/* @__PURE__ */I(cp,{tag:"span",ref:e,className:U("plitzi-component__svg",r),...a,dangerouslySetInnerHTML:{__html:o}}):/* @__PURE__ */M(cp,{ref:e,className:U("plitzi-component__svg svg--empty",r),children:["Paste one ","<svg>…</svg>"," here"]})}),YC=Object.assign(JC,{type:"svg",content:{attributes:{content:"",label:""},definition:{label:"SVG",type:"svg",description:"A drawing written as SVG markup, coloured by its class.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-bezier-curve"},defaultStyle:{name:"Svg",displayMode:"desktop",style:{base:{default:{display:"inline-flex",width:"24px",height:"24px"}}}},settings:{}}}),XC=Cd(({ref:e,src:t,autoPlay:n=!1,playsInline:r=!1,loop:i=!1,muted:o=!0,className:a=""})=>{let{settings:{previewMode:s}}=dc();/* @__PURE__ */
|
|
93
|
+
return I(cp,s?{tag:"video",draggable:!1,ref:e,className:U("plitzi-component__video",a),src:t,autoPlay:n,playsInline:r,loop:i,muted:o}:{ref:e,className:U("plitzi-component__video video--edit-mode",a),children:/* @__PURE__ */I("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:o,children:/* @__PURE__ */I("track",{kind:"captions"})})})}),QC=Object.assign(XC,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Embeds a video from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),ZC={type:"apiContainer",attributeValues:{subType:["","div","header","footer","nav","main","section","article","aside","address","figure"],method:["get","post","put","delete","patch"],credentials:["include","omit","same-origin"],pagination:["none","url","append"]},sourceType:"apiContainer",triggers:{onApiError:{action:"onApiError",title:"On Api Error",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}},onApiSuccess:{action:"onApiSuccess",title:"On Api Success",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}}},callbacks:{performQuery:{action:"performQuery",title:"Perform Query",type:"callback",preview:{},params:{input:{label:"Input (server providers)",type:"codemirror-json",defaultValue:"{}",description:"Values handed to a server-driven provider with its request, beside the page’s own route and query params — a search, a filter. Kept for the pages it loads after (`loadMore`, `goToPage`) until the next query."}}},cancelQuery:{action:"cancelQuery",title:"Cancel Query",type:"callback",preview:{},params:{}},loadMore:{action:"loadMore",title:"Load More",type:"callback",preview:{},params:{}},goToPage:{action:"goToPage",title:"Go To Page",type:"callback",preview:{},params:{page:{label:"Page",defaultValue:"1",type:"text"}}},writeRecord:{action:"writeRecord",title:"Write Record",type:"callback",preview:{action:"create"},params:{action:{label:"Endpoint",defaultValue:"create",type:"text"},recordId:{label:"Record Id",defaultValue:"",type:"text"}}}},content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"",credentials:"same-origin",connector:"",resource:"",limit:"10",singleRecord:!1,filters:[],pagination:"none",pageParam:"page",renderWhileLoading:!1,cache:!1,staleTime:30,gcTime:300},definition:{label:"Api Container",type:"apiContainer",description:'Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. A server provider (`runtime: "server"`) whose answer means the address shows nothing — a record not found — says so in `notFound`, a template against its answer (`{{ source.found == false }}`): the page is sent with status 404, rendered as written. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: "div"`, `section`, …); otherwise style its parent or a child.',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},eE=()=>{let{id:e,rootId:t}=Ed(),[[n=!1,r=!1,i=!1,o,a,s,l,c]]=_t(["rsc.enabled","rsc.loaded","rsc.stale","rsc.location",mu(e),"navigation.currentPageId","schema.pages","rsc.refreshing"]),u=Tu(),d=Nt(),p=f(()=>((e,t)=>{ku(e).inFlight.forEach(e=>{(!t||e.ids?.some(e=>t.includes(e)))&&e.controller.abort()})})(d,[e]),[d,e]),h=void 0!==o&&o!==gu()||void 0!==t&&t!==s&&Array.isArray(l)&&l.includes(t),m=x(void 0);!h&&void 0!==a&&(m.current=a);let g=h&&void 0!==m.current?m.current:a;return{enabled:n,loaded:r,stale:i,location:o,elementData:g??null,isServerElement:void 0!==g,refreshing:!0===c?.[e]||!0===c?.["*"],refresh:u,cancel:p}},tE=(e,t,n)=>n?void 0===e.record:Array.isArray(e.records)?0===t.length:(e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e.data),nE=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t||"{}")}catch{return}if("object"==typeof t&&t&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).flatMap(([e,t])=>"string"==typeof t||"number"==typeof t||"boolean"==typeof t?[[e,String(t)]]:[]))},rE=3e5,iE=e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)},oE=e=>`entries.${iE(e)}`,aE=new class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=We({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(oE(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(oE(e))}usage(e){let t=this.runtimes.get(iE(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(iE(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=rE){let n=this.ensure(e);return n.gcTime=t,n.holds++,this.cancelGc(n),()=>{n.holds--,this.scheduleGc(n)}}observe(e,t){let n=this.ensure(e),{isCacheable:r}=t,i={meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))};return n.observers.add(i),this.cancelGc(n),(!this.hasAnswer(e)||this.store.isStale(oE(e)))&&this.fetch(n,i),()=>{n.observers.delete(i),this.scheduleGc(n)}}async fetchQuery(e,t){let n=this.ensure(e);if(void 0!==t.gcTime&&(n.gcTime=t.gcTime),this.hasAnswer(e)&&!this.store.isStale(oE(e)))return this.scheduleGc(n),this.getEntry(e)?.data;let{isCacheable:r}=t;await this.fetch(n,{meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))});let i=this.getEntry(e)?.data;return this.scheduleGc(n),i}cancel(e){let t=this.runtimes.get(iE(e));if(!t?.controller)return!1;t.controller.abort(),t.controller=void 0,t.inFlight=void 0;let n=oE(e);return this.getEntry(e)?this.store.setState(`${n}.isFetching`,!1):this.markUnasked(t),!0}refetch(e){let t=this.runtimes.get(iE(e));return t?this.invalidateOne(t):Promise.resolve()}invalidate(e){let t=[];return this.runtimes.forEach(n=>{let r=this.getEntry(n.key);!r||e&&!e({url:r.url,tags:r.tags})||t.push(this.invalidateOne(n))}),Promise.all(t).then(()=>{})}reset({refetch:e=!0}={}){if(this.epochValue++,this.runtimes.forEach(e=>{e.version++,e.inFlight=void 0,e.controller?.abort(),e.controller=void 0}),this.store.setState("entries",{}),!e)return this.runtimes.forEach(e=>this.markUnasked(e)),Promise.resolve();let t=[];return this.runtimes.forEach(e=>t.push(this.fetchActive(e))),Promise.all(t).then(()=>{})}markUnasked(e){let t=e.observers.values().next();if(t.done)return;let n={key:e.key,url:t.value.meta.url,tags:[...e.tags],isFetching:!1};this.store.setState(oE(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(oE(e.key)).length&&e.version++,this.fetchActive(e)}onExpired(e){let t=this.runtimes.get(e.slice(8).split(".")[0]);t&&(t.version++,this.fetchActive(t))}fetchActive(e){let t=e.observers.values().next();return t.done?Promise.resolve():this.fetch(e,t.value)}fetch(e,t){if(e.inFlight)return e.inFlight;let{key:n}=e,{url:r}=t.meta;t.meta.tags?.forEach(t=>e.tags.add(t));let i=[...e.tags],o=oE(n);this.getEntry(n)?this.store.setState(`${o}.isFetching`,!0):this.store.setState(o,{key:n,url:r,tags:i,isFetching:!0});let a=this.epochValue,s=e.version,l=new AbortController,c=c=>{if(a!==this.epochValue||this.runtimes.get(iE(n))!==e||e.controller!==l)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let u=s!==e.version;if("error"in c){let e=this.getEntry(n);this.store.setState(o,{key:n,url:r,tags:i,data:e?.data,error:c.error,isFetching:!1},{ttl:0})}else{let a=!u&&(t.isCacheable?.(c.data)??!0);this.store.setState(o,{key:n,url:r,tags:i,data:c.data,isFetching:!1},{ttl:a?this.ttlOf(e,t):0})}return u?this.fetchActive(e):Promise.resolve()};return e.controller=l,e.inFlight=t.fetcher(l.signal).then(e=>c({data:e}),e=>c({error:e})),e.inFlight}ttlOf(e,t){let n=e.observers.size>0?1/0:t.staleTime;return e.observers.forEach(e=>{n=Math.min(n,e.staleTime)}),n}ensure(e){let t=iE(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){if(!(e.holds>0||e.observers.size>0)){if(this.cancelGc(e),e.gcTime<=0)return void this.collect(e);e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)}}collect(e){let t=iE(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(oE(e.key),void 0,{unmount:!0}))}},sE=/* @__PURE__ */new Set,lE=e=>Promise.allSettled([...sE].filter(t=>!e||e(t)).map(e=>e.refresh())).then(()=>{}),{useStore:cE}=Ot(),uE=()=>typeof location>"u"?void 0:location.href,dE=e=>{try{return new URL(e,uE()).origin}catch{return}},pE=(e,t)=>({id:n,url:r})=>(!t||void 0!==r)&&e({url:r??"",tags:[n]}),hE=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim()):"string"==typeof e?e.split(",").map(e=>e.trim()).filter(Boolean):[],fE=e=>{try{return new URL(e,uE()).href}catch{return e}},mE=(e={})=>{let t=e.url||e.elements?.length?(({url:e,elements:t})=>{let n=e?fE(e):void 0;return e=>(void 0===n||fE(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))})(e):void 0;return Promise.all([aE.invalidate(t),lE(t&&pE(t,!!e.url))]).then(()=>{})},gE=({method:e,url:t,credentials:n,headers:r})=>JSON.stringify([e.toLowerCase(),t,n,Object.entries(r).filter(([e])=>"content-type"!==e.toLowerCase()).sort(([e],[t])=>e<t?-1:+(e>t))]),yE=({mode:e,fallback:t,elements:n,url:r})=>{let i="origin"===e||"all"===e||"elements"===e||"none"===e?e:t;if("none"===i)return Promise.resolve();if("elements"===i){let e=hE(n);return e.length>0?mE({elements:e}):Promise.resolve()}return"origin"===i&&r?(e=>{let t=dE(e);if(!t)return Promise.resolve();let n=e=>dE(e.url)===t;return Promise.all([aE.invalidate(n),lE(pE(n,!0))]).then(()=>{})})(r):mE()},bE=async(e,t,n,r,i,o=!1)=>{if(!e)return{status:400,data:"URL is required"};let a=new Headers(r);a.has("Accept")||a.set("Accept","application/json");let s={method:t,credentials:n,headers:a,signal:i};"get"!==t&&(s.body="{}",a.has("Content-Type")||a.set("Content-Type","application/json"));try{let a=await fetch(e,s),l=await a.json(),c=ti(a.status,l);return c&&await Zr({reason:c,url:e})&&!o&&!i.aborted?await bE(e,t,n,r,i,!0):{status:a.status,data:l}}catch(e){if(i.aborted)throw e;return console.error(e.message),{status:500,data:e.message}}},vE=e=>e.status<400,wE=(e,t)=>{let n="number"==typeof e?e:Number(e);return 1e3*(Number.isFinite(n)&&n>=0?n:t)},kE=e=>Ur(e).map(e=>({path:e,name:e.split(".").slice(-2).join(" ")})),xE=Cd(({ref:e,className:t="",children:r,query:i="",method:o="get",accessToken:a="",when:s=qr,headers:l=qr,mockData:c="{}",subType:d="",credentials:p="same-origin",singleRecord:m=!1,pagination:y="none",pageParam:v="page",renderWhileLoading:w=!1,loadingSlot:T="",cache:C=!1,staleTime:E=30,gcTime:A=300,refreshSeconds:M=0,connector:O="",action:N="",input:_})=>{let{id:P,visible:L,definition:{label:D="Api Container",runtime:z,items:R}}=Ed(),j="server"===z,{loaded:$,stale:F,location:q,elementData:B,refreshing:H,refresh:W,cancel:V}=eE(),G=Fl(ZC.sourceType,P),{settings:{previewMode:K},contexts:{InteractionsContext:J}}=dc(),{interactionsManager:Y}=h(J),[[X,Q,Z]]=zt(["navigation.routeParams","navigation.queryParams","navigation.navigate"]),ee=k(()=>a?{...l,Authorization:`Bearer ${a}`}:l,[l,a]),te=k(()=>!(j||!L||!(K&&i&&(s===qr||Po(s,{...X,...Q}))||!K&&(i||c&&"{}"!==c&&c!==qr))),[j,L,K,i,s,X,Q,c]),ne=k(()=>[P],[P]),{isLoading:re,isFetching:ie,data:oe,refetch:ae,cancel:se,isSuccess:le,isError:ce}=(({url:e="",method:t="get",mock:n,customHeaders:r=qr,enabled:i=!0,credentials:o="same-origin",cache:a=!1,staleTime:s=30,gcTime:l=300,tags:c})=>{let u=(e=>!!e&&"{}"!==e&&e!==qr)(n),d=b(),p=!u&&(!e||Zn(e)),h=k(()=>{if(u||p)return;let n=gE({method:t,url:e,credentials:o,headers:r});return a?n:`${n}#${d}`},[u,p,e,t,o,r,a,d]),m=f(n=>bE(e,t,o,r,n),[e,t,o,r]),y=(({key:e,meta:t,fetcher:n,enabled:r=!0,staleTime:i,gcTime:o=rE,isCacheable:a})=>{let s=void 0!==e,[l]=cE(oE(e??""),{store:aE.store,enabled:s}),c=s&&l?.key===e?l:void 0,u=void 0!==c&&aE.hasAnswer(c.key),d=x(n),p=x(a);g(()=>{d.current=n,p.current=a},[n,a]),g(()=>void 0===e?void 0:aE.hold(e,o),[e,o]);let{url:h}=t,m=t.tags?.join("\0")??"";g(()=>{if(r&&void 0!==e)return aE.observe(e,{meta:{url:h,tags:m?m.split("\0"):[]},staleTime:i,fetcher:e=>d.current(e),isCacheable:e=>p.current?.(e)??!0})},[r,e,h,m,i]);let y=u?c.data:void 0,b=x(void 0);void 0===y?b.current&&b.current.epoch!==aE.epoch&&(b.current=void 0):b.current={epoch:aE.epoch,data:y};let v=y??b.current?.data,w=(c?.isFetching??!1)||r&&s&&!u;return{data:v,isFetching:w,isLoading:w&&void 0===v,refetch:f(()=>{r&&void 0!==e&&aE.refetch(e)},[r,e]),cancel:f(()=>{void 0!==e&&aE.cancel(e)},[e])}})({key:h,meta:{url:e,tags:c},fetcher:m,enabled:i,staleTime:a?wE(s,30):0,gcTime:a?wE(l,300):0,isCacheable:vE}),v=k(()=>u?(e=>{if("string"!=typeof e)return{status:200,data:e};try{return{status:200,data:JSON.parse(e)}}catch(e){return{status:500,data:e.message}}})(n):void 0,[u,n]),w=i&&v?v:y.data,S=!v&&y.isFetching;return{isLoading:S&&void 0===w,isFetching:S,data:w,refetch:y.refetch,cancel:y.cancel,isSuccess:!p&&!S&&!!w&&w.status<400,isError:!p&&!S&&!!w&&w.status>=400}})({url:i,method:o,credentials:p,mock:K?void 0:c,customHeaders:ee,enabled:te,cache:C,staleTime:E,gcTime:A,tags:ne}),ue=j&&!!q&&q!==gu(),de=j&&$&&!ue&&null===B,pe=j&&!O&&!N,he=k(()=>j?B||($?qr:((e,t)=>{let n;if("string"!=typeof e)n=e;else try{n=JSON.parse(e||"{}")}catch{return qr}return t?{status:200,data:n}:n})(c,pe)):oe??qr,[j,oe,B,$,c,pe]),fe=j?ue||H:ie,me=j?ue:re,ge=x({}),ye=f((e,t)=>W(e,{...ge.current,...t}),[W]),be=f(async e=>{j?await W([P],ge.current,{fresh:e}):ae()},[j,ae,W,P]),ve=f(()=>be(!0),[be]),we=f(()=>be(!1),[be]);(({id:e,url:t,enabled:n,active:r,refresh:i})=>{let o=x(!1);g(()=>{if(n)return r&&o.current&&(o.current=!1,i()),(e=>{let t={...e};return sE.add(t),()=>{sE.delete(t)}})({id:e,url:t,refresh:()=>r?i():(o.current=!0,Promise.resolve())})},[n,r,e,t,i])})({id:P,url:pe&&i?i:void 0,enabled:j&&$,active:L,refresh:ve});let ke=f(async({input:e}={})=>{let t=nE(e);t&&(ge.current=t),await ve()},[ve]),xe=f(()=>{j?V():se()},[j,V,se]),[Se]=_t(`schema.flat.${P}.attributes.input`,{mode:"mount"});(({enabled:e,input:t,savedInput:n,performQuery:r})=>{let i=JSON.stringify(nE(t)??{}),o=x(JSON.stringify(nE(n)??{}));g(()=>{e&&i!==o.current&&(o.current=i,r({input:t}))},[e,i,t,r])})({enabled:j&&$,input:_,savedInput:Se,performQuery:ke}),(({seconds:e,enabled:t,refresh:n})=>{let r=x(n);r.current=n;let i=Number(e),o=t&&Number.isFinite(i)&&i>0;g(()=>{if(!o)return;let e=!1,t=setInterval(()=>{e||"hidden"===document.visibilityState||(e=!0,Promise.resolve().then(()=>r.current()).catch(()=>{}).finally(()=>{e=!1}))},1e3*i);return()=>clearInterval(t)},[o,i])})({seconds:M,enabled:L&&(j?$&&!ue:te),refresh:we});let Te=he,Ce=k(()=>Array.isArray(Te.records)?Te.records:[],[Te.records]),{records:Ee,isLoadingMore:Ae,goToPage:Ie,loadMore:Me}=(({elementId:e,mode:t,pageParam:n,records:r,page:i,refresh:o,navigate:a})=>{let[s,l]=S(r),[c,u]=S(!1),d=x(0);g(()=>{if("append"===t){if(i<=1)return d.current=1,void l(r);d.current!==i&&(d.current=i,l(e=>[...e,...r]))}},[t,i,r]);let p=f(async r=>{let i=Math.max(r,1);if("url"!==t){if(o){u(!0);try{await o([e],{[n]:String(i)})}finally{u(!1)}}}else a?.(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(n,i))},[t,a,n,o,e]),h=f(()=>p(i+1),[p,i]);return{records:"append"===t?s:r,isLoadingMore:c,goToPage:p,loadMore:h}})({elementId:P,mode:y,pageParam:v,records:Ce,page:Te.pageInfo?.page??1,refresh:ye,navigate:Z}),Oe=(({serverMode:e,isSuccess:t,isError:n,rscResolved:r,rscPending:i,elementData:o})=>e?r&&!i?null==o?"error":"success":void 0:t?"success":n?"error":void 0)({serverMode:j,isSuccess:le,isError:ce,rscResolved:$,rscPending:ue,elementData:B}),Ne=x(void 0);g(()=>{!fe&&P&&Oe&&(Ne.current?.data!==he||Ne.current.outcome!==Oe)&&(Ne.current={data:he,outcome:Oe},Y.interactionTrigger(P,"success"===Oe?"onApiSuccess":"onApiError",{url:i,method:o,...he}))},[he,P,Y,fe,o,Oe,i]);let _e=k(()=>({...he,...Array.isArray(Te.records)?{records:Ee}:qr,isLoading:fe||Ae,isEmpty:tE(Te,Ee,m),hasError:de,errorMessage:de?"The data provider could not be reached":"",isStale:j&&F}),[he,Te.records,Te.record,Ee,fe,Ae,m,de,j,F]),Pe=f(()=>kE(_e),[_e]);ql({id:P,source:G,name:D||`API - ${P}`,fields:Pe});let{writeRecord:Le}=(({elementId:e,enabled:t,actionPath:n="/_action",onDone:r})=>({writeRecord:f(async(i={})=>{let{action:o,recordId:a,...s}=i;if(!t||"string"!=typeof o||!o)return;let l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({elementId:e,action:o,recordId:a,values:s})});if(!l.ok){let e=ti(l.status,await l.json().catch(()=>{}));throw e&&Zr({reason:e,url:n}),Error(`Write failed with status ${l.status}`)}let c=await l.json();return mE(),await(r?.()),c.record},[n,e,t,r])}))({elementId:P,enabled:j,onDone:ve}),De=k(()=>{let e={performQuery:{...ZC.callbacks.performQuery,title:`Perform Query ${D}`,callback:ke},cancelQuery:{...ZC.callbacks.cancelQuery,title:`Cancel Query ${D}`,callback:xe},loadMore:{...ZC.callbacks.loadMore,title:`Load More ${D}`,callback:Me},goToPage:{...ZC.callbacks.goToPage,title:`Go To Page ${D}`,callback:({page:e})=>Ie(Number(e)||1)}};return j&&(e.writeRecord={...ZC.callbacks.writeRecord,title:`Write Record ${D}`,callback:Le}),e},[D,ke,xe,Me,Ie,j,Le]),ze=k(()=>T&&K?((e,t,r)=>n.toArray(e).filter(e=>{let n=u(e)&&"string"==typeof e.key&&e.key.endsWith(`$${t}`);return r?n:!n}))(r,T,me):r,[r,me,T,K]),Re=k(()=>G?{runtime:{sources:{[G]:_e}}}:qr,[_e,G]);/* @__PURE__ */
|
|
94
|
+
return I(cp,{ref:e,tag:K||R?.length?d:"div",className:U("plitzi-component__api-container",t),interactionTriggers:ZC.triggers,interactionCallbacks:De,children:(!me||w||T)&&/* @__PURE__ */I(Et,{inherit:"live",name:`Api:${P}`,value:Re,children:ze})})}),SE=Object.assign(xE,ZC),TE={type:"channel",attributeValues:{subType:["","div","section","aside","main"]},sourceType:"channel",triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:""}},onJoin:{action:"onJoin",title:"On Join",type:"trigger",params:{},preview:{from:"",user:"",state:{}}},onLeave:{action:"onLeave",title:"On Leave",type:"trigger",params:{},preview:{from:"",user:"",state:{}}}},callbacks:{publish:{action:"publish",title:"Publish",type:"callback",preview:{},params:{type:{label:"Type",defaultValue:"",type:"text"},data:{label:"Data (JSON or a template)",defaultValue:"",type:"text"}}},setPresence:{action:"setPresence",title:"Set Presence",type:"callback",preview:{},params:{data:{label:"State (JSON or a template)",defaultValue:"",type:"text"}}}},content:{attributes:{topic:"",grant:"",keep:20,subType:""},definition:{label:"Channel",type:"channel",description:"A realtime channel: every page on the same `topic` hears what any of them publishes, within milliseconds. The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`) and `last`. It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{name:"Channel",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},CE=[500,1e3,2e3,5e3,1e4],EE=e=>"object"==typeof e&&!!e&&"connection"in e&&"string"==typeof e.connection&&"refused"in e&&Array.isArray(e.refused),AE=e=>"object"==typeof e&&!!e&&"topic"in e&&"string"==typeof e.topic&&"type"in e&&"string"==typeof e.type,IE=e=>{let t="message",n=[];for(let r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&n.push(r.slice(6));if(n.length)try{return{event:t,data:JSON.parse(n.join("\n"))}}catch{return}},ME=(e,t,n)=>{"success"===e?Jl.success("realtime",t,n):"warning"===e?Jl.warning("realtime",t,n):"danger"===e?Jl.danger("realtime",t,n):Jl.info("realtime",t,n)},OE=/* @__PURE__ */new Map,NE=/* @__PURE__ */new WeakMap,_E=(e,{grant:t,presence:n,onMessage:r,onJoin:i,onLeave:o}={})=>{let[a]=_t("realtime.endpoint"),[s]=_t("realtime.transport"),l=k(()=>a&&typeof window<"u"?((e,t="sse")=>{let n=`${t} ${e}`,r=OE.get(n);if(r)return r;let i=((e,{transport:t="sse",fetchImpl:n=fetch,WebSocketImpl:r=globalThis.WebSocket}={})=>{let i,o,a,s=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u="idle",d=/* @__PURE__ */new Map,p=0,h="websocket"===t&&"function"==typeof r,f=()=>[...s.keys()].sort().join(","),m=e=>{u=e;let t=f().split(",").filter(Boolean),n=i?.transport??(h?"websocket":"sse");ME("open"===e?"success":"closed"===e?"warning":"info",`${e} · ${t.join(", ")||"no topics"}`,{event:"status",status:e,topics:t,transport:n}),c.forEach(t=>t(e))},g=e=>{for(let[t,n]of e)d.set(t,n),ME("danger",`${t} refused: ${n}`,{event:"refused",topic:t,reason:n})},y=e=>{"$revoked"===e.type&&"server"===e.from&&g([[e.topic,"revoked"]]),ME("info",`${e.topic} ← ${e.type}`,{event:"received",message:e}),s.get(e.topic)?.forEach(t=>t(e))},b=(e,t)=>{e.me=t.connection,d=/* @__PURE__ */new Map,g(t.refused.map(e=>[e.topic,e.reason])),p=0,m("open")},v=e=>{if(i!==e)return;m("connecting");let t=CE[Math.min(p,CE.length-1)];p+=1,a=setTimeout(x,t)},w=(t,r)=>{let o,a=new AbortController,s={topics:t,transport:"sse",close:()=>a.abort(),publish:async(t,r,a)=>{if(!o)return!1;let l=await n(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({token:o,topic:t,type:r,data:a})}).catch(()=>{});return 401===l?.status&&i===s&&x(),l?.ok??!1}};return n(`${e}?${r}`,{headers:{accept:"text/event-stream"},credentials:"same-origin",signal:a.signal}).then(async e=>{if(!e.ok)return d=/* @__PURE__ */new Map,g(t.split(",").map(t=>[t,`http_${String(e.status)}`])),void m("closed");throw await(async e=>{let t=e.body?.getReader();if(!t)return;let n=new TextDecoder,r="";for(;;){let{done:e,value:i}=await t.read();if(e)return;r+=n.decode(i,{stream:!0});let a=r.indexOf("\n\n");for(;-1!==a;){let e=IE(r.slice(0,a));r=r.slice(a+2),a=r.indexOf("\n\n"),"ready"===e?.event&&EE(e.data)?(o=e.data.token,b(s,e.data)):"message"===e?.event&&AE(e.data)&&y(e.data)}}})(e),Error("The realtime stream ended")}).catch(()=>{a.signal.aborted||v(s)}),s},k=(t,n)=>{let o=new r(((e,t)=>{let n=new URL(`${e}?${t}`,globalThis.location.href);return n.protocol="https:"===n.protocol?"wss:":"ws:",n.href})(e,n)),a=/* @__PURE__ */new Map,s=0,l=!1,c=!1,u=()=>{a.forEach(e=>e(!1)),a.clear()},d={topics:t,transport:"websocket",close:()=>{c=!0,u(),o.close()},publish:(e,t,n)=>new Promise(r=>{if(o.readyState!==o.OPEN)return void r(!1);s+=1;let i=s,l=setTimeout(()=>{a.delete(i),r(!1)},5e3);a.set(i,e=>{clearTimeout(l),r(e)}),o.send(JSON.stringify({id:i,topic:e,type:t,data:n}))})};return o.onmessage=e=>{let t=(e=>{try{let t=JSON.parse(String(e));return"object"==typeof t&&t&&"event"in t&&"string"==typeof t.event?{event:t.event,data:"data"in t?t.data:void 0}:void 0}catch{return}})(e.data);"ready"===t?.event&&EE(t.data)?(l=!0,b(d,t.data)):"message"===t?.event&&AE(t.data)?y(t.data):"ack"===t?.event&&(e=>"object"==typeof e&&!!e&&"id"in e&&"number"==typeof e.id&&"ok"in e&&"boolean"==typeof e.ok)(t.data)&&(a.get(t.data.id)?.(t.data.ok),a.delete(t.data.id))},o.onclose=()=>{if(u(),!c&&i===d){if(!l)return h=!1,void x();v(d)}},d};function x(){i?.close(),i=void 0;let e=f();if(!e)return void m("idle");m("connecting");let t=(e=>{let t=e.split(",").flatMap(e=>l.get(e)??[]);return`topics=${encodeURIComponent(e)}${t.length?`&grants=${encodeURIComponent(t.join(","))}`:""}`})(e);i=h?k(e,t):w(e,t)}let S=(e=!1)=>{clearTimeout(o),clearTimeout(a),o=setTimeout(()=>{(e||i?.topics!==f())&&x()},30)},T=e=>"open"===u&&!0===i?.topics.split(",").includes(e),C={subscribe:(e,t)=>{let n=s.get(e)??/* @__PURE__ */new Set;return n.add(t),s.set(e,n),S(),()=>{n.delete(t),n.size||(s.delete(e),l.delete(e),S())}},grant:(e,t)=>{if(l.get(e)===t)return;t?l.set(e,t):l.delete(e);let n=T(e)&&!d.has(e);t&&s.has(e)&&!n&&S(!0)},publish:async(e,t,n)=>{let r=!(!(await(e=>T(e)?Promise.resolve(!0):new Promise(t=>{let n=setTimeout(()=>{r(),t(!1)},5e3),r=C.onStatus(i=>{("closed"===i||T(e))&&(clearTimeout(n),r(),t("closed"!==i))})}))(e))||!i)&&await i.publish(e,t,n);return ME(r?"info":"danger",`${e} → ${t}${r?"":" (not delivered)"}`,{event:"published",topic:e,type:t,data:n,delivered:r}),r},onStatus:e=>(c.add(e),()=>c.delete(e)),get status(){return u},get me(){return i?.me},get transport(){return i?.transport??(h?"websocket":"sse")},refusal:e=>d.get(e)};return C})(e,{transport:t});return OE.set(n,i),i})(a,s):void 0,[a,s]),[c,u]=S(!1),[d,p]=S([]),h=x(void 0),m=x({onMessage:r,onJoin:i,onLeave:o});g(()=>{m.current={onMessage:r,onJoin:i,onLeave:o}}),g(()=>{l&&e&&t&&l.grant(e,t)},[l,e,t]),g(()=>{if(!l||!e)return;let t=((e,t,n)=>{let r=NE.get(e)??/* @__PURE__ */new Map;NE.set(e,r);let i=r.get(t)??((e,t,n)=>{let r,i=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set,a=/* @__PURE__ */new Set,s=!1,l=()=>[...s&&e.me?[{from:e.me,state:r,me:!0}]:[],...[...i.values()].map(e=>e.member)],c=()=>{let e=l();a.forEach(t=>t.onChange(e))},u=e=>{let t=e.flatMap(e=>{let t=i.get(e);return i.delete(e),t?[t.member]:[]});if(t.length){c();for(let e of t)a.forEach(t=>t.onDepart?.(e))}},d=()=>{s&&e.publish(t,"$presence",r)},p=e.subscribe(t,t=>{if(t.from!==e.me){if("$presence"===t.type){let e={from:t.from,...t.user?{user:t.user}:{},state:t.data,me:!1},n=!i.has(t.from)&&o.delete(t.from);i.set(t.from,{member:e,heardAt:Date.now()}),c(),n&&a.forEach(t=>t.onArrive?.(e))}else"$leave"===t.type?(o.delete(t.from),u([t.from])):"$join"===t.type?(o.add(t.from),d()):"$revoked"===t.type&&"server"===t.from&&(i.clear(),o.clear(),c());a.forEach(e=>e.onMessage?.(t))}}),h=e.onStatus(e=>{"open"===e&&(d(),c())}),f=setInterval(()=>{d();let e=Date.now();u([...i].filter(([,t])=>e-t.heardAt>65e3).map(([e])=>e))},2e4);return{members:l,set:e=>{r=e,s=!0,d(),c()},listeners:a,teardown:()=>{clearInterval(f),h(),p(),n()}}})(e,t,()=>r.delete(t));r.set(t,i),i.listeners.add(n);let o=i.members();return o.length&&n.onChange(o),{set:i.set,members:i.members,stop:()=>{i.listeners.delete(n)&&!i.listeners.size&&i.teardown()}}})(l,e,{onChange:p,onMessage:e=>{"$revoked"===e.type&&"server"===e.from&&u(!1),m.current.onMessage?.(e)},onArrive:e=>m.current.onJoin?.(e),onDepart:e=>m.current.onLeave?.(e)});h.current=t,u("open"===l.status&&!l.refusal(e));let n=l.onStatus(t=>u("open"===t&&!l.refusal(e)));return()=>{n(),t.stop(),h.current=void 0,p([]),u(!1)}},[l,e]);let y=void 0===n?void 0:JSON.stringify(n);g(()=>{void 0!==y&&h.current?.set(JSON.parse(y))},[y,l,e]);let b=f((t,n)=>l&&e?l.publish(e,t,n):Promise.resolve(!1),[l,e]),v=f(e=>h.current?.set(e),[]);return{connected:c,me:c?l?.me:void 0,members:d,publish:b,setPresence:v}},PE=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},LE=/* @__PURE__ */new Set(["$presence","$join","$leave"]),DE=Cd(({ref:e,className:t,children:n,topic:r="",grant:i="",presence:o,keep:a=20,subType:s=""})=>{let{id:l,definition:{label:c="Channel"}}=Ed(),{settings:{previewMode:u},contexts:{InteractionsContext:d}}=dc(),{interactionsManager:p}=h(d),m=Math.max(0,Number(a)||0),[g,y]=S([]),b=f(e=>{LE.has(e.type)||(m>0&&y(t=>[...t,e].slice(-m)),p.interactionTrigger(l,"onMessage",{...e}))},[l,p,m]),v=f(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onJoin",{from:e,user:t??"",state:n})},[l,p]),w=f(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onLeave",{from:e,user:t??"",state:n})},[l,p]),x=_E(u&&r?r:void 0,{grant:i||void 0,presence:void 0===o||""===o?void 0:PE(o),onMessage:b,onJoin:v,onLeave:w}),T=k(()=>({publish:{...TE.callbacks.publish,callback:({type:e,data:t})=>"string"==typeof e&&e?x.publish(e,PE(t)):Promise.resolve(!1)},setPresence:{...TE.callbacks.setPresence,callback:({data:e})=>x.setPresence(PE(e))}}),[x]),C=Fl(TE.sourceType,l),E=k(()=>({connected:x.connected,me:x.me??"",members:x.members,messages:g,last:g.at(-1)??null}),[x.connected,x.me,x.members,g]),A=f(()=>kE(E),[E]);ql({id:l,source:C,name:c||`Channel - ${l}`,fields:A});let M=k(()=>C?{runtime:{sources:{[C]:E}}}:qr,[E,C]);/* @__PURE__ */
|
|
95
|
+
return I(cp,{ref:e,tag:s,className:U("plitzi-component__channel",t),interactionTriggers:TE.triggers,interactionCallbacks:T,children:/* @__PURE__ */I(Et,{inherit:"live",name:`Channel:${l}`,value:M,children:n})})}),zE=Object.assign(DE,TE),RE={type:"carousel",sourceType:"carousel",triggers:{onChange:{action:"onChange",title:"On Slide Change",type:"trigger",params:{},preview:{index:"0",item:{}}}},callbacks:{next:{action:"next",title:"Next Slide",type:"callback",params:{},preview:{}},previous:{action:"previous",title:"Previous Slide",type:"callback",params:{},preview:{}},goTo:{action:"goTo",title:"Go To Slide",type:"callback",params:{index:{type:"text",label:"Index (from 0)",defaultValue:"0",canBind:!0}},preview:{}},play:{action:"play",title:"Play",type:"callback",params:{},preview:{}},pause:{action:"pause",title:"Pause",type:"callback",params:{},preview:{}}},content:{attributes:{items:[],mode:"slide",autoplay:0,pauseOnHover:!0,loop:!0,transition:"slide",speed:30,label:""},definition:{label:"Carousel",type:"carousel",description:"Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-images"},defaultStyle:{name:"Carousel",displayMode:"desktop",style:{base:{default:{position:"relative"}}}},settings:{}},initialItems:["carouselTrack"]},jE=l(void 0);jE.displayName="CarouselContext";var $E=(e,t,n,r)=>{if(t<=0)return 0;let i=e+n;return r?(i%t+t)%t:Math.min(t-1,Math.max(0,i))},FE=(e,t)=>{let n="number"==typeof e?e:Number(e);return!Number.isFinite(n)||t<=0?0:Math.min(t-1,Math.max(0,Math.trunc(n)))},qE=(e,t)=>t<e?"previous":"next",BE=e=>{let t=e.firstElementChild;if(!(t instanceof HTMLElement))return 0;let n=Number.parseFloat(getComputedStyle(e).columnGap);return t.offsetWidth+(Number.isFinite(n)?n:0)},UE=(e,t)=>{let n=e.map(e=>{let n=sr(e,t);return"string"==typeof n||"number"==typeof n?`${t}:${String(n)}`:void 0});if(n.every(e=>void 0!==e)&&new Set(n).size===n.length)return n},HE=(e,t)=>(t?UE(e,t):void 0)??UE(e,"id")??e.map((e,t)=>t),WE=Cd(({ref:e,className:t="",children:n,items:r=[],mode:i="slide",autoplay:o=0,pauseOnHover:a=!0,loop:s=!0,transition:l="slide",speed:c=30,itemKey:u,label:d=""})=>{let{id:p,definition:{label:m="Carousel"}}=Ed(),y=Fl(RE.sourceType,p),{settings:{previewMode:b},contexts:{InteractionsContext:v}}=dc(),{interactionsManager:w}=h(v),T=k(()=>Array.isArray(r)?r:[],[r]),C=k(()=>HE(T,u),[T,u]),E=T.length,A=!!b,[M,O]=S(0),[N,_]=S("next"),[P,L]=S(!1),[D,z]=S(o>0),R=x(null),j=e??R,$=x(null),F=FE(M,E);g(()=>{M!==F&&O(F)},[M,F]);let q=f((e,t)=>{0!==E&&e!==F&&(_(t),L(!0),O(e),w.interactionTrigger(p,"onChange",{index:e,item:T[e]}))},[E,F,p,w,T]),B=f(e=>{let t=$.current,n=t?BE(t):0;t&&n>0&&t.scrollBy({left:e*n,behavior:"smooth"})},[]),H=f(()=>{"scroll"!==i?q($E(F,E,1,s),"next"):B(1)},[E,F,s,i,q,B]),W=f(()=>{"scroll"!==i?q($E(F,E,-1,s),"previous"):B(-1)},[E,F,s,i,q,B]),V=f(e=>{let t=FE(e.index,E);"scroll"!==i?q(t,qE(F,t)):B(t-F)},[E,F,i,q,B]),G=f(e=>{e!==F&&q(e,qE(F,e))},[F,q]);(({delay:e,active:t,rootRef:n,pauseOnHover:r,position:i,onTick:o})=>{let[a,s]=S(!1),[l,c]=S(!1),u=x(o);g(()=>{u.current=o},[o]),g(()=>{let e=n.current;if(!e||!t)return;let r=()=>s(!0),i=()=>s(!1),o=e=>{e.target instanceof Element&&e.target.matches(":focus-visible")&&c(!0)},a=t=>{(!(t.relatedTarget instanceof Node)||!e.contains(t.relatedTarget))&&c(!1)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",i),e.addEventListener("focusin",o),e.addEventListener("focusout",a),()=>{e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",i),e.removeEventListener("focusin",o),e.removeEventListener("focusout",a)}},[n,t]);let d=r&&a||l;g(()=>{if(!t||e<=0||d||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=window.setInterval(()=>{"visible"===document.visibilityState&&u.current()},e);return()=>window.clearInterval(n)},[t,e,d,i])})({delay:"slide"===i?o:0,active:A&&D&&E>1,rootRef:j,pauseOnHover:a,position:F,onTick:H});let K=k(()=>({next:{...RE.callbacks.next,callback:H},previous:{...RE.callbacks.previous,callback:W},goTo:{...RE.callbacks.goTo,callback:V},play:{...RE.callbacks.play,callback:()=>z(!0)},pause:{...RE.callbacks.pause,callback:()=>z(!1)}}),[V,H,W]),J=k(()=>({items:T,count:E,index:F,item:T[F],playing:D&&o>0}),[o,E,F,T,D]),Y=f(()=>kE(J),[J]);ql({id:p,source:y,name:m||`Carousel - ${p}`,fields:Y});let X=k(()=>y?{runtime:{sources:{[y]:J}}}:qr,[y,J]),Q=k(()=>({source:y,items:T,keys:C,index:F,direction:N,moved:P,mode:i,transition:l,speed:c,pauseOnHover:a,live:A,scrollerRef:$,onScrolledTo:G}),[F,N,C,T,A,i,P,G,a,y,c,l]);/* @__PURE__ */
|
|
96
|
+
return I(cp,{ref:j,className:U("plitzi-component__carousel",`carousel--${i}`,t),role:"region","aria-roledescription":"carousel","aria-label":d||void 0,interactionTriggers:RE.triggers,interactionCallbacks:K,children:/* @__PURE__ */I(Et,{inherit:"live",name:`Carousel:${p}`,value:X,children:/* @__PURE__ */I(jE,{value:Q,children:n})})})}),VE=({children:e,className:t="",isTemplate:n=!1,index:r=0,record:i,source:o=""})=>{let a=b(),s=k(()=>o?{runtime:{sources:{[o]:{item:i,index:r}}}}:qr,[o,i,r]),l=/* @__PURE__ */I(rg,{children:/* @__PURE__ */I(Et,{inherit:"live",name:`Row:${o}`,segment:a,value:s,children:e})});return n?/* @__PURE__ */M("div",{className:U("plitzi-component__controlled-list-item",t),children:[/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${r+1}`}),l]}):l},GE=({source:e,item:t,position:r,count:i,copy:o=!1,className:a="",children:s})=>{let l=0===n.count(s);/* @__PURE__ */
|
|
97
|
+
return M("div",{className:U("carousel__slide",a),role:"group","aria-roledescription":"slide","aria-label":`${String(r+1)} of ${String(i)}`,"aria-hidden":o||void 0,inert:o||void 0,children:[l&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:`Slide ${String(r+1)}`}),!l&&/* @__PURE__ */I(VE,{index:r,isTemplate:!1,record:t,source:e,children:s})]})},KE=({source:e,items:t,keys:n,speed:r,pauseOnHover:i,live:o,children:a})=>{let s=x(null),[l,c]=S(void 0);g(()=>{let e=s.current;if(!e||r<=0)return;let t=()=>c(e.scrollWidth/2/r);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,t.length]);let u={"--plitzi-marquee-duration":`${String(l??0)}s`};/* @__PURE__ */
|
|
98
|
+
return M("div",{ref:s,className:U("carousel__marquee",{"carousel__marquee--running":o&&void 0!==l,"carousel__marquee--pause-on-hover":i}),style:u,children:[t.map((r,i)=>/* @__PURE__ */I(GE,{source:e,item:r,position:i,count:t.length,children:a},String(n[i]))),o&&t.map((r,i)=>/* @__PURE__ */I(GE,{source:e,item:r,position:i,count:t.length,copy:!0,children:a},`copy:${String(n[i])}`))]})},JE=({source:e,items:t,keys:n,scrollerRef:r,onScrolledTo:i,children:o})=>{let a=x(0),s=f(()=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let e=r.current,t=e?BE(e):0;e&&t>0&&i(Math.round(e.scrollLeft/t))})},[r,i]);/* @__PURE__ */
|
|
99
|
+
return I("div",{ref:r,className:"carousel__scroller",onScroll:s,children:t.map((r,i)=>/* @__PURE__ */I(GE,{source:e,item:r,position:i,count:t.length,children:o},String(n[i])))})},YE=Cd(({ref:e,className:t="",children:n})=>{let r=h(jE),i=r?.items??[],o=r?.mode,a=i.length>0;/* @__PURE__ */
|
|
100
|
+
return M(cp,{ref:e,className:U("plitzi-component__carousel-track",t),children:[!r&&n,r&&!a&&!r.live&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:"This carousel has no items"}),r&&a&&"slide"===o&&/* @__PURE__ */I(GE,{source:r.source,item:i[r.index],position:r.index,count:i.length,className:U(r.live&&r.moved&&`carousel__slide--${r.transition}-${r.direction}`),children:n},String(r.keys[r.index])),r&&a&&"scroll"===o&&/* @__PURE__ */I(JE,{source:r.source,items:i,keys:r.keys,scrollerRef:r.scrollerRef,onScrolledTo:r.onScrolledTo,children:n}),r&&a&&"marquee"===o&&/* @__PURE__ */I(KE,{source:r.source,items:i,keys:r.keys,speed:r.speed,pauseOnHover:r.pauseOnHover,live:r.live,children:n})]})}),XE=Object.assign(YE,{type:"carouselTrack",ancestorType:"carousel",content:{attributes:{},definition:{label:"Carousel Track",type:"carouselTrack",description:"Where a carousel shows its slides: what is inside is one slide, rendered once per item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-film"},defaultStyle:{name:"Carousel Track",displayMode:"desktop",style:{base:{default:{position:"relative",overflow:"hidden"}}}},settings:{}}}),QE=Object.assign(WE,{...RE,plugins:{carouselTrack:XE}}),ZE=["div","header","footer","nav","main","section","article","aside","figure"],eA=Cd(({ref:e,className:t="",subType:n="div",label:r="",decorative:i=!1,live:o="",title:a="",children:s})=>{let l=!i&&r&&ZE.includes(n)?{"aria-label":r,..."div"===n?{role:"group"}:{}}:{},c=i?{"aria-hidden":!0}:{},u=o?{"aria-live":o}:{};/* @__PURE__ */
|
|
101
|
+
return I(cp,{ref:e,tag:n,className:U(`plitzi-component__container plitzi-component__container-${n}`,t),title:a||void 0,...l,...c,...u,children:s})}),tA=Object.assign(eA,{type:"container",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure","dl","dt","dd","li","h1","h2","h3","h4","h5","h6","p","span"],live:["","polite","assertive"]},content:{attributes:{subType:"div"},definition:{label:"Container",type:"container",description:"Generic layout box (a div). The primary building block for structure: groups and positions child elements with flex/grid. Reach for it whenever you need to wrap or arrange other elements.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-crop-simple"},defaultStyle:{name:"Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),nA={"min-height":"30px","min-width":"30px","padding-top":"6px","padding-bottom":"6px","padding-left":"12px","padding-right":"12px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px","background-color":"#4422ee",color:"white","line-height":"24px","font-size":"16px",outline:"none",cursor:"pointer"},rA={type:"dialogContainer",sourceType:"dialogContainer",triggers:{onDialogAccept:{action:"onDialogAccept",title:"On Dialog Accept",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogReject:{action:"onDialogReject",title:"On Dialog Reject",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogOpen:{action:"onDialogOpen",title:"On Dialog Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogClose:{action:"onDialogClose",title:"On Dialog Close",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}}},callbacks:{openDialog:{action:"openDialog",title:"Open Dialog",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeDialog:{action:"closeDialog",title:"Close Dialog",type:"callback",preview:{},params:{}}},content:{attributes:{headerLabel:"Dialog Header",acceptButtonLabel:"Accept",rejectButtonLabel:"Cancel",autoHideAfterClick:!0},definition:{label:"Dialog Container",type:"dialogContainer",description:"A native <dialog> container shown or hidden through interactions (e.g. an onClick open/close).",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-message"},defaultStyle:{name:"Dialog Container",displayMode:"desktop",style:{base:{default:{position:"fixed",top:"0",bottom:"0",left:"0",right:"0","z-index":"200"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","z-index":"210","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%","z-index":"250",width:"500px","max-width":"calc(100vw - 32px)","max-height":"calc(100dvh - 32px)",overflow:"auto","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2"}},headerCloseButton:{default:{height:"28px",width:"28px","padding-top":"4px","padding-bottom":"4px","padding-left":"4px","padding-right":"4px",display:"flex","justify-content":"center","align-items":"center","flex-shrink":"0","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px","background-color":"transparent",color:"inherit","font-style":"inherit","font-weight":"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"auto"}},footerContainer:{default:{display:"flex","justify-content":"flex-end","margin-top":"8px"}},acceptButton:{default:nA},cancelButton:{default:{...nA,"margin-left":"12px"}}},subTypes:{}},settings:{}},initialItems:["container"]},iA=({panelRef:e,open:t,onClose:n})=>{let r=y(n);g(()=>{let n=e.current;if(!t||!n)return;let i=n.ownerDocument.activeElement;n.contains(i)||n.focus({preventScroll:!0});let o=e=>{if(e.defaultPrevented)return;if("Escape"===e.key)return e.preventDefault(),void r();if("Tab"!==e.key)return;let t=(e=>[...e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]')].filter(e=>"function"!=typeof e.checkVisibility||e.checkVisibility()))(n);if(0===t.length)return e.preventDefault(),void n.focus({preventScroll:!0});let i=t[0],o=t[t.length-1],a=n.ownerDocument.activeElement;!e.shiftKey||a!==i&&a!==n&&n.contains(a)?!e.shiftKey&&(a===o||!n.contains(a))&&(e.preventDefault(),i.focus()):(e.preventDefault(),o.focus())},a=n.ownerDocument.defaultView;return a?.addEventListener("keydown",o),()=>{a?.removeEventListener("keydown",o),i instanceof HTMLElement&&i.isConnected&&i.focus({preventScroll:!0})}},[t,e])},oA=Cd(({ref:e,className:t="",children:n,headerLabel:r="Dialog Header",acceptButtonLabel:i="Accept",acceptButtonLabelLoading:o="Loading...",rejectButtonLabel:a="Cancel",autoHideAfterClick:s=!0})=>{let{id:l,rootId:c,visible:u,setElementState:d,definition:{styleSelectors:p,label:m="Dialog"},elementState:y}=Ed(),b=Fl(rA.sourceType,l),{settings:{previewMode:v},contexts:{InteractionsContext:w}}=dc(),{interactionsManager:T}=h(w),[C,E]=S({}),[A,O]=S(!1),N=x(null),_=`${c}_${l}_title`,P=f(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)E(t);else if("string"==typeof t)try{E(JSON.parse(t))}catch{E({content:t})}else E("boolean"==typeof t||"number"==typeof t?{content:t}:{});d(e=>({...e,visibility:!0}))},[d,E]),L=f(()=>{T.interactionTrigger(l,"onDialogClose",{metadata:C}),E({}),d(e=>({...e,visibility:!1}))},[T,d,E,C,l]),D=f(()=>{s&&(T.interactionTrigger(l,"onDialogClose",{metadata:C}),E({}),d(e=>({...e,visibility:!1})))},[T,s,d,E,C,l]),z=f(async()=>{O(!0),await T.interactionTrigger(l,"onDialogAccept",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),R=f(async()=>{O(!0),await T.interactionTrigger(l,"onDialogReject",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),j=k(()=>({openDialog:{...rA.callbacks.openDialog,title:`Open ${m}`,callback:P},closeDialog:{...rA.callbacks.closeDialog,title:`Close ${m}`,callback:L}}),[L,P,m]);iA({panelRef:N,open:!!v&&u,onClose:()=>{R()}}),g(()=>{!1!==y.visibility&&T.interactionTrigger(l,"onDialogOpen",{metadata:C})},[l,T,C,y.visibility]);let $=f(()=>kE(C),[C]);ql({id:l,source:b,name:m||`Dialog - ${l}`,fields:$});let F=k(()=>b?{runtime:{sources:{[b]:C}}}:qr,[b,C]);/* @__PURE__ */
|
|
102
|
+
return M(cp,{ref:e,className:U("plitzi-component__dialog-container",t),interactionTriggers:rA.triggers,interactionCallbacks:j,children:[/* @__PURE__ */I("div",{className:U("dialog-container__background",p.backgroundContainer),"aria-hidden":"true",onClick:D}),/* @__PURE__ */M("div",{ref:N,className:U("dialog-container__root",p.rootContainer),role:"alertdialog","aria-modal":"true","aria-labelledby":_,tabIndex:-1,children:[
|
|
103
103
|
/* @__PURE__ */M("div",{className:U("dialog-container__header",p.headerContainer),children:[/* @__PURE__ */I("div",{id:_,className:U("dialog-container__header__title",p.headerTitle),children:r||"Dialog Header"}),/* @__PURE__ */I("button",{type:"button",className:U("dialog-container__close",p.headerCloseButton),"aria-label":"Close",title:"Close",onClick:R,children:/* @__PURE__ */I("i",{className:"fa-solid fa-xmark","aria-hidden":"true"})})]}),
|
|
104
104
|
/* @__PURE__ */I("div",{className:U("dialog-container__body",p.bodyContainer),children:/* @__PURE__ */I(Et,{inherit:"live",name:`Dialog:${l}`,value:F,children:n})}),
|
|
105
|
-
/* @__PURE__ */M("div",{className:U("dialog-container__footer",p.footerContainer),children:[/* @__PURE__ */M("button",{type:"button",className:U("footer__button button--accept",p.acceptButton),onClick:z,disabled:A,children:[A&&/* @__PURE__ */M("div",{className:"button--accept__container",children:[/* @__PURE__ */I("i",{className:"fa-solid fa-rotate fa-spin","aria-hidden":"true"}),o]}),!A&&i]}),/* @__PURE__ */I("button",{type:"button",className:U("footer__button button--cancel",p.cancelButton),onClick:R,disabled:A,children:a})]})]})]})}),
|
|
106
|
-
return M(
|
|
107
|
-
return M(
|
|
105
|
+
/* @__PURE__ */M("div",{className:U("dialog-container__footer",p.footerContainer),children:[/* @__PURE__ */M("button",{type:"button",className:U("footer__button button--accept",p.acceptButton),onClick:z,disabled:A,children:[A&&/* @__PURE__ */M("div",{className:"button--accept__container",children:[/* @__PURE__ */I("i",{className:"fa-solid fa-rotate fa-spin","aria-hidden":"true"}),o]}),!A&&i]}),/* @__PURE__ */I("button",{type:"button",className:U("footer__button button--cancel",p.cancelButton),onClick:R,disabled:A,children:a})]})]})]})}),aA=Object.assign(oA,rA),sA={type:"list",attributeValues:{subType:["ul","ol"],source:["none","controlled"]},sourceType:"list",content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"List",type:"list",description:'Repeats a template (its row: a listItem, or a container with subType "li") once per entry of a data array — the way to render a dynamic collection, as a <ul> (subType "ol" for a numbered one). Bind its items to a data source (e.g. an apiContainer response).',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}},subTypes:{ul:{name:"List UL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}},ol:{name:"List OL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}}}},settings:{}},initialItems:["listItem","listItem","listItem"]},lA=({ref:e,className:t="",subType:n="ul",children:r,label:i=""})=>/* @__PURE__ */I(cp,{ref:e,tag:n,className:U("plitzi-component__list",t),"aria-label":i||void 0,children:r}),cA=({ref:e,className:t="",subType:n="ul",children:r,items:i=[],itemKey:o,label:a=""})=>{let{id:s,definition:{label:l}}=Ed(),c=Fl(sA.sourceType,s),{settings:{previewMode:u}}=dc(),d=k(()=>Array.isArray(i)?i:[],[i]),p=k(()=>HE(d,o),[d,o]),h=f(()=>Ur({item:sr(d,"0",{}),index:0}).reduce((e,t)=>[...e,{path:t,name:t}],[]),[d]),m=k(()=>c?{runtime:{sources:{[c]:{items:d}}}}:qr,[c,d]);return ql({id:s,source:c,name:l||`List - ${s}`,fields:h}),/* @__PURE__ */M(cp,{ref:e,tag:n,"aria-label":a||void 0,className:U("plitzi-component__controlled-list",t,{"controlled-list--build-mode":!u}),children:[/* @__PURE__ */I(Et,{inherit:"live",name:`List:${s}`,value:m,children:d.map((e,t)=>!r||Array.isArray(r)&&0===r.length?/* @__PURE__ */I("div",{className:"plitzi-component__controlled-list-item controlled-list--empty",children:/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${t+1}`})},t):/* @__PURE__ */I(VE,{index:t,isTemplate:0!==t&&!u,record:e,source:c,children:r},p[t]))}),!u&&0===d.length&&/* @__PURE__ */I("div",{className:"controlled-list controlled-list--empty",children:"This list does not contain any items"})]})},uA=Cd(({ref:e,className:t="",subType:n="ul",children:r,items:i=[],source:o="none",itemKey:a,label:s=""})=>"controlled"===o?/* @__PURE__ */I(cA,{ref:e,className:t,subType:n,items:i,itemKey:a,label:s,children:r}):/* @__PURE__ */I(lA,{ref:e,className:t,subType:n,label:s,children:r})),dA=Cd(({ref:e,className:t="",children:n})=>/* @__PURE__ */I(cp,{tag:"li",ref:e,className:U("plitzi-component__list-item",t),children:n})),pA=Object.assign(dA,{type:"listItem",content:{attributes:{},definition:{label:"List Item",type:"listItem",description:"The List Item element lets you add more items to existing List elements. You can then add any content you would like to them, including links, images, etc.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["listItem"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-grip-lines"},defaultStyle:{name:"List Item",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),hA=Object.assign(uA,{...sA,plugins:{listItem:pA}}),fA={type:"modalContainer",sourceType:"modalContainer",triggers:{onModalOpen:{action:"onModalOpen",title:"On Modal Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onModalClose:{action:"onModalClose",title:"On Modal Close",type:"trigger",preview:{},params:{}}},callbacks:{openModal:{action:"openModal",title:"Open Modal",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeModal:{action:"closeModal",title:"Close Modal",type:"callback",params:{},preview:{}}},content:{attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",type:"modalContainer",description:"A modal overlay container opened and closed through interactions; use for dialogs over the page.",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Modal Container",displayMode:"desktop",style:{base:{default:{position:"fixed",top:"0",bottom:"0",left:"0",right:"0","z-index":"200"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","z-index":"210","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%","z-index":"250",width:"500px","max-width":"calc(100vw - 32px)","max-height":"calc(100dvh - 32px)",overflow:"auto","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between","border-bottom-width":"1px","border-bottom-color":"light-dark(#d1d5db, oklch(0.37 0.013 285.805))","border-bottom-style":"solid","padding-left":"20px","padding-right":"20px","padding-top":"10px","padding-bottom":"10px"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2"}},headerCloseButton:{default:{height:"28px",width:"28px","padding-top":"4px","padding-bottom":"4px","padding-left":"4px","padding-right":"4px",display:"flex","justify-content":"center","align-items":"center","flex-shrink":"0","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px","background-color":"transparent",color:"inherit","font-style":"inherit","font-weight":"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"auto","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}},subTypes:{}},settings:{}},initialItems:["container"]},mA=Cd(({ref:e,className:t="",children:n,title:r="Modal Header",autoHideAfterClick:i=!0})=>{let{id:o,rootId:a,visible:s,definition:{styleSelectors:l,label:c="Modal"},elementState:u,setElementState:d}=Ed(),p=Fl(fA.sourceType,o),{settings:{previewMode:m},contexts:{InteractionsContext:y}}=dc(),{interactionsManager:b}=h(y),[v,w]=S({}),T=x(null),C=`${a}_${o}_title`,E=f(e=>{let{metadata:t}=e;w(t&&"object"==typeof t?t:"string"==typeof t?(e=>{try{let t=JSON.parse(e);if(nr(t))return t}catch{}return{content:e}})(t):"boolean"==typeof t||"number"==typeof t?{content:t}:{}),d(e=>({...e,visibility:!0}))},[d,w]),A=f(()=>{b.interactionTrigger(o,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1}))},[b,d,w,v,o]),O=f(()=>{i&&(b.interactionTrigger(o,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1})))},[b,i,d,w,v,o]),N=k(()=>({openModal:{...fA.callbacks.openModal,title:`Open ${c}`,callback:E},closeModal:{...fA.callbacks.closeModal,title:`Close ${c}`,callback:A}}),[A,E,c]);iA({panelRef:T,open:!!m&&s,onClose:A}),g(()=>{!1!==u.visibility&&b.interactionTrigger(o,"onModalOpen",{metadata:v})},[o,b,v,u.visibility]);let _=f(()=>kE(v),[v]);ql({id:o,source:p,name:c||`Modal - ${o}`,fields:_});let P=k(()=>p?{runtime:{sources:{[p]:v}}}:qr,[p,v]);/* @__PURE__ */
|
|
106
|
+
return M(cp,{ref:e,className:U("plitzi-component__modal-container",t),interactionTriggers:fA.triggers,interactionCallbacks:N,children:[/* @__PURE__ */I("div",{className:U("modal-container__background",l.backgroundContainer),"aria-hidden":"true",onClick:O}),/* @__PURE__ */M("div",{ref:T,className:U("modal-container__root",l.rootContainer),role:"dialog","aria-modal":"true","aria-labelledby":C,tabIndex:-1,children:[/* @__PURE__ */M("div",{className:U("modal-container__header",l.headerContainer),children:[/* @__PURE__ */I("div",{id:C,className:U("modal-container__header__title",l.headerTitle),children:r||"Modal Header"}),/* @__PURE__ */I("button",{type:"button",className:U("modal-container__close",l.headerCloseButton),"aria-label":"Close",title:"Close",onClick:A,children:/* @__PURE__ */I("i",{className:"fa-solid fa-xmark","aria-hidden":"true"})})]}),/* @__PURE__ */I("div",{className:U("modal-container__body",l.bodyContainer),children:/* @__PURE__ */I(Et,{inherit:"live",name:`Modal:${o}`,value:P,children:n})})]})]})}),gA=Object.assign(mA,fA),yA={type:"pagination",attributeValues:{mode:["pages","loadMore"],target:["url","interaction"]},triggers:{onPageChange:{action:"onPageChange",title:"On Page Change",type:"trigger",params:{},preview:{page:"1"}}},content:{attributes:{pageInfo:{},mode:"pages",target:"url",pageParam:"page",windowSize:5,previousLabel:"Previous",nextLabel:"Next",loadMoreLabel:"Load more"},definition:{label:"Pagination",type:"pagination",description:'Pages through a list. Bind it to a provider page info: in URL mode it writes the page into the address bar so the result stays shareable and indexable, and in load-more mode it announces the next page for the provider to append. Its buttons take a class through their slots: `previous`, `page` (each numbered one — the page shown carries `aria-current="page"`, so the class\'s `current` state dresses it), `next` and `loadMore`; one with nowhere to go is disabled, the `disabled` state.',items:[],bindings:{},styleSelectors:{base:"",previous:"",page:"",next:"",loadMore:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-ellipsis"},defaultStyle:{name:"Pagination",displayMode:"desktop",style:{base:{default:{display:"flex","align-items":"center","row-gap":"8px","column-gap":"8px"}}},subTypes:{}},settings:{}}},bA=Cd(({ref:e,className:t="",children:n,pageInfo:r=qr,mode:i="pages",pageParam:o="page",target:a="url",windowSize:s=5,previousLabel:l="Previous",nextLabel:c="Next",loadMoreLabel:u="Load more",label:d="Pagination"})=>{let{id:p,definition:{styleSelectors:m}}=Ed(),{settings:{previewMode:g},contexts:{InteractionsContext:y}}=dc(),{interactionsManager:b}=h(y),[v]=zt("navigation.navigate"),w=r.page??1,x=r.pageCount??0,S=r.hasPrevPage??w>1,T=r.hasNextPage??!1,C=k(()=>((e,t,n)=>{if(t<=0||n<=0)return[];let r=Math.min(n,t),i=Math.min(Math.max(e-Math.floor(r/2),1),t-r+1);return Array.from({length:r},(e,t)=>i+t)})(w,x,s),[w,x,s]),E=f(e=>{let t=Math.max(e,1);p&&b.interactionTrigger(p,"onPageChange",{page:t}),"url"===a&&v(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(o,t))},[p,b,a,v,o]),O=f(e=>t=>{t.preventDefault(),E(e)},[E]),N=0===x&&!T&&!S;/* @__PURE__ */
|
|
107
|
+
return M(cp,{ref:e,tag:"nav","aria-label":d||void 0,className:U("plitzi-component__pagination",t),interactionTriggers:yA.triggers,children:["loadMore"===i&&/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-more",m.loadMore),disabled:!T&&g,onClick:O(w+1),children:u}),"pages"===i&&/* @__PURE__ */M(A,{children:[
|
|
108
108
|
/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-prev",m.previous),disabled:!S&&g,onClick:O(w-1),children:l}),C.map(e=>/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-page",{"plitzi-component__pagination-page--current":e===w},m.page),"aria-current":e===w?"page":void 0,onClick:O(e),children:e},e)),
|
|
109
|
-
/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-next",m.next),disabled:!T&&g,onClick:O(w+1),children:c})]}),!g&&N&&/* @__PURE__ */I("span",{className:"plitzi-component__pagination-hint",children:"Bind pageInfo"}),n]})}),
|
|
110
|
-
return I(
|
|
111
|
-
return I(
|
|
112
|
-
return I(
|
|
113
|
-
return I(sp,{ref:n,onClick:p,className:U("plitzi-component__tab-container-item",e,{active:c}),...r?m:{},children:t})}),CA=Object.assign(TA,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-folder"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),EA=Object.assign(vA,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:SA,tabContainerBody:kA,tabContainerItem:CA}}),AA=l({addToast:()=>{}});AA.displayName="ToastContext";var IA=e=>"number"==typeof e&&!isNaN(e),MA=e=>"string"==typeof e,OA=e=>"function"==typeof e,NA=e=>MA(e)||OA(e)?e:null,_A=(e,t)=>!1===e||IA(e)&&e>0?e:t,PA=e=>u(e)||MA(e)||OA(e)||IA(e);function LA({enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}){return function({children:a,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let h=r?`${e}--${s}`:e,f=r?`${n}--${s}`:n,m=x(0);return w(()=>{let e=u.current,t=h.split(" "),n=r=>{r.target===u.current&&(p(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===m.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),g(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,c,o):c()};d||(l?t():(m.current=1,e.className+=` ${f}`,e.addEventListener("animationend",t)))},[d]),t.createElement(t.Fragment,null,a)}}function DA(e,t){return{content:zA(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function zA(e,t,n=!1){return u(e)&&!MA(e.type)?s(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):OA(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function RA({delay:e,isRunning:n,closeToast:r,type:i="default",hide:o,className:a,controlledProgress:s,progress:l,rtl:c,isIn:u,theme:d}){let p=o||s&&0===l,h={animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};s&&(h.transform=`scaleX(${l})`);let f=U("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=OA(a)?a({rtl:c,type:i,defaultClassName:f}):U(f,a),g={[s&&l>=1?"onTransitionEnd":"onAnimationEnd"]:s&&l<1?null:()=>{u&&r()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${i}`}),t.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":s?Math.round(100*l):void 0,"aria-valuemin":0,"aria-valuemax":100,className:m,style:h,...g}))}var jA=1,$A=()=>""+jA++;var FA=/* @__PURE__ */new Map,qA=[],BA=/* @__PURE__ */new Set,UA=e=>BA.forEach(t=>t(e)),HA=()=>FA.size>0;function WA(e,t){var n;if(t)return!(null==(n=FA.get(t))||!n.isToastActive(e));let r=!1;return FA.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function VA(e,t){PA(e)&&(HA()||qA.push({content:e,options:t}),FA.forEach(n=>{n.buildToast(e,t)}))}function GA(e,t){FA.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function KA(e){let t=e.containerId||1;return{subscribe(n){let r=function(e,t,n){let r=1,i=0,o=[],a=[],s=t,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u=()=>{a=Array.from(l.values()),c.forEach(e=>e())},d=e=>{var t,r;e.isActive&&(null==(r=null==(t=e.props)?void 0:t.onClose)||r.call(t,e.removalReason),e.isActive=!1,n(DA(e,"removed")))},p=e=>{if(null==e)l.forEach(d);else{let t=l.get(e);t&&d(t)}u()},h=e=>{var t,r;let{toastId:i,updateId:o}=e.props,a=null==o;e.staleId&&l.delete(e.staleId),e.isActive=!0,l.set(i,e),u(),n(DA(e,a?"added":"updated")),a&&(null==(r=(t=e.props).onOpen)||r.call(t))};return{id:e,props:s,observe:e=>(c.add(e),()=>c.delete(e)),toggle:(e,t)=>{l.forEach(n=>{var r;(null==t||t===n.props.toastId)&&(null==(r=n.toggle)||r.call(n,e))})},removeToast:p,toasts:l,clearQueue:()=>{i-=o.length,o=[]},buildToast:(t,n)=>{if((({containerId:t,toastId:n,updateId:r})=>{let i=t?t!==e:1!==e,o=l.has(n)&&null==r;return i||o})(n))return;let{toastId:a,updateId:c,data:d,staleId:f,delay:m}=n,g=null==c;g&&i++;let y={...s,style:s.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t)),toastId:a,updateId:c,data:d,isIn:!1,className:NA(n.className||s.toastClassName),progressClassName:NA(n.progressClassName||s.progressClassName),autoClose:!n.isLoading&&_A(n.autoClose,s.autoClose),closeToast(e){let t=l.get(a);t&&(t.removalReason=e,p(a))},deleteToast(){if(null!=l.get(a)){if(l.delete(a),i--,i<0&&(i=0),o.length>0)return void h(o.shift());u()}}};y.closeButton=s.closeButton,!1===n.closeButton||PA(n.closeButton)?y.closeButton=n.closeButton:!0===n.closeButton&&(y.closeButton=!PA(s.closeButton)||s.closeButton);let b={content:t,props:y,staleId:f};s.limit&&s.limit>0&&i>s.limit&&g?o.push(b):IA(m)?setTimeout(()=>{h(b)},m):h(b)},setProps(e){s=e},setToggle:(e,t)=>{let n=l.get(e);n&&(n.toggle=t)},isToastActive:e=>{var t;return null==(t=l.get(e))?void 0:t.isActive},getSnapshot:()=>a}}(t,e,UA);FA.set(t,r);let i=r.observe(n);return qA.forEach(e=>VA(e.content,e.options)),qA=[],()=>{i(),FA.delete(t)}},setProps(e){var n;null==(n=FA.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=FA.get(t))?void 0:e.getSnapshot()}}}function JA(e){return e&&(MA(e.toastId)||IA(e.toastId))?e.toastId:$A()}function YA(e,t){return VA(e,t),t.toastId}function XA(e,t){return{...t,type:t&&t.type||e,toastId:JA(t)}}function QA(e){return(t,n)=>YA(t,XA(e,n))}function ZA(e,t){return YA(e,XA("default",t))}ZA.loading=(e,t)=>YA(e,XA("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ZA.promise=function(e,{pending:t,error:n,success:r},i){let o;t&&(o=MA(t)?ZA.loading(t,i):ZA.loading(t.render,{...i,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,n)=>{if(null==t)return void ZA.dismiss(o);let r={type:e,...a,...i,data:n},s=MA(t)?{render:t}:t;return o?ZA.update(o,{...r,...s}):ZA(s.render,{...r,...s}),n},l=OA(e)?e():e;return l.then(e=>s("success",r,e)).catch(e=>s("error",n,e)),l},ZA.success=QA("success"),ZA.info=QA("info"),ZA.error=QA("error"),ZA.warning=QA("warning"),ZA.warn=ZA.warning,ZA.dark=(e,t)=>YA(e,XA("default",{theme:"dark",...t})),ZA.dismiss=function(e){!function(e){if(HA()){if(null==e||(e=>MA(e)||IA(e))(e))FA.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=FA.get(e.containerId);t?t.removeToast(e.id):FA.forEach(t=>{t.removeToast(e.id)})}}else qA=qA.filter(t=>null!=e&&t.options.toastId!==e)}(e)},ZA.clearWaitingQueue=(e={})=>{FA.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},ZA.isActive=WA,ZA.update=(e,t={})=>{let n=((e,{containerId:t})=>{var n;return null==(n=FA.get(t||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:$A()};o.toastId!==e&&(o.staleId=e);let a=o.render||i;delete o.render,YA(a,o)}},ZA.done=e=>{ZA.update(e,{progress:1})},ZA.onChange=function(e){return BA.add(e),()=>{BA.delete(e)}},ZA.play=e=>GA(!0,e),ZA.pause=e=>GA(!1,e);var eI="undefined"!=typeof window?w:g,tI=({theme:e,type:n,isLoading:r,...i})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...i}),nI={info:function(e){return t.createElement(tI,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return t.createElement(tI,{...e},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return t.createElement(tI,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return t.createElement(tI,{...e},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};var rI=e=>{let{isRunning:n,preventExitTransition:r,toastRef:i,eventHandlers:o,playToast:a}=function(e){let[t,n]=S(!1),[r,i]=S(!1),o=x(null),a=x({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;function p(){n(!0)}function h(){n(!1)}function f(n){let r=o.current;if(a.canDrag&&r){a.didMove=!0,t&&h(),"x"===e.draggableDirection?a.delta=n.clientX-a.start:a.delta=n.clientY-a.start,a.start!==n.clientX&&(a.canCloseOnClick=!1);let i="x"===e.draggableDirection?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;r.style.transform=`translate3d(${i},0)`,r.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance))}}function m(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",m);let t=o.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=FA.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:n}),g(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",p),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){a.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",m);let n=o.current;a.canCloseOnClick=!0,a.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(a.start=t.clientX,a.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(a.start=t.clientY,a.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:n,bottom:r,left:i,right:a}=o.current.getBoundingClientRect();"mouse"===t.pointerType&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=a&&t.clientY>=n&&t.clientY<=r?h():p()}};return s&&l&&(y.onMouseEnter=h,e.stacked||(y.onMouseLeave=p)),d&&(y.onClick=e=>{u&&u(e),a.canCloseOnClick&&c(!0)}),{playToast:p,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:y}}(e),{closeButton:l,children:c,autoClose:d,onClick:p,type:h,hideProgressBar:f,closeToast:m,transition:y,position:b,className:v,style:w,progressClassName:k,updateId:T,role:C,progress:E,rtl:A,toastId:I,deleteToast:M,isIn:O,isLoading:N,closeOnClick:_,theme:P,ariaLabel:L}=e,D=U("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":_}),z=OA(v)?v({rtl:A,position:b,type:h,defaultClassName:D}):U(D,v),R=function({theme:e,type:t,isLoading:n,icon:r}){let i=null,o={theme:e,type:t};return!1===r||(OA(r)?i=r({...o,isLoading:n}):u(r)?i=s(r,o):n?i=nI.spinner():(e=>e in nI)(t)&&(i=nI[t](o))),i}(e),j=!!E||!d,$={closeToast:m,type:h,theme:P},F=null;return!1===l||(F=OA(l)?l($):u(l)?s(l,$):function({closeToast:e,theme:n,ariaLabel:r="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":r},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}($)),t.createElement(y,{isIn:O,done:M,position:b,preventExitTransition:r,nodeRef:i,playToast:a},t.createElement("div",{id:I,tabIndex:0,onClick:p,"data-in":O,className:z,...o,style:w,ref:i,...O&&{role:C,"aria-label":L}},null!=R&&t.createElement("div",{className:U("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},R),zA(c,e,!n),F,!e.customProgressBar&&t.createElement(RA,{...T&&!j?{key:`p-${T}`}:{},rtl:A,theme:P,delay:d,isRunning:n,isIn:O,closeToast:m,hide:f,type:h,className:k,controlledProgress:j,progress:E||0})))},iI=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),oI=LA(iI("bounce",!0)),aI=(LA(iI("slide",!0)),LA(iI("zoom")),LA(iI("flip")),{position:"top-right",transition:oI,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function sI(e){let n={...aI,...e},r=e.stacked,[i,o]=S(!0),a=x(null),{getToastToRender:s,isToastActive:l,count:c}=function(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=x(KA(e)).current;i(e);let o=null==(t=T(n,r,r))?void 0:t.slice();return{getToastToRender:function(t){if(!o)return[];let n=/* @__PURE__ */new Map;return e.newestOnTop&&o.reverse(),o.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:WA,count:null==o?void 0:o.length}}(n),{className:u,style:d,rtl:p,containerId:h,hotKeys:f}=n;function m(e){let t=U("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":p});return OA(u)?u({position:e,rtl:p,defaultClassName:t}):U(t,NA(u))}function y(){r&&(o(!0),ZA.play())}return eI(()=>{var e;if(r){let t=a.current.querySelectorAll('[data-in="true"]'),r=12,o=null==(e=n.position)?void 0:e.includes("top"),s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{let n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${i}`),n.dataset.pos||(n.dataset.pos=o?"top":"bot");let a=s*(i?.2:1)+(i?0:r*t),c=Math.max(.5,1-(i?l:0));n.style.setProperty("--y",`${o?a:-1*a}px`),n.style.setProperty("--g",`${r}`),n.style.setProperty("--s",`${c}`),s+=n.offsetHeight,l+=.025})}},[i,c,r]),g(()=>{function e(e){var t;let n=a.current;f(e)&&(null==(t=null==n?void 0:n.querySelector('[tabIndex="0"]'))||t.focus(),o(!1),ZA.pause()),"Escape"===e.key&&(document.activeElement===n||null!=n&&n.contains(document.activeElement))&&(o(!0),ZA.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[f]),t.createElement("section",{ref:a,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ZA.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":n["aria-label"]},s((e,n)=>{let i=n.length?{...d}:{...d,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:m(e),"data-stacked":r,style:i,key:`c-${e}`},n.map(({content:e,props:n})=>t.createElement(rI,{...n,stacked:r,collapseAll:y,isIn:l(n.toastId,n.containerId),key:`t-${n.key}`},e)))}))}var lI=/* @__PURE__ */new Map;function cI(e){return((e,t)=>{eI(()=>{if("undefined"==typeof document)return;let n=document,r=lI.get(n);if(r)return void(t&&r.setAttribute("nonce",t));let i=n.createElement("style");i.textContent=e,t&&i.setAttribute("nonce",t),n.head.appendChild(i),lI.set(n,i)},[t])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",e.nonce),t.createElement(sI,{...e})}var uI=({children:e,classNameToast:t="",classNameContainer:n="",isFixed:r=!0,containerId:i})=>{let o=k(()=>i??crypto.randomUUID(),[i]),a=f(async(e,n={})=>{let{appeareance:r="default",placement:i="top-right",autoDismiss:a=!0,autoDismissTimeout:s=5e3,theme:l="light",icon:c}=n,u=ZA;r&&"default"!==r&&ZA[r]&&(u=ZA[r]),u(e,{className:t,position:i,autoClose:!!a&&s,hideProgressBar:!a,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:l,icon:c,containerId:o})},[t,o]),s=k(()=>({addToast:a}),[a]);/* @__PURE__ */
|
|
114
|
-
return M(
|
|
115
|
-
return I(
|
|
116
|
-
return I(
|
|
117
|
-
return M(
|
|
109
|
+
/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-next",m.next),disabled:!T&&g,onClick:O(w+1),children:c})]}),!g&&N&&/* @__PURE__ */I("span",{className:"plitzi-component__pagination-hint",children:"Bind pageInfo"}),n]})}),vA=Object.assign(bA,yA),wA=l(void 0);wA.displayName="TabContainerContext";var kA=Cd(({ref:e,className:t="",children:n})=>{let{id:r,rootId:i}=Ed(),[o,a]=S(0),s=`${i}_${r}`,l=k(()=>({baseId:s,tabSelected:o,onSelect:a}),[s,o]);/* @__PURE__ */
|
|
110
|
+
return I(cp,{ref:e,className:U("plitzi-component__tab-container",t),children:/* @__PURE__ */I(wA,{value:l,children:n})})}),xA=Cd(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:o,onSelect:a}=h(wA),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(s(t,{...r,internalProps:{...r.internalProps,baseId:i,onSelect:a,tabSelected:o,tabIndex:n}}))}),e},[i,r,a,o]);/* @__PURE__ */
|
|
111
|
+
return I(cp,{ref:e,className:U("plitzi-component__tab-container-body",t),children:l})}),SA=Object.assign(xA,{type:"tabContainerBody",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Body",type:"tabContainerBody",description:"The panel area inside a tabContainer that shows the active tab item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Body",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),TA=Cd(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:o,onSelect:a}=h(wA),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]},t=n.toArray(r).filter(u).length;return n.forEach(r,(n,r)=>{if(!u(n))return;let l=n.props;e.childrenParsed.push(s(n,{...l,internalProps:{...l.internalProps,isHeader:!0,baseId:i,onSelect:a,tabSelected:o,tabIndex:r,tabCount:t}}))}),e},[i,r,a,o]);/* @__PURE__ */
|
|
112
|
+
return I(cp,{ref:e,role:"tablist",className:U("plitzi-component__tab-container-header",t),children:l})}),CA=Object.assign(TA,{type:"tabContainerHeader",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Header",type:"tabContainerHeader",description:"The row of tab triggers inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Header",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),EA=Cd(({className:e="",children:t,ref:n,baseId:r="",tabSelected:i,tabIndex:o=0,tabCount:a=0,isHeader:s,onSelect:l})=>{let c=i===o,u=`${r}_tab_${o}`,d=`${r}_panel_${o}`,p=f(()=>{s&&!c&&l?.(o)},[s,c,o,l]),h=f(e=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void l?.(o);let t=((e,t,n)=>{switch(e){case"ArrowRight":case"ArrowDown":return(t+1)%n;case"ArrowLeft":case"ArrowUp":return(t-1+n)%n;case"Home":return 0;case"End":return n-1;default:return}})(e.key,o,a);void 0!==t&&0!==a&&(e.preventDefault(),l?.(t),e.currentTarget.ownerDocument.getElementById(`${r}_tab_${t}`)?.focus())},[r,o,a,l]),m=s?{id:u,role:"tab","aria-selected":c,"aria-controls":d,tabIndex:c?0:-1,onKeyDown:h}:{id:d,role:"tabpanel","aria-labelledby":u,tabIndex:0,hidden:!c};/* @__PURE__ */
|
|
113
|
+
return I(cp,{ref:n,onClick:p,className:U("plitzi-component__tab-container-item",e,{active:c}),...r?m:{},children:t})}),AA=Object.assign(EA,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-folder"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),IA=Object.assign(kA,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:CA,tabContainerBody:SA,tabContainerItem:AA}}),MA=l({addToast:()=>{}});MA.displayName="ToastContext";var OA=e=>"number"==typeof e&&!isNaN(e),NA=e=>"string"==typeof e,_A=e=>"function"==typeof e,PA=e=>NA(e)||_A(e)?e:null,LA=(e,t)=>!1===e||OA(e)&&e>0?e:t,DA=e=>u(e)||NA(e)||_A(e)||OA(e);function zA({enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}){return function({children:a,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let h=r?`${e}--${s}`:e,f=r?`${n}--${s}`:n,m=x(0);return w(()=>{let e=u.current,t=h.split(" "),n=r=>{r.target===u.current&&(p(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===m.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),g(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,c,o):c()};d||(l?t():(m.current=1,e.className+=` ${f}`,e.addEventListener("animationend",t)))},[d]),t.createElement(t.Fragment,null,a)}}function RA(e,t){return{content:jA(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function jA(e,t,n=!1){return u(e)&&!NA(e.type)?s(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):_A(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function $A({delay:e,isRunning:n,closeToast:r,type:i="default",hide:o,className:a,controlledProgress:s,progress:l,rtl:c,isIn:u,theme:d}){let p=o||s&&0===l,h={animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};s&&(h.transform=`scaleX(${l})`);let f=U("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=_A(a)?a({rtl:c,type:i,defaultClassName:f}):U(f,a),g={[s&&l>=1?"onTransitionEnd":"onAnimationEnd"]:s&&l<1?null:()=>{u&&r()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${i}`}),t.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":s?Math.round(100*l):void 0,"aria-valuemin":0,"aria-valuemax":100,className:m,style:h,...g}))}var FA=1,qA=()=>""+FA++;var BA=/* @__PURE__ */new Map,UA=[],HA=/* @__PURE__ */new Set,WA=e=>HA.forEach(t=>t(e)),VA=()=>BA.size>0;function GA(e,t){var n;if(t)return!(null==(n=BA.get(t))||!n.isToastActive(e));let r=!1;return BA.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function KA(e,t){DA(e)&&(VA()||UA.push({content:e,options:t}),BA.forEach(n=>{n.buildToast(e,t)}))}function JA(e,t){BA.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function YA(e){let t=e.containerId||1;return{subscribe(n){let r=function(e,t,n){let r=1,i=0,o=[],a=[],s=t,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u=()=>{a=Array.from(l.values()),c.forEach(e=>e())},d=e=>{var t,r;e.isActive&&(null==(r=null==(t=e.props)?void 0:t.onClose)||r.call(t,e.removalReason),e.isActive=!1,n(RA(e,"removed")))},p=e=>{if(null==e)l.forEach(d);else{let t=l.get(e);t&&d(t)}u()},h=e=>{var t,r;let{toastId:i,updateId:o}=e.props,a=null==o;e.staleId&&l.delete(e.staleId),e.isActive=!0,l.set(i,e),u(),n(RA(e,a?"added":"updated")),a&&(null==(r=(t=e.props).onOpen)||r.call(t))};return{id:e,props:s,observe:e=>(c.add(e),()=>c.delete(e)),toggle:(e,t)=>{l.forEach(n=>{var r;(null==t||t===n.props.toastId)&&(null==(r=n.toggle)||r.call(n,e))})},removeToast:p,toasts:l,clearQueue:()=>{i-=o.length,o=[]},buildToast:(t,n)=>{if((({containerId:t,toastId:n,updateId:r})=>{let i=t?t!==e:1!==e,o=l.has(n)&&null==r;return i||o})(n))return;let{toastId:a,updateId:c,data:d,staleId:f,delay:m}=n,g=null==c;g&&i++;let y={...s,style:s.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t)),toastId:a,updateId:c,data:d,isIn:!1,className:PA(n.className||s.toastClassName),progressClassName:PA(n.progressClassName||s.progressClassName),autoClose:!n.isLoading&&LA(n.autoClose,s.autoClose),closeToast(e){let t=l.get(a);t&&(t.removalReason=e,p(a))},deleteToast(){if(null!=l.get(a)){if(l.delete(a),i--,i<0&&(i=0),o.length>0)return void h(o.shift());u()}}};y.closeButton=s.closeButton,!1===n.closeButton||DA(n.closeButton)?y.closeButton=n.closeButton:!0===n.closeButton&&(y.closeButton=!DA(s.closeButton)||s.closeButton);let b={content:t,props:y,staleId:f};s.limit&&s.limit>0&&i>s.limit&&g?o.push(b):OA(m)?setTimeout(()=>{h(b)},m):h(b)},setProps(e){s=e},setToggle:(e,t)=>{let n=l.get(e);n&&(n.toggle=t)},isToastActive:e=>{var t;return null==(t=l.get(e))?void 0:t.isActive},getSnapshot:()=>a}}(t,e,WA);BA.set(t,r);let i=r.observe(n);return UA.forEach(e=>KA(e.content,e.options)),UA=[],()=>{i(),BA.delete(t)}},setProps(e){var n;null==(n=BA.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=BA.get(t))?void 0:e.getSnapshot()}}}function XA(e){return e&&(NA(e.toastId)||OA(e.toastId))?e.toastId:qA()}function QA(e,t){return KA(e,t),t.toastId}function ZA(e,t){return{...t,type:t&&t.type||e,toastId:XA(t)}}function eI(e){return(t,n)=>QA(t,ZA(e,n))}function tI(e,t){return QA(e,ZA("default",t))}tI.loading=(e,t)=>QA(e,ZA("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),tI.promise=function(e,{pending:t,error:n,success:r},i){let o;t&&(o=NA(t)?tI.loading(t,i):tI.loading(t.render,{...i,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,n)=>{if(null==t)return void tI.dismiss(o);let r={type:e,...a,...i,data:n},s=NA(t)?{render:t}:t;return o?tI.update(o,{...r,...s}):tI(s.render,{...r,...s}),n},l=_A(e)?e():e;return l.then(e=>s("success",r,e)).catch(e=>s("error",n,e)),l},tI.success=eI("success"),tI.info=eI("info"),tI.error=eI("error"),tI.warning=eI("warning"),tI.warn=tI.warning,tI.dark=(e,t)=>QA(e,ZA("default",{theme:"dark",...t})),tI.dismiss=function(e){!function(e){if(VA()){if(null==e||(e=>NA(e)||OA(e))(e))BA.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=BA.get(e.containerId);t?t.removeToast(e.id):BA.forEach(t=>{t.removeToast(e.id)})}}else UA=UA.filter(t=>null!=e&&t.options.toastId!==e)}(e)},tI.clearWaitingQueue=(e={})=>{BA.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},tI.isActive=GA,tI.update=(e,t={})=>{let n=((e,{containerId:t})=>{var n;return null==(n=BA.get(t||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:qA()};o.toastId!==e&&(o.staleId=e);let a=o.render||i;delete o.render,QA(a,o)}},tI.done=e=>{tI.update(e,{progress:1})},tI.onChange=function(e){return HA.add(e),()=>{HA.delete(e)}},tI.play=e=>JA(!0,e),tI.pause=e=>JA(!1,e);var nI="undefined"!=typeof window?w:g,rI=({theme:e,type:n,isLoading:r,...i})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...i}),iI={info:function(e){return t.createElement(rI,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return t.createElement(rI,{...e},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return t.createElement(rI,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return t.createElement(rI,{...e},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};var oI=e=>{let{isRunning:n,preventExitTransition:r,toastRef:i,eventHandlers:o,playToast:a}=function(e){let[t,n]=S(!1),[r,i]=S(!1),o=x(null),a=x({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;function p(){n(!0)}function h(){n(!1)}function f(n){let r=o.current;if(a.canDrag&&r){a.didMove=!0,t&&h(),"x"===e.draggableDirection?a.delta=n.clientX-a.start:a.delta=n.clientY-a.start,a.start!==n.clientX&&(a.canCloseOnClick=!1);let i="x"===e.draggableDirection?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;r.style.transform=`translate3d(${i},0)`,r.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance))}}function m(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",m);let t=o.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=BA.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:n}),g(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",p),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){a.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",m);let n=o.current;a.canCloseOnClick=!0,a.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(a.start=t.clientX,a.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(a.start=t.clientY,a.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:n,bottom:r,left:i,right:a}=o.current.getBoundingClientRect();"mouse"===t.pointerType&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=a&&t.clientY>=n&&t.clientY<=r?h():p()}};return s&&l&&(y.onMouseEnter=h,e.stacked||(y.onMouseLeave=p)),d&&(y.onClick=e=>{u&&u(e),a.canCloseOnClick&&c(!0)}),{playToast:p,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:y}}(e),{closeButton:l,children:c,autoClose:d,onClick:p,type:h,hideProgressBar:f,closeToast:m,transition:y,position:b,className:v,style:w,progressClassName:k,updateId:T,role:C,progress:E,rtl:A,toastId:I,deleteToast:M,isIn:O,isLoading:N,closeOnClick:_,theme:P,ariaLabel:L}=e,D=U("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":_}),z=_A(v)?v({rtl:A,position:b,type:h,defaultClassName:D}):U(D,v),R=function({theme:e,type:t,isLoading:n,icon:r}){let i=null,o={theme:e,type:t};return!1===r||(_A(r)?i=r({...o,isLoading:n}):u(r)?i=s(r,o):n?i=iI.spinner():(e=>e in iI)(t)&&(i=iI[t](o))),i}(e),j=!!E||!d,$={closeToast:m,type:h,theme:P},F=null;return!1===l||(F=_A(l)?l($):u(l)?s(l,$):function({closeToast:e,theme:n,ariaLabel:r="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":r},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}($)),t.createElement(y,{isIn:O,done:M,position:b,preventExitTransition:r,nodeRef:i,playToast:a},t.createElement("div",{id:I,tabIndex:0,onClick:p,"data-in":O,className:z,...o,style:w,ref:i,...O&&{role:C,"aria-label":L}},null!=R&&t.createElement("div",{className:U("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},R),jA(c,e,!n),F,!e.customProgressBar&&t.createElement($A,{...T&&!j?{key:`p-${T}`}:{},rtl:A,theme:P,delay:d,isRunning:n,isIn:O,closeToast:m,hide:f,type:h,className:k,controlledProgress:j,progress:E||0})))},aI=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),sI=zA(aI("bounce",!0)),lI=(zA(aI("slide",!0)),zA(aI("zoom")),zA(aI("flip")),{position:"top-right",transition:sI,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function cI(e){let n={...lI,...e},r=e.stacked,[i,o]=S(!0),a=x(null),{getToastToRender:s,isToastActive:l,count:c}=function(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=x(YA(e)).current;i(e);let o=null==(t=T(n,r,r))?void 0:t.slice();return{getToastToRender:function(t){if(!o)return[];let n=/* @__PURE__ */new Map;return e.newestOnTop&&o.reverse(),o.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:GA,count:null==o?void 0:o.length}}(n),{className:u,style:d,rtl:p,containerId:h,hotKeys:f}=n;function m(e){let t=U("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":p});return _A(u)?u({position:e,rtl:p,defaultClassName:t}):U(t,PA(u))}function y(){r&&(o(!0),tI.play())}return nI(()=>{var e;if(r){let t=a.current.querySelectorAll('[data-in="true"]'),r=12,o=null==(e=n.position)?void 0:e.includes("top"),s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{let n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${i}`),n.dataset.pos||(n.dataset.pos=o?"top":"bot");let a=s*(i?.2:1)+(i?0:r*t),c=Math.max(.5,1-(i?l:0));n.style.setProperty("--y",`${o?a:-1*a}px`),n.style.setProperty("--g",`${r}`),n.style.setProperty("--s",`${c}`),s+=n.offsetHeight,l+=.025})}},[i,c,r]),g(()=>{function e(e){var t;let n=a.current;f(e)&&(null==(t=null==n?void 0:n.querySelector('[tabIndex="0"]'))||t.focus(),o(!1),tI.pause()),"Escape"===e.key&&(document.activeElement===n||null!=n&&n.contains(document.activeElement))&&(o(!0),tI.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[f]),t.createElement("section",{ref:a,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),tI.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":n["aria-label"]},s((e,n)=>{let i=n.length?{...d}:{...d,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:m(e),"data-stacked":r,style:i,key:`c-${e}`},n.map(({content:e,props:n})=>t.createElement(oI,{...n,stacked:r,collapseAll:y,isIn:l(n.toastId,n.containerId),key:`t-${n.key}`},e)))}))}var uI=/* @__PURE__ */new Map;function dI(e){return((e,t)=>{nI(()=>{if("undefined"==typeof document)return;let n=document,r=uI.get(n);if(r)return void(t&&r.setAttribute("nonce",t));let i=n.createElement("style");i.textContent=e,t&&i.setAttribute("nonce",t),n.head.appendChild(i),uI.set(n,i)},[t])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",e.nonce),t.createElement(cI,{...e})}var pI=({children:e,classNameToast:t="",classNameContainer:n="",isFixed:r=!0,containerId:i})=>{let o=k(()=>i??crypto.randomUUID(),[i]),a=f(async(e,n={})=>{let{appeareance:r="default",placement:i="top-right",autoDismiss:a=!0,autoDismissTimeout:s=5e3,theme:l="light",icon:c}=n,u=tI;r&&"default"!==r&&tI[r]&&(u=tI[r]),u(e,{className:t,position:i,autoClose:!!a&&s,hideProgressBar:!a,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:l,icon:c,containerId:o})},[t,o]),s=k(()=>({addToast:a}),[a]);/* @__PURE__ */
|
|
114
|
+
return M(MA,{value:s,children:[/* @__PURE__ */I(dI,{containerId:o,pauseOnFocusLoss:!1,className:U(n,{"toast-container--absolute":!r})}),e]})},hI={source:"space",title:"Add Notification",strictParams:!0,params:{content:{type:"textarea",description:"The notification text shown to the user — this is the message body. There is no separate title/message/type param.",default:"Content"},placement:{type:"select",description:"Where the toast appears on screen.",default:"top-right",options:["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]},appearance:{type:"select",description:"Visual style of the notification: success, danger, warning or info.",default:"success",options:["success","danger","warning","info"]},autoDismiss:{type:"boolean",description:"Whether the notification dismisses itself after a timeout.",default:!0,canBind:!1},autoDismissTimeout:{type:"number",description:"Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",default:5e3,when:e=>!0===e.autoDismiss}}},fI=({children:e})=>{const{addToast:t}=(()=>{let e=h(MA);if(void 0===e)throw Error("ToastContext value is undefined. Make sure you use the ToastProvider before using the hook.");return e})(),{useInteractions:n}=h($m),{resolvedTheme:r}=ru(nu),i=f(e=>{const{placement:n,appearance:i,autoDismiss:o,autoDismissTimeout:a}=e;let{content:s}=e;"string"!=typeof s&&(s=JSON.stringify(s)),t(/* @__PURE__ */I("div",{className:"whitespace-break-spaces",children:s}),{appeareance:i,autoDismiss:o,placement:n,autoDismissTimeout:a,theme:r})},[t,r]);return n({id:"space",callbacks:k(()=>({addNotification:Pd("addNotification",hI,i)}),[i])}),/* @__PURE__ */I(A,{children:e})},mI=({children:e})=>{const{webId:t}=h(Rc);/* @__PURE__ */
|
|
115
|
+
return I(pI,{containerId:`toast-container-${t}`,classNameContainer:"plitzi-sdk-toasts",children:/* @__PURE__ */I(fI,{children:e})})},gI=()=>{const{overQuota:e}=X();return e?/* @__PURE__ */M("div",{className:"plitzi-over-quota",role:"status",children:[/* @__PURE__ */I("span",{className:"plitzi-over-quota__text",children:"This site is over its monthly plan limit."}),/* @__PURE__ */I("a",{className:"plitzi-over-quota__cta",href:"https://plitzi.com/pricing",rel:"noreferrer noopener",target:"_blank",children:"Upgrade"})]}):null},yI=p(({pageId:e="",style:t="",plitziContextValue:n,assets:r=qr,ref:i})=>{const o=k(()=>({id:e,rootId:e}),[e]);/* @__PURE__ */
|
|
116
|
+
return I(Wm,{ref:i,id:"i-sdk",css:t,assets:r,className:"w-full grow",children:/* @__PURE__ */M(mI,{children:[/* @__PURE__ */I(pc,{value:n,children:e&&/* @__PURE__ */I(LC,{internalProps:o})}),/* @__PURE__ */I(gI,{})]})})}),bI=p(({pageId:e="",style:t="",plitziContextValue:n,renderMode:r="raw"})=>{const i=k(()=>({id:e,rootId:e}),[e]),[o]=zt("schema.flat"),a=k(()=>e&&"widget"===r?sr(o,`${e}.definition.type`,"page"):"page",[e,r,o]);/* @__PURE__ */
|
|
117
|
+
return M(mI,{children:[
|
|
118
118
|
/* @__PURE__ */I("style",{type:"text/css",rel:"stylesheet","data-id":"plitzi-runtime-style",children:t}),
|
|
119
|
-
/* @__PURE__ */M(
|
|
120
|
-
/* @__PURE__ */I(
|
|
121
|
-
return I("style",{ref:n,...t,children:e})},
|
|
122
|
-
return I("div",{ref:c,className:t,children:h&&d&&O(/* @__PURE__ */M(
|
|
123
|
-
return M(
|
|
124
|
-
/* @__PURE__ */I(
|
|
125
|
-
/* @__PURE__ */I(
|
|
119
|
+
/* @__PURE__ */M(pc,{value:n,children:[e&&"widget"!==r&&/* @__PURE__ */I(LC,{internalProps:i}),e&&"widget"===r&&/* @__PURE__ */I(ng,{type:a,internalProps:i},e)]}),
|
|
120
|
+
/* @__PURE__ */I(gI,{})]})}),vI=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),wI=l({shadowRoot:null});wI.displayName="ContainerShadowContext";var kI=({href:e,onLoad:t,onError:n,onRegister:r,onUnregister:i,...o})=>{let[a,s]=S(!1),l=x(null);return g(()=>(r?.(l),s(!0),()=>{i?.(l)}),[]),/* @__PURE__ */I("link",a?{ref:l,href:e,onLoad:t,onError:n,rel:"stylesheet",...o}:{ref:l,rel:"stylesheet",...o})},xI=({children:e,...t})=>{let n=x(null);/* @__PURE__ */
|
|
121
|
+
return I("style",{ref:n,...t,children:e})},SI=({ref:e,className:t="",children:r,mode:i="open",delegatesFocus:o=!1,stylesheets:a,fallback:l})=>{let c=x(null);v(e,()=>c.current,[c]);let[d,p]=S(null),[h,f]=S(!1),m=e=>{_(t=>{if(!e.current)return t;let n=[...t.pending,e.current];return{isLoading:n.length>0,pending:n}})},y=e=>{_(t=>{let n=t.pending.filter(t=>t!==e.current);return{isLoading:n.length>0,pending:n}})},b=e=>{_(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},w=e=>{_(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},T=()=>{},{content:C,links:E,styles:A}=k(()=>{let e={content:/* @__PURE__ */I(vI,{},"shadow-content"),links:[],styles:[]};return n.forEach(r,(t,n)=>{u(t)&&(t.type===vI?e.content=s(t,{...t.props,key:"shadow-content",contentDidMount:T}):t.type===kI?e.links.push(s(t,{...t.props,key:n,onRegister:m,onUnregister:y,onLoad:b,onError:w})):t.type===xI&&(e.content=s(t,{...t.props,key:n})))}),e},[r]),[N,_]=S({isLoading:0!==E.length,pending:[]});g(()=>{if(c.current){let e=c.current.attachShadow({mode:i,delegatesFocus:o});a&&(e.adoptedStyleSheets=a),p(e),f(!0)}},[]);let P=k(()=>({shadowRoot:d}),[d]),{isLoading:L}=N;/* @__PURE__ */
|
|
122
|
+
return I("div",{ref:c,className:t,children:h&&d&&O(/* @__PURE__ */M(wI,{value:P,children:[E,A,!L&&C,L&&l]}),d)})};SI.Content=vI,SI.Link=kI,SI.Style=xI;var TI=SI,CI=p(({pageId:e="",sdkStylePath:t="",style:n="",plitziContextValue:r,assets:i})=>{const o=k(()=>({id:e,rootId:e}),[e]),a=k(()=>Object.values(i),[i]);/* @__PURE__ */
|
|
123
|
+
return M(TI,{children:[a.map((e,t)=>/* @__PURE__ */I(TI.Link,{href:e.params.href},t)),
|
|
124
|
+
/* @__PURE__ */I(TI.Link,{href:t}),
|
|
125
|
+
/* @__PURE__ */I(TI.Content,{children:/* @__PURE__ */M(mI,{children:[
|
|
126
126
|
/* @__PURE__ */I("style",{dangerouslySetInnerHTML:{__html:n}}),
|
|
127
|
-
/* @__PURE__ */I(
|
|
128
|
-
/* @__PURE__ */I(
|
|
129
|
-
return M(A,{children:["iframe"!==p&&/* @__PURE__ */I(CI,{head:S}),("raw"===p||"widget"===p)&&/* @__PURE__ */I(gI,{renderMode:p,style:T,plitziContextValue:N,pageId:c}),"shadow"===p&&/* @__PURE__ */I(SI,{sdkStylePath:t,style:T,plitziContextValue:N,pageId:c,assets:i}),!["raw","widget","shadow"].includes(p)&&/* @__PURE__ */I(mI,{style:S.faces?`${S.faces}\n${T}`:T,plitziContextValue:N,pageId:c,assets:C,ref:o})]})};AI.Plugin=TI;var II,MI,OI,NI=AI,_I=["loginUrl","userUrl","refreshUrl","logoutUrl","mfaUrl","sessionHintCookie"],PI=e=>{let[t,n]=e.split("."),r=Number(t);if(!Number.isFinite(r)||r<=0)return;let i=Number(n);return{expiresAt:r,refreshExpiresAt:Number.isFinite(i)&&i>0?i:void 0}},LI=e=>{if(e&&typeof document<"u")for(let t of document.cookie.split(";")){let n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return PI(decodeURIComponent(t.slice(n+1).trim()))}},DI=class{kind;key;constructor(e,t){this.kind=e,this.key=t}get area(){try{if("localStorage"===this.kind&&typeof localStorage<"u")return localStorage;if("sessionStorage"===this.kind&&typeof sessionStorage<"u")return sessionStorage}catch{}}read(){let e=this.area?.getItem(this.key);if(e)try{let t=JSON.parse(e);return(e=>"object"==typeof e&&!!e&&1===e.version)(t)?t:void 0}catch{return}}write(e){try{this.area?.setItem(this.key,JSON.stringify({version:1,...e}))}catch{}}clear(){try{this.area?.removeItem(this.key)}catch{}}subscribe(e){if("localStorage"!==this.kind||typeof window>"u")return()=>{};let t=t=>{(null===t.key||t.key===this.key)&&e(this.read())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}},zI=e=>{if(!e)return;let t=e.split(".");if(3!==t.length)return;let n=(e=>{try{let t=e.replaceAll("-","+").replaceAll("_","/"),n=t.padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(n));return"object"==typeof r&&r?r:void 0}catch{return}})(t[1])?.exp;return"number"==typeof n&&Number.isFinite(n)?n:void 0},RI=()=>Math.floor(Date.now()/1e3),jI=e=>{if("number"==typeof e&&Number.isFinite(e)&&!(e<=0))return Math.floor(e>1e11?e/1e3:e)},$I=class{state="init";session={validatedAt:0};store;gate;hintCookie;revalidateSeconds;listeners=/* @__PURE__ */new Set;renewal;epoch=0;renewalTimer;detachListeners;offline=!1;spaceKey;constructor({spaceKey:e="",tokenStorage:t="localStorage",sessionHintCookie:n,sessionGate:r="optimistic",sessionRevalidateSeconds:i=300,storageKey:o="plitzi_auth_session"}={}){this.spaceKey=e,this.store=new DI(t,o),this.gate=r,this.hintCookie=n,this.revalidateSeconds=i}get endpoints(){return[]}requestExchange(){return Promise.resolve(void 0)}consumeRedirect(){return Promise.resolve(void 0)}get user(){return this.session.user}get token(){return this.session.token}getState(){return this.state}can(e){let t=this.session.user?.permissions;return Array.isArray(t)&&t.includes(e)}peekState(){return this.peek().state}peek(){let e=this.store.read(),t=LI(this.hintCookie);if(this.hintCookie&&!t)return{state:"guest"};let n=e?.token,r=jI(n?.expiresAt)??zI(n?.accessToken);return n?.accessToken&&(void 0===r||r-60>RI())&&e?.user?{state:"authenticated",user:e.user,token:e.token}:n?.accessToken||n?.refreshToken||t?{state:"init",user:e?.user,token:e?.token}:{state:"guest"}}async init(e={}){this.attach(),await this.decide(e),this.settle()}settle(){("init"===this.state||"initLoading"===this.state)&&this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest","settled")}async decide(e){if(e.skipAuth)return void this.setState("guest","skip-auth");let t=await this.consumeRedirect();if(t)return void(t.ok?(this.adopt(t),await this.handOffToServer(),this.emit({type:"login",token:this.session.token})):this.endSession(t.reason));if(e.user)return void this.adopt({ok:!0,user:e.user,token:e.accessToken?{accessToken:e.accessToken,expiresAt:e.expiresAt??null,refreshToken:null}:this.session.token},!0,"bootstrap");let n=this.store.read(),r=LI(this.hintCookie);if(this.session={user:n?.user,token:n?.token,validatedAt:n?.validatedAt??0},!this.hintCookie||r){if(this.hasLiveToken()&&this.session.user){this.setState("authenticated","restored"),this.scheduleRenewal();let e=this.isFresh()&&"strict"!==this.gate?void 0:this.revalidate(!0);return void("strict"===this.gate&&await e)}this.hasEvidence()?(this.setState("initLoading","no-evidence"),this.hasLiveToken()&&this.capabilities.identity?await this.loadIdentity():this.capabilities.renew?await this.renew():this.capabilities.identity?await this.loadIdentity():this.endSession()):this.endSession(void 0,"no-evidence")}else this.endSession(void 0,"hint-missing")}dispose(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.detachListeners?.(),this.detachListeners=void 0}async login(e){this.epoch+=1,this.setState("authenticating","authenticating");let t=await this.requestLogin(e);if(!t.ok&&"mfa"===t.reason)return this.endSession(),t;if(!t.ok)return this.endSession(t.reason),{ok:!1,reason:t.reason};this.adopt(t);let n=await this.handOffToServer();return n?{ok:!1,reason:n}:(!this.session.user&&this.capabilities.identity&&await this.loadIdentity(),"authenticated"===this.state?(this.emit({type:"login",token:this.session.token}),{ok:!0,...this.session.token??{accessToken:"",expiresAt:null,refreshToken:null}}):{ok:!1,reason:"inactive"})}async handOffToServer(){let e=await this.requestExchange();if(e)return e.ok?void this.adopt(e):"network"===e.reason?void(this.offline=!0):(this.endSession(e.reason),e.reason)}async refresh(){return await this.renew(),this.session.token}async revalidate(e=!1){return this.hasEvidence()?!e&&this.isFresh()&&this.hasLiveToken()?"authenticated"===this.state:this.hasLiveToken()&&this.capabilities.identity?this.loadIdentity():this.capabilities.renew?this.renew():this.capabilities.identity?this.loadIdentity():(this.hasLiveToken()||this.endSession("expired"),"authenticated"===this.state):("guest"!==this.state&&this.endSession(),!1)}invalidate(e="expired"){this.recover(e)}async recover(e){return"network"===e?(this.offline=!0,!1):this.renewable(e)?this.renew():(this.endSession(e),!1)}async logout(){await this.requestLogout(),this.endSession(),this.emit({type:"logout"})}on(e){let t=Array.isArray(e)?e:[e];return t.forEach(e=>this.listeners.add(e)),()=>t.forEach(e=>this.listeners.delete(e))}emit(e){for(let t of this.listeners)t(e)}setState(e,t){this.state!==e&&(this.state=e,this.emit({type:"state",state:e,reason:t}))}async renew(){return this.renewal??=this.performRenewal().finally(()=>{this.renewal=void 0}),this.renewal}async performRenewal(){let e=this.epoch,t=await this.requestRenewal(this.session.token?.refreshToken??void 0);return e===this.epoch?t.ok?(this.adopt(t),!this.session.user&&this.capabilities.identity?this.loadIdentity():"authenticated"===this.state):(this.handleFailure(t.reason),!1):"authenticated"===this.state}async loadIdentity(){let e=this.epoch,t=await this.requestIdentity();return e===this.epoch?t.ok?(this.adopt(t),"authenticated"===this.state):this.renewable(t.reason)&&!this.renewal?this.renew():(this.handleFailure(t.reason),!1):"authenticated"===this.state}handleFailure(e){"network"!==e?this.endSession(e):this.offline=!0}adopt(e,t=!0,n="granted"){this.session={user:e.user??this.session.user,token:e.token??this.session.token,validatedAt:RI()},this.offline=!1,t&&this.store.write(this.session),this.scheduleRenewal(),this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest",n)}endSession(e,t="signed-out"){this.epoch+=1,clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:RI()},this.store.write(this.session),this.setState("guest",t),e&&this.emit({type:"expired",reason:e})}expiresAt(){return jI(this.session.token?.expiresAt)??zI(this.session.token?.accessToken)}renewable(e){if(!this.capabilities.renew)return!1;if("expired"===e)return!0;if("missing"!==e)return!1;if(this.session.token?.refreshToken)return!0;let t=LI(this.hintCookie);return void 0!==t&&(void 0===t.refreshExpiresAt||t.refreshExpiresAt>RI())}hasLiveToken(){if(!this.session.token?.accessToken)return!1;let e=this.expiresAt();return void 0===e||e-60>RI()}isFresh(){return RI()-this.session.validatedAt<this.revalidateSeconds}hasEvidence(){if(this.session.token?.accessToken||this.session.token?.refreshToken)return!0;let e=LI(this.hintCookie);return!(void 0!==e?.refreshExpiresAt&&e.refreshExpiresAt<=RI()||!e)}scheduleRenewal(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0;let e=this.expiresAt();if(void 0===e||typeof window>"u"||"guest"===this.state)return;let t=Math.min(1e3*(e-60-RI()),2147483647);t<=0?this.onRenewalDue():this.renewalTimer=setTimeout(()=>this.onRenewalDue(),t)}onRenewalDue(){this.capabilities.renew?this.renew():this.endSession("expired")}attach(){if(typeof window>"u"||this.detachListeners)return;let e=()=>{"visible"===document.visibilityState&&this.revalidate()},t=()=>{this.offline&&this.revalidate(!0)},n=this.store.subscribe(e=>this.adoptFromStorage(e)),r=(e=>(Qr.add(e),()=>Qr.delete(e)))(({reason:e,url:t})=>{let n=this.endpoints.filter(Boolean);return!(0!==n.length&&!n.some(e=>((e,t)=>{if(!e||!t)return!1;try{let n=typeof window>"u"?void 0:window.location.href;return ni(new URL(e,n).hostname)===ni(new URL(t,n).hostname)}catch{return!1}})(e,t)))&&this.recover(e)});document.addEventListener("visibilitychange",e),window.addEventListener("online",t),this.detachListeners=()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("online",t),n(),r()}}adoptFromStorage(e){if(this.epoch+=1,!e?.token&&!e?.user)return clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:RI()},this.setState("guest","another-tab"),void this.emit({type:"logout"});this.adopt({ok:!0,user:e.user,token:e.token},!1)}},FI=(e,t)=>sr(e,t,void 0),qI=(e,t)=>{let n=FI(e,t);return"string"==typeof n&&""!==n?n:null},BI=(e,t)=>{let n=FI(e,t),r="string"==typeof n?Number(n):n;return"number"==typeof r&&Number.isFinite(r)?r:null},UI=e=>"string"==typeof e?e:"number"==typeof e&&Number.isFinite(e)?String(e):"",HI=class extends $I{name="basic";options;constructor({loginUrl:e="",userUrl:t="",refreshUrl:n="",logoutUrl:r="",sessionExchangeUrl:i="",mfaUrl:o="",detailsPath:a="details",tokenPath:s="access_token",refreshTokenPath:l="refresh_token",expirationTimePath:c="expire_at",refreshExpirationTimePath:u="refresh_expire_at",...d}={}){super(d),this.options={loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r,sessionExchangeUrl:i,mfaUrl:o,detailsPath:a,tokenPath:s,refreshTokenPath:l,expirationTimePath:c,refreshExpirationTimePath:u}}get capabilities(){return{renew:!!this.options.refreshUrl,identity:!!this.options.userUrl}}get endpoints(){let{loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r}=this.options;return[e,t,n,r]}async requestLogin(e){let t=UI(e.token).trim();if("token"===e.mode)return t?this.adoptToken(t):{ok:!1,reason:"missing"};if("mfa"===e.mode){let t=UI(e.mfaToken).trim();return this.options.mfaUrl&&t?this.toResult(await this.request(this.options.mfaUrl,{method:"POST",body:JSON.stringify({mfaToken:t,code:UI(e.code).trim()})})):{ok:!1,reason:"missing"}}if(!this.options.loginUrl)return console.warn('[plitzi] auth.login: the "basic" provider has no loginUrl to post the credentials to. Declare loginUrl in the space settings, or serve the space from createServer({ auth }), which names it for you.'),{ok:!1,reason:"missing"};let n=await this.request(this.options.loginUrl,{method:"POST",body:JSON.stringify({username:UI(e.username),password:UI(e.password)})});return this.challengeOf(n)??this.toResult(n)}async adoptToken(e){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.userUrl,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),n=this.toResult(t);return n.ok?{ok:!0,user:n.user,token:{accessToken:e,expiresAt:null,refreshToken:null}}:n}async requestRenewal(e){if(!this.options.refreshUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.refreshUrl,{method:"POST",body:JSON.stringify(e?{[this.options.refreshTokenPath]:e}:{})});return this.toResult(t)}async requestExchange(){let e=this.token?.accessToken;if(!this.options.sessionExchangeUrl||!e)return;let t=await this.request(this.options.sessionExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",...this.spaceKey?{"x-access-token":this.spaceKey}:{}},body:JSON.stringify({provider:this.name,token:e})});return this.toResult(t)}async requestIdentity(){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let e=await this.request(this.options.userUrl,{method:"GET"});return this.toResult(e)}async requestLogout(){this.options.logoutUrl&&await this.request(this.options.logoutUrl,{method:"POST"})}async request(e,t){let n,r;try{n=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json"},...t})}catch{return{status:0,reason:"network"}}try{r=await n.json()}catch{r=void 0}return{data:r,status:n.status,reason:n.ok?void 0:ti(n.status,r)??"network"}}challengeOf(e){let t=FI(e.data,"mfaToken");return!e.reason&&!0===FI(e.data,"mfaRequired")&&"string"==typeof t&&t?{ok:!1,reason:"mfa",mfaToken:t}:void 0}toResult(e){if(e.reason)return{ok:!1,reason:e.reason};let t=FI(e.data,this.options.detailsPath);return{ok:!0,user:"object"==typeof t&&t?t:void 0,token:this.tokenFrom(e.data)}}tokenFrom(e){let t=qI(e,this.options.tokenPath);if(!t)return;let n=FI(e,"errors");return{..."object"==typeof n&&n?{errors:n}:{},accessToken:t,expiresAt:BI(e,this.options.expirationTimePath),refreshToken:qI(e,this.options.refreshTokenPath),refreshExpiresAt:BI(e,this.options.refreshExpirationTimePath)}}},WI=class extends $I{name="server";loginUrl;logoutUrl;constructor({loginUrl:e="",logoutUrl:t="",...n}={}){super({...n,tokenStorage:""}),this.loginUrl=e||"/auth/sign-in",this.logoutUrl=t||"/auth/logout"}get capabilities(){return{renew:!1,identity:!1}}requestLogin(){let e=`${window.location.pathname}${window.location.search}`;return window.location.assign(`${this.loginUrl}?return=${encodeURIComponent(e)}`),new Promise(()=>{})}requestRenewal(){return Promise.resolve({ok:!1,reason:"expired"})}requestIdentity(){return Promise.resolve({ok:!1,reason:"missing"})}async requestLogout(){await fetch(this.logoutUrl,{method:"POST",credentials:"same-origin"})}revalidate(){return Promise.resolve("authenticated"===this.getState())}},VI=/* @__PURE__ */new Map([["basic",e=>new HI(e)],["server",e=>new WI(e)]]),GI=class{providerType;provider;settings;listeners;constructor(e,t,n){this.providerType=e,this.settings=n,this.listeners=Array.isArray(t)?t:[t];let r=VI.get(e);r&&(this.provider=r(n),this.provider.on(this.listeners))}getProviderType(){return this.providerType}getProvider(){return this.provider}getState(){return this.provider?.getState()??"guest"}peekState(){return this.peek().state}peek(){return(this.provider??new HI(this.settings)).peek()}can(e){return this.provider?.can(e)??!1}init(e){if(!this.provider){let t=this.peekState(),n=e?.user||"authenticated"===t?"authenticated":"guest";return this.listeners.forEach(e=>e({type:"state",state:n,reason:"no-provider"})),Promise.resolve()}return this.provider.init(e)}login(...e){return this.provider?this.provider.login(...e):(console.warn(this.providerType?`[plitzi] auth.login: no auth provider is registered as "${this.providerType}". Register it with registerAuthProvider before the SDK mounts, or set the userProvider of the space to one that exists ("basic", "server").`:'[plitzi] auth.login: this space has no auth provider to sign in with. Serve it from createServer({ auth }), which needs nothing declared, or declare userProvider in the space settings ("server" on the Plitzi platform, "basic" with loginUrl for your own API).'),Promise.resolve({ok:!1,reason:"missing"}))}refresh(){return this.provider?.refresh()??Promise.resolve(void 0)}revalidate(e){return this.provider?.revalidate(e)??Promise.resolve(!1)}invalidate(e){this.provider?.invalidate(e)}logout(){return this.provider?.logout()??Promise.resolve()}dispose(){this.provider?.dispose()}on(e){return this.provider?.on(e)}},KI=["loginUrl","userUrl","refreshUrl","logoutUrl","detailsPath","tokenPath","refreshTokenPath","expirationTimePath","refreshExpirationTimePath","sessionHintCookie","sessionExchangeUrl","mfaUrl"],JI=({children:e,server:t})=>{let{previewMode:n,isHydrating:r,environment:i}=X(),{webKey:o}=h(zc),[[a,s]]=_t(["schema.settings","schema.variables"]),{queryParams:l,hostname:c}=xm({server:t}),u=k(()=>({queryParams:l,hostname:c,environment:i}),[l,c,i]),d=k(()=>Array.isArray(s)?s.reduce((e,t)=>{let{name:n,value:r,subValues:i}=t;if(!Array.isArray(i)||0===i.length)return{...e,[n]:r};let o=i.find(e=>Po(e.when,u));return o?{...e,[n]:o.value}:{...e,[n]:r}},{}):{},[s,u]),p=k(()=>{let e=Object.fromEntries(KI.map(e=>[e,a[e]]));try{return JSON.parse(Fn(JSON.stringify(e),d))}catch{return e}},[a,d]),{provider:m,settings:y}=k(()=>{let e=((e,t,n)=>{if(!n||e&&e!==n.userProvider)return{provider:e??"",settings:t};let r={...t};for(let i of _I)r[i]||(r[i]=n[i]);return{provider:n.userProvider,settings:r}})(a.userProvider,{...p,tokenStorage:a.tokenStorage??"localStorage",sessionGate:a.sessionGate,sessionRevalidateSeconds:a.sessionRevalidateSeconds},t.auth);return{provider:e.provider,settings:{...e.settings,spaceKey:o}}},[p,a,o,t.auth]),{manager:b,loading:v,authenticated:w,state:T,bootstrapUser:C,bootstrapToken:E,peekedUser:A,peekedToken:M}=(({server:e,isHydrating:t=!1,provider:n="",settings:r})=>{let i=e?.authenticated?e.user?.details:void 0,o="string"==typeof e?.user?.accessToken?e.user.accessToken:void 0,[a,s]=S("init"),l=f(e=>{"state"===e.type&&s(e.state)},[]),c=k(()=>new GI(n,l,r),[n,l,r]),u=k(()=>t||i?void 0:c.peek(),[c,t,i]),d="init"!==a&&"initLoading"!==a||!!i||t||"authenticated"===u?.state||"guest"===u?.state;return g(()=>(c.init({user:i,accessToken:o,expiresAt:e?.user?.expiresAt,skipAuth:e?.skipAuth}),()=>c.dispose()),[c,i,o,e?.user?.expiresAt,e?.skipAuth]),k(()=>({manager:c,state:a,bootstrapUser:i,bootstrapToken:o,peekedUser:u?.user,peekedToken:u?.token?.accessToken,loading:"initLoading"===a||!d,authenticated:"authenticated"===a||"init"===a&&(!!i||"authenticated"===u?.state)}),[c,a,i,o,d,u])})({server:t,isHydrating:r,provider:m,settings:y}),O=b.getProvider(),{user:N,accessToken:_}=(e=>{let{state:t,provider:n,bootstrap:r,peeked:i}=e;return n?.user?{user:n.user,accessToken:n.accessToken}:"guest"===t?{}:r?.user?{user:r.user,accessToken:r.accessToken}:i?.user?{user:i.user,accessToken:i.accessToken}:{}})({state:T,provider:{user:O?.user,accessToken:O?.token?.accessToken},bootstrap:{user:C,accessToken:E},peeked:{user:A,accessToken:M}}),P=x(void 0),L=k(()=>{let e=N?{details:N,accessToken:_}:void 0,t=P.current;return t?.accessToken===e?.accessToken&&((e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t;return[.../* @__PURE__ */new Set([...Object.keys(n),...Object.keys(r)])].every(e=>JSON.stringify(n[e])===JSON.stringify(r[e]))})(t?.details,e?.details)||(P.current=e),P.current},[N,_]);(e=>{let t=x(e);wt(()=>{t.current!==e&&(t.current=e,iE.reset({refetch:""!==e}))},[e])})(w?String(L?.details?.id??""):"");let D=k(()=>({login:b.login.bind(b),refresh:b.refresh.bind(b),revalidate:b.revalidate.bind(b),invalidate:b.invalidate.bind(b),can:b.can.bind(b),logout:b.logout.bind(b),provider:b.getProviderType(),state:T,authenticated:w||!n,user:L}),[b,T,w,n,L]);/* @__PURE__ */
|
|
130
|
-
return I(
|
|
131
|
-
return I(Wl,{value:d,children:e})},
|
|
132
|
-
/* @__PURE__ */M(
|
|
133
|
-
return M("div",{className:U("relative flex min-w-0 grow",{"overflow-auto":!$,"flex-col":$||"horizontal"===P,"h-screen":!$&&"vertical"===P},t),children:[/* @__PURE__ */I(ft,{value:N,children:/* @__PURE__ */I("div",{ref:O,className:U("grow",{"basis-0 flex-col overflow-auto":!$},n),children:e})}),$?/* @__PURE__ */I("div",{className:"sticky bottom-0 h-0",children:F}):F]})},CM=({children:e})=>{let[[t,n,r,i,o,a=""]]=_t(["navigation.routeParams","navigation.queryParams","navigation.origin","navigation.href","navigation.currentPageId","navigation.pendingLocation"]),s=Hl(),l=f(()=>Ur(s).map(e=>({path:e,name:`variables.${e}`})),[s]);ql({id:"global",source:"variables",name:"Variables",fields:l}),Pt("runtime.sources.variables",s);let[c={}]=_t("pageDefinitions"),u=k(()=>Object.values(c).map(e=>({value:e.id,label:sr(e,"attributes.name",e.id)})),[c]),d=k(()=>({routeParams:t,queryParams:n,origin:r,href:i,currentPageId:o,pending:""!==a,pendingLocation:a}),[t,n,r,i,o,a]),p=f(()=>[...Ur({routeParams:t,queryParams:n}).map(e=>({path:e,name:`navigation.${e}`})),{path:"origin",name:"Origin"},{path:"href",name:"This page’s address"},{path:"pending",name:"A navigation is on its way"},{path:"pendingLocation",name:"Where a navigation is going"},u.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:u}:{path:"currentPageId",name:"Current Page"}],[t,n,u]);ql({id:"global",source:"navigation",name:"Navigation",fields:p}),Pt("runtime.sources.navigation",d);let m=h(km),{user:y,authenticated:b,state:v,provider:w}=m,S=k(()=>w?{isAuthenticated:b,...void 0===v?{}:{status:v},accessToken:y?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...y?.details??{}}}:{},[w,y,b,v]),T=f(()=>Ur(S).map(e=>({path:e,name:`user.${e}`})),[S]);ql({id:"global",source:"auth",name:"Auth State",fields:T}),Pt("runtime.sources.auth",S);let C=(e=>{let{environment:t}=X(),[[n,r,i,o,a]]=_t(["schema.flags","navigation.routeParams","navigation.queryParams","navigation.hostname","flags.overrides"]),{authenticated:s,user:l}=e,c=k(()=>Sm({authenticated:s,user:l}),[s,l]);return Bl(k(()=>oc(n,{environment:t,hostname:o,routeParams:r,queryParams:i,user:c},a),[n,t,o,r,i,c,a]))})(m),E=k(()=>ac(C),[C]),A=f(()=>Object.keys(E).map(e=>({path:e,name:`flags.${e}`,inputType:"checkbox"})),[E]);ql({id:"global",source:"flags",name:"Feature Flags",fields:A}),Pt("runtime.sources.flags",E),Pt("flags.resolved",C);let[I,M]=_t(["schema.flags","flags.overrides"])[0],O=Bl(((e,t)=>rc.flatMap(n=>Object.keys(t[n]??{}).filter(t=>!Object.hasOwn(e??{},t)).map(e=>({layer:n,name:e}))))(I,M??{}));g(()=>{O.forEach(({layer:e,name:t})=>console.warn(`[plitzi] The ${e} sets the feature flag "${t}", which this space does not declare: the override is ignored. Declare the flag in the space, or remove the override.`))},[O]);let[N]=_t("runtime.state"),_=f(()=>Ur(N).map(e=>({path:e,name:`state.${e}`})),[N]);ql({id:"global",source:"state",name:"State",fields:_}),Pt("runtime.sources.state",N);let[P]=_t("runtime.host"),L=f(()=>Ur(P).map(e=>({path:e,name:`host.${e}`})),[P]);ql({id:"global",source:"host",name:"Host",fields:L}),Pt("runtime.sources.host",P);let{theme:D,resolvedTheme:z}=nu(tu),R=k(()=>({mode:D,resolved:z}),[D,z]),j=f(()=>Ur(R).map(e=>({path:e,name:`theme.${e}`})),[R]);ql({id:"global",source:"theme",name:"Theme",fields:j}),Pt("runtime.sources.theme",R);let[$]=_t("schema.settings.computed"),F=x(void 0),q=k(()=>si($??{},{variables:s,navigation:d,auth:S,state:N??{},host:P??{},theme:R,flags:E},F.current),[$,s,d,S,N,P,R,E]);F.current=q;let B=f(()=>Ur(q).map(e=>({path:e,name:`computed.${e}`})),[q]);return ql({id:"global",source:"computed",name:"Computed",fields:B}),Pt("runtime.sources.computed",q),e},EM=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:o=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||o&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){delete this.events[e][t];let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),delete this.events[e])}}async emit(e,t=[],...n){let r;this.debugMode&&Kl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let o=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),o}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){if(!e)return this.events={},void this.counts.clear();this.events[e]&&(delete this.events[e],this.counts.delete(e))}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},AM=({children:e,debugMode:t,onInit:n})=>{let r=k(()=>new EM({debugMode:t}),[t]);g(()=>()=>{r.clear()},[r]);let i=k(()=>({eventBridge:r}),[r]);return g(()=>{n?.(i)},[n,i]),/* @__PURE__ */I(Gu,{value:i,children:e})},IM=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:o}=h(Rm);g(()=>{if(e)return o.subscribe(e),()=>{o.unsubscribe(e)}},[e,o]),g(()=>{e&&o.update(e,t,n,r,i)},[e,t,n,r,i,o])},MM=(e,t)=>"function"==typeof e.type?e.type(t):e.type,OM=(e,t)=>{if("string"!=typeof t)return t;if("number"===e){let e=t.trim();if(""===e)return;let n=Number(e);return Number.isFinite(n)?n:t}return"boolean"!==e||"true"!==t&&"false"!==t?t:"true"===t},NM=(e,t)=>{if(!e)return t;let n="function"==typeof e?e(t):e,r={...t};for(let[i,o]of Object.entries(n))Object.hasOwn(t,i)&&(r[i]=OM(MM(o,t),t[i]));return r},_M=Nd("copyToClipboard",{title:"Copy To Clipboard",type:"utility",strictParams:!0,params:{text:{type:"text",description:"The words to copy — a template reads the page: {{ navigation.href }} is its address.",default:"",label:"Text",required:!0}}},async({text:e})=>{let t=typeof navigator>"u"?void 0:Reflect.get(navigator,"clipboard"),n="object"==typeof t&&t?Reflect.get(t,"writeText"):void 0;if("function"!=typeof n)throw Error("This page has no clipboard to write to: the browser offers none here (a page not on https?)");await Reflect.apply(n,t,[e])}),PM={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"number"}},preview:{},callback:({time:e},t)=>new Promise(n=>{let r=t?.signal;if(r?.aborted)return void n(void 0);let i=()=>{clearTimeout(o),r?.removeEventListener("abort",i),n(void 0)},o=setTimeout(i,e);r?.addEventListener("abort",i,{once:!0})})},LM={action:"twigTemplate",title:"Twig Template",type:"utility",params:{returnMode:{label:"Mode",canBind:!1,type:"select",defaultValue:"text",options:[{label:"Text",value:"text"},{label:"Json Text",value:"json"},{label:"Json Object",value:"jsonObject"}]},template:{label:"Template",canBind:!1,defaultValue:"",type:e=>{let{returnMode:t}=e;return"text"===t?"codemirror-text":"codemirror-json"}}},preview:e=>{let{template:t,returnMode:n}=e;if("jsonObject"===n)try{let n=JSON.parse(Fn(t,e));if(n&&"object"==typeof n)return{template:"",content:Ur(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Fn(t,e)}catch(VO){console.error(VO)}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(VO){console.error(VO)}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},DM={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},zM=(e,t=()=>!0)=>({invalidateQueries:{type:"select",description:"What to refresh once the write succeeded, so the page shows the new data: the requests to the same site, every provider on the page, only the api containers named in `invalidateElements`, or none for a step that only reads. Server-driven containers are refreshed too, asking the server past its cache. Containers on screen ask again at once; the rest when they are shown.",default:e[0],options:[...e],optionLabels:Object.fromEntries(e.map(e=>[e,DM[e]])),label:"Refresh cached requests",canBind:!1,when:t},invalidateElements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id.",default:[],label:"Containers (ids)",when:e=>t(e)&&"elements"===e.invalidateQueries}}),RM=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},jM={title:"Webhook",type:"utility",strictParams:!0,params:{url:{type:"text",description:"The URL to call.",default:"",label:"Url"},method:{type:"select",description:"HTTP method.",default:"get",options:["get","post","put","delete","patch","head"],canBind:!1},body:{type:"json",description:'Request body: an object of fields (sent as JSON, or as form data when one of them is a file). Pass a real object, with templates for its values — `{ email: "{{ submitted.values.email }}" }`.',default:"",builderType:"textarea"},authorizationToken:{type:"text",description:"Value sent as the Authorization header.",default:""},headers:{type:"json",description:'Headers of the request, as an object of name to value, with templates for the values like the body: `{ "x-api-key": "{{ apiKey }}" }`. Authorization is set by `authorizationToken` and the content type follows the body, so neither is set here.',default:"",builderType:"textarea"},credentials:{type:"select",description:"fetch credentials mode.",default:"same-origin",options:["include","omit","same-origin"],optionLabels:{"same-origin":"Same Origin"}},cache:{type:"boolean",description:"Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",default:!1,label:"Cache response",when:RM},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>RM(e)&&(!0===e.cache||"true"===e.cache)},...zM(["origin","all","elements","none"],e=>!RM(e))},preview:{response:{status:"",data:""}}},$M=/* @__PURE__ */new Set(["GET","HEAD"]),FM=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),qM=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(jM.params.staleTime.default))},BM=e=>e?{Authorization:`Bearer ${e}`}:{},UM=/* @__PURE__ */new Set(["authorization","content-type"]),HM=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||UM.has(e.toLowerCase())?[]:[[e,String(t)]])):{},WM=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},o,a)=>{let s=(e=>"object"==typeof e&&e?e:{})(r),l=Object.values(s).some(e=>e instanceof Blob),c={method:o,headers:{...HM(n),...l?{}:{"Content-Type":"application/json"},...BM(t)},credentials:i,...a?{signal:a}:{}};if(!FM.has(o))if(l){let e=new FormData;Object.entries(s).forEach(([t,n])=>{e.append(t,n)}),c.body=e}else c.body=JSON.stringify(s);let u=await fetch(e,c).catch(t=>{throw Error(`${o} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),d="";try{d=await u.json()}catch{}return{status:u.status,data:d}},VM=Nd("webHook",jM,async(e,t)=>{let n=(e.method||"get").toUpperCase();if($M.has(n)){if(!0!==e.cache&&"true"!==e.cache)return{response:await WM(e,n,t?.signal)};let r=fE({method:n,url:e.url,credentials:e.credentials,headers:{...HM(e.headers),...BM(e.authorizationToken)}});return{response:await iE.fetchQuery(r,{meta:{url:e.url},fetcher:()=>WM(e,n),staleTime:qM(e.staleTime),isCacheable:e=>e.status<400})}}let r=await WM(e,n,t?.signal);return r.status>=200&&r.status<300&&mE({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:r}}),GM={copyToClipboard:_M,delayTime:PM,twigTemplate:LM,webHook:VM},KM=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let o={...n,...r},a=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=((e,t)=>{let n=e,r=5;for((e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e))(n)&&!Zn(e)&&(n=Wn(e,t),r--);"string"==typeof n&&Zn(n)&&r>0;)n=Wn(n,t),r--;return{value:n,unresolved:"string"==typeof n&&Zn(n)}})(e,o);return r&&Kl.warning("interactions",/* @__PURE__ */M("span",{children:["Twig token resolution exceeded ",5," passes for ",
|
|
134
|
-
/* @__PURE__ */I("b",{children:t}),", leaving unresolved tokens"]}),{param:t,value:n}),n}return n>=5||"object"!=typeof e||!e?e:Array.isArray(e)?e.map(e=>a(e,t,n+1)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,a(r,t,n+1)]))};return Object.keys(t).reduce((n,r)=>{let i="trigger"===e?t[r]:a(t[r],r,0);return{...n,[r]:i}},{})},
|
|
135
|
-
/* @__PURE__ */I("b",{children:s})," names no element, so there is nothing to run it on"]}),{node:e}),{status:"failed",result:{},postCallbacks:o,whenParams:h};if(f=sr(t,`${u}.${s}`),!f)return
|
|
136
|
-
/* @__PURE__ */I("b",{children:`${u}.${s}`}),", so this step did nothing"]}),{node:e,available:Object.keys(sr(t,u,{}))}),{status:"failed",result:{},postCallbacks:o,whenParams:h};break;case"utility":f=sr(
|
|
137
|
-
/* @__PURE__ */I("b",{children:`${e.title} [${e.action}]`}),i?/* @__PURE__ */M(A,{children:[" on ",/* @__PURE__ */I("b",{children:i})]}):null]}),l={status:r,node:e,elementId:e.elementId,hostElementId:i,nodes:{...n,[e.id]:{node:e,status:a,result:void 0,postCallbacks:[],startTime:t,endTime:o}},startTime:t,endTime:o};"failed"!==r?
|
|
138
|
-
return I(
|
|
139
|
-
/* @__PURE__ */I("b",{children:n})," was skipped: this page is served without a Plitzi server"]}),{actionId:n,status:"skipped"}),{status:"skipped",runId:"",output:{}};if(!n)return{status:"skipped",runId:"",output:{}};let s=(e=>{if(!e)return{};if("object"==typeof e)return e;try{let t=JSON.parse(e);return"object"==typeof t&&t?t:{}}catch{return{}}})(e.input),l=JSON.stringify({actionId:n,input:s,...o?{idempotencyKey:o}:{}}),c=(e=>{let t=`run-${rt+=1}`;return it([{...e,id:t,status:"running",startedAt:Date.now(),progress:[],cancellable:!0},...nt.getState().runs].slice(0,100)),t})({actionId:n,mode:i,input:s}),u=new AbortController,d="",p=()=>{u.abort(),ct(c,{status:"aborted",endedAt:Date.now(),cancellable:!1}),d&&fetch(`${r}/run/${d}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{})};((e,t)=>{ot.set(e,t)})(c,p);let h=t?.signal;h?.addEventListener("abort",p,{once:!0});let f,m=t=>{h?.removeEventListener("abort",p),(e=>{ot.delete(e)})(c),ct(c,{endedAt:Date.now(),cancellable:!1,...t}),"completed"===t.status&&
|
|
140
|
-
/* @__PURE__ */I("b",{children:n})," sent"]}),{actionId:n,mode:i,status:"accepted"}),fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",keepalive:!0,signal:u.signal,body:l}).then(async e=>{let o=await e.json().catch(()=>({}));if(!e.ok)return
|
|
141
|
-
/* @__PURE__ */I("b",{children:n})," finished"]}),{actionId:n,mode:i,runId:o.runId,status:o.status,output:o.output}),a(t?.hostElementId,"onFlowEnd",{actionId:n,runId:o.runId??"",status:o.status??"completed",output:o.output??{}})}).catch(e=>{m(
|
|
142
|
-
/* @__PURE__ */I("b",{children:n})," could not be sent"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"})}),{accepted:!0,status:"accepted",runId:"",output:{}};if("stream"===i){let o;
|
|
143
|
-
/* @__PURE__ */I("b",{children:n})," streaming"]}),{actionId:n,mode:i,status:"streaming"});try{o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return m(
|
|
144
|
-
/* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),
|
|
145
|
-
/* @__PURE__ */I("b",{children:n})," stopped mid-stream"]}),{actionId:n,mode:i,runId:s,error:r}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:s,error:r,reason:"failed"})}),{accepted:!0,status:"streaming",runId:s,output:{}}}try{f=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return m(
|
|
146
|
-
/* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),
|
|
147
|
-
/* @__PURE__ */I("b",{children:n})," was refused"]}),{actionId:n,mode:i,runId:g.runId,reason:g.reason,error:g.error,status:String(f.status)}),{status:"failed",reason:g.reason??"failed",runId:g.runId??"",output:{},...g.error?{error:g.error}:{}})},[r,a]),l=f(async e=>{if(!r||!e.runId)return{cancelled:!1};try{let t=204===(await fetch(`${r}/run/${e.runId}`,{method:"DELETE",credentials:"same-origin"})).status;return
|
|
148
|
-
/* @__PURE__ */I("b",{children:e.runId})," ",t?"cancelled":"was not cancelled"]}),{actionId:"",mode:"cancel",runId:e.runId,status:t?"aborted":"failed"}),{cancelled:t}}catch{return{cancelled:!1}}},[r]),c=k(()=>(i??[]).map(e=>({label:`${e.name} (${e.identifier})`,value:e.identifier})),[i]);return t({id:"actions",callbacks:k(()=>_d(oO,{cancelServerAction:l,runServerAction:s},{runServerAction:{params:e=>{let t=Od(oO.runServerAction.params),n=(i??[]).find(t=>t.identifier===e.actionId),r=Object.entries(n?.input??{});return{...t,actionId:{...t.actionId,type:()=>c.length>0?"select":"text",canBind:!0,label:!1===o?"Action — this space has no server to run it":"Action",options:c},input:{...t.input,canBind:!0,label:r.length>0?`Input — ${r.map(([e,t])=>`${e}${t.required?"*":""}: ${t.type}`).join(", ")}`:"Input"}}}}}),[s,l,c,i,o])}),e},dO={login:{source:"auth",title:"Auth Login",strictParams:!0,params:{mode:{type:"select",description:"Credentials to sign in with: a username and password, or a token obtained elsewhere.",default:"normal",options:["normal","token","mfa"],optionLabels:{normal:"User and Password",token:"Token",mfa:"Second factor"},canBind:!1},username:{type:"text",description:"Username.",default:"",when:e=>"normal"===e.mode},password:{type:"text",description:"Password.",default:"",when:e=>"normal"===e.mode},token:{type:"text",description:"A token to exchange for a session.",default:"",when:e=>"token"===e.mode},mfaToken:{type:"text",description:"The challenge a sign-in answered with when it owed a second factor: `{{ login.mfaToken }}`.",default:"",when:e=>"mfa"===e.mode},code:{type:"text",description:"The code from the authenticator app, or a recovery code.",default:"",when:e=>"mfa"===e.mode}},preview:{ok:"",reason:"",mfaToken:"",errors:{username:"",password:"",token:""},accessToken:"",expiresAt:"",refreshToken:""}},refreshDetails:{source:"auth",title:"Auth Refresh Details",strictParams:!0,params:{},preview:{errors:"",accessToken:"",expiresAt:"",refreshToken:""}},logout:{source:"auth",title:"Auth Logout",strictParams:!0,params:{}}},pO=({children:e})=>{let{login:t,refresh:n,logout:r,provider:i}=h(km),{useInteractions:o}=h(Rm);return o({id:"auth",callbacks:k(()=>i&&t&&n&&r?_d(dO,{login:e=>t(e),refreshDetails:e=>n(e),logout:()=>r()}):{},[t,r,n,i])}),e},hO={hostAction:{source:"host",title:"Host Action",strictParams:!0,params:{action:{type:"text",description:"The name the host registered the handler under — `openSpace`, `signOut`, whatever it offers.",default:""},value:{type:"scalar",description:"What the action is about: the space to open, the workspace to switch to. Optional.",default:""}}}},fO=({children:e,actions:t})=>{let{useInteractions:n}=h(Rm),r=f(e=>{let{action:n,value:r}=e,i=n?t?.[n]:void 0;i&&i({...e,value:r})},[t]);return n({id:"host",callbacks:k(()=>_d(hO,{hostAction:r}),[r])}),e},mO={navigate:{source:"navigation",title:"Navigate",strictParams:!0,params:{urlType:{type:"select",description:"Target kind: a space page, an internal space path, or an external URL.",options:["page","internal","external"],optionLabels:{page:"Space Page",internal:"Inside Space",external:"Outside Space"}},url:{type:"text",description:'Destination — a page id when urlType is "page", otherwise a URL/path.',when:e=>!!e.urlType,builderType:e=>"page"===e.urlType?"select":"text"}}}},gO=({children:e,previewMode:t=!1})=>{let{useInteractions:n}=h(Rm),[[r,i,o]]=zt(["schema.pages","pageDefinitions","navigation.navigate"]),a=k(()=>{let e=cr(i,r);return Object.keys(e).reduce((t,n)=>{let r=e[n];return[...t,{key:n,label:sr(r,"attributes.name",n),defaultPage:sr(r,"attributes.default",!1)}]},[])},[i,r]),s=f(e=>{if(!t)return;let{url:n,urlType:r}=e;"page"===r||"internal"===r?o(n):o(n,!0)},[o,t]);return n({id:"navigation",callbacks:k(()=>{let{urlType:e,url:t}=Od(mO.navigate.params);return _d(mO,{navigate:s},{navigate:{params:{urlType:e,url:{...t,defaultValue:a.find(e=>e.defaultPage)?.key??"",options:a.map(e=>({value:e.key,label:e.label}))}}}})},[s,a])}),e},yO={invalidateQueries:{source:"queries",title:"Invalidate Queries",strictParams:!0,params:{elements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id — the way to name a request whose URL is a template. Leave both this and `url` empty to refresh every cached request on the page.",default:[],label:"Containers (ids)"},url:{type:"text",description:"Only the requests whose URL starts with this — `/api/orders` covers `/api/orders?page=2`. With `elements` too, a request must match both.",default:"",label:"URL prefix"}},preview:{}}},bO=({children:e})=>{let{useInteractions:t}=h(Rm),n=f(e=>hE({url:e.url??"",elements:dE(e.elements)}),[]);return t({id:"queries",callbacks:k(()=>_d(yO,{invalidateQueries:n}),[n])}),e},vO={setState:{source:"state",title:"Set State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to set. Stored under `runtime.state.<key>`.",default:""},type:{type:"select",description:'The value type. What is stored is coerced to it — a boolean is a real boolean, not "true"; `json` stores an object or a list (a template naming one, or JSON text).',options:["boolean","number","text","json"],optionLabels:{boolean:"True / False",number:"Numeric",text:"Text",json:"Object / List (JSON)"}},value:{type:"json",description:"The value to store — its type follows the `type` param (a real boolean/number, text, or an object/list).",when:e=>!!e.type,builderType:e=>"boolean"===e.type?"select":"text",options:["true","false"]}}},toggleState:{source:"state",title:"Toggle State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to flip, under `runtime.state.<key>`. Anything not already true is treated as false, so a key that has never been set toggles to true.",default:""}}},appendState:{source:"state",title:"Append To State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`. Created if it is not there.",default:""},value:{type:"scalar",description:"What to add to the end of the list.",default:""},unique:{type:"boolean",description:"Skip the append when the list already holds this value. For a list whose entries are their own identity — anything referring to one refers to it by value, so a second copy is indistinguishable.",default:!1},withId:{type:"boolean",description:"Store the entry as `{ id, value }` with an id of its own, so two entries that read the same are still two entries. Anything reading one back names `.value`; anything referring to one names `.id`.",default:!1}}},removeState:{source:"state",title:"Remove From State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry to drop, by value — every copy of it. Prefer this wherever the list can change under the person: a position is only true until something before it moves.",default:""},by:{type:"text",description:"The FIELD carrying the identity, for a list of records rather than of scalars — `id` for entries appended with `withId`. Without it the whole entry is compared, which never matches a record.",default:""},index:{type:"text",description:"Which entry to drop, by position, when there is no value to go on. Inside a controlled list, `{{ <listSource>.index }}` is the row own position. An index that resolves to nothing removes nothing.",default:""}}},moveState:{source:"state",title:"Move Between Lists",strictParams:!0,params:{from:{type:"text",description:"The list to take it out of, under `runtime.state.<key>`.",default:""},to:{type:"text",description:"The list to put it into. It is not added twice.",default:""},value:{type:"scalar",description:"The entry to move. Absent from `from` means nothing happens.",default:""}}},toggleInState:{source:"state",title:"Toggle In List",strictParams:!0,params:{key:{type:"text",description:"The list to add to or drop from, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry the box stands for.",default:""}}},clearState:{source:"state",title:"Clear State",strictParams:!0,params:{key:{type:"text",description:"The list to empty, under `runtime.state.<key>`. Left blank it empties EVERYTHING the space is keeping — which on a page that holds notes beside a list means losing the notes to clear the list.",default:""}}}},wO=0,kO=({children:e})=>{let{useInteractions:t}=h(Rm),n=Dt(),r=f(e=>{let{key:t,type:r}=e,i=e.value;if("boolean"===r)i=!0===i||"true"===i;else if("number"===r)i="number"==typeof i?i:parseFloat(String(i));else if("json"===r)return void n(`runtime.state.${t}`,((e,t)=>{if("string"!=typeof t)return t;try{return JSON.parse(t)}catch{throw Error(`setState "${e}" is typed json, and its value is not JSON: ${t.slice(0,80)}`)}})(t,i));n(`runtime.state.${t}`,i)},[n]),i=f(e=>{let{key:t}=e;t&&n(`runtime.state.${t}`,e=>!0!==e&&"true"!==e)},[n]),o=e=>!0===e||"true"===e,a=f(e=>{let{key:t,value:r,unique:i,withId:a}=e;t&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return o(a)?[...t,{id:typeof crypto<"u"&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`e${++wO}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,value:r}]:o(i)&&t.includes(r)?t:[...t,r]})},[n]),s=f(e=>{let{key:t,index:r,value:i,by:o}=e;if(!t)return;if(void 0!==i&&""!==i)return void n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter(e=>o?e?.[o]!==i:e!==i):[]);let a="number"==typeof r?r:parseInt(r??"",10);Number.isNaN(a)||n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter((e,t)=>t!==a):[])},[n]),l=f(e=>{let{from:t,to:r,value:i}=e;if(!t||!r||void 0===i||""===i)return;let o={moved:!1};n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return o.moved=t.includes(i),o.moved?t.filter(e=>e!==i):t}),o.moved&&n(`runtime.state.${r}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(i)?t:[...t,i]})},[n]),c=f(e=>{let{key:t,value:r}=e;t&&void 0!==r&&""!==r&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(r)?t.filter(e=>e!==r):[...t,r]})},[n]),u=f(e=>{let{key:t}=e;n(t?`runtime.state.${t}`:"runtime.state",t?[]:{})},[n]);return t({id:"state",callbacks:k(()=>_d(vO,{setState:r,toggleState:i,appendState:a,removeState:s,moveState:l,toggleInState:c,clearState:u}),[r,i,a,s,l,c,u])}),e},xO=({children:e,hostActions:t})=>{let[[n,r,i]]=zt(["navigation.routeParams","navigation.queryParams","navigation.currentPageId"]),{previewMode:o}=X();/* @__PURE__ */
|
|
149
|
-
return I(
|
|
150
|
-
return I(
|
|
151
|
-
return M(
|
|
152
|
-
return I(Fr,{value:p,children:n})},
|
|
153
|
-
return I(Et,{value:v,middlewares:[me(
|
|
154
|
-
return I(
|
|
155
|
-
return I(t,{...e})};return a.displayName=`Hot(${r.displayName??r.name})`,Object.assign(a,r)})(e,i.component);return r.set(e,o),[e,{...i,component:o}]})),replace:(e,i)=>{const o=t.get(e),a=r.get(e);return!(!o||!a||
|
|
156
|
-
return I(
|
|
127
|
+
/* @__PURE__ */I(pc,{value:r,children:e&&/* @__PURE__ */I(LC,{internalProps:o})}),
|
|
128
|
+
/* @__PURE__ */I(gI,{})]})})]})}),EI=e=>{},AI=({head:e})=>((e=>{g(()=>{if(typeof document>"u")return;let{head:t}=document,n=[];if(e.preconnect.forEach(e=>{if(t.querySelector(`link[rel="preconnect"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel="preconnect",r.href=e.href,e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.links.forEach(e=>{if(t.querySelector(`link[rel="${e.rel}"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel=e.rel,r.href=e.href,e.as&&(r.as=e.as),e.type&&(r.type=e.type),e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.faces&&!t.querySelector(`style[${cc}]`)){let r=document.createElement("style");r.setAttribute(cc,""),r.textContent=e.faces,t.appendChild(r),n.push(r)}return()=>n.forEach(e=>e.remove())},[e])})(e),null),II=[],MI=({externalStyle:e="",sdkStylePath:t="./plitzi-sdk.css",server:n})=>{const{resolvedTheme:r}=ru(),{assets:i}=h(Lm),o=x(null),{rootRef:a}=h(Rm),[[s,l,c,u=II]]=zt(["schema.settings","style.cache","navigation.currentPageId","style.fonts"]),d=Hl(),{renderMode:p,previewMode:m,debugMode:y,environment:v,isHydrating:w}=X();(e=>{let t=Nt(),n=b(),[r]=_t("schema.rsc",{mode:"mount"}),[i]=_t(["navigation.routeParams","navigation.queryParams","navigation.currentPageId","navigation.href"]),o=JSON.stringify(i),{rscData:a,rscPath:s}=e??{},l=(r?.enabled??!1)&&!!s;Pt(["rsc.enabled","rsc.endpoint","rsc.instance"],[l,s,n]),Pt(["rsc.data","rsc.loaded","rsc.location"],[a?.serverData??{},void 0!==a,gu()],{mode:"mount"}),g(()=>()=>(e=>{bu.get(e)?.inFlight.forEach(e=>e.controller.abort()),bu.delete(e)})(n),[n]),g(()=>{!l||t.get("rsc.loaded")&&t.get("rsc.location")===gu()&&!t.get("rsc.stale")||Su(t)},[l,o,t])})(n?.ssr),(e=>{Pt(["actions.endpoint"],[e?.actionPath])})(n?.ssr),(e=>{Pt(["realtime.endpoint","realtime.transport"],[e?.realtimePath,e?.realtimeTransport])})(n?.ssr),(e=>{Pt(["images.endpoint"],[e?.imagePath])})(n?.ssr);const S=k(()=>((e,t)=>{let n=[],r=[],i=[],o=/* @__PURE__ */new Map,a=/* @__PURE__ */new Set,s=(e,t)=>{e&&(a.add(e),o.set(e,(o.get(e)??!1)||t))},l=e.filter(e=>"google"===e.source);if(l.length>0){let e=(e=>{let t=[...e].sort((e,t)=>((e,t)=>e===t?0:e<t?-1:1)(e.family,t.family)).map(e=>{let t=(e=>{let t=[...new Set(e.weights)].filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:[400]})(e);if(!e.styles.includes("italic"))return`family=${Ec(e.family)}:wght@${t.join(";")}`;let n=[0,1].flatMap(e=>t.map(t=>`${e},${t}`));return`family=${Ec(e.family)}:ital,wght@${n.join(";")}`}),n=[...new Set(e.map(e=>e.display??"swap"))],r=1===n.length?n[0]:"swap";return`${vc}/css2?${t.join("&")}&display=${r}`})(l);s(vc,!1),s("https://fonts.gstatic.com",!0),l.some(e=>e.preload)&&r.push({href:e,rel:"preload",as:"style"}),n.push({href:e,rel:"stylesheet"})}return e.forEach(e=>{if("remote"===e.source&&e.stylesheet&&kc(e.stylesheet))return s(xc(e.stylesheet),!1),e.preload&&r.push({href:e.stylesheet,rel:"preload",as:"style"}),void n.push({href:e.stylesheet,rel:"stylesheet"});"remote"===e.source&&e.files?e.files.filter(e=>kc(e.url)).forEach(t=>{s(xc(t.url),!0),i.push(Ac(e,{...t,url:t.url})),e.preload&&r.push({href:t.url,rel:"preload",as:"font",type:wc[t.format],crossorigin:!0})}):"hosted"===e.source&&e.files.forEach(n=>{let o=t(n.path);s(xc(o),!0),i.push(Ac(e,{...n,url:o})),e.preload&&r.push({href:o,rel:"preload",as:"font",type:wc[n.format],crossorigin:!0})})}),{preconnect:[...o].map(([e,t])=>t?{href:e,crossorigin:t}:{href:e}),links:[...r,...n],faces:i.join(""),origins:[...a]}})(u,((e="/fonts")=>t=>`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`)(n?.fontsBaseUrl)),[u,n?.fontsBaseUrl]),T=k(()=>{const t=(e=>e?Object.keys(e).filter(t=>"string"==typeof e[t]||"number"==typeof e[t]).map(t=>{let n=e[t];return(e=>{if(!e||"string"!=typeof e)return!1;let t=e.trim().toLowerCase();return Fm.test(t)||qm.test(t)||Bm.test(t)||Um.has(t)})(n)?`--${t}:${n};`:`--${t}:"${n}";`}).join("\n"):"")(d),n=((e="",t={},n={missing:""})=>{let r=n.missing??"";return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi,(e,n)=>{let i=n.split("."),o=t;for(let t of i){if("object"!=typeof o||!o)return r;if(!(t in o))return r;o=o[t]}return"string"==typeof o||"number"==typeof o||"boolean"==typeof o?String(o):r})})(l,d),r=`.plitzi-sdk{${t}}\n${(e=>`${Ic}${e}${Mc}`)(n)}\n${s.customCss}\n${e}`;return`@layer plitzi-sdk-plugin, ${yc};@layer ${yc}{${r}}`},[d,l,s.customCss,e]),C=k(()=>({...i,...bc(S)}),[i,S]),E=f(()=>o.current?o.current.contentWindow:"undefined"!=typeof window?window:{innerWidth:1440,innerHeight:900},[o]),O=m?"":c,N=k(()=>({settings:{isHydrating:w,previewMode:m,debugMode:y,renderMode:p,environment:v,...s,theme:r},root:{baseElementId:O},utils:{displayBorderComponents:!1,getWindow:E,rootRef:a},customContexts:{},contexts:{ComponentContext:Fr,NetworkContext:Rc,PluginsContext:Lm,EventBridgeContext:Ju,InteractionsContext:$m}}),[w,m,y,O,p,v,s,r,E,a]);/* @__PURE__ */
|
|
129
|
+
return M(A,{children:["iframe"!==p&&/* @__PURE__ */I(AI,{head:S}),("raw"===p||"widget"===p)&&/* @__PURE__ */I(bI,{renderMode:p,style:T,plitziContextValue:N,pageId:c}),"shadow"===p&&/* @__PURE__ */I(CI,{sdkStylePath:t,style:T,plitziContextValue:N,pageId:c,assets:i}),!["raw","widget","shadow"].includes(p)&&/* @__PURE__ */I(yI,{style:S.faces?`${S.faces}\n${T}`:T,plitziContextValue:N,pageId:c,assets:C,ref:o})]})};MI.Plugin=EI;var OI,NI,_I,PI=MI,LI=["loginUrl","userUrl","refreshUrl","logoutUrl","mfaUrl","sessionHintCookie"],DI=e=>{let[t,n]=e.split("."),r=Number(t);if(!Number.isFinite(r)||r<=0)return;let i=Number(n);return{expiresAt:r,refreshExpiresAt:Number.isFinite(i)&&i>0?i:void 0}},zI=e=>{if(e&&typeof document<"u")for(let t of document.cookie.split(";")){let n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return DI(decodeURIComponent(t.slice(n+1).trim()))}},RI=class{kind;key;constructor(e,t){this.kind=e,this.key=t}get area(){try{if("localStorage"===this.kind&&typeof localStorage<"u")return localStorage;if("sessionStorage"===this.kind&&typeof sessionStorage<"u")return sessionStorage}catch{}}read(){let e=this.area?.getItem(this.key);if(e)try{let t=JSON.parse(e);return(e=>"object"==typeof e&&!!e&&1===e.version)(t)?t:void 0}catch{return}}write(e){try{this.area?.setItem(this.key,JSON.stringify({version:1,...e}))}catch{}}clear(){try{this.area?.removeItem(this.key)}catch{}}subscribe(e){if("localStorage"!==this.kind||typeof window>"u")return()=>{};let t=t=>{(null===t.key||t.key===this.key)&&e(this.read())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}},jI=e=>{if(!e)return;let t=e.split(".");if(3!==t.length)return;let n=(e=>{try{let t=e.replaceAll("-","+").replaceAll("_","/"),n=t.padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(n));return"object"==typeof r&&r?r:void 0}catch{return}})(t[1])?.exp;return"number"==typeof n&&Number.isFinite(n)?n:void 0},$I=()=>Math.floor(Date.now()/1e3),FI=e=>{if("number"==typeof e&&Number.isFinite(e)&&!(e<=0))return Math.floor(e>1e11?e/1e3:e)},qI=class{state="init";session={validatedAt:0};store;gate;hintCookie;revalidateSeconds;listeners=/* @__PURE__ */new Set;renewal;epoch=0;renewalTimer;detachListeners;offline=!1;spaceKey;constructor({spaceKey:e="",tokenStorage:t="localStorage",sessionHintCookie:n,sessionGate:r="optimistic",sessionRevalidateSeconds:i=300,storageKey:o="plitzi_auth_session"}={}){this.spaceKey=e,this.store=new RI(t,o),this.gate=r,this.hintCookie=n,this.revalidateSeconds=i}get endpoints(){return[]}requestExchange(){return Promise.resolve(void 0)}consumeRedirect(){return Promise.resolve(void 0)}get user(){return this.session.user}get token(){return this.session.token}getState(){return this.state}can(e){let t=this.session.user?.permissions;return Array.isArray(t)&&t.includes(e)}peekState(){return this.peek().state}peek(){let e=this.store.read(),t=zI(this.hintCookie);if(this.hintCookie&&!t)return{state:"guest"};let n=e?.token,r=FI(n?.expiresAt)??jI(n?.accessToken);return n?.accessToken&&(void 0===r||r-60>$I())&&e?.user?{state:"authenticated",user:e.user,token:e.token}:n?.accessToken||n?.refreshToken||t?{state:"init",user:e?.user,token:e?.token}:{state:"guest"}}async init(e={}){this.attach(),await this.decide(e),this.settle()}settle(){("init"===this.state||"initLoading"===this.state)&&this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest","settled")}async decide(e){if(e.skipAuth)return void this.setState("guest","skip-auth");let t=await this.consumeRedirect();if(t)return void(t.ok?(this.adopt(t),await this.handOffToServer(),this.emit({type:"login",token:this.session.token})):this.endSession(t.reason));if(e.user)return void this.adopt({ok:!0,user:e.user,token:e.accessToken?{accessToken:e.accessToken,expiresAt:e.expiresAt??null,refreshToken:null}:this.session.token},!0,"bootstrap");let n=this.store.read(),r=zI(this.hintCookie);if(this.session={user:n?.user,token:n?.token,validatedAt:n?.validatedAt??0},!this.hintCookie||r){if(this.hasLiveToken()&&this.session.user){this.setState("authenticated","restored"),this.scheduleRenewal();let e=this.isFresh()&&"strict"!==this.gate?void 0:this.revalidate(!0);return void("strict"===this.gate&&await e)}this.hasEvidence()?(this.setState("initLoading","no-evidence"),this.hasLiveToken()&&this.capabilities.identity?await this.loadIdentity():this.capabilities.renew?await this.renew():this.capabilities.identity?await this.loadIdentity():this.endSession()):this.endSession(void 0,"no-evidence")}else this.endSession(void 0,"hint-missing")}dispose(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.detachListeners?.(),this.detachListeners=void 0}async login(e){this.epoch+=1,this.setState("authenticating","authenticating");let t=await this.requestLogin(e);if(!t.ok&&"mfa"===t.reason)return this.endSession(),t;if(!t.ok)return this.endSession(t.reason),{ok:!1,reason:t.reason};this.adopt(t);let n=await this.handOffToServer();return n?{ok:!1,reason:n}:(!this.session.user&&this.capabilities.identity&&await this.loadIdentity(),"authenticated"===this.state?(this.emit({type:"login",token:this.session.token}),{ok:!0,...this.session.token??{accessToken:"",expiresAt:null,refreshToken:null}}):{ok:!1,reason:"inactive"})}async handOffToServer(){let e=await this.requestExchange();if(e)return e.ok?void this.adopt(e):"network"===e.reason?void(this.offline=!0):(this.endSession(e.reason),e.reason)}async refresh(){return await this.renew(),this.session.token}async revalidate(e=!1){return this.hasEvidence()?!e&&this.isFresh()&&this.hasLiveToken()?"authenticated"===this.state:this.hasLiveToken()&&this.capabilities.identity?this.loadIdentity():this.capabilities.renew?this.renew():this.capabilities.identity?this.loadIdentity():(this.hasLiveToken()||this.endSession("expired"),"authenticated"===this.state):("guest"!==this.state&&this.endSession(),!1)}invalidate(e="expired"){this.recover(e)}async recover(e){return"network"===e?(this.offline=!0,!1):this.renewable(e)?this.renew():(this.endSession(e),!1)}async logout(){await this.requestLogout(),this.endSession(),this.emit({type:"logout"})}on(e){let t=Array.isArray(e)?e:[e];return t.forEach(e=>this.listeners.add(e)),()=>t.forEach(e=>this.listeners.delete(e))}emit(e){for(let t of this.listeners)t(e)}setState(e,t){this.state!==e&&(this.state=e,this.emit({type:"state",state:e,reason:t}))}async renew(){return this.renewal??=this.performRenewal().finally(()=>{this.renewal=void 0}),this.renewal}async performRenewal(){let e=this.epoch,t=await this.requestRenewal(this.session.token?.refreshToken??void 0);return e===this.epoch?t.ok?(this.adopt(t),!this.session.user&&this.capabilities.identity?this.loadIdentity():"authenticated"===this.state):(this.handleFailure(t.reason),!1):"authenticated"===this.state}async loadIdentity(){let e=this.epoch,t=await this.requestIdentity();return e===this.epoch?t.ok?(this.adopt(t),"authenticated"===this.state):this.renewable(t.reason)&&!this.renewal?this.renew():(this.handleFailure(t.reason),!1):"authenticated"===this.state}handleFailure(e){"network"!==e?this.endSession(e):this.offline=!0}adopt(e,t=!0,n="granted"){this.session={user:e.user??this.session.user,token:e.token??this.session.token,validatedAt:$I()},this.offline=!1,t&&this.store.write(this.session),this.scheduleRenewal(),this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest",n)}endSession(e,t="signed-out"){this.epoch+=1,clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:$I()},this.store.write(this.session),this.setState("guest",t),e&&this.emit({type:"expired",reason:e})}expiresAt(){return FI(this.session.token?.expiresAt)??jI(this.session.token?.accessToken)}renewable(e){if(!this.capabilities.renew)return!1;if("expired"===e)return!0;if("missing"!==e)return!1;if(this.session.token?.refreshToken)return!0;let t=zI(this.hintCookie);return void 0!==t&&(void 0===t.refreshExpiresAt||t.refreshExpiresAt>$I())}hasLiveToken(){if(!this.session.token?.accessToken)return!1;let e=this.expiresAt();return void 0===e||e-60>$I()}isFresh(){return $I()-this.session.validatedAt<this.revalidateSeconds}hasEvidence(){if(this.session.token?.accessToken||this.session.token?.refreshToken)return!0;let e=zI(this.hintCookie);return!(void 0!==e?.refreshExpiresAt&&e.refreshExpiresAt<=$I()||!e)}scheduleRenewal(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0;let e=this.expiresAt();if(void 0===e||typeof window>"u"||"guest"===this.state)return;let t=Math.min(1e3*(e-60-$I()),2147483647);t<=0?this.onRenewalDue():this.renewalTimer=setTimeout(()=>this.onRenewalDue(),t)}onRenewalDue(){this.capabilities.renew?this.renew():this.endSession("expired")}attach(){if(typeof window>"u"||this.detachListeners)return;let e=()=>{"visible"===document.visibilityState&&this.revalidate()},t=()=>{this.offline&&this.revalidate(!0)},n=this.store.subscribe(e=>this.adoptFromStorage(e)),r=(e=>(Qr.add(e),()=>Qr.delete(e)))(({reason:e,url:t})=>{let n=this.endpoints.filter(Boolean);return!(0!==n.length&&!n.some(e=>((e,t)=>{if(!e||!t)return!1;try{let n=typeof window>"u"?void 0:window.location.href;return ni(new URL(e,n).hostname)===ni(new URL(t,n).hostname)}catch{return!1}})(e,t)))&&this.recover(e)});document.addEventListener("visibilitychange",e),window.addEventListener("online",t),this.detachListeners=()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("online",t),n(),r()}}adoptFromStorage(e){if(this.epoch+=1,!e?.token&&!e?.user)return clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:$I()},this.setState("guest","another-tab"),void this.emit({type:"logout"});this.adopt({ok:!0,user:e.user,token:e.token},!1)}},BI=(e,t)=>sr(e,t,void 0),UI=(e,t)=>{let n=BI(e,t);return"string"==typeof n&&""!==n?n:null},HI=(e,t)=>{let n=BI(e,t),r="string"==typeof n?Number(n):n;return"number"==typeof r&&Number.isFinite(r)?r:null},WI=e=>"string"==typeof e?e:"number"==typeof e&&Number.isFinite(e)?String(e):"",VI=class extends qI{name="basic";options;constructor({loginUrl:e="",userUrl:t="",refreshUrl:n="",logoutUrl:r="",sessionExchangeUrl:i="",mfaUrl:o="",detailsPath:a="details",tokenPath:s="access_token",refreshTokenPath:l="refresh_token",expirationTimePath:c="expire_at",refreshExpirationTimePath:u="refresh_expire_at",...d}={}){super(d),this.options={loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r,sessionExchangeUrl:i,mfaUrl:o,detailsPath:a,tokenPath:s,refreshTokenPath:l,expirationTimePath:c,refreshExpirationTimePath:u}}get capabilities(){return{renew:!!this.options.refreshUrl,identity:!!this.options.userUrl}}get endpoints(){let{loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r}=this.options;return[e,t,n,r]}async requestLogin(e){let t=WI(e.token).trim();if("token"===e.mode)return t?this.adoptToken(t):{ok:!1,reason:"missing"};if("mfa"===e.mode){let t=WI(e.mfaToken).trim();return this.options.mfaUrl&&t?this.toResult(await this.request(this.options.mfaUrl,{method:"POST",body:JSON.stringify({mfaToken:t,code:WI(e.code).trim()})})):{ok:!1,reason:"missing"}}if(!this.options.loginUrl)return console.warn('[plitzi] auth.login: the "basic" provider has no loginUrl to post the credentials to. Declare loginUrl in the space settings, or serve the space from createServer({ auth }), which names it for you.'),{ok:!1,reason:"missing"};let n=await this.request(this.options.loginUrl,{method:"POST",body:JSON.stringify({username:WI(e.username),password:WI(e.password)})});return this.challengeOf(n)??this.toResult(n)}async adoptToken(e){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.userUrl,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),n=this.toResult(t);return n.ok?{ok:!0,user:n.user,token:{accessToken:e,expiresAt:null,refreshToken:null}}:n}async requestRenewal(e){if(!this.options.refreshUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.refreshUrl,{method:"POST",body:JSON.stringify(e?{[this.options.refreshTokenPath]:e}:{})});return this.toResult(t)}async requestExchange(){let e=this.token?.accessToken;if(!this.options.sessionExchangeUrl||!e)return;let t=await this.request(this.options.sessionExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",...this.spaceKey?{"x-access-token":this.spaceKey}:{}},body:JSON.stringify({provider:this.name,token:e})});return this.toResult(t)}async requestIdentity(){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let e=await this.request(this.options.userUrl,{method:"GET"});return this.toResult(e)}async requestLogout(){this.options.logoutUrl&&await this.request(this.options.logoutUrl,{method:"POST"})}async request(e,t){let n,r;try{n=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json"},...t})}catch{return{status:0,reason:"network"}}try{r=await n.json()}catch{r=void 0}return{data:r,status:n.status,reason:n.ok?void 0:ti(n.status,r)??"network"}}challengeOf(e){let t=BI(e.data,"mfaToken");return!e.reason&&!0===BI(e.data,"mfaRequired")&&"string"==typeof t&&t?{ok:!1,reason:"mfa",mfaToken:t}:void 0}toResult(e){if(e.reason)return{ok:!1,reason:e.reason};let t=BI(e.data,this.options.detailsPath);return{ok:!0,user:"object"==typeof t&&t?t:void 0,token:this.tokenFrom(e.data)}}tokenFrom(e){let t=UI(e,this.options.tokenPath);if(!t)return;let n=BI(e,"errors");return{..."object"==typeof n&&n?{errors:n}:{},accessToken:t,expiresAt:HI(e,this.options.expirationTimePath),refreshToken:UI(e,this.options.refreshTokenPath),refreshExpiresAt:HI(e,this.options.refreshExpirationTimePath)}}},GI=class extends qI{name="server";loginUrl;logoutUrl;constructor({loginUrl:e="",logoutUrl:t="",...n}={}){super({...n,tokenStorage:""}),this.loginUrl=e||"/auth/sign-in",this.logoutUrl=t||"/auth/logout"}get capabilities(){return{renew:!1,identity:!1}}requestLogin(){let e=`${window.location.pathname}${window.location.search}`;return window.location.assign(`${this.loginUrl}?return=${encodeURIComponent(e)}`),new Promise(()=>{})}requestRenewal(){return Promise.resolve({ok:!1,reason:"expired"})}requestIdentity(){return Promise.resolve({ok:!1,reason:"missing"})}async requestLogout(){await fetch(this.logoutUrl,{method:"POST",credentials:"same-origin"})}revalidate(){return Promise.resolve("authenticated"===this.getState())}},KI=/* @__PURE__ */new Map([["basic",e=>new VI(e)],["server",e=>new GI(e)]]),JI=class{providerType;provider;settings;listeners;constructor(e,t,n){this.providerType=e,this.settings=n,this.listeners=Array.isArray(t)?t:[t];let r=KI.get(e);r&&(this.provider=r(n),this.provider.on(this.listeners))}getProviderType(){return this.providerType}getProvider(){return this.provider}getState(){return this.provider?.getState()??"guest"}peekState(){return this.peek().state}peek(){return(this.provider??new VI(this.settings)).peek()}can(e){return this.provider?.can(e)??!1}init(e){if(!this.provider){let t=this.peekState(),n=e?.user||"authenticated"===t?"authenticated":"guest";return this.listeners.forEach(e=>e({type:"state",state:n,reason:"no-provider"})),Promise.resolve()}return this.provider.init(e)}login(...e){return this.provider?this.provider.login(...e):(console.warn(this.providerType?`[plitzi] auth.login: no auth provider is registered as "${this.providerType}". Register it with registerAuthProvider before the SDK mounts, or set the userProvider of the space to one that exists ("basic", "server").`:'[plitzi] auth.login: this space has no auth provider to sign in with. Serve it from createServer({ auth }), which needs nothing declared, or declare userProvider in the space settings ("server" on the Plitzi platform, "basic" with loginUrl for your own API).'),Promise.resolve({ok:!1,reason:"missing"}))}refresh(){return this.provider?.refresh()??Promise.resolve(void 0)}revalidate(e){return this.provider?.revalidate(e)??Promise.resolve(!1)}invalidate(e){this.provider?.invalidate(e)}logout(){return this.provider?.logout()??Promise.resolve()}dispose(){this.provider?.dispose()}on(e){return this.provider?.on(e)}},YI=["loginUrl","userUrl","refreshUrl","logoutUrl","detailsPath","tokenPath","refreshTokenPath","expirationTimePath","refreshExpirationTimePath","sessionHintCookie","sessionExchangeUrl","mfaUrl"],XI=({children:e,server:t})=>{let{previewMode:n,isHydrating:r,environment:i}=X(),{webKey:o}=h(Rc),[[a,s]]=_t(["schema.settings","schema.variables"]),{queryParams:l,hostname:c}=Tm({server:t}),u=k(()=>({queryParams:l,hostname:c,environment:i}),[l,c,i]),d=k(()=>Array.isArray(s)?s.reduce((e,t)=>{let{name:n,value:r,subValues:i}=t;if(!Array.isArray(i)||0===i.length)return{...e,[n]:r};let o=i.find(e=>Po(e.when,u));return o?{...e,[n]:o.value}:{...e,[n]:r}},{}):{},[s,u]),p=k(()=>{let e=Object.fromEntries(YI.map(e=>[e,a[e]]));try{return JSON.parse(Fn(JSON.stringify(e),d))}catch{return e}},[a,d]),{provider:m,settings:y}=k(()=>{let e=((e,t,n)=>{if(!n||e&&e!==n.userProvider)return{provider:e??"",settings:t};let r={...t};for(let i of LI)r[i]||(r[i]=n[i]);return{provider:n.userProvider,settings:r}})(a.userProvider,{...p,tokenStorage:a.tokenStorage??"localStorage",sessionGate:a.sessionGate,sessionRevalidateSeconds:a.sessionRevalidateSeconds},t.auth);return{provider:e.provider,settings:{...e.settings,spaceKey:o}}},[p,a,o,t.auth]),{manager:b,loading:v,authenticated:w,state:T,bootstrapUser:C,bootstrapToken:E,peekedUser:A,peekedToken:M}=(({server:e,isHydrating:t=!1,provider:n="",settings:r})=>{let i=e?.authenticated?e.user?.details:void 0,o="string"==typeof e?.user?.accessToken?e.user.accessToken:void 0,[a,s]=S("init"),l=f(e=>{"state"===e.type&&s(e.state)},[]),c=k(()=>new JI(n,l,r),[n,l,r]),u=k(()=>t||i?void 0:c.peek(),[c,t,i]),d="init"!==a&&"initLoading"!==a||!!i||t||"authenticated"===u?.state||"guest"===u?.state;return g(()=>(c.init({user:i,accessToken:o,expiresAt:e?.user?.expiresAt,skipAuth:e?.skipAuth}),()=>c.dispose()),[c,i,o,e?.user?.expiresAt,e?.skipAuth]),k(()=>({manager:c,state:a,bootstrapUser:i,bootstrapToken:o,peekedUser:u?.user,peekedToken:u?.token?.accessToken,loading:"initLoading"===a||!d,authenticated:"authenticated"===a||"init"===a&&(!!i||"authenticated"===u?.state)}),[c,a,i,o,d,u])})({server:t,isHydrating:r,provider:m,settings:y}),O=b.getProvider(),{user:N,accessToken:_}=(e=>{let{state:t,provider:n,bootstrap:r,peeked:i}=e;return n?.user?{user:n.user,accessToken:n.accessToken}:"guest"===t?{}:r?.user?{user:r.user,accessToken:r.accessToken}:i?.user?{user:i.user,accessToken:i.accessToken}:{}})({state:T,provider:{user:O?.user,accessToken:O?.token?.accessToken},bootstrap:{user:C,accessToken:E},peeked:{user:A,accessToken:M}}),P=x(void 0),L=k(()=>{let e=N?{details:N,accessToken:_}:void 0,t=P.current;return t?.accessToken===e?.accessToken&&((e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t;return[.../* @__PURE__ */new Set([...Object.keys(n),...Object.keys(r)])].every(e=>JSON.stringify(n[e])===JSON.stringify(r[e]))})(t?.details,e?.details)||(P.current=e),P.current},[N,_]);(e=>{let t=x(e);wt(()=>{t.current!==e&&(t.current=e,aE.reset({refetch:""!==e}))},[e])})(w?String(L?.details?.id??""):"");let D=k(()=>({login:b.login.bind(b),refresh:b.refresh.bind(b),revalidate:b.revalidate.bind(b),invalidate:b.invalidate.bind(b),can:b.can.bind(b),logout:b.logout.bind(b),provider:b.getProviderType(),state:T,authenticated:w||!n,user:L}),[b,T,w,n,L]);/* @__PURE__ */
|
|
130
|
+
return I(Sm,{value:D,children:!v&&e})},QI=(e,t=0,n=/* @__PURE__ */new WeakSet)=>{if("function"==typeof e)return;if("object"!=typeof e||!e)return e;if(n.has(e)||t>12)return"[…]";n.add(e);let r=Array.isArray(e)?e.map(e=>QI(e,t+1,n)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,QI(r,t+1,n)]).filter(([,e])=>void 0!==e));return n.delete(e),r},ZI=(e,...t)=>{let n=e;for(let r of t)n=nr(n)?n[r]:void 0;return nr(n)?n:{}},eM=e=>Array.isArray(e)?e:[],tM=e=>Object.entries(ZI(e,"definition","bindings")).flatMap(([e,t])=>eM(t).flatMap(t=>{let{to:n,source:r,transformers:i}=ZI(t),o=eM(i).map(e=>ZI(e,"params").template).find(e=>"string"==typeof e);return"string"==typeof n&&"string"==typeof r?[{category:e,to:n,source:r,..."string"==typeof o?{template:o}:{}}]:[]})),nM=(e,t,n)=>{let{element:r,inComponent:i}=((e,t)=>{let n=ZI(e,"flat");if(Object.hasOwn(n,t))return{element:n[t]};for(let[r,i]of Object.entries(ZI(e,"components"))){let e=ZI(i,"flat");if(Object.hasOwn(e,t))return{element:e[t],inComponent:r}}return{}})(ZI(e,"schema"),t),o=Array.from(n.querySelectorAll(`[data-id="${t}"]`));if(!nr(r)&&0===o.length)return;let a=o.at(0),s=a?.getBoundingClientRect(),l=a?getComputedStyle(a):void 0,c=void 0!==s&&s.width>0&&s.height>0&&"none"!==l?.display&&"hidden"!==l?.visibility,u=ZI(r,"definition").type,d=ZI(r,"attributes"),p="reference"===u&&"component"===d.referenceType&&"string"==typeof d.referenceId?d.referenceId:void 0,h=ZI(e,"runtime","elements")[t];return{id:t,..."string"==typeof u?{type:u}:{},...void 0===i?{}:{inComponent:i},...void 0===p?{}:{instanceOf:p},...nr(r)?{attributes:ZI(QI(r),"attributes"),bindings:tM(r)}:{},...void 0===h?{}:{state:QI(h)},copies:o.length,visible:c,...s?{box:{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}}:{}}},rM=(e,t)=>nr(e)&&nr(t)&&Object.keys(t).some(t=>!Object.hasOwn(e,t)),iM=e=>{let t=m(mt),n=Dt();g(()=>{if(!e||!t)return;let r=[],i=!1,o=Jl.addListener(e=>{let t=(e=>{if("interactions"!==e.category||!(e=>"object"==typeof e&&"nodes"in e&&"startTime"in e&&"node"in e)(e.params))return;let{node:t,hostElementId:n,status:r,startTime:i,endTime:o,nodes:a}=e.params,s=Object.values(a).filter(e=>e.node.id!==t.id).toSorted((e,t)=>e.startTime-t.startTime).map(e=>{let t=(e=>{if("failed"===e.status)return e.result instanceof Error?e.result.message:"string"==typeof e.result?e.result:void 0})(e);return{title:e.node.title,action:e.node.action,status:e.status,ms:Math.round(e.endTime-e.startTime),...void 0===t?{}:{error:t}}});return{at:e.time??"",trigger:`${t.title} [${t.action}]`,...void 0===n?{}:{on:n},status:r,ms:Math.round(o-i),steps:s}})(e);t&&(r.push(t),r.length>100&&r.shift())},{replay:!0}),a=(({root:e,writeState:t,stores:n,runs:r,setWatching:i,document:o})=>({help:()=>"window.__plitzi — this page, in text (debug mode only):\n state(key?) runtime.state, or one key of it\n setState(key, value) writes runtime.state.<key>, as a setState step would\n sources(name?) every source's current value by name (apiContainer_site, list_products…), or one\n element(id) an element by its id, in a page or a component: type, attributes, what it reads, its own state,\n the component it places, copies, on screen, box\n flows(limit = 20) the last flows that ran: trigger, element, status, every step with its time and error\n watch(on = true) one console line per flow as it ends",state:t=>{let n=ZI(e.getState(),"runtime","state");return QI(void 0===t?n:n[t])},setState:t,sources:t=>{let r={},i={};for(let a of[e,...n()]){let e=ZI(a.getState(),"runtime","sources");for(let[t,n]of Object.entries(ZI(a.getOwnState(),"runtime","sources")))rM(n,e[t])?i[t]=n:r[t]=n}let o={...i,...r};return QI(void 0===t?o:o[t])},element:t=>nM(e.getState(),t,o),flows:(e=20)=>r().slice(-e),watch:(e=!0)=>(i(e),e?"Each flow is said in the console as it ends.":"Flows are no longer said in the console.")}))({root:t,writeState:(e,t)=>n(`runtime.state.${e}`,t),stores:()=>tt().map(e=>e.store),runs:()=>r,setWatching:e=>{i=e},document:document});return window.__plitzi=a,()=>{o(),window.__plitzi===a&&delete window.__plitzi}},[e,t,n])},oM=({children:e})=>{let[t,n]=S([]),[r,i]=S({}),o=x(!1),a=f((e,t,r,i,o)=>{n(n=>[...n,{logType:e,category:t,message:r,time:o,params:i}])},[n]),s=f((e,t)=>i(n=>({...n,[e]:t})),[]),l=f(e=>i(t=>fr(t,[e])),[]),c=f((e,...t)=>{if(e&&"function"==typeof r[e])return r[e](...t)},[r]),u=f(()=>n([]),[]);o.current||=(Jl.setCallback(a),Jl.setCallbackAddProvider(s),Jl.setCallbackRemoveProvider(l),!0),g(()=>(Jl.setCallback(a),Jl.setCallbackAddProvider(s),Jl.setCallbackRemoveProvider(l),Jl.processPendingLogs(),()=>{Jl.setCallback(void 0),Jl.setCallbackAddProvider(void 0),Jl.setCallbackRemoveProvider(void 0),Jl.flush()}),[a,s,l]);let d=k(()=>({providers:r,logs:t,setLogs:n,clearLogs:u,getData:c}),[r,t,n,u,c]);/* @__PURE__ */
|
|
131
|
+
return I(Wl,{value:d,children:e})},aM={display:"contents"},sM=({children:e})=>{let t=x(null),n=x(void 0),r=x(void 0),i=m(mt),o=h(Qc),a=h(Lm),s=h(Fr),l=h(Vo);return w(()=>{let e=t.current;if(e)return clearTimeout(r.current),n.current??=C(e),()=>{let e=n.current;r.current=setTimeout(()=>{e?.unmount(),n.current===e&&(n.current=void 0)},0)}},[]),w(()=>{n.current?.render(/* @__PURE__ */I(mt,{value:i,children:/* @__PURE__ */I(Vo,{value:l,children:/* @__PURE__ */I(Qc,{value:o,children:/* @__PURE__ */I(Lm,{value:a,children:/* @__PURE__ */I(Fr,{value:s,children:e})})})})}))}),/* @__PURE__ */I("div",{ref:t,style:aM})},lM=[],cM=/* @__PURE__ */new Set,uM=[],dM=()=>{uM=[...lM];for(let e of cM)e()},pM=e=>(cM.add(e),()=>{cM.delete(e)}),hM=()=>uM,fM=()=>OI,mM=e=>{OI!==e&&(OI=e,dM())},gM=()=>({instanceIds:T(pM,hM,hM),selectedId:T(pM,fM,fM)}),yM=()=>()=>{},bM=(e,t,n)=>{window.dispatchEvent(new CustomEvent("customstorage-changed",{detail:{key:e,oldValue:t,newValue:n}}))},vM=()=>{let e={};if(typeof document>"u"||!document.cookie)return e;for(let t of document.cookie.split(";")){let n=t.indexOf("=");-1!==n&&(e[t.slice(0,n).trim()]=decodeURIComponent(t.slice(n+1).trim()))}return e},wM=e=>new Proxy(e,{get(e,t,n){if("setItem"===t)return(t,n)=>{let r=e.getItem(t);e.setItem.call(e,t,n),r!==n&&bM(t,r,n)};if("removeItem"===t)return t=>{let n=e.getItem(t);e.removeItem.call(e,t),null!==n&&bM(t,n,null)};let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}}),kM=e=>"cookie"===e?typeof document<"u"?wM((()=>{let e={getItem(e){let t=vM();return e in t?t[e]:null},setItem(e,t){typeof document<"u"&&(document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; samesite=lax`)},removeItem(e){typeof document<"u"&&(document.cookie=`${e}=; path=/; max-age=0; samesite=lax`)},clear(){for(let t of Object.keys(vM()))e.removeItem(t)},key:e=>Object.keys(vM())[e]??null,get length(){return Object.keys(vM()).length}};return e})()):void 0:"sessionStorage"===e?typeof sessionStorage<"u"?wM(sessionStorage):void 0:typeof localStorage<"u"?wM(localStorage):void 0,xM=function(e,t,n="localStorage",r=!0){let[i,o]=k(()=>{if(e.includes(".")){let t=e.split(".").filter(Boolean);return[t.shift(),t.join(".")]}return[e,""]},[e]),a=x(kM(n));Cs(()=>{a.current=kM(n)},[n]);let[s,l]=S(()=>{try{if(!a.current)return t;let e=a.current.getItem(i);if(!e)return t;let n=JSON.parse(e);return o?sr(n,o,t):n}catch{return t}});g(()=>{try{if(!a.current)return;let e=s;if(o){let t=a.current.getItem(i);e=$l(t?JSON.parse(t):{},e=>{lr(e,o,s)})}a.current.setItem(i,JSON.stringify(e))}catch(YO){}},[i,o,s]);let c=f(e=>{if(e.key===i)try{let n=e.newValue?JSON.parse(e.newValue):t;l(o?sr(n,o,t):n)}catch{}},[i,o,t]),u=f(e=>{if(e.detail.key===i)try{let n=e.detail.newValue?JSON.parse(e.detail.newValue):t;l(o?sr(n,o,t):n)}catch{}},[i,o,t]);return g(()=>{if(typeof window<"u"&&r)return window.addEventListener("storage",c),window.addEventListener("customstorage-changed",u),()=>{window.removeEventListener("storage",c),window.removeEventListener("customstorage-changed",u)}},[c,u,n,r]),[s,l]},SM=d(()=>import("./plitzi-sdk-devtools-DmTtYHDq.js")),TM="horizontal",CM=0,EM=({children:e,className:t,innerClassName:n,enabled:r=!1,instanceId:i,renderMode:o="default",scroll:s="container",qa:l=!1,devToolsStyle:c="",devToolsStyleLink:u="",devToolsIconsLink:d=""})=>{let{resolvedTheme:p}=ru(),[h,y]=xM("plitzi-sdk.dev-tools.orientation",TM),[b,v]=xM("plitzi-sdk.dev-tools.collapsed",!0),[w,k]=xM("plitzi-sdk.dev-tools.tab","logs"),[C,E]=S(),A=x(void 0),O=x(null);A.current||="sdk-instance-"+ ++CM;let N=i||A.current,_=T(yM,()=>!0,()=>!1),P=_?h:TM,L=((e,t)=>{g(()=>{if(t)return(e=>(lM.push(e),void 0===OI&&(OI=e),dM(),()=>{let t=lM.indexOf(e);-1!==t&&lM.splice(t,1),OI===e&&(OI=lM[0]),dM()}))(e)},[t,e]);let n=T(pM,fM,fM);return t&&n===e})(N,r);(e=>{let t=m(mt);g(()=>{if(e&&!Ne&&t)return Ze(t)},[e,t])})(r),((e,t)=>{g(()=>{if(e)return Ze(aE.store,t,"Queries")},[e,t])})(L,N),iM(L);let D=f(e=>y(e),[y]),z=f(e=>{e&&k("logs"),E(e),v(!1)},[v,k]),R=f(()=>v(!0),[v]),j=f(e=>{E(void 0),k(e)},[k]);if(!r)return e;let $="document"===s&&(!_||b),F=L&&_&&/* @__PURE__ */I(sM,{children:/* @__PURE__ */I(oM,{children:/* @__PURE__ */M(a,{fallback:null,children:["default"===o&&/* @__PURE__ */I(SM,{className:U({dark:"dark"===p}),collapsed:b,orientation:P,tabSelected:w,logTypeFilter:C,onOpen:z,onCollapse:R,onTabSelect:j,onChangeOrientation:D,pageRef:O,qa:l}),"shadow"===o&&/* @__PURE__ */I("div",{style:{display:"contents"},"data-plitzi-devtools":"",children:/* @__PURE__ */M(TI,{children:[d&&/* @__PURE__ */I(TI.Link,{href:d}),u&&/* @__PURE__ */I(TI.Link,{href:u}),
|
|
132
|
+
/* @__PURE__ */M(TI.Content,{children:[/* @__PURE__ */I("style",{dangerouslySetInnerHTML:{__html:c}}),/* @__PURE__ */I(SM,{className:U({dark:"dark"===p}),collapsed:b,orientation:P,tabSelected:w,logTypeFilter:C,onOpen:z,onCollapse:R,onTabSelect:j,onChangeOrientation:D,pageRef:O,qa:l})]})]})})]})})});/* @__PURE__ */
|
|
133
|
+
return M("div",{className:U("relative flex min-w-0 grow",{"overflow-auto":!$,"flex-col":$||"horizontal"===P,"h-screen":!$&&"vertical"===P},t),children:[/* @__PURE__ */I(ft,{value:N,children:/* @__PURE__ */I("div",{ref:O,className:U("grow",{"basis-0 flex-col overflow-auto":!$},n),children:e})}),$?/* @__PURE__ */I("div",{className:"sticky bottom-0 h-0",children:F}):F]})},AM=({children:e})=>{let[[t,n,r,i,o,a=""]]=_t(["navigation.routeParams","navigation.queryParams","navigation.origin","navigation.href","navigation.currentPageId","navigation.pendingLocation"]),s=Hl(),l=f(()=>Ur(s).map(e=>({path:e,name:`variables.${e}`})),[s]);ql({id:"global",source:"variables",name:"Variables",fields:l}),Pt("runtime.sources.variables",s);let[c={}]=_t("pageDefinitions"),u=k(()=>Object.values(c).map(e=>({value:e.id,label:sr(e,"attributes.name",e.id)})),[c]),d=k(()=>({routeParams:t,queryParams:n,origin:r,href:i,currentPageId:o,pending:""!==a,pendingLocation:a}),[t,n,r,i,o,a]),p=f(()=>[...Ur({routeParams:t,queryParams:n}).map(e=>({path:e,name:`navigation.${e}`})),{path:"origin",name:"Origin"},{path:"href",name:"This page’s address"},{path:"pending",name:"A navigation is on its way"},{path:"pendingLocation",name:"Where a navigation is going"},u.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:u}:{path:"currentPageId",name:"Current Page"}],[t,n,u]);ql({id:"global",source:"navigation",name:"Navigation",fields:p}),Pt("runtime.sources.navigation",d);let m=h(Sm),{user:y,authenticated:b,state:v,provider:w}=m,S=k(()=>w?{isAuthenticated:b,...void 0===v?{}:{status:v},accessToken:y?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...y?.details??{}}}:{},[w,y,b,v]),T=f(()=>Ur(S).map(e=>({path:e,name:`user.${e}`})),[S]);ql({id:"global",source:"auth",name:"Auth State",fields:T}),Pt("runtime.sources.auth",S);let C=(e=>{let{environment:t}=X(),[[n,r,i,o,a]]=_t(["schema.flags","navigation.routeParams","navigation.queryParams","navigation.hostname","flags.overrides"]),{authenticated:s,user:l}=e,c=k(()=>Cm({authenticated:s,user:l}),[s,l]);return Bl(k(()=>ac(n,{environment:t,hostname:o,routeParams:r,queryParams:i,user:c},a),[n,t,o,r,i,c,a]))})(m),E=k(()=>sc(C),[C]),A=f(()=>Object.keys(E).map(e=>({path:e,name:`flags.${e}`,inputType:"checkbox"})),[E]);ql({id:"global",source:"flags",name:"Feature Flags",fields:A}),Pt("runtime.sources.flags",E),Pt("flags.resolved",C);let[I,M]=_t(["schema.flags","flags.overrides"])[0],O=Bl(((e,t)=>ic.flatMap(n=>Object.keys(t[n]??{}).filter(t=>!Object.hasOwn(e??{},t)).map(e=>({layer:n,name:e}))))(I,M??{}));g(()=>{O.forEach(({layer:e,name:t})=>console.warn(`[plitzi] The ${e} sets the feature flag "${t}", which this space does not declare: the override is ignored. Declare the flag in the space, or remove the override.`))},[O]);let[N]=_t("runtime.state"),_=f(()=>Ur(N).map(e=>({path:e,name:`state.${e}`})),[N]);ql({id:"global",source:"state",name:"State",fields:_}),Pt("runtime.sources.state",N);let[P]=_t("runtime.host"),L=f(()=>Ur(P).map(e=>({path:e,name:`host.${e}`})),[P]);ql({id:"global",source:"host",name:"Host",fields:L}),Pt("runtime.sources.host",P);let{theme:D,resolvedTheme:z}=ru(nu),R=k(()=>({mode:D,resolved:z}),[D,z]),j=f(()=>Ur(R).map(e=>({path:e,name:`theme.${e}`})),[R]);ql({id:"global",source:"theme",name:"Theme",fields:j}),Pt("runtime.sources.theme",R);let[$]=_t("schema.settings.computed"),F=x(void 0),q=k(()=>si($??{},{variables:s,navigation:d,auth:S,state:N??{},host:P??{},theme:R,flags:E},F.current),[$,s,d,S,N,P,R,E]);F.current=q;let B=f(()=>Ur(q).map(e=>({path:e,name:`computed.${e}`})),[q]);return ql({id:"global",source:"computed",name:"Computed",fields:B}),Pt("runtime.sources.computed",q),e},IM=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:o=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||o&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){delete this.events[e][t];let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),delete this.events[e])}}async emit(e,t=[],...n){let r;this.debugMode&&Jl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let o=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),o}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){if(!e)return this.events={},void this.counts.clear();this.events[e]&&(delete this.events[e],this.counts.delete(e))}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},MM=({children:e,debugMode:t,onInit:n})=>{let r=k(()=>new IM({debugMode:t}),[t]);g(()=>()=>{r.clear()},[r]);let i=k(()=>({eventBridge:r}),[r]);return g(()=>{n?.(i)},[n,i]),/* @__PURE__ */I(Ju,{value:i,children:e})},OM=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:o}=h($m);g(()=>{if(e)return o.subscribe(e),()=>{o.unsubscribe(e)}},[e,o]),g(()=>{e&&o.update(e,t,n,r,i)},[e,t,n,r,i,o])},NM=(e,t)=>"function"==typeof e.type?e.type(t):e.type,_M=(e,t)=>{if("string"!=typeof t)return t;if("number"===e){let e=t.trim();if(""===e)return;let n=Number(e);return Number.isFinite(n)?n:t}return"boolean"!==e||"true"!==t&&"false"!==t?t:"true"===t},PM=(e,t)=>{if(!e)return t;let n="function"==typeof e?e(t):e,r={...t};for(let[i,o]of Object.entries(n))Object.hasOwn(t,i)&&(r[i]=_M(NM(o,t),t[i]));return r},LM=Pd("copyToClipboard",{title:"Copy To Clipboard",type:"utility",strictParams:!0,params:{text:{type:"text",description:"The words to copy — a template reads the page: {{ navigation.href }} is its address.",default:"",label:"Text",required:!0}}},async({text:e})=>{let t=typeof navigator>"u"?void 0:Reflect.get(navigator,"clipboard"),n="object"==typeof t&&t?Reflect.get(t,"writeText"):void 0;if("function"!=typeof n)throw Error("This page has no clipboard to write to: the browser offers none here (a page not on https?)");await Reflect.apply(n,t,[e])}),DM={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"number"}},preview:{},callback:({time:e},t)=>new Promise(n=>{let r=t?.signal;if(r?.aborted)return void n(void 0);let i=()=>{clearTimeout(o),r?.removeEventListener("abort",i),n(void 0)},o=setTimeout(i,e);r?.addEventListener("abort",i,{once:!0})})},zM={action:"twigTemplate",title:"Twig Template",type:"utility",params:{returnMode:{label:"Mode",canBind:!1,type:"select",defaultValue:"text",options:[{label:"Text",value:"text"},{label:"Json Text",value:"json"},{label:"Json Object",value:"jsonObject"}]},template:{label:"Template",canBind:!1,defaultValue:"",type:e=>{let{returnMode:t}=e;return"text"===t?"codemirror-text":"codemirror-json"}}},preview:e=>{let{template:t,returnMode:n}=e;if("jsonObject"===n)try{let n=JSON.parse(Fn(t,e));if(n&&"object"==typeof n)return{template:"",content:Ur(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Fn(t,e)}catch(YO){console.error(YO)}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(YO){console.error(YO)}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},RM={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},jM=(e,t=()=>!0)=>({invalidateQueries:{type:"select",description:"What to refresh once the write succeeded, so the page shows the new data: the requests to the same site, every provider on the page, only the api containers named in `invalidateElements`, or none for a step that only reads. Server-driven containers are refreshed too, asking the server past its cache. Containers on screen ask again at once; the rest when they are shown.",default:e[0],options:[...e],optionLabels:Object.fromEntries(e.map(e=>[e,RM[e]])),label:"Refresh cached requests",canBind:!1,when:t},invalidateElements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id.",default:[],label:"Containers (ids)",when:e=>t(e)&&"elements"===e.invalidateQueries}}),$M=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},FM={title:"Webhook",type:"utility",strictParams:!0,params:{url:{type:"text",description:"The URL to call.",default:"",label:"Url"},method:{type:"select",description:"HTTP method.",default:"get",options:["get","post","put","delete","patch","head"],canBind:!1},body:{type:"json",description:'Request body: an object of fields (sent as JSON, or as form data when one of them is a file). Pass a real object, with templates for its values — `{ email: "{{ submitted.values.email }}" }`.',default:"",builderType:"textarea"},authorizationToken:{type:"text",description:"Value sent as the Authorization header.",default:""},headers:{type:"json",description:'Headers of the request, as an object of name to value, with templates for the values like the body: `{ "x-api-key": "{{ apiKey }}" }`. Authorization is set by `authorizationToken` and the content type follows the body, so neither is set here.',default:"",builderType:"textarea"},credentials:{type:"select",description:"fetch credentials mode.",default:"same-origin",options:["include","omit","same-origin"],optionLabels:{"same-origin":"Same Origin"}},cache:{type:"boolean",description:"Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",default:!1,label:"Cache response",when:$M},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>$M(e)&&(!0===e.cache||"true"===e.cache)},...jM(["origin","all","elements","none"],e=>!$M(e))},preview:{response:{status:"",data:""}}},qM=/* @__PURE__ */new Set(["GET","HEAD"]),BM=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),UM=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(FM.params.staleTime.default))},HM=e=>e?{Authorization:`Bearer ${e}`}:{},WM=/* @__PURE__ */new Set(["authorization","content-type"]),VM=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||WM.has(e.toLowerCase())?[]:[[e,String(t)]])):{},GM=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},o,a)=>{let s=(e=>"object"==typeof e&&e?e:{})(r),l=Object.values(s).some(e=>e instanceof Blob),c={method:o,headers:{...VM(n),...l?{}:{"Content-Type":"application/json"},...HM(t)},credentials:i,...a?{signal:a}:{}};if(!BM.has(o))if(l){let e=new FormData;Object.entries(s).forEach(([t,n])=>{e.append(t,n)}),c.body=e}else c.body=JSON.stringify(s);let u=await fetch(e,c).catch(t=>{throw Error(`${o} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),d="";try{d=await u.json()}catch{}return{status:u.status,data:d}},KM=Pd("webHook",FM,async(e,t)=>{let n=(e.method||"get").toUpperCase();if(qM.has(n)){if(!0!==e.cache&&"true"!==e.cache)return{response:await GM(e,n,t?.signal)};let r=gE({method:n,url:e.url,credentials:e.credentials,headers:{...VM(e.headers),...HM(e.authorizationToken)}});return{response:await aE.fetchQuery(r,{meta:{url:e.url},fetcher:()=>GM(e,n),staleTime:UM(e.staleTime),isCacheable:e=>e.status<400})}}let r=await GM(e,n,t?.signal);return r.status>=200&&r.status<300&&yE({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:r}}),JM={copyToClipboard:LM,delayTime:DM,twigTemplate:zM,webHook:KM},YM=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let o={...n,...r},a=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=((e,t)=>{let n=e,r=5;for((e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e))(n)&&!Zn(e)&&(n=Wn(e,t),r--);"string"==typeof n&&Zn(n)&&r>0;)n=Wn(n,t),r--;return{value:n,unresolved:"string"==typeof n&&Zn(n)}})(e,o);return r&&Jl.warning("interactions",/* @__PURE__ */M("span",{children:["Twig token resolution exceeded ",5," passes for ",
|
|
134
|
+
/* @__PURE__ */I("b",{children:t}),", leaving unresolved tokens"]}),{param:t,value:n}),n}return n>=5||"object"!=typeof e||!e?e:Array.isArray(e)?e.map(e=>a(e,t,n+1)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,a(r,t,n+1)]))};return Object.keys(t).reduce((n,r)=>{let i="trigger"===e?t[r]:a(t[r],r,0);return{...n,[r]:i}},{})},XM=e=>Object.fromEntries(Object.entries(e).filter(e=>(e=>"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e)(e[1]))),QM=e=>"object"==typeof e&&!!e&&"then"in e&&"function"==typeof e.then,ZM=(e,t={},n={},r={},i={})=>{let o=[],{id:a,action:s,enabled:l,params:c,elementId:u,type:d,when:p}=e;if(!s||!l)return{status:"disabled",result:{},postCallbacks:o};let h=XM({...r,...n,[a]:c});if(p&&!Po(p,h))return{status:"skipped",result:{},postCallbacks:o,whenParams:h};let f,m=t=>(Jl.danger("interactions",/* @__PURE__ */M("span",{children:["Interaction node failed ",/* @__PURE__ */I("b",{children:s})]}),{error:t instanceof Error?t.message:String(t),node:e}),{status:"failed",result:{},postCallbacks:o,whenParams:h});switch(d){case"callback":case"globalCallback":if(!u)return Jl.warning("interactions",/* @__PURE__ */M("span",{children:["Step ",
|
|
135
|
+
/* @__PURE__ */I("b",{children:s})," names no element, so there is nothing to run it on"]}),{node:e}),{status:"failed",result:{},postCallbacks:o,whenParams:h};if(f=sr(t,`${u}.${s}`),!f)return Jl.warning("interactions",/* @__PURE__ */M("span",{children:["Nothing is registered as ",
|
|
136
|
+
/* @__PURE__ */I("b",{children:`${u}.${s}`}),", so this step did nothing"]}),{node:e,available:Object.keys(sr(t,u,{}))}),{status:"failed",result:{},postCallbacks:o,whenParams:h};break;case"utility":f=sr(JM,s,{});break;default:return{status:"success",result:{},postCallbacks:o,whenParams:h}}try{let e={...n,...r,...PM(f.params,YM(d,c,n,r,s))},{callback:t,postCallback:l}=f,u=t=>(l&&o.push({id:a,callback:l,params:{...e,[a]:t}}),{status:"success",result:t,postCallbacks:o,whenParams:h}),p=t?t(e,i):{};return QM(p)?Promise.resolve(p).then(u,m):u(p)}catch(YO){return m(YO)}},eO=async(e=[])=>{let t={};return await Promise.all(e.reverse().map(async({id:e,callback:n,params:r})=>{t[e]=await(n?.(fr(r,[e]),r[e]))})),t},tO=()=>({}),nO=async(e,t={},n={},r={},i=tO,o=[],a={},s={})=>{let l=e,c=r;for(;l;){if(s.signal?.aborted)return a;let e=sr(t,l.afterNode);if(!e)return o.length>0&&await eO(o),a;let r=Jl.getTime().valueOf(),u=ZM(e,n,c,i(),s),d=QM(u)?await u:u,{result:p,postCallbacks:h,whenParams:f}=d,m="failed"===d.status&&s.signal?.aborted?"skipped":d.status;a[e.id]={node:e,status:m,result:p,postCallbacks:h,whenParams:f,startTime:r,endTime:Jl.getTime().valueOf()},o.push(...h),c={...c,[e.id]:p},l=e}return a},rO=(e,t,n={},r,i)=>{let o=Jl.getTime().valueOf(),a="skipped"===r?"skipped":"success",s=/* @__PURE__ */M("span",{children:["Interaction triggered ",
|
|
137
|
+
/* @__PURE__ */I("b",{children:`${e.title} [${e.action}]`}),i?/* @__PURE__ */M(A,{children:[" on ",/* @__PURE__ */I("b",{children:i})]}):null]}),l={status:r,node:e,elementId:e.elementId,hostElementId:i,nodes:{...n,[e.id]:{node:e,status:a,result:void 0,postCallbacks:[],startTime:t,endTime:o}},startTime:t,endTime:o};"failed"!==r?Jl.info("interactions",s,l):Jl.danger("interactions",s,l)},iO=IM,oO=class e{eventBridge;parentManager;childManagers;interactionsData;subscriptors;callbacksAvailables;flowsRunning=/* @__PURE__ */new Map;latestRuns=/* @__PURE__ */new Map;lastUpdate;listeners=/* @__PURE__ */new Set;constructor(e="",t={},n={}){this.eventBridge=new iO,this.parentManager=void 0,this.childManagers=[],this.subscriptors={},this.callbacksAvailables={},this.interactionsData={currentPageId:e,...t,...n},this.lastUpdate=Date.now()}eventBridgeCallback=e=>async(t,n,r)=>{if(!e||!n||!t)return;let i=this.subscriptors[t];if(await Promise.resolve(),!i||this.subscriptors[t]!==i)return;let o=sr(this.subscriptors,`${t}.getAdditionalParams`,void 0),a=()=>({...this.interactionsData,..."function"==typeof o?o().dataSource:void 0}),s=Object.values(e).filter(e=>"trigger"===e.type&&e.action===n&&e.enabled&&((e,t)=>{if("onKey"===e.action){let{shortcuts:n}=t;return Array.isArray(n)&&n.includes(e.params.keys)}return"onInterval"!==e.action||yo(e.params.interval)===t.interval})(e,r));await Promise.all(s.map(n=>this.runFlow(`${t}.${n.id}`,n.whileRunning??"skip",i=>(async(e,t={},n={},r={},i=tO,o,a,s=[])=>{let l=Jl.getTime().valueOf(),{action:c,enabled:u,when:d}=e;if(!c||!u||d&&!Po(d,XM({...i(),...r})))return void rO(e,l,{},"skipped",o);let p=await nO(e,t,n,r,i,s,{},{hostElementId:o,...a?{signal:a}:{}});rO(e,l,p,(e=>Object.values(e).some(({status:e})=>"failed"===e)?"failed":"completed")(p),o)})(n,e,this.getCallbacksAvailables(),{[n.id]:r},a,t,i))))};runFlow(e,t,n){if("latest"===t){this.latestRuns.get(e)?.abort();let t=new AbortController;return this.latestRuns.set(e,t),n(t.signal).finally(()=>{this.latestRuns.get(e)===t&&this.latestRuns.delete(e)})}let r=this.flowsRunning.get(e);if("parallel"===t)return n();if(r&&"skip"===t)return Promise.resolve();let i=(r?r.then(()=>n(),()=>n()):n()).finally(()=>{this.flowsRunning.get(e)===i&&this.flowsRunning.delete(e)});return this.flowsRunning.set(e,i),i}subscribe(e,t={},n={},r={},i){return!(!e||this.subscriptors[e]||(lr(this.subscriptors,e,{id:e,triggers:n,getAdditionalParams:i}),this.wire(e,t,n,r),this.touch(),0))}update(e,t={},n={},r={},i){let o=this.subscriptors[e];return!!o&&(o.triggers=n,o.getAdditionalParams=i,this.wire(e,t,n,r),this.touch(),!0)}wire(e,t,n,r){let i=Object.keys(r);i.length>0?this.callbacksAvailables[e]=i.reduce((t,n)=>{let{title:i,callback:o,postCallback:a,params:s,preview:l,type:c}=r[n];return"function"==typeof o?{...t,[n]:{elementId:e,title:i,action:n,type:c,callback:o,postCallback:a,params:s,preview:l}}:t},{}):delete this.callbacksAvailables[e],Object.keys(n).length>0?this.eventBridge.on("interaction",e,this.eventBridgeCallback(t),{override:!0}):this.eventBridge.off("interaction",e)}unsubscribe(e){return!!this.subscriptors[e]&&(this.eventBridge.off("interaction",e),delete this.subscriptors[e],this.callbacksAvailables[e]&&delete this.callbacksAvailables[e],this.touch(),!0)}getRootManager(){return this.parentManager?this.parentManager.getRootManager():this}getSubscriptorInternal(e){let t=sr(this.subscriptors,e);if(!t&&this.childManagers.length>0)for(let n of this.childManagers)if(t=n.getSubscriptorInternal(e),t)break;return t}getSubscriptor(e){return this.parentManager?this.getRootManager()?.getSubscriptorInternal(e):this.getSubscriptorInternal(e)}getCallbacksAvailablesInternal(){let e={};if(this.childManagers.length>0)for(let t of this.childManagers)e={...e,...t.getCallbacksAvailablesInternal()};return{...e,...this.callbacksAvailables}}getCallbacksAvailables(){if(!this.parentManager)return this.getCallbacksAvailablesInternal();let e=[];for(let n=this.parentManager;n;n=n.parentManager)e.unshift(n);let t=this.getRootManager()?.getCallbacksAvailablesInternal()??{};for(let n of e)t={...t,...n.callbacksAvailables};return{...t,...this.getCallbacksAvailablesInternal()}}interactionTrigger(e,t,n={}){if(e)return this.eventBridge.emit("interaction",e,e,t,n)}createChildManager=(t={},n={})=>{let r=new e(this.interactionsData.currentPageId,t,n);return r.parentManager=this,this.childManagers.push(r),r};removeChildManager=e=>{this.childManagers=this.childManagers.filter(t=>t!==e)};onUpdate(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}touch(){let e=Date.now();this.lastUpdate=e;for(let t of this.listeners)t(e)}},aO=({children:e,currentPageId:t,routeParams:n,queryParams:r})=>{let i=k(()=>new oO(t,n,r),[]);i.interactionsData=k(()=>({currentPageId:t,...n,...r}),[t,n,r]);let o=k(()=>({interactionsManager:i,useInteractions:OM}),[i]);/* @__PURE__ */
|
|
138
|
+
return I($m,{value:o,children:e})},sO={runServerAction:{source:"actions",title:"Run Server Action",strictParams:!0,params:{actionId:{type:"text",description:"Identifier of the server action to run, as the space publishes it.",default:"",required:!0,label:"Action"},input:{type:"json",description:"The values passed to the action, as a JSON object. The server drops every key the action did not declare. Authoring in code, pass a real object rather than a line of JSON text — an interpolated value containing a quote or a newline makes the text unparseable, and unparseable input posts nothing.",default:"{}",label:"Input"},mode:{type:"select",description:"await waits and puts the result in the flow scope; detached carries on immediately and leaves nothing to read; stream reports progress as it goes.",default:"await",options:["await","detached","stream"],optionLabels:{await:"Wait for the result",detached:"Send and continue",stream:"Stream progress"}},idempotencyKey:{type:"text",description:"Makes a repeat of the same intent answer with the first run instead of running again.",default:"",when:e=>"detached"!==e.mode},...jM(["all","elements","none"])},preview:{runId:"",status:"",output:{},reason:"",error:""}},cancelServerAction:{source:"actions",title:"Cancel Server Action",strictParams:!0,params:{runId:{type:"text",description:"The run to cancel — normally `{{ <step>.output.runId }}` from the step that started it.",default:""}},preview:{cancelled:""}}},lO=e=>Array.isArray(e)?e:void 0,cO={status:"failed",reason:"failed",runId:"",output:{}},uO=(e,t)=>e.signal.aborted?{status:"aborted",error:"Cancelled"}:{status:"failed",error:t instanceof Error?t.message:String(t)},dO=(e,t,n)=>{if(401!==e)return;let r=ti(e,t);r&&Zr({reason:r,url:n})},pO=({children:e})=>{let{useInteractions:t,interactionsManager:n}=h($m),[r]=_t("actions.endpoint"),[[i,o]]=_t(["actions.catalog","actions.available"]),a=f((e,t,r)=>{e&&n.interactionTrigger(e,t,r)},[n]),s=f(async(e,t)=>{let{actionId:n,mode:i="await",idempotencyKey:o}=e;if(!r)return Jl.warning("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
139
|
+
/* @__PURE__ */I("b",{children:n})," was skipped: this page is served without a Plitzi server"]}),{actionId:n,status:"skipped"}),{status:"skipped",runId:"",output:{}};if(!n)return{status:"skipped",runId:"",output:{}};let s=(e=>{if(!e)return{};if("object"==typeof e)return e;try{let t=JSON.parse(e);return"object"==typeof t&&t?t:{}}catch{return{}}})(e.input),l=JSON.stringify({actionId:n,input:s,...o?{idempotencyKey:o}:{}}),c=(e=>{let t=`run-${rt+=1}`;return it([{...e,id:t,status:"running",startedAt:Date.now(),progress:[],cancellable:!0},...nt.getState().runs].slice(0,100)),t})({actionId:n,mode:i,input:s}),u=new AbortController,d="",p=()=>{u.abort(),ct(c,{status:"aborted",endedAt:Date.now(),cancellable:!1}),d&&fetch(`${r}/run/${d}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{})};((e,t)=>{ot.set(e,t)})(c,p);let h=t?.signal;h?.addEventListener("abort",p,{once:!0});let f,m=t=>{h?.removeEventListener("abort",p),(e=>{ot.delete(e)})(c),ct(c,{endedAt:Date.now(),cancellable:!1,...t}),"completed"===t.status&&yE({mode:e.invalidateQueries,fallback:"all",elements:e.invalidateElements})};if("detached"===i)return Jl.info("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
140
|
+
/* @__PURE__ */I("b",{children:n})," sent"]}),{actionId:n,mode:i,status:"accepted"}),fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",keepalive:!0,signal:u.signal,body:l}).then(async e=>{let o=await e.json().catch(()=>({}));if(!e.ok)return dO(e.status,o,r),m({status:"failed",...o.runId?{runId:o.runId}:{},...o.reason?{reason:o.reason}:{},...o.error?{error:o.error}:{},...o.steps?{steps:o.steps}:{}}),void a(t?.hostElementId,"onFlowError",{actionId:n,runId:o.runId??"",error:o.error??"",reason:o.reason??"failed"});m({status:"completed"===o.status?"completed":"accepted",...o.runId?{runId:o.runId}:{},...o.output?{output:o.output}:{},...o.steps?{steps:o.steps}:{},...o.trace?{trace:o.trace}:{}}),Jl.success("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
141
|
+
/* @__PURE__ */I("b",{children:n})," finished"]}),{actionId:n,mode:i,runId:o.runId,status:o.status,output:o.output}),a(t?.hostElementId,"onFlowEnd",{actionId:n,runId:o.runId??"",status:o.status??"completed",output:o.output??{}})}).catch(e=>{m(uO(u,e)),Jl.warning("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
142
|
+
/* @__PURE__ */I("b",{children:n})," could not be sent"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"})}),{accepted:!0,status:"accepted",runId:"",output:{}};if("stream"===i){let o;Jl.info("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
143
|
+
/* @__PURE__ */I("b",{children:n})," streaming"]}),{actionId:n,mode:i,status:"streaming"});try{o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return m(uO(u,e)),Jl.warning("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
144
|
+
/* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),cO}if(!o.ok||!o.body){let e=await o.json().catch(()=>({}));return dO(o.status,e,r),m({status:"failed",...e.runId?{runId:e.runId}:{},...e.reason?{reason:e.reason}:{},...e.error?{error:e.error}:{},...e.steps?{steps:e.steps}:{}}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:e.runId??"",error:e.error??"",reason:e.reason??"failed"}),{status:"failed",reason:e.reason??"failed",runId:"",output:{},...e.error?{error:e.error}:{}}}let s=o.headers.get("X-Plitzi-Run-Id")??"";return d=s,ct(c,{status:"streaming",...s?{runId:s}:{}}),(async(e,t)=>{let n=e.getReader(),r=new TextDecoder,i="";for(;;){let{done:e,value:o}=await n.read();if(e)return;i+=r.decode(o,{stream:!0});let a=i.split("\n\n");i=a.pop()??"";for(let n of a){let e=/event: (\w+)/.exec(n)?.[1];if(!e)continue;let r=n.split("\n").filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trimStart()).join("\n");try{t({event:e,data:r?JSON.parse(r):{}})}catch{}}}})(o.body,e=>{if("data"===e.event)return((e,t)=>{let{runs:n}=nt.getState();it(n.map(n=>n.id===e?{...n,progress:[...n.progress,t].slice(-500)}:n))})(c,e.data.chunk??e.data),void a(t?.hostElementId,"onFlowProgress",{actionId:n,runId:s,...e.data});if("error"===e.event){let r=lO(e.data.steps);return m({status:"failed",..."string"==typeof e.data.reason?{reason:e.data.reason}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),void a(t?.hostElementId,"onFlowError",{actionId:n,runId:s,...e.data})}if("done"===e.event){let r=lO(e.data.steps);m({status:"completed"===e.data.status?"completed":"failed",...e.data.output?{output:e.data.output}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),a(t?.hostElementId,"onFlowEnd",{actionId:n,runId:s,...e.data})}}).catch(e=>{if(u.signal.aborted)return;let r=e instanceof Error?e.message:String(e);m({status:"failed",error:r}),Jl.warning("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
145
|
+
/* @__PURE__ */I("b",{children:n})," stopped mid-stream"]}),{actionId:n,mode:i,runId:s,error:r}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:s,error:r,reason:"failed"})}),{accepted:!0,status:"streaming",runId:s,output:{}}}try{f=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return m(uO(u,e)),Jl.warning("interactions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
146
|
+
/* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,error:e instanceof Error?e.message:String(e)}),a(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),cO}let g=await f.json().catch(()=>({}));return f.ok?(m({status:"completed"===g.status?"completed":"failed",...g.runId?{runId:g.runId}:{},...g.output?{output:g.output}:{},...g.error?{error:g.error}:{},...g.steps?{steps:g.steps}:{},...g.trace?{trace:g.trace}:{}}),{status:g.status??"completed",runId:g.runId??"",output:g.output??{},...g.error?{error:g.error}:{}}):(dO(f.status,g,r),m({status:"failed",...g.runId?{runId:g.runId}:{},...g.reason?{reason:g.reason}:{},...g.error?{error:g.error}:{},...g.steps?{steps:g.steps}:{}}),Jl.warning("actions",/* @__PURE__ */M("span",{children:["Server action ",
|
|
147
|
+
/* @__PURE__ */I("b",{children:n})," was refused"]}),{actionId:n,mode:i,runId:g.runId,reason:g.reason,error:g.error,status:String(f.status)}),{status:"failed",reason:g.reason??"failed",runId:g.runId??"",output:{},...g.error?{error:g.error}:{}})},[r,a]),l=f(async e=>{if(!r||!e.runId)return{cancelled:!1};try{let t=204===(await fetch(`${r}/run/${e.runId}`,{method:"DELETE",credentials:"same-origin"})).status;return Jl.info("actions",/* @__PURE__ */M("span",{children:["Server action run ",
|
|
148
|
+
/* @__PURE__ */I("b",{children:e.runId})," ",t?"cancelled":"was not cancelled"]}),{actionId:"",mode:"cancel",runId:e.runId,status:t?"aborted":"failed"}),{cancelled:t}}catch{return{cancelled:!1}}},[r]),c=k(()=>(i??[]).map(e=>({label:`${e.name} (${e.identifier})`,value:e.identifier})),[i]);return t({id:"actions",callbacks:k(()=>Ld(sO,{cancelServerAction:l,runServerAction:s},{runServerAction:{params:e=>{let t=_d(sO.runServerAction.params),n=(i??[]).find(t=>t.identifier===e.actionId),r=Object.entries(n?.input??{});return{...t,actionId:{...t.actionId,type:()=>c.length>0?"select":"text",canBind:!0,label:!1===o?"Action — this space has no server to run it":"Action",options:c},input:{...t.input,canBind:!0,label:r.length>0?`Input — ${r.map(([e,t])=>`${e}${t.required?"*":""}: ${t.type}`).join(", ")}`:"Input"}}}}}),[s,l,c,i,o])}),e},hO={login:{source:"auth",title:"Auth Login",strictParams:!0,params:{mode:{type:"select",description:"Credentials to sign in with: a username and password, or a token obtained elsewhere.",default:"normal",options:["normal","token","mfa"],optionLabels:{normal:"User and Password",token:"Token",mfa:"Second factor"},canBind:!1},username:{type:"text",description:"Username.",default:"",when:e=>"normal"===e.mode},password:{type:"text",description:"Password.",default:"",when:e=>"normal"===e.mode},token:{type:"text",description:"A token to exchange for a session.",default:"",when:e=>"token"===e.mode},mfaToken:{type:"text",description:"The challenge a sign-in answered with when it owed a second factor: `{{ login.mfaToken }}`.",default:"",when:e=>"mfa"===e.mode},code:{type:"text",description:"The code from the authenticator app, or a recovery code.",default:"",when:e=>"mfa"===e.mode}},preview:{ok:"",reason:"",mfaToken:"",errors:{username:"",password:"",token:""},accessToken:"",expiresAt:"",refreshToken:""}},refreshDetails:{source:"auth",title:"Auth Refresh Details",strictParams:!0,params:{},preview:{errors:"",accessToken:"",expiresAt:"",refreshToken:""}},logout:{source:"auth",title:"Auth Logout",strictParams:!0,params:{}}},fO=({children:e})=>{let{login:t,refresh:n,logout:r,provider:i}=h(Sm),{useInteractions:o}=h($m);return o({id:"auth",callbacks:k(()=>i&&t&&n&&r?Ld(hO,{login:e=>t(e),refreshDetails:e=>n(e),logout:()=>r()}):{},[t,r,n,i])}),e},mO={hostAction:{source:"host",title:"Host Action",strictParams:!0,params:{action:{type:"text",description:"The name the host registered the handler under — `openSpace`, `signOut`, whatever it offers.",default:""},value:{type:"scalar",description:"What the action is about: the space to open, the workspace to switch to. Optional.",default:""}}}},gO=({children:e,actions:t})=>{let{useInteractions:n}=h($m),r=f(e=>{let{action:n,value:r}=e,i=n?t?.[n]:void 0;i&&i({...e,value:r})},[t]);return n({id:"host",callbacks:k(()=>Ld(mO,{hostAction:r}),[r])}),e},yO={navigate:{source:"navigation",title:"Navigate",strictParams:!0,params:{urlType:{type:"select",description:"Target kind: a space page, an internal space path, or an external URL.",options:["page","internal","external"],optionLabels:{page:"Space Page",internal:"Inside Space",external:"Outside Space"}},url:{type:"text",description:'Destination — a page id when urlType is "page", otherwise a URL/path.',when:e=>!!e.urlType,builderType:e=>"page"===e.urlType?"select":"text"}}}},bO=({children:e,previewMode:t=!1})=>{let{useInteractions:n}=h($m),[[r,i,o]]=zt(["schema.pages","pageDefinitions","navigation.navigate"]),a=k(()=>{let e=cr(i,r);return Object.keys(e).reduce((t,n)=>{let r=e[n];return[...t,{key:n,label:sr(r,"attributes.name",n),defaultPage:sr(r,"attributes.default",!1)}]},[])},[i,r]),s=f(e=>{if(!t)return;let{url:n,urlType:r}=e;"page"===r||"internal"===r?o(n):o(n,!0)},[o,t]);return n({id:"navigation",callbacks:k(()=>{let{urlType:e,url:t}=_d(yO.navigate.params);return Ld(yO,{navigate:s},{navigate:{params:{urlType:e,url:{...t,defaultValue:a.find(e=>e.defaultPage)?.key??"",options:a.map(e=>({value:e.key,label:e.label}))}}}})},[s,a])}),e},vO={invalidateQueries:{source:"queries",title:"Invalidate Queries",strictParams:!0,params:{elements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id — the way to name a request whose URL is a template. Leave both this and `url` empty to refresh every cached request on the page.",default:[],label:"Containers (ids)"},url:{type:"text",description:"Only the requests whose URL starts with this — `/api/orders` covers `/api/orders?page=2`. With `elements` too, a request must match both.",default:"",label:"URL prefix"}},preview:{}}},wO=({children:e})=>{let{useInteractions:t}=h($m),n=f(e=>mE({url:e.url??"",elements:hE(e.elements)}),[]);return t({id:"queries",callbacks:k(()=>Ld(vO,{invalidateQueries:n}),[n])}),e},kO={setState:{source:"state",title:"Set State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to set. Stored under `runtime.state.<key>`.",default:""},type:{type:"select",description:'The value type. What is stored is coerced to it — a boolean is a real boolean, not "true"; `json` stores an object or a list (a template naming one, or JSON text).',options:["boolean","number","text","json"],optionLabels:{boolean:"True / False",number:"Numeric",text:"Text",json:"Object / List (JSON)"}},value:{type:"json",description:"The value to store — its type follows the `type` param (a real boolean/number, text, or an object/list).",when:e=>!!e.type,builderType:e=>"boolean"===e.type?"select":"text",options:["true","false"]}}},toggleState:{source:"state",title:"Toggle State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to flip, under `runtime.state.<key>`. Anything not already true is treated as false, so a key that has never been set toggles to true.",default:""}}},appendState:{source:"state",title:"Append To State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`. Created if it is not there.",default:""},value:{type:"scalar",description:"What to add to the end of the list.",default:""},unique:{type:"boolean",description:"Skip the append when the list already holds this value. For a list whose entries are their own identity — anything referring to one refers to it by value, so a second copy is indistinguishable.",default:!1},withId:{type:"boolean",description:"Store the entry as `{ id, value }` with an id of its own, so two entries that read the same are still two entries. Anything reading one back names `.value`; anything referring to one names `.id`.",default:!1}}},removeState:{source:"state",title:"Remove From State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry to drop, by value — every copy of it. Prefer this wherever the list can change under the person: a position is only true until something before it moves.",default:""},by:{type:"text",description:"The FIELD carrying the identity, for a list of records rather than of scalars — `id` for entries appended with `withId`. Without it the whole entry is compared, which never matches a record.",default:""},index:{type:"text",description:"Which entry to drop, by position, when there is no value to go on. Inside a controlled list, `{{ <listSource>.index }}` is the row own position. An index that resolves to nothing removes nothing.",default:""}}},moveState:{source:"state",title:"Move Between Lists",strictParams:!0,params:{from:{type:"text",description:"The list to take it out of, under `runtime.state.<key>`.",default:""},to:{type:"text",description:"The list to put it into. It is not added twice.",default:""},value:{type:"scalar",description:"The entry to move. Absent from `from` means nothing happens.",default:""}}},toggleInState:{source:"state",title:"Toggle In List",strictParams:!0,params:{key:{type:"text",description:"The list to add to or drop from, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry the box stands for.",default:""}}},clearState:{source:"state",title:"Clear State",strictParams:!0,params:{key:{type:"text",description:"The list to empty, under `runtime.state.<key>`. Left blank it empties EVERYTHING the space is keeping — which on a page that holds notes beside a list means losing the notes to clear the list.",default:""}}}},xO=0,SO=({children:e})=>{let{useInteractions:t}=h($m),n=Dt(),r=f(e=>{let{key:t,type:r}=e,i=e.value;if("boolean"===r)i=!0===i||"true"===i;else if("number"===r)i="number"==typeof i?i:parseFloat(String(i));else if("json"===r)return void n(`runtime.state.${t}`,((e,t)=>{if("string"!=typeof t)return t;try{return JSON.parse(t)}catch{throw Error(`setState "${e}" is typed json, and its value is not JSON: ${t.slice(0,80)}`)}})(t,i));n(`runtime.state.${t}`,i)},[n]),i=f(e=>{let{key:t}=e;t&&n(`runtime.state.${t}`,e=>!0!==e&&"true"!==e)},[n]),o=e=>!0===e||"true"===e,a=f(e=>{let{key:t,value:r,unique:i,withId:a}=e;t&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return o(a)?[...t,{id:typeof crypto<"u"&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`e${++xO}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,value:r}]:o(i)&&t.includes(r)?t:[...t,r]})},[n]),s=f(e=>{let{key:t,index:r,value:i,by:o}=e;if(!t)return;if(void 0!==i&&""!==i)return void n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter(e=>o?e?.[o]!==i:e!==i):[]);let a="number"==typeof r?r:parseInt(r??"",10);Number.isNaN(a)||n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter((e,t)=>t!==a):[])},[n]),l=f(e=>{let{from:t,to:r,value:i}=e;if(!t||!r||void 0===i||""===i)return;let o={moved:!1};n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return o.moved=t.includes(i),o.moved?t.filter(e=>e!==i):t}),o.moved&&n(`runtime.state.${r}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(i)?t:[...t,i]})},[n]),c=f(e=>{let{key:t,value:r}=e;t&&void 0!==r&&""!==r&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(r)?t.filter(e=>e!==r):[...t,r]})},[n]),u=f(e=>{let{key:t}=e;n(t?`runtime.state.${t}`:"runtime.state",t?[]:{})},[n]);return t({id:"state",callbacks:k(()=>Ld(kO,{setState:r,toggleState:i,appendState:a,removeState:s,moveState:l,toggleInState:c,clearState:u}),[r,i,a,s,l,c,u])}),e},TO=({children:e,hostActions:t})=>{let[[n,r,i]]=zt(["navigation.routeParams","navigation.queryParams","navigation.currentPageId"]),{previewMode:o}=X();/* @__PURE__ */
|
|
149
|
+
return I(aO,{currentPageId:i,routeParams:n,queryParams:r,children:/* @__PURE__ */I(fO,{children:/* @__PURE__ */I(SO,{children:/* @__PURE__ */I(pO,{children:/* @__PURE__ */I(wO,{children:/* @__PURE__ */I(bO,{previewMode:o,children:/* @__PURE__ */I(gO,{actions:t,children:e})})})})})})})},CO=W("StyleContext",{}),EO=({children:e,style:t})=>{let{style:n}=h(jc),r=k(()=>({}),[]);return qt("style",t??(n||hc)),/* @__PURE__ */I(CO,{value:r,children:e})},AO="/plitzi-sdk.css",IO=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:o,isHydrating:a=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d=Y.renderMode,sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:f,sdkIconsStylePath:m="/plitzi-sdk-icons.css",previewMode:y=!0,debugMode:b=!1,overQuota:v=!1,analytics:w,onInitEventBridge:x,hostData:T,hostActions:C,flags:E,serverFlags:A,forcedFlags:O,onInitStateManager:N,..._})=>{const P=h(mt),[L,D]=S(!a);g(()=>D(!0),[]),Rt(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota"],[y,b,d,r,a,L,v]),Rt(["runtime.host"],[T]),Rt(["flags.overrides.server","flags.overrides.sdk","flags.overrides.qa"],[Bl(A),Bl(E),O]);const z=k(()=>P?.withBase("runtime.state"),[P]),R=k(()=>({get state(){return z?.getState()??{}},setState:e=>z?.setState(void 0,e),setStateByKey:(e,t)=>z?.setState(e,t),clearState:()=>z?.setState(void 0,{}),subscribe:e=>z?z.subscribe(()=>e(z.getState()??{})):()=>{}}),[z]);return g(()=>{N?.(R)},[N,R]),/* @__PURE__ */I(Pm,{webKey:t,webId:n,instanceId:u,server:o,offlineMode:s,offlineData:l,offlineDataType:c,revision:e,children:/* @__PURE__ */I(zm,{children:/* @__PURE__ */I(Dm,{sdkStylePath:AO,sdkIconsPath:m,children:/* @__PURE__ */I(EO,{children:/* @__PURE__ */I(MM,{onInit:x,debugMode:b,children:/* @__PURE__ */I(XI,{server:o,children:/* @__PURE__ */M(Im,{currentPageId:i,children:[/* @__PURE__ */I(xm,{analytics:w}),/* @__PURE__ */I(AM,{children:/* @__PURE__ */I(TO,{hostActions:C,children:/* @__PURE__ */I(EM,{enabled:b,instanceId:u,devToolsStyleLink:f||"/plitzi-sdk-devtools.css",devToolsIconsLink:m,renderMode:"shadow",scroll:"document",qa:!0,innerClassName:U({flex:"iframe"===d}),children:/* @__PURE__ */I(PI,{sdkStylePath:AO,server:o,..._})})})})]})})})})})})})},MO=({scope:e,theme:t,children:n})=>{const[[r="system"]]=zt(["style.theme.default"]);/* @__PURE__ */
|
|
150
|
+
return I(tu,{defaultTheme:r,scope:e,theme:t,children:n})},OO=`[data-motion-on="view"]:not([${sp}])`,NO=()=>{const{rootRef:e}=h(Rm);return g(()=>{const t=e.current;if(t)return(e=>{let t=e=>e.setAttribute(sp,""),n=e=>[...e.matches(OO)?[e]:[],...Array.from(e.querySelectorAll(OO))];if("function"!=typeof Reflect.get(globalThis,"IntersectionObserver"))return n(e).forEach(t),()=>{};let r=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting&&(t(n.target),r.unobserve(n.target))}),i=e=>n(e).forEach(e=>r.observe(e)),o=new MutationObserver(e=>{for(let t of e)"attributes"===t.type&&t.target instanceof Element&&i(t.target),t.addedNodes.forEach(e=>{e instanceof Element&&i(e)})});return i(e),o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-motion-on"]}),()=>{r.disconnect(),o.disconnect()}})(t)},[e]),null},_O=({className:e,scoped:t=!1,children:n})=>{const{theme:r}=ru(),[[i=!1]]=zt(["render.hydrated"]);/* @__PURE__ */
|
|
151
|
+
return M(jm,{className:U(e,t&&"system"!==r&&r),"data-hydrated":i?"":void 0,children:[/* @__PURE__ */I(NO,{}),n]})},PO=/* @__PURE__ */$({ComponentHelper_exports:()=>LO,getPlugins:()=>DO,nestedInject:()=>$O,processLocalCustomPlugins:()=>FO,processLocalPlugins:()=>zO}),LO=/* @__PURE__ */Gm({getPlugins:()=>DO,nestedInject:()=>$O,processLocalCustomPlugins:()=>FO,processLocalPlugins:()=>zO}),DO=e=>{let t={};if(!e)return t;t[e.type]=e;let{plugins:n}=e;return n&&Object.keys(n).length>0&&Object.keys(n).forEach(e=>{Object.assign(t,DO(n[e]))}),t},zO=e=>{let t={};return e&&Object.values(e).forEach(e=>{e.type&&Object.assign(t,DO(e))}),t},RO={local:/* @__PURE__ */new WeakMap,"local-custom":/* @__PURE__ */new WeakMap,remote:/* @__PURE__ */new WeakMap},jO=(e,t)=>{let n=RO[t].get(e);if(n)return n;let r=Cd(e);return RO[t].set(e,r),r},$O=(e,t)=>{if(!e)return{};let n={};return Object.keys(e).forEach(r=>{let i=e[r],{version:o,pluginSettings:a,initialItems:s,plugins:l,extraProps:c}=i;n[r]=jO(i,t),n[r].origin=t,n[r].version=o,n[r].type=r,n[r].initialItems=s,n[r].pluginSettings=a,n[r].extraProps=c,n[r].plugins=$O(l,t)}),n},FO=e=>{let t={};return e&&Object.values(e).forEach(e=>{if(!e.type)return;let{type:n,pluginSettings:r,version:i,initialItems:o,plugins:a,assets:s,content:l,extraProps:c}=e,u=jO(e,"local-custom");u.version=i,u.type=n,u.assets=s,u.initialItems=o,u.pluginSettings=r,u.origin="local-custom",u.content=l,u.extraProps=c,u.plugins=$O(a,"local-custom"),Object.assign(t,DO(u))}),t},qO=p(({plitziJsxSkipHOC:e=!0,as:t="",internalProps:n,children:r,...i})=>{let{contexts:{PluginsContext:o}}=dc(),{components:a}=h(Fr),{plugins:s}=h(o),l=t?a.current[t]:void 0,c=k(()=>l?void 0:Wr({type:t,plugins:s}),[l,s,t]);return t?!l&&c?/* @__PURE__ */I(Hr,{internalProps:n,url:c.url,type:t,plitziJsxSkipHOC:e,plitziJsxProps:i}):(l||=MC,/* @__PURE__ */I(l,{plitziJsxSkipHOC:e,...i,internalProps:n,children:r})):null}),BO=e=>{let[t]=_t(`runtime.sources.flags.${e}`);return!0===t},UO={dropdown:Sg,notFound:OC,loading:EC,custom:Zm,reference:ug,blockHtml:Jm,nodeHtml:tg,blockJsx:Xm,page:LC,container:tA,layoutContainer:TC,dialogContainer:aA,modalContainer:gA,tabContainer:IA,carousel:QE,heading:Cg,image:HC,video:QC,embed:zC,svg:YC,fontAwesome:jC,button:gg,paragraph:gT,text:OT,themeToggle:$T,list:hA,link:Ig,markdown:fT,richText:IT,pagination:vA,form:UT,formControl:bC,apiContainer:SE,channel:zE},HO=({localComponents:e,localCustomComponents:t,children:n})=>{let r=k(()=>({...zO(UO),...zO(e),...FO(t)}),[e,t]),i=x({}),o=k(()=>({current:{...i.current,...r}}),[r]),a=f((e=[],t=!1)=>{if("string"==typeof e&&!t)return o.current[e];if("string"==typeof e&&t){let t=o.current[e];return t?{[e]:t,...fr(DO(t),[e])}:{}}let n={};return e.forEach(e=>{let r=o.current[e];r&&(t?n={...n,...fr(DO(r),[e])}:n[e]=r)}),n},[o]),s=f((e=[])=>{let t={};return Array.isArray(e)||(e=[e]),e.forEach(e=>{e.type&&!o.current[e.type]&&(t={...t,[e.type]:e,...DO(e)})}),0===Object.keys(t).length||(o.current={...i.current,...t,...r},i.current={...i.current,...t}),t},[o,r]),l=f(e=>{if(!e)return[];Array.isArray(e)||(e=[e]);let t=e;return e.forEach(e=>{let n=a([e],!0);Object.keys(n).length>0&&(t=[...t,...Object.keys(fr(n,e))])}),o.current={...fr(i.current,t),...r},i.current=fr(i.current,t),t},[o,a,r]),c=x(Object.keys(o.current).reduce((e,t)=>{let n=sr(o.current,t,void 0);return n&&n.content?{...e,[t]:{...n.content,initialItems:n.initialItems}}:e},{})),u=f(e=>{c.current={...c.current,...e}},[]),d=f(e=>{let t=sr(c.current,`${e}.builder.pluginChildren`,[]);c.current=fr(c.current,[e,...t])},[]),p=k(()=>({components:o,componentDefinitions:c,getComponent:a,register:s,unregister:l,unregisterDefinition:d,registerDefinition:u}),[o,s,l,u,d,a]);/* @__PURE__ */
|
|
152
|
+
return I(Fr,{value:p,children:n})},WO=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),VO={Button:vs,ContentEditable:lh,Input:As,Heading:uh,ContainerResizable:Zp,ContainerCollapsable:Xp,Text:hh,ContainerTabs:ah},GO=({className:e="min-h-screen",children:t,webKey:r="",server:o,renderMode:a=Y.renderMode,routing:s="browser",debugMode:l=!1,themeScope:c="document",theme:d,state:p,forcedFlags:h,...m})=>{const y=k(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}let n=Number(sr(t,"sub",0));return Number.isInteger(n)&&n>0?n:0}(r),[r]),b=x(p).current,v=k(()=>({runtime:{sources:{},state:b??{}},render:Y}),[b]),w=k(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[T,C]=S(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(w)),E=l&&T,[A]=S(()=>h||!l||"undefined"==typeof window?h:((e,t)=>(e=>e?Object.fromEntries(e.split(",").map(e=>e.split(":")).filter(([e,t])=>ec(e)&&("1"===t||"0"===t)).map(([e,t])=>[e,"1"===t])):{})(ci(e,tc(t))))(ui(),window.location.host)),M=k(()=>WO(o),[o]);g(()=>{},[]);const O=f(()=>{const e=!T;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(w,e),C(e)},[w,T]);(({authorized:e,onToggle:t})=>{const n=f(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);g(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:l,onToggle:O}),g(()=>{},[l,T,w]),g(()=>{if(E)return window.plitziTracing={lastCommitId:Sd.lastCommitId,commitsSince:Sd.commitsSince},()=>{delete window.plitziTracing}},[E]),g(()=>{m.isHydrating&&Sd.setHydrated()},[m.isHydrating]);const N=k(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==EI)return;const{renderType:n,component:r,assets:i=[],...o}=t.props;if(!n||!r)return;const a=r;a.type=n,a.assets=i,a.extraProps=o,e[n]=a}),e},[t]);"undefined"==typeof window&&M.requestUrl;const _="widget"===a?i:"undefined"==typeof window?hm:"memory"===s?zf:am,P="widget"===a?{}:{..."memory"===s&&"undefined"!=typeof window?{}:{basename:sr(M,"basePath","/"),location:"undefined"==typeof window?M.requestUrl??"":void 0}};/* @__PURE__ */
|
|
153
|
+
return I(Et,{value:v,middlewares:[me(Yl("sdk")),zu(y),...E?[()=>({onChange:e=>Sd.recordStoreChange(e)}),pe({shouldRecord:e=>!(e?.startsWith("runtime.elements")||e?.startsWith("rsc")||e?.startsWith("theme")||e?.startsWith("flags"))})]:[]],children:/* @__PURE__ */I(MO,{scope:c,theme:d,children:/* @__PURE__ */I(ph,{components:VO,children:/* @__PURE__ */I(_O,{scoped:"container"===c,className:U("plitzi-sdk flex",e,{"sdk-debug-mode":E}),children:/* @__PURE__ */I(Bp,{children:/* @__PURE__ */I(_,{...P,children:/* @__PURE__ */I(HO,{localCustomComponents:N,localComponents:JO,children:/* @__PURE__ */I(IO,{server:M,webKey:r,renderMode:a,debugMode:E,webId:y,forcedFlags:A,...m})})})})})})})})},KO=Cd(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:o}}=dc(),{server:a}=h(o);/* @__PURE__ */
|
|
154
|
+
return I(cp,{ref:e,className:U("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!i}),children:n&&/* @__PURE__ */I(GO,{webKey:n,environment:r,renderMode:"widget",server:a,className:"h-full w-full"})})}),JO={plitziSdk:Object.assign(KO,{type:"plitziSdk",content:{attributes:{spaceId:"",spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",type:"plitziSdk",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */I(q,{})},defaultStyle:{name:"Plitzi Sdk",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}})},YO=class extends Error{stage;log;constructor(e,t){super(`${"link"===e?"program failed to link":`${e} shader failed`}: ${t.trim()||"no log given"}`),this.name="ShaderError",this.stage=e,this.log=t}},XO=(e,t,n)=>{let r=e.createShader("vertex"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(!r)throw new YO(t,"the context made no shader (it is lost)");if(e.shaderSource(r,n),e.compileShader(r),!0!==e.getShaderParameter(r,e.COMPILE_STATUS)){let n=e.getShaderInfoLog(r)??"";throw e.deleteShader(r),new YO(t,n)}return r},QO=(e,{vertex:t,fragment:n})=>{let r=XO(e,"vertex",t),i=XO(e,"fragment",n),o=e.createProgram();if(e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.deleteShader(r),e.deleteShader(i),!0!==e.getProgramParameter(o,e.LINK_STATUS)){let t=e.getProgramInfoLog(o)??"";throw e.deleteProgram(o),new YO("link",t)}return o},ZO="(prefers-reduced-motion: reduce)",eN=()=>"function"==typeof window.matchMedia&&window.matchMedia(ZO).matches||document.documentElement.classList.contains("plitzi-reduced-motion"),tN=e=>{let t="function"==typeof window.matchMedia?window.matchMedia(ZO):void 0;t?.addEventListener("change",e);let n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t?.removeEventListener("change",e),n.disconnect()}},nN=()=>T(tN,eN,()=>!1),rN=e=>(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),iN=()=>"hidden"!==document.visibilityState,oN=(e,{paused:t=!1,fps:n,target:r}={})=>{let i=dc().settings.previewMode??!0,o=nN(),a=T(rN,iN,()=>!1),s=(e=>{let[t,n]=S(!0);return g(()=>{let t=e?.current;if(!t||typeof IntersectionObserver>"u")return;let r=new IntersectionObserver(e=>n(e.some(e=>e.isIntersecting)));return r.observe(t),()=>r.disconnect()},[e]),t})(r),l=i&&!o&&!t&&a&&s,c=x(e);g(()=>{c.current=e},[e]);let u=x({time:0,frame:0});return g(()=>{if(!l)return;let e,t=n&&n>0?1e3/n:0,r=0,i=0,o=n=>{let a=void 0===e?0:n-e;if(e=n,i+=a,i>=t){let e=t>0?i:a;i=t>0?i%t:0,u.current={time:u.current.time+e,frame:u.current.frame+1},c.current({...u.current,delta:e})}r=requestAnimationFrame(o)};return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[l,n]),{running:l}},aN=(e,{setup:t,draw:n,maxPixelRatio:r=2,paused:i,fps:o})=>{let a=(e=>`[plugin ${e?.definition?.type??"canvas"}${e?.id?` "${e.id}"`:""}]`)(h(V)),s=x(null),[l,c]=S(null),[u,d]=S({width:0,height:0,pixelRatio:1}),[p,m]=S(),[y,b]=S(!1),[v,w]=S(0),k=x(null),T=x({acquire:e,setup:t,draw:n});g(()=>{T.current={acquire:e,setup:t,draw:n}},[e,t,n]);let C=f(e=>{let t=e instanceof Error?e.message:String(e);console.error(`${a} ${t}`),m(t)},[a]),E=f(e=>{s.current=e,c(e)},[]);g(()=>{if(!l)return;let e=()=>{let e=l.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,r);l.width=Math.max(1,Math.round(e.width*t)),l.height=Math.max(1,Math.round(e.height*t)),d({width:e.width,height:e.height,pixelRatio:t})};if(e(),typeof ResizeObserver>"u")return;let t=new ResizeObserver(e);return t.observe(l),()=>t.disconnect()},[l,r]),g(()=>{if(!l)return;let e=e=>{e.preventDefault(),k.current=null,b(!1)},t=()=>w(e=>e+1);return l.addEventListener("webglcontextlost",e),l.addEventListener("webglcontextrestored",t),()=>{l.removeEventListener("webglcontextlost",e),l.removeEventListener("webglcontextrestored",t)}},[l]),g(()=>{if(l&&0!==u.width&&void 0===p)try{let e=T.current.acquire(l);if(!e)return void C(/* @__PURE__ */Error("the browser gave no drawing context (WebGL may be off)"));e.prepare(u);let t=T.current.setup?T.current.setup(e.context,u):void 0;k.current={handle:e,state:t}}catch(YO){C(YO)}},[l,u,v,p,C]);let A=f(e=>{let t=k.current;if(t&&void 0===p)try{t.handle.prepare(u),T.current.draw(t.handle.context,{...e,...u,state:t.state}),b(!0)}catch(e){k.current=null,C(e)}},[u,p,C]),{running:I}=oN(A,{paused:i||void 0!==p,fps:o,target:s});return g(()=>{!I&&u.width>0&&A({time:0,delta:0,frame:0})},[I,u,v,A]),{ref:E,ready:y,error:p,running:I}},sN=({attributes:e,...t})=>aN(f(t=>{let n=t.getContext("2d",e);return n&&{context:n,prepare:({pixelRatio:e})=>n.setTransform(e,0,0,e,0,0)}},[e]),t),lN=({attributes:e,...t})=>aN(f(t=>{let n=t.getContext("webgl",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),cN=({attributes:e,...t})=>aN(f(t=>{let n=t.getContext("webgl2",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),uN=e=>"string"==typeof e&&e?e:void 0,dN=e=>n.toArray(e).flatMap(e=>{if(!u(e))return[];let t=(e=>{let t=e.props;return e.type===Xr?uN(t.id):uN(t.internalProps?.id)})(e);return void 0===t?[]:[{id:t,node:e}]}),pN=e=>"function"==typeof e.checkVisibility?e.checkVisibility():e.getClientRects().length>0,hN=e=>{let{utils:{rootRef:t}}=dc(),[n,r]=S(void 0);return g(()=>{let n=t.current,i=n?.ownerDocument.defaultView;if(!n||!i||!e)return;let o=`[data-plitzi-el="${i.CSS.escape(e)}"]`,a=()=>r([...n.querySelectorAll(o)].some(pN)),s=0,l=new i.MutationObserver(()=>{s||=i.requestAnimationFrame(()=>{s=0,a()})});return l.observe(n,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style"]}),i.addEventListener("resize",a),a(),()=>{l.disconnect(),i.removeEventListener("resize",a),i.cancelAnimationFrame(s)}},[e,t]),n},fN=e=>{let[t]=_t("actions.endpoint");return f((n="/")=>{if(!t)return;let r=((e,t="/")=>`/fn/plugins/${encodeURIComponent(e)}${t.startsWith("/")?t:`/${t}`}`)(e,n);return typeof window>"u"?r:new URL(r,new URL(t,window.location.href)).href},[t,e])},mN={mobile:`(max-width: ${mc("tablet")})`,tablet:`(max-width: ${mc("desktop")})`},gN=e=>typeof window>"u"||"function"!=typeof window.matchMedia?void 0:window.matchMedia(e),yN=()=>gN(mN.mobile)?.matches?"mobile":gN(mN.tablet)?.matches?"tablet":"desktop",bN=e=>{let t=[gN(mN.mobile),gN(mN.tablet)].filter(e=>void 0!==e);return t.forEach(t=>{t.addEventListener("change",e)}),()=>{t.forEach(t=>{t.removeEventListener("change",e)})}},vN=()=>"desktop",wN=()=>T(bN,yN,vN),kN=(e,t)=>new Promise(n=>{const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.dataset.plitziPlugin=t,r.onload=()=>n(),r.onerror=()=>n(),document.head.append(r)}),xN=(e,{load:t,css:n,declaration:r})=>{let i;const o=(r,{content:s,version:l,initialItems:c,plugins:u})=>{const p=d(async()=>({default:r.reduce((t,n)=>{const r=t.plugins?.[n];if(!r)throw new Error(`[plitzi] plugin "${e}" was loaded without the "${n}" it declared`);return r},await(i??=Promise.all([t(),n?kN(n,e):void 0]).then(([e])=>e.default)))})),h=e=>/* @__PURE__ */I(a,{fallback:null,children:/* @__PURE__ */I(p,{...e})});return h.displayName=`Deferred(${r.at(-1)??e})`,Object.assign(h,{content:s,version:l,initialItems:c,plugins:u?Object.fromEntries(Object.entries(u).map(([e,t])=>[e,o([...r,e],t)])):void 0})};return o([],r)},SN=e=>{try{return JSON.stringify({...e},(e,t)=>"function"==typeof t?void 0:t)}catch{return}},TN=e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map;return{plugins:Object.fromEntries(Object.entries(e).map(([e,i])=>{t.set(e,i.component);const o=((e,r)=>{const i=(e=>t=>{const r=n.get(e)??/* @__PURE__ */new Set;return r.add(t),n.set(e,r),()=>{r.delete(t)}})(e),o=()=>t.get(e)??r,a=e=>{const t=T(i,o,o);/* @__PURE__ */
|
|
155
|
+
return I(t,{...e})};return a.displayName=`Hot(${r.displayName??r.name})`,Object.assign(a,r)})(e,i.component);return r.set(e,o),[e,{...i,component:o}]})),replace:(e,i)=>{const o=t.get(e),a=r.get(e);return!(!o||!a||SN(o)!==SN(i)||(t.set(e,i),n.get(e)?.forEach(e=>{e()}),0))}}};Promise.resolve({ });function CN(e,t={},n={},r=!1,i=!1,{hotPlugins:o=!1}={}){const a=Object.fromEntries(Object.entries(n).map(([e,t])=>{if("component"in t)return[e,t];const{load:n,css:r,declaration:i,...o}=t;return[e,{...o,component:xN(e,{load:n,css:r,declaration:i})}]})),s=o?TN(a):void 0,l=s?.plugins??a,{actionRuns:c,styleCacheInDocument:u,...d}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=WO(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),p="undefined"!=typeof document?document.getElementById(e):void 0,h=u?((e,t)=>{const{offlineData:n}=e;if(!n||!t)return e;const r=(e=>{let t=e.querySelector('style[data-id="plitzi-runtime-style"]')?.textContent??"",n=t.indexOf(Ic),r=t.indexOf(Mc,n);if(!(n<0||r<0))return t.slice(n+22,r)})(t);return void 0===r?(console.error("[plitzi] The server-rendered stylesheet is missing from the page: it renders without its styles."),e):{...e,offlineData:{...n,style:{...n.style,cache:r}}}})(d,p):d,m=h.debugMode??r;m&&c?.length&<(c);const y=({isHydrating:e=!1})=>{const[t,n]=S(!e);g(()=>n(!0),[]);const r=Object.keys(l).filter(e=>t||!l[e].clientOnly);m||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const i=f(e=>{NI=e},[]),o=f(e=>{_I=e},[]);/* @__PURE__ */
|
|
156
|
+
return I(GO,{...h,debugMode:m,isHydrating:e,onInitStateManager:i,onInitEventBridge:o,children:r.filter(e=>!!l[e].component).map(e=>/* @__PURE__ */I(PI.Plugin,{renderType:e,component:l[e].component,...l[e].props},e))})};if(!p)return;const b=i?E(p,/* @__PURE__ */I(y,{isHydrating:!0})):C(p);return i||b.render(/* @__PURE__ */I(y,{})),{unmount:()=>b.unmount(),replacePlugin:(e,t)=>s?.replace(e,t)??!1}}var EN=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:o=Y.renderMode,...a})=>/* @__PURE__ */I(GO,{...a,isHydrating:t,renderMode:o,debugMode:e,webKey:r,environment:i,children:n});EN.Plugin=PI.Plugin;var AN=dc,IN="0.38.9",MN=()=>NI,ON=()=>_I;export{gr as A,ue as B,ws as C,Fr as ComponentContext,HO as ComponentProvider,mo as D,go as E,dt as F,at as I,qO as JsxManager,et as L,_t as M,vt as N,qr as O,mt as P,pc as PlitziServiceProvider,ng as PluginManager,Hr as PluginRemote,tt as R,rg as ReplicaProvider,cp as RootElement,Is as S,YO as ShaderError,bo as T,U as V,gc as _,aE as a,Vl as b,Lm as c,QO as createShaderProgram,Qp as d,EN as default,dN as elementChildren,lp as f,Dc as g,ON as getEventBridge,MN as getStateManager,ru as h,nM as i,sr as j,Rr as k,sh as l,td as m,mM as n,Dg as o,Sd as p,gM as r,CN as render,Og as s,JO as sdkComponents,xM as t,km as track,th as u,oN as useAnimationFrame,sN as useCanvas2d,_E as useChannel,wN as useDisplayMode,Ed as useElement,hN as useElementVisible,BO as useFlag,AN as usePlitziServiceContext,fN as usePluginRoute,nN as useReducedMotion,eE as useRscData,Tu as useRscRefresh,zt as useStore,lN as useWebGL,cN as useWebGL2,nc as v,IN as version,Do as w,Cd as withElement,Wl as x,rc as y,Oe as z};
|