@plitzi/plitzi-builder 0.39.8 → 0.39.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Pro
2
2
  /* @vite-ignore */
3
3
  /* webpackIgnore: true */
4
4
  URL.createObjectURL(n)))}catch(e){return}}});function Jl(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 ec(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=Jl(n[1]);if(null!==e)r.push(e);else if(t)return[]}else if(n[2]){let e=Jl(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=Jl(r);if(null!==e)n.push(e);else if(t)return[]}return n}(e,t):[]:[]}var tc=X(()=>{});function nc(e,t,n){if(null==e||!t)return n;let r=ec(t);if(!r.length)return n;let i=e;for(let a of r){if("object"!=typeof i||!i)return n;i=Array.isArray(i)&&/^\d+$/.test(a)?i[Number(a)]:Reflect.get(i,a)}return void 0===i?n:i}var rc=X(()=>{tc()});function ic(e,t,n){let r=ec(t);if(!r.length)return e;let i=e;for(let o=0;o<r.length-1;o++){let t=r[o],n=r[o+1];if("object"!=typeof i||!i)return e;let a=i;(null==a[t]||"object"!=typeof a[t])&&(a[t]=/^\d+$/.test(n)?[]:{}),i=a[t]}let a=r[r.length-1];return"object"==typeof i&&i&&(i[a]=n),e}var ac=X(()=>{tc()});function oc(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=nc(e,i);void 0!==t&&ic(n,i,t)}return n}var sc,lc=X(()=>{rc(),ac()});function cc(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,cc(e,t))),n}if(e instanceof Set){let n=/* @__PURE__ */new Set;return t.set(e,n),e.forEach(e=>n.add(cc(e,t))),n}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let n=new DataView(cc(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]=cc(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]=cc(e[i],t));return r}function dc(e,t){let n=ec(t),r=Array.isArray(e)?[...e]:sc(e);if(!n.length)return r;let i=e,a=r;for(let o=0;o<n.length;o++){let e=n[o],t=i?.[e];if(!t||"object"!=typeof t){a[e]=t;break}let r=Array.isArray(t)?[...t]:sc(t);a[e]=r,i=t,a=r}return r}var uc=X(()=>{tc(),sc=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e)});function hc(e,t){if(null===e)return!1;let n=ec(t),r=e;for(let i of n){if(null==r||!(i in r))return!1;r=r[i]}return!0}var pc=X(()=>{tc()});function fc(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(0===n.length)return{...e};let r=[],i=[];for(let o of n){let e=ec(o);0!==e.length&&(1===e.length?r.push(e[0]):i.push(o))}let a=e;if(r.length){let e;for(let t of r)Object.prototype.hasOwnProperty.call(a,t)&&(e??=sc(a),delete e[t]);e&&(a=e)}for(let o of i){let e=ec(o);if(!hc(a,o))continue;let t=dc(a,o),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]}a=t}return a}var mc=X(()=>{uc(),pc(),tc()});function gc(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,d=n.trailing??!0,u=n.maxWait,h=()=>Date.now();function p(t){if(!r)return a;l=t;let n=r,o=i;return r=void 0,i=void 0,a=e.apply(o,n),a}function f(e){o=setTimeout(g,e)}function m(e){if(void 0===s)return!0;let n=e-s;return n>=t||n<0||void 0!==u&&e-l>=u}function g(){let e=h();if(m(e))return v(e);f(function(e){let n=e-l,r=t-(e-(s??0));return void 0===u?r:Math.min(r,u-n)}(e))}function b(e){return l=e,f(t),c?p(e):a}function v(e){return o=void 0,d&&r?p(e):(r=i=void 0,a)}function y(...e){let n=h(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return b(n);if(void 0!==u)return clearTimeout(o),f(t),p(n)}return o||f(t),a}return y.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},y.flush=()=>void 0===o?a:v(h()),y.pending=()=>void 0!==o,y}var bc=X(()=>{});function vc(e,t=0,n={}){return gc(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}var yc=X(()=>{bc()});function xc(e){return null!=e&&"string"==typeof e&&e.trim()?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}var wc=X(()=>{});function kc(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)}var Oc=X(()=>{});function Sc(e){return e&&"string"==typeof e&&e.trim()?e.charAt(0).toUpperCase()+e.slice(1):""}var Cc=X(()=>{});function Nc(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=Nc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _c(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Nc(e))&&(r&&(r+=" "),r+=t);return r}var $c,Tc,Ac,Ec,Pc,zc,Mc,Ic,Rc,jc,Dc,Lc,Fc,Qc,Vc,Bc,Uc,Wc,qc,Hc,Zc,Xc,Yc,Gc,Kc,Jc,ed,td,nd,rd,id,ad,od,sd,ld,cd,dd,ud,hd,pd,fd,md,gd,bd,vd,yd,xd,wd,kd,Od,Sd,Cd,Nd,_d,$d,Td,Ad,Ed,Pd,zd,Md,Id,Rd,jd,Dd,Ld,Fd,Qd,Vd,Bd,Ud,Wd,qd,Hd,Zd,Xd,Yd,Gd,Kd,Jd,eu,tu,nu,ru,iu,au,ou,su,lu,cu,du,uu,hu,pu,fu,mu,gu,bu,vu,yu,xu,wu,ku,Ou,Su,Cu,Nu,_u,$u,Tu,Au,Eu,Pu,zu,Mu,Iu,Ru,ju,Du,Lu,Fu,Qu,Vu,Bu,Uu,Wu,qu,Hu,Zu,Xu=X(()=>{}),Yu=/* @__PURE__ */G({cva:()=>Ac,cx:()=>Tc}),Gu=X(()=>{Xu(),$c=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Tc=_c,Ac=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Tc(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const o=$c(t)||$c(r);return i[e][o]}),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({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Tc(e,o,l,null==n?void 0:n.class,null==n?void 0:n.className)}}),Ku=X(()=>{Gu(),({cva:Ec}=Yu)}),Ju=X(()=>{Pc=({tag:e,children:t,...n})=>c(e,n,t)}),eh=X(()=>{zc=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}}),th=X(()=>{Mc=e=>{if(!e)return!1;let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window,{documentElement:{clientHeight:s,clientWidth:l}}=document;return t>=0&&n>=0&&r<=(a||s)&&i<=(o||l)},Ic=e=>"function"==typeof e}),nh=X(()=>{rc(),ac(),lc(),uc(),pc(),mc(),bc(),yc(),wc(),Oc(),Cc()}),rh=X(()=>{we(),Rc=Q("ElementParentContext",void 0)}),ih=X(()=>{jc=async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}}}),ah=X(()=>{Dc=e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e)}),oh=X(()=>{Bc=`(?:\\{\\{\\{\\s*${Vc=`${Lc="[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*"}(?:${Qc=`\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${Lc}(?:\\.${Fc=`(?:${Lc}|\\d+)`})*)\\s*\\]`})*(?:\\??\\.${Fc}(?:${Qc})*)*(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`}\\s*\\}\\}\\}|\\{\\{\\s*${Vc}\\s*\\}\\})`,Uc=new RegExp(Bc,"g"),Wc=RegExp(`^${Bc}$`)}),sh=X(()=>{oh(),qc=(e,t=!1)=>{if("string"!=typeof e)return!1;let n=t?Wc:Uc;return n.lastIndex=0,n.test(e.trim())}}),lh=X(()=>{es(),ah(),sh(),Hc=(e,t)=>{let n=e,r=5;for(Dc(n)&&!qc(e)&&(n=co(e,t),r--);"string"==typeof n&&qc(n)&&r>0;)n=co(n,t),r--;return{value:n,unresolved:"string"==typeof n&&qc(n)}}}),ch=X(()=>{Zc={cycle:{signature:"cycle(values, index)",summary:"The value at index, going round the list: alternating classes, colours of a row",example:"{{ cycle(['odd', 'even'], loop.index0) }}"},max:{signature:"max(a, b, …) | max(list)",summary:"The largest of the numbers given, or of a list",example:"{{ max(carousel_row.count - 3, 0) }}"},min:{signature:"min(a, b, …) | min(list)",summary:"The smallest of the numbers given, or of a list",example:"{{ min(state.page + 1, state.pages) }}"},range:{signature:"range(end) | range(start, end, step?)",summary:"The whole numbers from 0 (or start) to end, both included",example:"{% for n in range(1, 5) %}{{ n }}{% endfor %}"}}}),dh=X(()=>{ch(),Ho(),Ko(),Uo(),Xc=e=>e.replace(/_/g,"").toLowerCase(),Yc=e=>Object.keys(fa).find(t=>Xc(t)===Xc(e)),Gc={concat:"first|merge(second)",push:"list|merge([item])",includes:"item in list",indexOf:"list|find(…)",toUpperCase:"value|upper",toLowerCase:"value|lower",startsWith:"value|startswith(prefix)",endsWith:"value|endswith(suffix)",toFixed:"value|number(2)",stringify:"value|to_json",uniq:"list|unique",groupBy:"list|group_by('field')"},Kc=new Set(Object.keys(Zc)),Jc=e=>`value|round(0, '${e}')`,ed={floor:Jc("floor"),ceil:Jc("ceil"),clamp:"min(max(value, low), high)"},td=e=>{let t=Object.hasOwn(fa,e)?`value|${e}`:ed[e];return`Unknown function "${e}()"${t?` — write \`${t}\``:""}: the functions are ${[...Kc].join(", ")}`},nd=e=>"literal"===e.type&&("string"==typeof e.value||"number"==typeof e.value),rd=class{issues=[];notes=[];freeNames=/* @__PURE__ */new Set;nodes(e,t){let n=new Set(t);for(let r of e)switch(r.type){case"text":case"break":case"continue":break;case"variable":this.expression(r.expression,n);break;case"if":this.expression(r.condition,n),this.nodes(r.body,n);for(let e of r.elseifClauses)this.expression(e.condition,n),this.nodes(e.body,n);r.elseBody&&this.nodes(r.elseBody,n);break;case"for":{this.expression(r.collection,n);let e=/* @__PURE__ */new Set([...n,r.valueVar,"loop",...r.keyVar?[r.keyVar]:[]]);this.nodes(r.body,e),n=/* @__PURE__ */new Set([...n,...this.setsIn(r.body)]),r.elseBody&&this.nodes(r.elseBody,n);break}case"set":Array.isArray(r.value)?this.nodes(r.value,n):this.expression(r.value,n),n=/* @__PURE__ */new Set([...n,r.name]);break;case"apply":this.filterNames(r.filters.map(e=>e.name));for(let e of r.filters)e.args.forEach(e=>this.expression(e,n));this.nodes(r.body,n)}return n}setsIn(e){return e.flatMap(e=>"set"===e.type?[e.name]:[])}filterNames(e){for(let t of e)if(t&&!Object.hasOwn(fa,t)){let e=Gc[t],n=void 0===e?Yc(t):void 0;this.issues.push(`Unknown filter "${t}"${e?` — write \`${e}\``:n?` — did you mean \`${n}\`?`:""}`)}}expression(e,t){switch(e.type){case"literal":return;case"array":return void e.elements.forEach(e=>this.expression(e,t));case"object":for(let n of e.entries)this.expression(n.key,t),this.expression(n.value,t);return;case"range":return this.expression(e.start,t),void this.expression(e.end,t);case"path":return void(t.has(e.segments[0])||this.freeNames.add(e.segments[0]));case"index":return this.expression(e.object,t),void this.expression(e.index,t);case"function":return Kc.has(e.name)||this.issues.push(td(e.name)),void e.args.forEach(e=>this.expression(e,t));case"filter":this.expression(e.subject,t),this.filterNames(e.filters.map(e=>e.name));for(let n of e.filters)n.args.forEach(e=>this.expression(e,t));return;case"concat":return void e.parts.forEach(e=>this.expression(e,t));case"unary":return void this.expression(e.operand,t);case"binary":if(("or"===e.operator||"and"===e.operator)&&[e.left,e.right].some(nd)){let t=[e.left,e.right].find(nd);this.notes.push(`\`${e.operator}\` with ${"literal"===t?.type?JSON.stringify(t.value):"a value"} answers true or false, never the value — a fallback value is \`??\`: \`x ?? ${"literal"===t?.type?JSON.stringify(t.value):"…"}\``)}return this.expression(e.left,t),void(("is"!==e.operator&&"is not"!==e.operator||"path"!==e.right.type)&&this.expression(e.right,t));case"default":return this.expression(e.value,t),void this.expression(e.defaultExpr,t);case"ternary":return this.expression(e.condition,t),e.trueExpr&&this.expression(e.trueExpr,t),void this.expression(e.falseExpr,t);case"arrow":this.expression(e.body,/* @__PURE__ */new Set([...t,...e.params]))}}},id=e=>{let t=Ma(e);if(t.error)return{issues:[t.error],freeNames:[],notes:[]};let n=new rd,{nodes:r,error:i}=Ua(t.tokens,!1,n.issues);return i&&n.issues.push(i),n.nodes(r,/* @__PURE__ */new Set),{issues:[...new Set(n.issues)],freeNames:[...n.freeNames],notes:[...new Set(n.notes)]}}}),uh=X(()=>{Jo(),ad=(e,t)=>{if(Array.isArray(e))for(let n of e)ad(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);n.length>0&&t.add(n.join("."))}else for(let n of Object.values(e))ad(n,t)},od=/* @__PURE__ */new Map,sd=e=>{let t=od.get(e);if(t)return t;let n=Ka(e),r=/* @__PURE__ */new Set;n&&ad(n.nodes??n.nodesWithSource,r);let i=[...r];if(od.set(e,i),od.size>5e3){let[e]=od.keys();od.delete(e)}return i}}),hh=X(()=>{ld=e=>{let t="number";return/^"/.test(e)?t=/:$/.test(e)?"text-red-700":"text-green-700":/true|false/.test(e)?t="text-blue-700":/null/.test(e)&&(t=""),`<span class="${t}">${e}</span>`},cd=/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,dd=e=>e?.replace(cd,ld)??e}),ph=X(()=>{}),fh=X(()=>{}),mh=X(()=>{ud=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,hd=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:a=!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 a,o,s=[];if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(!hd(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.values())if(!t.has(o))return!1;for(o of e.entries())if(!hd(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let n=e,r=t;if(a=n.length,a!=r.length)return!1;for(o=a;0!==o--;)if(n[o]!==r[o])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),a=s.length,a!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(o=a;0!==o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!==o--;){let a=s[o];if("_owner"===a&&e.$$typeof)continue;let l="soft"===n||ud(e,a)||!i.includes(a);if(!hd(e[a],t[a],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||a&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t}}),gh=X(()=>{pd=e=>null!==e&&"nodeType"in e&&"number"==typeof e.nodeType,fd=e=>pd(e)?e:null,md=e=>pd(e)&&e.nodeType===Node.ELEMENT_NODE,gd=e=>md(e)?e:null}),bh=X(()=>{bd="onInterval",vd=e=>{let t="string"==typeof e&&""!==e.trim()?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>=250?t:void 0}}),vh=X(()=>{yd=e=>!e.fromSubscriptions&&!e.queryFailed}),yh=X(()=>{Ns(),xd={},Object.freeze(xd),wd=(e,t="",n=".",r=!1)=>e&&"object"==typeof e?Object.keys(e).reduce((i,a)=>{a=a.replaceAll(n,"").replaceAll(".","");let o=`${t}${t?n:""}${a}`;return"object"!=typeof e[a]||Array.isArray(e[a])&&(r||e[a].length>5)?[...i,o]:[...i,o,...wd(e[a],o,n,r)]},[]):[],kd=(e,t=!0,n=!0)=>{let r="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),n&&(i=`${i}0123456789`);let a=i.length;for(let o=0;o<e;o++)r+=i.charAt(Math.floor(Math.random()*a));return r},Od=e=>new Promise(t=>{setTimeout(t,e)}),Sd=e=>{let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window,{documentElement:{clientHeight:s,clientWidth:l}}=document;return t>=0&&n>=0&&r<=(a||s)&&i<=(o||l)}}),xh=X(()=>{Cd=()=>{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})}}),wh=X(()=>{Nd=e=>e?.closest(".plitzi-sdk")??null}),kh=X(()=>{_d=[320,480,640,768,960,1280,1600,1920],$d=e=>/^https?:\/\//i.test(e),Td=e=>$d(e)&&!/\.svgz?(?:[?#]|$)/i.test(e),Ad=(e,t,n)=>`${e}?url=${encodeURIComponent(t)}&w=${String(n)}`,Ed=(e,t)=>_d.map(n=>`${Ad(e,t,n)} ${String(n)}w`).join(", ")}),Oh=X(()=>{Pd="onKey",zd=["ctrl","alt","shift","meta"],Md={ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",shift:"shift",meta:"meta",cmd:"meta",command:"meta",mod:"mod"},Id={esc:"escape",space:"space",spacebar:"space",plus:"+",minus:"-",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",return:"enter"},Rd=/* @__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)=>[...zd.filter(t=>e.has(t)),t].join("+"),Dd=(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),a=/* @__PURE__ */new Set,o=[];for(let l of i)if(Object.hasOwn(Md,l)){let e=Md[l];a.add("mod"===e?t?"meta":"ctrl":e)}else o.push(Object.hasOwn(Id,l)?Id[l]:l);if(1!==o.length)return{problem:`"${e.trim()}" names ${o.length?`${o.length} keys (${o.join(", ")})`:"no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"`};let[s]=o;return 1===s.length||Rd.has(s)?{combo:jd(a,s)}:{problem:`"${s}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...Rd].slice(0,15).join(", ")}, f1…f12)`}},Ld=(e,t=!1)=>{let n=e.split(",").map(e=>Dd(e,t));return{combos:n.flatMap(e=>e.combo?[e.combo]:[]),problems:n.flatMap(e=>e.problem?[e.problem]:[])}},Fd=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(),a=1===i.length&&!/[a-z0-9]/.test(i),o=/* @__PURE__ */new Set;return e.ctrlKey&&o.add("ctrl"),e.altKey&&o.add("alt"),e.shiftKey&&!a&&o.add("shift"),e.metaKey&&o.add("meta"),jd(o,i)},Qd=/* @__PURE__ */new Set(["a","z","y","c","x","v"]),Vd=/* @__PURE__ */new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","backspace","delete"]),Bd=e=>{let t=e.split("+"),n=e.endsWith("++")?"+":t[t.length-1];return Vd.has(n)||Qd.has(n)&&(e.includes("ctrl+")||e.includes("meta+"))}}),Sh=X(()=>{Ud=["smooth","auto"],Wd=["start","center","end","nearest"],qd=/^(-?\d+(?:\.\d+)?)(px|%)?$/,Hd=(e,t)=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;let n=qd.exec(e.trim());if(!n)return;let r=Number(n[1]);return"%"===n[2]?r/100*t:r},Zd=(e,t,n)=>{let r=Math.max(t-n,0);if("start"===e)return 0;if("end"===e)return r;let i=Hd(e,r);return void 0===i?void 0:Math.min(Math.max(i,0),r)},Xd=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}},Yd="onScroll",Gd="onView"}),Ch=X(()=>{Kd=()=>{let e=typeof navigator>"u"?void 0:Reflect.get(navigator,"clipboard"),t="object"==typeof e&&e?Reflect.get(e,"writeText"):void 0;if("function"==typeof t)return async n=>{await Reflect.apply(t,e,[n])}},Jd=async e=>{let t=Kd();if(!t)return!1;try{return await t(e),!0}catch{return!1}},eu="This page cannot reach the clipboard: it is not served over https, or the browser refused."}),Nh=X(()=>{tu=e=>String(Math.round(1e3*e)/1e3),nu=e=>`${tu(e/1e3)} vCPU`,ru=e=>e>=1024?`${tu(e/1024)} GiB`:`${String(Math.round(e))} MiB`,iu=(e,t)=>`${nu(e)} · ${ru(t)}`,au=e=>{if("string"!=typeof e&&"number"!=typeof e)return;let t=/^(\d+(?:\.\d+)?)(m)?$/.exec(String(e).trim());if(!t)return;let n=t[2]?Number(t[1]):1e3*Number(t[1]);return n>0?Math.round(n):void 0},ou={Ki:1024,Mi:1048576,Gi:1073741824,K:1e3,M:1e6,G:1e9},su=e=>{if("string"!=typeof e&&"number"!=typeof e)return;let t=/^(\d+(?:\.\d+)?)(Ki|Mi|Gi|K|M|G)?$/.exec(String(e).trim());if(!t)return;let n=Math.round(Number(t[1])*(t[2]?ou[t[2]]??1:1)/1048576);return n>0?n:void 0},lu=(e,t)=>{let n=au(e),r=su(t);return void 0===n||void 0===r?void 0:iu(n,r)}}),_h=X(()=>{ih(),hh(),gh(),bh(),te(),vh(),yh(),xh(),wh(),kh(),Oh(),Sh(),Ch(),Nh()}),$h=X(()=>{_h(),cu=(e,t)=>{if("string"!=typeof t)return t;if("number"==typeof e){let e=Number(t.trim());return""!==t.trim()&&Number.isFinite(e)?e:t}return"boolean"!=typeof e||"true"!==t&&"false"!==t?t:"true"===t},du=(e,t)=>{if("function"!=typeof e||!("content"in e)||!V(e.content))return t;let n=e.content.attributes;if(!V(n))return t;let r=!1,i={...t};for(let[a,o]of Object.entries(t)){let e=cu(n[a],o);e!==o&&(i[a]=e,r=!0)}return r?i:t}}),Th=X(()=>{uu=e=>!1!==e&&"false"!==e}),Ah=X(()=>{hu=(e,t)=>{let n={};for(let r of Object.keys(e))t.includes(r)||(n[r]=e[r]);return n}}),Eh=X(()=>{pu=typeof window>"u",fu=e=>e(),mu=e=>e,gu=pu?fu:C,bu=pu?mu:g}),Ph=X(()=>{$o(),vu=(e,t)=>{let[n]=Dn(t,{store:e});return n},yu=(e,t)=>t.map(t=>e.getPath(t)),xu=typeof window>"u",wu=xu?yu:vu,ku=xu?(e,t)=>e.getPath(t):(e,t)=>{let[n]=Dn(t,{store:e});return n}}),zh=X(()=>{lh(),es(),ah(),sh(),dh(),uh()}),Mh=X(()=>{Ou={training:["GPTBot","ClaudeBot","anthropic-ai","Google-Extended","Applebot-Extended","CCBot","Bytespider","Amazonbot","meta-externalagent"],assistants:["ChatGPT-User","Claude-User","Perplexity-User","MistralAI-User"],search:["OAI-SearchBot","Claude-SearchBot","PerplexityBot"]},Su=["training","assistants","search"],Cu={training:"Crawlers that train AI models",assistants:"Assistants fetching a page for a person",search:"AI search indexes"},Nu=e=>"string"==typeof e&&e in Ou}),Ih=X(()=>{_u=/^[a-z][a-z0-9-]*$/,$u=e=>"string"==typeof e&&_u.test(e),Tu=e=>e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+|-+$/g,"")||"section",Au=(e,t)=>{let n=Tu(e),r=n;for(let i=2;t.has(r);i+=1)r=`${n}-${String(i)}`;return t.add(r),r}}),Rh=X(()=>{Eu={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},zu=[(Pu={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_IMAGE:"border-image",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",VIEW_TRANSITION_NAME:"view-transition-name",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",OVERSCROLL_BEHAVIOR_X:"overscroll-behavior-x",OVERSCROLL_BEHAVIOR_Y:"overscroll-behavior-y",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_PADDING_RIGHT:"scroll-padding-right",SCROLL_PADDING_BOTTOM:"scroll-padding-bottom",SCROLL_PADDING_LEFT:"scroll-padding-left",SCROLL_MARGIN_TOP:"scroll-margin-top",SCROLL_MARGIN_RIGHT:"scroll-margin-right",SCROLL_MARGIN_BOTTOM:"scroll-margin-bottom",SCROLL_MARGIN_LEFT:"scroll-margin-left",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"}).FONT_FAMILY,Pu.FONT_SIZE,Pu.FONT_STYLE,Pu.FONT_VARIANT,Pu.FONT_VARIANT_NUMERIC,Pu.FONT_FEATURE_SETTINGS,Pu.FONT_WEIGHT,Pu.COLOR,Pu.LINE_HEIGHT,Pu.LETTER_SPACING,Pu.TEXT_ALIGN,Pu.TEXT_DECORATION,Pu.TEXT_INDENT,Pu.TEXT_SHADOW,Pu.TEXT_TRANSFORM,Pu.TEXT_WRAP,Pu.TEXT_OVERFLOW,Pu.WHITE_SPACE,Pu.DIRECTION,Pu.CURSOR,Pu.LIST_STYLE,Pu.LIST_STYLE_TYPE],Mu=Object.values(Pu).map(e=>({path:e,label:e})),Iu={[Pu.DISPLAY]:"block",[Pu.FLEX_WRAP]:"nowrap",[Pu.FLEX_DIRECTION]:"row",[Pu.ALIGN_ITEMS]:"stretch",[Pu.JUSTIFY_ITEMS]:"stretch",[Pu.JUSTIFY_CONTENT]:"flex-start",[Pu.ALIGN_CONTENT]:"flex-start",[Pu.ROW_GAP]:"0px",[Pu.COLUMN_GAP]:"0px",[Pu.GRID_ROW_GAP]:"0px",[Pu.GRID_COLUMN_GAP]:"0px",[Pu.GRID_TEMPLATE_AREAS]:"none",[Pu.GRID_TEMPLATE_COLUMNS]:"none",[Pu.GRID_TEMPLATE_ROWS]:"none",[Pu.GRID_AUTO_FLOW]:"row",[Pu.GRID_AUTO_ROWS]:"auto",[Pu.GRID_AUTO_COLUMNS]:"auto",[Pu.GRID_ROW_START]:"auto",[Pu.GRID_COLUMN_START]:"auto",[Pu.GRID_ROW_END]:"auto",[Pu.GRID_COLUMN_END]:"auto",[Pu.ALIGN_SELF]:"auto",[Pu.JUSTIFY_SELF]:"auto",[Pu.ORDER]:"0",[Pu.FLEX_GROW]:"0",[Pu.FLEX_SHRINK]:"1",[Pu.FLEX_BASIS]:"auto",[Pu.LIST_STYLE]:"disc",[Pu.LIST_STYLE_TYPE]:"disc",[Pu.LIST_STYLE_POSITION]:"outside",[Pu.LIST_STYLE_IMAGE]:"none",[Pu.BACKGROUND_COLOR]:"transparent",[Pu.BACKGROUND_IMAGE]:'url("https://cdn.plitzi.com/resources/img/background-image.svg")',[Pu.BACKGROUND_POSITION]:"0px 0px",[Pu.BACKGROUND_SIZE]:"auto",[Pu.BACKGROUND_CLIP]:"border-box",[Pu.BACKGROUND_ORIGIN]:"padding-box",[Pu.BACKGROUND_REPEAT]:"repeat",[Pu.BACKGROUND_ATTACHMENT]:"scroll",[Pu.BACKGROUND_BLEND_MODE]:"normal",[Pu.MASK_IMAGE]:"none",[Pu.MASK_SIZE]:"auto",[Pu.MASK_POSITION]:"0% 0%",[Pu.MASK_REPEAT]:"repeat",[Pu.MASK_COMPOSITE]:"add",[Pu.WEBKIT_MASK_IMAGE]:"none",[Pu.BORDER_TOP_STYLE]:"solid",[Pu.BORDER_TOP_WIDTH]:"0px",[Pu.BORDER_TOP_COLOR]:"#000000",[Pu.BORDER_BOTTOM_STYLE]:"solid",[Pu.BORDER_BOTTOM_WIDTH]:"0px",[Pu.BORDER_BOTTOM_COLOR]:"#000000",[Pu.BORDER_LEFT_STYLE]:"solid",[Pu.BORDER_LEFT_WIDTH]:"0px",[Pu.BORDER_LEFT_COLOR]:"#000000",[Pu.BORDER_RIGHT_STYLE]:"solid",[Pu.BORDER_RIGHT_WIDTH]:"0px",[Pu.BORDER_RIGHT_COLOR]:"#000000",[Pu.BORDER_TOP_LEFT_RADIUS]:"0px",[Pu.BORDER_TOP_RIGHT_RADIUS]:"0px",[Pu.BORDER_BOTTOM_LEFT_RADIUS]:"0px",[Pu.BORDER_BOTTOM_RIGHT_RADIUS]:"0px",[Pu.BORDER_COLLAPSE]:"separate",[Pu.BORDER_SPACING]:"0px",[Pu.BORDER_IMAGE]:"none",[Pu.TABLE_LAYOUT]:"auto",[Pu.OPACITY]:"1",[Pu.VISIBILITY]:"visible",[Pu.CURSOR]:"auto",[Pu.TRANSITION]:"opacity 200ms ease 0ms",[Pu.TRANSITION_PROPERTY]:"all",[Pu.TRANSITION_DURATION]:"0s",[Pu.TRANSITION_TIMING_FUNCTION]:"ease",[Pu.TRANSITION_DELAY]:"0s",[Pu.TRANSITION_BEHAVIOR]:"normal",[Pu.ANIMATION]:"none",[Pu.ANIMATION_NAME]:"none",[Pu.ANIMATION_DURATION]:"0s",[Pu.ANIMATION_TIMING_FUNCTION]:"ease",[Pu.ANIMATION_DELAY]:"0s",[Pu.ANIMATION_ITERATION_COUNT]:"1",[Pu.ANIMATION_DIRECTION]:"normal",[Pu.ANIMATION_FILL_MODE]:"none",[Pu.ANIMATION_PLAY_STATE]:"running",[Pu.ANIMATION_TIMELINE]:"auto",[Pu.ANIMATION_RANGE]:"normal",[Pu.BOX_SHADOW]:"1px 1px 3px 1px black",[Pu.FILTER]:"blur(5px)",[Pu.BACKDROP_FILTER]:"blur(5px)",[Pu.MIX_BLEND_MODE]:"normal",[Pu.ISOLATION]:"auto",[Pu.CLIP_PATH]:"none",[Pu.TRANSFORM]:"translate3d(0px, 0px, 0px)",[Pu.TRANSFORM_ORIGIN]:"50% 50%",[Pu.TRANSLATE]:"none",[Pu.ROTATE]:"none",[Pu.SCALE]:"none",[Pu.TRANSFORM_STYLE]:"flat",[Pu.PERSPECTIVE]:"none",[Pu.PERSPECTIVE_ORIGIN]:"50% 50%",[Pu.BACKFACE_VISIBILITY]:"visible",[Pu.WILL_CHANGE]:"auto",[Pu.VIEW_TRANSITION_NAME]:"none",[Pu.OUTLINE_WIDTH]:"medium",[Pu.OUTLINE_STYLE]:"none",[Pu.OUTLINE_COLOR]:"currentColor",[Pu.OUTLINE_OFFSET]:"0px",[Pu.POINTER_EVENTS]:"auto",[Pu.USER_SELECT]:"auto",[Pu.TOUCH_ACTION]:"auto",[Pu.RESIZE]:"none",[Pu.APPEARANCE]:"none",[Pu.SCROLL_BEHAVIOR]:"auto",[Pu.OVERSCROLL_BEHAVIOR]:"auto",[Pu.OVERSCROLL_BEHAVIOR_X]:"auto",[Pu.OVERSCROLL_BEHAVIOR_Y]:"auto",[Pu.SCROLL_SNAP_TYPE]:"none",[Pu.SCROLL_SNAP_ALIGN]:"none",[Pu.SCROLL_SNAP_STOP]:"normal",[Pu.SCROLL_PADDING_TOP]:"auto",[Pu.SCROLL_PADDING_RIGHT]:"auto",[Pu.SCROLL_PADDING_BOTTOM]:"auto",[Pu.SCROLL_PADDING_LEFT]:"auto",[Pu.SCROLL_MARGIN_TOP]:"0px",[Pu.SCROLL_MARGIN_RIGHT]:"0px",[Pu.SCROLL_MARGIN_BOTTOM]:"0px",[Pu.SCROLL_MARGIN_LEFT]:"0px",[Pu.ACCENT_COLOR]:"auto",[Pu.CARET_COLOR]:"auto",[Pu.COLOR_SCHEME]:"normal",[Pu.POSITION]:"static",[Pu.FLOAT]:"none",[Pu.CLEAR]:"none",[Pu.Z_INDEX]:"0",[Pu.TOP]:"auto",[Pu.BOTTOM]:"auto",[Pu.LEFT]:"auto",[Pu.RIGHT]:"auto",[Pu.BOX_SIZING]:"border-box",[Pu.ASPECT_RATIO]:"auto",[Pu.WIDTH]:"auto",[Pu.HEIGHT]:"auto",[Pu.MIN_WIDTH]:"0px",[Pu.MIN_HEIGHT]:"0px",[Pu.MAX_WIDTH]:"none",[Pu.MAX_HEIGHT]:"none",[Pu.OVERFLOW]:"visible",[Pu.OVERFLOW_X]:"visible",[Pu.OVERFLOW_Y]:"visible",[Pu.SCROLLBAR_WIDTH]:"auto",[Pu.SCROLLBAR_COLOR]:"auto",[Pu.CONTAINER_TYPE]:"normal",[Pu.CONTENT]:"normal",[Pu.CONTAINER_NAME]:"none",[Pu.OBJECT_FIT]:"fill",[Pu.OBJECT_POSITION]:"50% 50%",[Pu.COLUMN_WIDTH]:"auto",[Pu.COLUMN_COUNT]:"auto",[Pu.MARGIN_TOP]:"0px",[Pu.MARGIN_BOTTOM]:"0px",[Pu.MARGIN_LEFT]:"0px",[Pu.MARGIN_RIGHT]:"0px",[Pu.PADDING_TOP]:"0px",[Pu.PADDING_BOTTOM]:"0px",[Pu.PADDING_LEFT]:"0px",[Pu.PADDING_RIGHT]:"0px",[Pu.FONT_FAMILY]:"Arial",[Pu.FONT_WEIGHT]:400,[Pu.FONT_SIZE]:"0px",[Pu.LINE_HEIGHT]:"0px",[Pu.COLOR]:"#000000",[Pu.TEXT_ALIGN]:"left",[Pu.FONT_STYLE]:"normal",[Pu.FONT_VARIANT]:"normal",[Pu.FONT_VARIANT_NUMERIC]:"normal",[Pu.FONT_FEATURE_SETTINGS]:"normal",[Pu.TEXT_DECORATION]:"none",[Pu.TEXT_DECORATION_LINE]:"none",[Pu.TEXT_DECORATION_COLOR]:"currentColor",[Pu.TEXT_DECORATION_STYLE]:"solid",[Pu.TEXT_DECORATION_THICKNESS]:"auto",[Pu.TEXT_UNDERLINE_OFFSET]:"auto",[Pu.LETTER_SPACING]:"0px",[Pu.WORD_SPACING]:"normal",[Pu.TEXT_INDENT]:"0px",[Pu.TEXT_TRANSFORM]:"none",[Pu.DIRECTION]:"ltr",[Pu.WRITING_MODE]:"horizontal-tb",[Pu.TEXT_ORIENTATION]:"mixed",[Pu.WHITE_SPACE]:"normal",[Pu.TEXT_WRAP]:"wrap",[Pu.WORD_BREAK]:"normal",[Pu.OVERFLOW_WRAP]:"normal",[Pu.HYPHENS]:"manual",[Pu.VERTICAL_ALIGN]:"baseline",[Pu.TEXT_OVERFLOW]:"clip",[Pu.TEXT_SHADOW]:"",[Pu.LINE_CLAMP]:"none",[Pu.WEBKIT_LINE_CLAMP]:"none",[Pu.WEBKIT_BOX_ORIENT]:"horizontal",[Pu.WEBKIT_TEXT_FILL_COLOR]:"currentcolor",[Pu.WEBKIT_BACKGROUND_CLIP]:"border-box",[Pu.BOX_DECORATION_BREAK]:"slice",[Pu.WEBKIT_BOX_DECORATION_BREAK]:"slice",[Pu.FILL]:"currentColor",[Pu.STROKE]:"none",[Pu.STROKE_WIDTH]:"1"}}),jh=X(()=>{Rh(),Ru=/var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/,ju="props",Du={schema:{definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[],components:{}},style:Eu,definition:{rootId:""}}}),Dh=X(()=>{Lu=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length,Fu=(e,t,n)=>n?void 0===e.record:Array.isArray(e.records)?0===t.length:Lu(e.data)}),Lh=X(()=>{Vu=(Qu=["variables","navigation","auth","state","host","theme","flags","computed"]).filter(e=>"state"!==e&&"computed"!==e)}),Fh=X(()=>{Dh(),te(),Bu=e=>V(e)&&("and"===e.combinator||"or"===e.combinator)&&Array.isArray(e.rules)&&e.rules.every(e=>Bu(e)||V(e)&&"string"==typeof e.field&&"string"==typeof e.operator),Uu=e=>{let{when:t}=e.attributes;return Bu(t)&&t.rules.length>0&&!1!==t.enabled?t:void 0},Wu=e=>e.rules.flatMap(e=>"rules"in e?Wu(e):[e.field,...e.isBinding&&"string"==typeof e.value?[e.value]:[]]),qu=(e,t)=>{if(!V(e))return{isLoading:!1,isEmpty:!0,hasError:!0,isStale:!1};let n=Array.isArray(e.records)?e.records:[];return{...e,isLoading:!1,isEmpty:Fu(e,n,t),hasError:!1,isStale:!1}}}),Qh=X(()=>{Ns(),El(),Hu={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&&_s(t,n.to,Cs(e,n.from,""))}),t})}}}),Vh=X(()=>{ph(),Zu={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}});function Bh(e,t){return+os(e)-+os(t)}var Uh,Wh,qh=X(()=>{hs()}),Hh=X(()=>{Uh={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"}},Wh=(e,t,n)=>{let r;const i=Uh[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}});function Zh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Xh,Yh,Gh,Kh,Jh,ep=X(()=>{}),tp=X(()=>{ep(),Xh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gh={date:Zh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Zh({formats:Xh,defaultWidth:"full"}),dateTime:Zh({formats:Yh,defaultWidth:"full"})}}),np=X(()=>{Kh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jh=(e,t,n,r)=>Kh[e]});function rp(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 ip,ap,op,sp,lp,cp,dp,up=X(()=>{}),hp=X(()=>{up(),ip={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ap={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"]},op={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"]},sp={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"}},lp={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"}},cp=(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"},dp={ordinalNumber:cp,era:rp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:rp({values:ip,defaultWidth:"wide",argumentCallback:e=>e-1}),month:rp({values:ap,defaultWidth:"wide"}),day:rp({values:op,defaultWidth:"wide"}),dayPeriod:rp({values:sp,defaultWidth:"wide",formattingValues:lp,defaultFormattingWidth:"wide"})}});function pp(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[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(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(o));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(o.length)}}}var fp=X(()=>{});function mp(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];return o=n.valueCallback?n.valueCallback(o):o,{value:o,rest:t.slice(i.length)}}}var gp,bp,vp,yp,xp,wp,kp,Op,Sp,Cp,Np,_p,$p,Tp=X(()=>{}),Ap=X(()=>{fp(),Tp(),gp={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},bp={any:[/^b/i,/^(a|c)/i]},vp={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yp={any:[/1/i,/2/i,/3/i,/4/i]},xp={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},wp={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]},kp={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},Op={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]},Sp={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},Cp={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}},Np={ordinalNumber:mp({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:pp({matchPatterns:gp,defaultMatchWidth:"wide",parsePatterns:bp,defaultParseWidth:"any"}),quarter:pp({matchPatterns:vp,defaultMatchWidth:"wide",parsePatterns:yp,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pp({matchPatterns:xp,defaultMatchWidth:"wide",parsePatterns:wp,defaultParseWidth:"any"}),day:pp({matchPatterns:kp,defaultMatchWidth:"wide",parsePatterns:Op,defaultParseWidth:"any"}),dayPeriod:pp({matchPatterns:Sp,defaultMatchWidth:"any",parsePatterns:Cp,defaultParseWidth:"any"})}}),Ep=X(()=>{Hh(),tp(),np(),hp(),Ap(),_p={code:"en-US",formatDistance:Wh,formatLong:Gh,formatRelative:Jh,localize:dp,match:Np,options:{weekStartsOn:0,firstWeekContainsDate:1}}}),Pp=X(()=>{Ep()});function zp(){return $p}var Mp=X(()=>{$p={}});function Ip(e){const t=os(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}var Rp=X(()=>{hs()});function jp(e,...t){const n=is.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}var Dp=X(()=>{as()});function Lp(e,t){const n=os(e,t?.in);return n.setHours(0,0,0,0),n}var Fp=X(()=>{hs()}),Qp=X(()=>{Rp(),Dp(),rs(),Fp()}),Vp=X(()=>{hs()});var Bp=X(()=>{Qp(),Vp(),hs()});function Up(e,t){const n=zp(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=os(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}var Wp=X(()=>{Mp(),hs()});function qp(e,t){return Up(e,{...t,weekStartsOn:1})}var Hp=X(()=>{Wp()});function Zp(e,t){const n=os(e,t?.in),r=n.getFullYear(),i=is(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=qp(i),o=is(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=qp(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}var Xp=X(()=>{as(),Hp(),hs()}),Yp=X(()=>{as(),Xp(),Hp()});var Gp=X(()=>{rs(),Hp(),Yp(),hs()});function Kp(e,t){const n=os(e,t?.in),r=n.getFullYear(),i=zp(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=is(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Up(o,t),l=is(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Up(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}var Jp=X(()=>{Mp(),as(),Wp(),hs()}),ef=X(()=>{Mp(),as(),Jp(),Wp()});var tf=X(()=>{rs(),Wp(),ef(),hs()});function nf(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var rf,af,of,sf=X(()=>{}),lf=X(()=>{sf(),rf={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return nf("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):nf(n+1,2)},d:(e,t)=>nf(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)=>nf(e.getHours()%12||12,t.length),H:(e,t)=>nf(e.getHours(),t.length),m:(e,t)=>nf(e.getMinutes(),t.length),s:(e,t)=>nf(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return nf(Math.trunc(r*Math.pow(10,n-3)),t.length)}}});function cf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+nf(a,2)}function df(e,t){return e%60==0?(e>0?"-":"+")+nf(Math.abs(e)/60,2):uf(e,t)}function uf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+nf(Math.trunc(r/60),2)+t+nf(r%60,2)}var hf,pf,ff,mf,gf,bf,vf,yf=X(()=>{Bp(),Gp(),Xp(),tf(),Jp(),sf(),lf(),af={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},of={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 rf.y(e,t)},Y:function(e,t,n,r){const i=Kp(e,r),a=i>0?i:1-i;return"YY"===t?nf(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):nf(a,t.length)},R:function(e,t){return nf(Zp(e),t.length)},u:function(e,t){return nf(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 nf(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 nf(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 rf.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 nf(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=os(e,t?.in),r=+Up(n,t)-+function(e,t){const n=zp(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Kp(e,t),a=is(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Up(a,t)}(n,t);return Math.round(r/bo)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):nf(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=os(e,t?.in),r=+qp(n)-+function(e){const t=Zp(e,void 0),n=is(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),qp(n)}(n);return Math.round(r/bo)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):nf(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):rf.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=os(e,t?.in);return function(e,t){const[n,r]=jp(void 0,e,t),i=Lp(n),a=Lp(r),o=+i-Ip(i),s=+a-Ip(a);return Math.round((o-s)/vo)}(n,function(e){const t=os(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"}):nf(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(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return nf(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return nf(a,t.length);case"co":return n.ordinalNumber(a,{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 nf(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?af.noon:0===r?af.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?af.evening:r>=12?af.afternoon:r>=4?af.morning:af.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 rf.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):rf.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):nf(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):nf(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rf.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rf.s(e,t)},S:function(e,t){return rf.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return df(r);case"XXXX":case"XX":return uf(r);default:return uf(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return df(r);case"xxxx":case"xx":return uf(r);default:return uf(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+cf(r,":");default:return"GMT"+uf(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+cf(r,":");default:return"GMT"+uf(r,":")}},t:function(e,t,n){return nf(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return nf(+e,t.length)}}}),xf=X(()=>{hf=(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"})}},pf=(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"})}},ff=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hf(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",hf(r,t)).replace("{{time}}",pf(i,t))},mf={p:pf,P:ff}}),wf=X(()=>{gf=/^D+$/,bf=/^Y+$/,vf=["D","DD","YY","YYYY"]}),kf=X(()=>{});var Of,Sf,Cf,Nf,_f,$f=X(()=>{kf(),hs()});function Tf(e,t,n){const r=zp(),i=n?.locale??r.locale??_p,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=os(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(+os(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(Sf).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,mf[t])(e,i.formatLong):e}).join("").match(Of).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Af(e)};if(of[t])return{isToken:!0,value:e};if(t.match(_f))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:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return bf.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return gf.test(e)}(a))&&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(vf.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,of[a[0]])(s,a,i.localize,c)}).join("")}function Af(e){const t=e.match(Cf);return t?t[1].replace(Nf,"'"):e}var Ef=X(()=>{Pp(),Mp(),yf(),xf(),wf(),$f(),hs(),Of=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cf=/^'([^]*?)'?$/,Nf=/''/g,_f=/[a-zA-Z]/}),Pf=X(()=>{as()});function zf(e,t){const n=+os(e)-+os(t);return n<0?-1:n>0?1:n}var Mf=X(()=>{hs()}),If=X(()=>{Dp()}),Rf=X(()=>{hs()}),jf=X(()=>{hs()});var Df=X(()=>{Rf(),jf(),hs()});function Lf(e,t,n){const[r,i,a]=jp(n?.in,e,e,t),o=zf(i,a),s=Math.abs(function(e,t){const[n,r]=jp(void 0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,a));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let l=zf(i,a)===-o;(function(e,t){const n=os(e,t?.in);return+function(e,t){const n=os(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=os(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===zf(r,a)&&(l=!1);const c=o*(s-+l);return 0===c?0:c}var Ff=X(()=>{Dp(),Mf(),If(),Df()}),Qf=X(()=>{});var Vf=X(()=>{Qf(),qh()}),Bf=X(()=>{Pp(),Mp(),Rp(),Dp(),Mf(),rs(),Ff(),Vf()});function Uf(e,t){return function(e,t,n){const r=zp(),i=n?.locale??r.locale??_p,a=zf(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,l]=jp(n?.in,...a>0?[t,e]:[e,t]),c=function(e,t,n){const r=Bh(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),d=(Ip(l)-Ip(s))/1e3,u=Math.round((c-d)/60);let h;if(u<2)return n?.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,o):c<10?i.formatDistance("lessThanXSeconds",10,o):c<20?i.formatDistance("lessThanXSeconds",20,o):c<40?i.formatDistance("halfAMinute",0,o):c<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):0===u?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",u,o);if(u<45)return i.formatDistance("xMinutes",u,o);if(u<90)return i.formatDistance("aboutXHours",1,o);if(u<1440){const e=Math.round(u/60);return i.formatDistance("aboutXHours",e,o)}if(u<2520)return i.formatDistance("xDays",1,o);if(u<43200){const e=Math.round(u/ko);return i.formatDistance("xDays",e,o)}if(u<86400)return h=Math.round(u/wo),i.formatDistance("aboutXMonths",h,o);if(h=Lf(l,s),h<12){const e=Math.round(u/wo);return i.formatDistance("xMonths",e,o)}{const e=h%12,t=Math.trunc(h/12);return e<3?i.formatDistance("aboutXYears",t,o):e<9?i.formatDistance("overXYears",t,o):i.formatDistance("almostXYears",t+1,o)}}(e,function(e){return is(e,Date.now())}(e),t)}var Wf,qf,Hf,Zf,Xf,Yf,Gf,Kf,Jf,em,tm,nm,rm,im,am,om,sm,lm,cm,dm,um,hm,pm,fm,mm,gm,bm,vm,ym,xm,wm,km,Om,Sm,Cm,Nm,_m,$m,Tm,Am,Em,Pm,zm,Mm,Im,Rm,jm,Dm,Lm,Fm,Qm,Vm,Bm,Um,Wm=X(()=>{Pf(),Bf()}),qm=X(()=>{Wf={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"}},qf=(e,t,n)=>{let r;const i=Wf[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}}),Hm=X(()=>{ep(),Hf={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Zf={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xf={date:Zh({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:Zh({formats:Hf,defaultWidth:"full"}),dateTime:Zh({formats:Zf,defaultWidth:"full"})}}),Zm=X(()=>{Yf={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"},Gf={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"},Kf=(e,t,n,r)=>1!==t.getHours()?Gf[e]:Yf[e]}),Xm=X(()=>{up(),Jf={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},em={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"]},tm={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"]},nm={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"}},rm={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"}},im={ordinalNumber:(e,t)=>Number(e)+"º",era:rp({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:rp({values:Jf,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:rp({values:em,defaultWidth:"wide"}),day:rp({values:tm,defaultWidth:"wide"}),dayPeriod:rp({values:nm,defaultWidth:"wide",formattingValues:rm,defaultFormattingWidth:"wide"})}}),Ym=X(()=>{Tp(),fp(),am={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},om={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]},sm={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},lm={any:[/1/i,/2/i,/3/i,/4/i]},cm={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},dm={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]},um={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},hm={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]},pm={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},fm={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}},mm={ordinalNumber:mp({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:pp({matchPatterns:am,defaultMatchWidth:"wide",parsePatterns:om,defaultParseWidth:"any"}),quarter:pp({matchPatterns:sm,defaultMatchWidth:"wide",parsePatterns:lm,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pp({matchPatterns:cm,defaultMatchWidth:"wide",parsePatterns:dm,defaultParseWidth:"any"}),day:pp({matchPatterns:um,defaultMatchWidth:"wide",parsePatterns:hm,defaultParseWidth:"any"}),dayPeriod:pp({matchPatterns:pm,defaultMatchWidth:"any",parsePatterns:fm,defaultParseWidth:"any"})}}),Gm=X(()=>{qm(),Hm(),Zm(),Xm(),Ym(),gm={code:"es",formatDistance:qf,formatLong:Xf,formatRelative:Kf,localize:im,match:mm,options:{weekStartsOn:1,firstWeekContainsDate:1}}}),Km=X(()=>{bm={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"}},vm=(e,t,n)=>{let r;const i=bm[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}}),Jm=X(()=>{ep(),ym={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},xm={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wm={date:Zh({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:Zh({formats:ym,defaultWidth:"full"}),dateTime:Zh({formats:xm,defaultWidth:"full"})}}),eg=X(()=>{km={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"},Om=(e,t,n,r)=>{const i=km[e];return"function"==typeof i?i(t):i}}),tg=X(()=>{up(),Sm={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Cm={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"]},Nm={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"]},_m={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"}},$m={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"}},Tm={ordinalNumber:(e,t)=>Number(e)+"º",era:rp({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:rp({values:Sm,defaultWidth:"wide",argumentCallback:e=>e-1}),month:rp({values:Cm,defaultWidth:"wide"}),day:rp({values:Nm,defaultWidth:"wide"}),dayPeriod:rp({values:_m,defaultWidth:"wide",formattingValues:$m,defaultFormattingWidth:"wide"})}}),ng=X(()=>{fp(),Tp(),Am={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},Em={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},Pm={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},zm={any:[/1/i,/2/i,/3/i,/4/i]},Mm={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},Im={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]},Rm={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},jm={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]},Dm={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},Lm={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}},Fm={ordinalNumber:mp({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:pp({matchPatterns:Am,defaultMatchWidth:"wide",parsePatterns:Em,defaultParseWidth:"any"}),quarter:pp({matchPatterns:Pm,defaultMatchWidth:"wide",parsePatterns:zm,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pp({matchPatterns:Mm,defaultMatchWidth:"wide",parsePatterns:Im,defaultParseWidth:"any"}),day:pp({matchPatterns:Rm,defaultMatchWidth:"wide",parsePatterns:jm,defaultParseWidth:"any"}),dayPeriod:pp({matchPatterns:Dm,defaultMatchWidth:"any",parsePatterns:Lm,defaultParseWidth:"any"})}}),rg=X(()=>{Km(),Jm(),eg(),tg(),ng(),Qm={code:"pt",formatDistance:vm,formatLong:wm,formatRelative:Om,localize:Tm,match:Fm,options:{weekStartsOn:0,firstWeekContainsDate:4}}});function ig(e,t="dd MMMM, yyyy",n="en"){return e?Tf(Bm(e),t,{locale:Vm[n]}):""}function ag(e,t){let n=Bm(e);return Bh(Bm(t),n)}var og,sg,lg,cg,dg,ug,hg,pg,fg,mg,gg,bg,vg,yg,xg,wg,kg,Og,Sg,Cg,Ng,_g,$g,Tg,Ag,Eg,Pg,zg,Mg,Ig,Rg,jg,Dg,Lg,Fg,Qg,Vg,Bg,Ug,Wg,qg,Hg,Zg,Xg,Yg,Gg,Kg,Jg,eb,tb,nb,rb,ib,ab,ob,sb,lb,cb,db,ub,hb,pb,fb,mb,gb,bb,vb,yb,xb,wb,kb,Ob,Sb,Cb,Nb,_b,$b,Tb,Ab,Eb,Pb,zb,Mb,Ib,Rb,jb,Db,Lb,Fb,Qb,Vb,Bb,Ub,Wb,qb,Hb,Zb,Xb,Yb,Gb,Kb=X(()=>{ks(),qh(),Ef(),Wm(),Ep(),Gm(),rg(),Vm={en:_p,es:gm,pt:Qm},Bm=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?fs(e):e,t},Um=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}}),Jb=X(()=>{Kb(),og={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:a="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let o=Bm(r?Number(e):e);return isNaN(o.getTime())?e:n?function(e,t="en",n){if(!e)return"";let r=Bm(e);return isNaN(r.getTime())?"":Uf(r,{...n,locale:Vm[t]})}(o,a,{addSuffix:!0}):i?function(e,t="dd MMMM, yyyy",n="en"){if(!e)return"";let r=Bm(e);return Tf(Um(r),t,{locale:Vm[n]})}(o,t,a):ig(o,t,a)}catch{return e}}}}),ev=X(()=>{sg=/* @__PURE__ */new Set(["false","0",""]),lg=e=>"string"==typeof e?!sg.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e}),tv=X(()=>{ev(),cg={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!lg(e)}}),nv=X(()=>{dg={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}}}),rv=X(()=>{ug={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}}}),iv=X(()=>{Ns(),hg={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:a,selector:o}=t,s=[];if(a&&!i){let e="string"==typeof r.sourceTo?r.sourceTo:"";s.push(...e?[e]:[],o)}else if(i&&a){let e=Cs(n,"definition.styleSelectors.base","");e?s.push(e,o):s.push(o)}return s.length?1===s.length?s[0]:s.join(" "):""}}}),av=X(()=>{te(),El(),pg=(e,t,n,r={})=>{let{key:i,variant:a,append:o}=t;if(!i)return r.sourceTo??{};let s=i||"base",l=a||e;if("object"==typeof l&&!Array.isArray(l))return l;if(!o)return _s({},s,l);let c=r.sourceTo;return _s(V(c)?{...c}:{},s,l)},fg=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}))},mg={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 fg(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 a=t.definition.type,o=i.split(".").pop()||"",s=r[o];if(!s)return[];let l=[],c=[a,...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[o];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:pg}}),ov=X(()=>{es(),gg={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:a="text"}=t,o={source:e,...r};try{return"value"===a?ao(i,o):eo(i,o)}catch{return e}}}}),sv=X(()=>{Qh(),Vh(),Jb(),tv(),nv(),rv(),iv(),av(),ov(),ev(),bg={twigTemplate:gg,dateConverter:og,staticValue:dg,capitalize:Zu,arrayMap:Hu,stringToArray:ug,not:cg,styleSelector:hg,styleVariant:mg},vg=Object.values(bg).map(({title:e,action:t})=>({label:e,value:t}))}),lv=X(()=>{yg=(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}}),cv=X(()=>{El(),fh(),zl(),sv(),lv(),ev(),xg=(e,t,n,r,i)=>{let a="initialState"===r?`definition.${r}.${i}`:`${r}.${i}`;return{fromValue:t?Sg(e,t):void 0,toValue:Sg(n,a)}},wg=e=>"number"==typeof e||"string"==typeof e&&!/[;{}<>]/.test(e),kg=/* @__PURE__ */new Map,Og=e=>{let t=kg.get(e);if(t)return t;let n=[...e.matchAll(/([^.[\]]+)|\[(\d+)\]/g)].map(([,e,t])=>e||t);return kg.size<4096&&kg.set(e,n),n},Sg=(e,t)=>{if("object"==typeof e&&e&&t in e)return e[t];let n=e;for(let r of Og(t)){if(null==n)return;n=Object(n)[r]}return n},Cg=(e,t,n,r)=>{if(Object.is(Sg(e,t),n))return;let i=e;for(let a of Og(t).slice(0,-1)){let e=i[a];if("object"!=typeof e||!e)break;if(!r.has(e)){let t=Array.isArray(e)?[...e]:{...e};r.add(t),i[a]=t}i=i[a]}_s(e,t,n)},Ng=(e,t,n={})=>{let{attributes:r,definition:i}=t,{bindings:a}=i;if(!a||"object"==typeof a&&!Object.keys(a).length)return{attributes:r,style:{},definition:i};let o={attributes:r,style:n,definition:i},s=new WeakSet([o]);return Object.keys(a).forEach(t=>{a[t]&&Array.isArray(a[t])&&a[t].length&&a[t].forEach(n=>{let{source:r,transformers:i,when:a,enabled:l=!0}=n,{to:c}=n;if(!c||a&&!Us(a,e,{whenMissing:!0})||!l)return;"style"===t&&!c.startsWith("--")&&(c=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("")}(c));let{fromValue:d,toValue:u}=xg(e,r,o,t,c),h=d;i&&Array.isArray(i)&&i.length>0&&i.forEach(t=>{let{action:n,params:r,enabled:i=!0}=t;if(!i)return;let a=bg[n];a&&(h=a.callback(h,yg(a,r)??{},o,{...e,sourceTo:u}))}),"initialState"===t&&"visibility"===c&&r&&void 0!==Sg(e,r)&&(h=lg(h)),("style"!==t||wg(h))&&("boolean"==typeof h||"number"==typeof h||h)&&Cg(o,"initialState"===t?`definition.${t}.${c}`:`${t}.${c}`,h,s)})}),o}}),dv=X(()=>{Fh(),uh(),cv(),ns(),te(),_g=/^navigation\.(routeParams|queryParams)(\.|$)/,$g="apiContainer",Tg=e=>e.split(/[.[]/)[0]??e,Ag=e=>[e.source,...(e.transformers??[]).flatMap(({action:e,params:t})=>"twigTemplate"===e&&"string"==typeof t.template?sd(t.template).filter(e=>"source"!==e&&!e.startsWith("source.")):[])],Eg=e=>"input"===e.to||e.to.startsWith("input."),Pg=(e,t)=>(e.definition.bindings?.attributes??[]).filter(e=>!1!==e.enabled&&Eg(e)&&void 0===e.when&&Ag(e).every(e=>_g.test(e)||t(Tg(e)))),zg=(e,t)=>{let n=e=>{let n=e.startsWith(`${$g}_`)?e.slice(13):void 0;return void 0!==n&&t.has(n)&&go($g,n)===e?n:void 0};return[...new Set(Pg(e,e=>void 0!==n(e)).flatMap(e=>Ag(e).flatMap(e=>n(Tg(e))??[])))]},Mg=(e,t,n={})=>{if(void 0===e)return;let r=Pg(e,e=>Object.hasOwn(n,e));return 0===r.length?e.attributes.input:Ng({...n,navigation:t},{attributes:e.attributes,definition:{...e.definition,bindings:{attributes:r}}}).attributes.input},Ig=(e,t,n,r)=>{if(void 0===e)return;let i=V(n)?n:{},a=e=>{let n=V(t)?t[e]:void 0;return V(n)&&V(n.attributes)&&!0===n.attributes.singleRecord};return Mg(e,r,Object.fromEntries(zg(e,new Set(Object.keys(i))).map(e=>[go($g,e),qu(i[e],a(e))])))}}),uv=X(()=>{te(),Rg=["website","article","profile","book","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other"],jg=/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/,Dg=/^\/(?!\/)[^\s"'<>]*$/,Lg=/^https?:\/\/[^\s"'<>]+$/,Fg=/^(#[0-9a-fA-F]{3,4}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([^()]*\))$/,Qg=e=>Dg.test(e)||Lg.test(e),Vg=(e,t)=>Dg.test(e)&&""!==t?`${t.replace(/\/$/,"")}${e}`:e,Bg=e=>e.replace(/-/g,"_"),Ug=e=>{let t=[],{siteName:n,language:r,favicon:i,shareImage:a,themeColor:o}=e;void 0!==n&&""===n.trim()&&t.push("siteName is empty: leave it out, or name the site."),void 0!==r&&!jg.test(r)&&t.push(`language "${r}" is no language tag: \`en\`, \`es\`, \`es-MX\`.`);for(let[l,c]of[["favicon",i],["shareImage",a]])void 0!==c&&!Qg(c)&&t.push(`${l} "${c}" is neither a file of the site nor an address: \`/${"favicon"===l?"favicon.svg":"og.png"}\` (in public/), or \`https://…\`.`);let s=void 0===o?[]:"string"==typeof o?[["themeColor",o]]:Object.entries(o).map(([e,t])=>[`themeColor.${e}`,t]);V(o)&&Object.keys(o).some(e=>"light"!==e&&"dark"!==e)&&t.push('themeColor is one colour, or one a scheme: `{ light: "#ffffff", dark: "#09090b" }`.');for(let[l,c]of s)"string"==typeof c&&Fg.test(c.trim())||t.push(`${l} ${JSON.stringify(c)} is no colour a browser reads here: \`#ff6a3d\`, \`oklch(…)\`.`);return t},Wg=e=>{let t=e.split(/[?#]/)[0]??"";return{svg:"image/svg+xml",png:"image/png",ico:"image/x-icon",webp:"image/webp"}[t.slice(t.lastIndexOf(".")+1).toLowerCase()]},qg=(e,t,n)=>{let r=/^https?:\/\/[^/]+/.exec(n)?.[0]??"",i=e.image??t.shareImage,a=i&&Qg(i)?Vg(i,r):void 0,o=[],s=(e,t,n,r)=>{void 0!==n&&""!==n.trim()&&o.push({attribute:e,key:t,content:n.trim(),...r?{media:r}:{}})};s("name","description",e.description),s("name","robots",e.robots),s("property","og:type",e.type??"website"),s("property","og:title",e.title),s("property","og:description",e.description),s("property","og:site_name",t.siteName),s("property","og:url",n),s("property","og:locale",t.language?Bg(t.language):void 0),s("property","og:image",a),s("property","og:image:alt",a?e.imageAlt:void 0),s("name","twitter:card",a?"summary_large_image":"summary"),s("name","twitter:title",e.title),s("name","twitter:description",e.description),s("name","twitter:image",a),s("name","twitter:image:alt",a?e.imageAlt:void 0);let{themeColor:l}=t;"string"==typeof l?s("name","theme-color",l):l&&(s("name","theme-color",l.light,"(prefers-color-scheme: light)"),s("name","theme-color",l.dark,"(prefers-color-scheme: dark)"));let c=t.favicon&&Qg(t.favicon)?t.favicon:"/_plitzi/favicon.svg",d=Wg(c);return{meta:o,links:[...""===n?[]:[{rel:"canonical",href:n}],{rel:"icon",href:c,...d?{type:d}:{}}],...t.language&&jg.test(t.language)?{lang:t.language}:{}}},Hg=e=>{let{siteName:t,language:n,favicon:r,shareImage:i,themeColor:a}=e??{};return{..."string"==typeof t?{siteName:t}:{},..."string"==typeof n?{language:n}:{},..."string"==typeof r?{favicon:r}:{},..."string"==typeof i?{shareImage:i}:{},...void 0===a?{}:{themeColor:a}}}}),hv=X(()=>{Zg=`data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">\x3c!-- The layers: Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0) Copyright 2026 Fonticons, Inc. --\x3e<rect width="512" height="512" rx="112" fill="#5b3df5"/><path fill="#ffffff" transform="translate(102 102) scale(0.6)" d="M232.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 149.8C5.4 145.8 0 137.3 0 128s5.4-17.9 13.9-21.8L232.5 5.2zM48.1 218.4l164.3 75.9c27.7 12.8 59.6 12.8 87.3 0l164.3-75.9 34.1 15.8c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 277.8C5.4 273.8 0 265.3 0 256s5.4-17.9 13.9-21.8l34.1-15.8zM13.9 362.2l34.1-15.8 164.3 75.9c27.7 12.8 59.6 12.8 87.3 0l164.3-75.9 34.1 15.8c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 405.8C5.4 401.8 0 393.3 0 384s5.4-17.9 13.9-21.8z"/></svg>')}`}),pv=X(()=>{Xg=new Set(/* @__PURE__ */"keepState.stateStorage.transientState.keptState.paintedState.browserState.robotsTxt.securityTxt.llmsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.wholeDocument.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split(".")),Yg=e=>Xg.has(e)}),fv=X(()=>{te(),Gg=e=>{if(!(V(e)&&V(e.definition)&&V(e.schema)&&V(e.style)))return!1;let{definition:t,schema:n,style:r}=e;return"string"==typeof t.name&&"string"==typeof t.baseElementId&&V(n.flat)&&V(n.flat[t.baseElementId])&&Array.isArray(n.variables)&&V(r.platform)}}),mv=X(()=>{te(),Kg=["fade","fade-up","fade-down","slide-left","slide-right","slide-up","scale","zoom-in","zoom-out","pop","bounce-in","tilt","spin-in"],Jg=["load","view","scroll"],eb=["float","pulse","spin","sway","bounce","wobble","orbit","heartbeat","drift"],tb="cubic-bezier(0.2, 0.7, 0.2, 1)",nb=["ease","ease-in","ease-out","ease-in-out","linear"],rb="-?(?:\\d+\\.?\\d*|\\.\\d+)",ib=RegExp(`^cubic-bezier\\(\\s*(${rb})\\s*,\\s*(${rb})\\s*,\\s*(${rb})\\s*,\\s*(${rb})\\s*\\)$`),ab=/^steps\(\s*[1-9]\d*\s*(?:,\s*(?:jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/,ob=e=>{if("string"!=typeof e)return!1;let t=e.trim();if(nb.includes(t)||ab.test(t))return!0;let n=ib.exec(t);return null!==n&&[n[1],n[3]].every(e=>Number(e)>=0&&Number(e)<=1)},sb={"fade-up":24,"fade-down":24,"slide-left":32,"slide-right":32,"slide-up":72,"bounce-in":64,tilt:32},lb={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"}]},Object.fromEntries(Kg.map(e=>{let[{at:t,...n}]=lb[e];return[e,n]})),cb=(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)`},db={float:{frames:[{at:50,transform:"translateY(-8px)"}],periodMs:6e3,easing:"ease-in-out"},pulse:{frames:[{at:50,transform:"scale(1.04)"}],periodMs:3e3,easing:"ease-in-out"},spin:{frames:[{at:100,transform:"rotate(360deg)"}],periodMs:12e3,easing:"linear"},sway:{frames:[{at:50,transform:"rotate(2deg)"}],periodMs:5e3,easing:"ease-in-out"},bounce:{frames:[{at:0,transform:"translateY(0) scale(1.03, 0.97)"},{at:45,transform:"translateY(-14px) scale(0.98, 1.02)"},{at:55,transform:"translateY(-14px) scale(0.98, 1.02)"},{at:100,transform:"translateY(0) scale(1.03, 0.97)"}],periodMs:1400,easing:"ease-in-out"},wobble:{frames:[{at:25,transform:"rotate(-5deg)"},{at:75,transform:"rotate(5deg)"}],periodMs:2400,easing:"ease-in-out"},orbit:{frames:Array.from({length:9},(e,t)=>({at:100*t/8,transform:cb(6,t/8)})),periodMs:8e3,easing:"linear"},heartbeat:{frames:[{at:14,transform:"scale(1.1)"},{at:28,transform:"scale(1)"},{at:42,transform:"scale(1.07)"},{at:70,transform:"scale(1)"}],periodMs:1600,easing:"ease-in-out"},drift:{frames:[{at:50,transform:"translateX(12px)"}],periodMs:7e3,easing:"ease-in-out"}},ub=(e,t)=>"string"==typeof t&&e.includes(t),hb=/* @__PURE__ */new Set(["enter","on","duration","delay","stagger","loop","easing","distance"]),pb=e=>{if(!V(e))return['motion is an object: `{ enter: "fade-up", on: "view" }`'];let t=[];for(let n of Object.keys(e))hb.has(n)||t.push(`motion has no "${n}" — it takes enter, on, duration, delay, stagger, loop, easing and distance`);void 0!==e.enter&&!ub(Kg,e.enter)&&t.push(`motion.enter is one of ${Kg.join(", ")}`),void 0!==e.on&&!ub(Jg,e.on)&&t.push(`motion.on is ${Jg.slice(0,-1).join(", ")} or ${String(Jg.at(-1))}`),void 0!==e.loop&&!ub(eb,e.loop)&&t.push(`motion.loop is one of ${eb.join(", ")}`);for(let n of["duration","delay","stagger"]){let r=e[n];void 0!==r&&("number"!=typeof r||!Number.isFinite(r)||r<0||r>1e4)&&t.push(`motion.${n} is a number of ms from 0 to ${String(1e4)}`)}if(void 0!==e.easing&&!ob(e.easing)&&t.push(`motion.easing is a curve CSS names: ${nb.join(", ")}, cubic-bezier(x1, y1, x2, y2) with x from 0 to 1, or steps(n)`),void 0!==e.distance){let n=ub(Kg,e.enter)?e.enter:void 0,r=Object.keys(sb).join(", ");"number"!=typeof e.distance||!Number.isFinite(e.distance)||e.distance<0||e.distance>400?t.push("motion.distance is how far it travels, a number of px from 0 to 400"):(void 0===n||void 0===sb[n])&&t.push(`motion.distance is how far an arrival travels — ${r} do; ${n??"an element with no enter"} does not`)}return void 0!==e.easing&&void 0===e.enter&&t.push("motion.easing is the curve of its `enter`: give it one"),void 0===e.enter&&void 0===e.loop&&t.push("motion says nothing to play: give it an `enter`, a `loop`, or both"),void 0!==e.stagger&&void 0===e.enter&&t.push("motion.stagger staggers the children’s `enter`: give it one"),t},fb=e=>0===pb(e).length,mb=e=>{if(!e)return{attributes:{},style:{}};let t={},n={};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`),void 0!==e.easing&&(n["--plitzi-motion-easing"]=e.easing.trim());let r=e.enter?sb[e.enter]:void 0;return void 0!==e.distance&&void 0!==r&&(n["--plitzi-motion-travel"]=String(Math.round(e.distance/r*1e4)/1e4)),{attributes:t,style:n}},gb="[data-motion-enter], [data-motion-stagger] > *, [data-motion-loop] { animation: none !important; }",bb="data-motion-seen",vb='[data-motion-on="view"]',xb=["[data-motion-loop] { animation-play-state: running, running !important; }",yb='[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"),wb=e=>"animationName"in e&&"string"==typeof e.animationName&&e.animationName.startsWith("plitzi-motion-")}),gv=X(()=>{mv(),kb=`${vb}:not([${bb}])`,Ob=e=>{let t=e=>e.setAttribute(bb,""),n=e=>[...e.matches(kb)?[e]:[],...Array.from(e.querySelectorAll(kb))];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)),a=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),a.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-motion-on"]}),()=>{r.disconnect(),a.disconnect()}}}),bv=X(()=>{Sb=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}:{}}),Cb=({definition:e,...t})=>{let{parentId:n,items:r,bindings:i,interactions:a,initialState:o,runtime:s,loadStrategy:l,flag:c,anchor:d,motion:u,quiet:h,...p}=e;return{...t,definition:{...p,...null==n?{}:{parentId:n},...null==r?{}:{items:r},...null==i?{}:{bindings:i},...null==a?{}:{interactions:a},...null==o?{}:{initialState:o},...null==s?{}:{runtime:s},...null==l?{}:{loadStrategy:l},...null==c?{}:{flag:c},...null==d?{}:{anchor:d},...null==u?{}:{motion:Sb(u)},...null==h?{}:{quiet:h}}}},Nb=e=>({...e,flat:Object.fromEntries(e.flat.map(e=>[e.id,Cb(e)]))})}),vv=X(()=>{Mh(),Ih(),jh(),Ao(),Il(),Dh(),Fh(),dv(),uv(),hv(),pv(),fv(),mv(),gv(),bv(),ts()}),yv=X(()=>{_h(),$o(),zh(),vv(),_b=({source:e,transformers:t,when:n})=>{let r=e?[e]:[];for(let{action:i,params:a}of t??[])"twigTemplate"===i&&"string"==typeof a.template&&a.template&&r.push(...sd(a.template).filter(e=>"source"!==e&&!e.startsWith("source.")));return n&&r.push(...Wu(n)),r},$b=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},Tb=(e,t,n)=>{let r=t.split("."),i=e;for(let a of r.slice(0,-1)){let e=i[a],t=V(e)?e:{};i[a]=t,i=t}i[r[r.length-1]]=n},Ab=(e,t)=>{let n=new Set(t??[]);for(let r of Object.values(e??{}))if(Array.isArray(r))for(let e of r)for(let t of _b(e))n.add(t);return n.size>0&&n.add("variables"),$b(n)},Eb=e=>`runtime.sources.${e}`,Pb=(e,t)=>{let n={};return e.forEach((e,r)=>{void 0!==t[r]&&Tb(n,e,t[r])}),n},zb=({bindings:e,sources:t})=>{let n=C(()=>Ab(e,t),[e,t]),r=C(()=>n.map(Eb),[n]),[i]=Dn(r);return C(()=>Pb(n,i),[n,i])}}),xv=X(()=>{Eh(),nh(),Mb={},Ib=(e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`,Rb=({store:e,id:t,bindings:n,previewMode:r})=>{let{scopePath:i}=e,a=gu(()=>Ib(t,i),[t,i]),o=e.setState,s=bu(e=>{if(!r)return!1;let t=(n?.attributes&&Array.isArray(n.attributes)?n.attributes:[]).filter(e=>!1!==e.enabled).map(e=>nc(e,"to",""));return o(a,n=>{if(!e)return{};let r="function"==typeof e?e(n??Mb):e;return t.length&&(r=fc(r,t)),r}),!0},[n,a,r,o]);return x(()=>{if(r&&i)return()=>o(a,void 0)},[r,i,a,o,t]),{path:a,setElementState:s}}}),wv=X(()=>{we(),jb=Q("LayoutBodyContext",void 0),Db=()=>{},Lb=({bodies:e,children:t})=>{let[n]=$(()=>({current:e,listeners:/* @__PURE__ */new Set}));return S(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */z(jb,{value:n,children:t})},Fb=typeof window>"u"?e=>{let t=m(jb);return void 0!==e&&t?t.current[e]:void 0}:e=>{let t=m(jb),n=g(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):Db,[e,t]),r=g(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return T(n,r,r)}});function kv(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Ov(e,t="|"){return e.map(e=>Qv(e)).join(t)}function Sv(e,t){return"bigint"==typeof t?t.toString():t}function Cv(e){return new Qb(e)}function Nv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function _v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $v(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Tv(e){return $v(e._zod.def)??e._zod.def.shape}function Av(e,t,n){Object.defineProperty(e,t,{get(){const e=n();return _v(this,t,e),e},enumerable:!0,configurable:!0})}function Ev(e,t,n){t in e?_v(e,t,n):e[t]=n}function Pv(e,t,n,r){const i=Tv(t);for(const a of n){const n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Av(e,a,()=>{const e=t._zod.def.shape[a];return r?r(e,a):e}):Ev(e,a,r?r(n.value,a):n.value))}}function zv(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Mv(e){return JSON.stringify(e)}function Iv(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Rv(e){if(!1===Iv(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Iv(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function jv(e){return Rv(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Dv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Lv(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Fv(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Qv(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function Vv(e,t){const n=Tv(e),r=[];for(const i of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,i)?.enumerable)throw new Error(`Unrecognized key: "${String(i)}"`);t[i]&&r.push(i)}return r}function Bv(e,t){const n={};return Pv(n,e,Reflect.ownKeys(Tv(e))),function(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Av(e,n,()=>t[n]):Ev(e,n,r.value))}}(n,t),n}function Uv(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const a=n?new Set(Vv(t,n)):void 0,o={};return Pv(o,t,Reflect.ownKeys(Tv(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:"optional",innerType:t}))),Lv(t,zv(t._zod.def,{shape:o,checks:[]}))}function Wv(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function qv(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function Hv(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Zv(e){return"string"==typeof e?e:e?.message}function Xv(e){const t=[];for(const n of e??[]){const e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;const r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Yv(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Gv(e,t,n){var r;const i=e.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const a=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:Zv(e.inst?._zod.def?.error?.(e))??Zv(a?.(e))??Zv(t?.error?.(e))??Zv(n.customError?.(e))??Zv(n.localeError?.(e))??"Invalid input",s={};for(const l of Object.keys(e))"inst"!==l&&"schema"!==l&&"continue"!==l&&"input"!==l&&"__proto__"!==l&&(s[l]=e[l]);return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=e.input),s}function Kv(e){const t=e.length;if(!Hb.test(e))return t;let n=t;for(let r=0;r<t-1;r++)55296==(64512&e.charCodeAt(r))&&56320==(64512&e.charCodeAt(r+1))&&(n--,r++);return n}function Jv(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ey(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}function ty(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ny(e,t,n){return ty(e,t,n,!1)}function ry(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return ty(this,n,r(this))},set(e){ty(this,n,e)}})}return t}function iy(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return null==this?n:ty(this,t,n.bind(this))},set(e){ty(this,t,e)}})}function ay(e,t,n){const r=Object.getPrototypeOf(e._zod);t in r&&Zb!==e._zod?Zb=void 0:(Zb=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Yb);const e=Xb;Xb=!1;try{const r=n(this);return Xb?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Xb=Xb||e,r}catch(r){throw delete this[t],Xb=Xb||e,r}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function oy(e){const t=()=>e;return t[Gb]=!0,t}var sy,ly,cy,dy,uy,hy,py=X(()=>{xy(),Qb=class{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}},Vb="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{},Bb=/* @__PURE__*/Cv(()=>{if(hy.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(Z$t){return!1}}),Ub=/* @__PURE__*/new Set(["string","number","symbol"]),Wb=/*@__PURE__*/(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),qb={int64:[/* @__PURE__*/BigInt("-9223372036854775808"),/* @__PURE__*/BigInt("9223372036854775807")],uint64:[/* @__PURE__*/BigInt(0),/* @__PURE__*/BigInt("18446744073709551615")]},Hb=/[\uD800-\uDBFF]/,Xb=!1,Yb={configurable:!0,get(){Xb=!0}},Gb="~constantCatch"});function fy(e,t,n,r){function i(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */new Set}i.prototype={};const a=n,o=a&&/* @__PURE__ */new WeakSet;function s(n,r){if(n._zod){if(n._zod.traits.has(e))return}else{ly.value=new i(r);try{Object.defineProperty(n,"_zod",ly)}finally{ly.value=void 0}}if(n._zod.traits.add(e),t(n,r),o){const e=Object.getPrototypeOf(n),t=n._zod.constr.prototype;let r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);const i=r??e;o.has(i)||(o.add(i),function(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):iy(e,n,r.value)}}(i,a))}const s=d.prototype;for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in n||(n[e]=s[e].bind(n)))}const l=r?.Parent??Object;class c extends l{}function d(e){const t=r?.Parent?function(e){const t=cy;if(t){const n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return cy=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(c):this;s(t,e);const n=t._zod.deferred;if(n){for(const e of n)e();t._zod.deferred=void 0}const i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(c,"name",{value:e}),Object.defineProperty(d,"init",{value:s}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>!!(r?.Parent&&t instanceof r.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function my(e){return e&&Object.assign(hy,e),hy}var gy,by,vy,yy,xy=X(()=>{py(),ly={value:void 0,enumerable:!1},cy="captureStackTrace"in Error?Error:null,dy=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},uy=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},(sy=globalThis).__zod_globalConfig??(sy.__zod_globalConfig={}),hy=globalThis.__zod_globalConfig});function wy(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Sv,2)),e.message}function ky(e){this._zod.message=e}function Oy(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||("__proto__"===t?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}var Sy,Cy,Ny,_y,$y,Ty,Ay,Ey,Py,zy,My,Iy,Ry,jy,Dy,Ly,Fy=X(()=>{xy(),py(),gy={get:wy,set:ky,enumerable:!0,configurable:!0},by={value:void 0,enumerable:!1},vy=/* @__PURE__ */new WeakSet([Object.prototype,Error.prototype]),yy=/* @__PURE__ */fy("$ZodError",(e,t)=>{e.name="$ZodError",by.value=t,Object.defineProperty(e,"issues",by),by.value=void 0,Object.defineProperty(e,"message",gy);const n=Object.getPrototypeOf(e);vy.has(n)||(vy.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))})});function Qy(e,t){return{callee:t?.callee??e,Err:t?.Err}}function Vy(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Gv(e,n,my()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var By,Uy,Wy,qy,Hy,Zy,Xy,Yy,Gy,Ky,Jy,ex,tx,nx,rx,ix,ax,ox,sx,lx,cx,dx,ux,hx,px,fx,mx,gx=X(()=>{xy(),py(),Sy=e=>{const t=(n,r,i,a)=>{const o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new dy;if(s.issues.length){const n=new(a?.Err??e)(s.issues.map(e=>Gv(e,o,my())));throw Vb(n,a?.callee??t),n}return s.value};return t},Cy=e=>{const t=async(n,r,i,a)=>{const o=i?{...i,async:!0}:{async:!0};let s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const n=new(a?.Err??e)(s.issues.map(e=>Gv(e,o,my())));throw Vb(n,a?.callee??t),n}return s.value};return t},Ny=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new dy;return a.issues.length?Vy(e,a.issues,i):{success:!0,data:a.value}},_y=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Vy(e,a.issues,i):{success:!0,data:a.value}},$y=/* @__PURE__ */Symbol.for("zod.compile.invalid"),Ty=/* @__PURE__ */Symbol.for("zod.compile.fallback"),Ay=(e,t,n)=>{const r=e._zod.bag.validator;if(void 0!==r){if(r(t)!==$y)return!0;if(!0===r.definite&&void 0===n)return!1}return function(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun;let a;if(i?(r[Ty]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new dy;return 0===a.issues.length}(e,t,n)},Ey=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length},Py=e=>{const t=Sy(e),n=(e,r,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return t(e,r,o,Qy(n,a))};return n},zy=e=>{const t=Sy(e),n=(e,r,i,a)=>t(e,r,i,Qy(n,a));return n},My=e=>{const t=Cy(e),n=async(e,r,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return await t(e,r,o,Qy(n,a))};return n},Iy=e=>{const t=Cy(e),n=async(e,r,i,a)=>await t(e,r,i,Qy(n,a));return n},Ry=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return Ny(e)(t,n,i)},jy=e=>(t,n,r)=>Ny(e)(t,n,r),Dy=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return _y(e)(t,n,i)},Ly=e=>async(t,n,r)=>_y(e)(t,n,r)});function bx(e){return new RegExp(`^${e}$`)}function vx(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}var yx,xx,wx,kx,Ox,Sx,Cx,Nx,_x,$x,Tx,Ax,Ex,Px,zx,Mx,Ix,Rx,jx,Dx,Lx,Fx,Qx,Vx,Bx,Ux,Wx,qx,Hx,Zx,Xx,Yx,Gx,Kx,Jx,ew,tw,nw,rw,iw,aw,ow,sw,lw,cw,dw,uw,hw,pw,fw,mw,gw,bw,vw,yw,xw,ww,kw,Ow,Sw,Cw,Nw,_w,$w,Tw,Aw,Ew,Pw,zw,Mw,Iw,Rw,jw,Dw,Lw,Fw,Qw,Vw,Bw,Uw=X(()=>{By=/^[cC][0-9a-z]{6,}$/,Uy=/^[0-9a-z]+$/,Wy=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,qy=/^[0-9a-vA-V]{20}$/,Hy=/^[A-Za-z0-9]{27}$/,Zy=/^[a-zA-Z0-9_-]{21}$/,Xy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Yy=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gy=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ky=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jy="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",ex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nx=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ix=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ax=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ox=/^https?$/,sx=/^\+[1-9]\d{6,14}$/,cx=/*@__PURE__*/bx(lx="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))"),dx=/^[\s\S]{0,}$/,ux=/^-?\d+$/,hx=/^-?\d+(?:\.\d+)?$/,px=/^(?:true|false)$/i,fx=/^[^A-Z]*$/,mx=/^[^a-z]*$/}),Ww=X(()=>{xy(),Uw(),py(),yx=/*@__PURE__*/fy("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xx=e=>{const t=e.value;return!(null==t||void 0===t.length)},wx={number:"number",bigint:"bigint",object:"date"},kx=/*@__PURE__*/fy("$ZodCheckLessThan",(e,t)=>{yx.init(e,t);const n=wx[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:wx[typeof r.value]??n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ox=/*@__PURE__*/fy("$ZodCheckGreaterThan",(e,t)=>{yx.init(e,t);const n=wx[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:wx[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sx=/*@__PURE__*/fy("$ZodCheckMultipleOf",(e,t)=>{yx.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value===BigInt(0)||n.value%t.value!==BigInt(0):0!==function(e,t){const n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}(n.value,t.value))&&n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Cx=/*@__PURE__*/fy("$ZodCheckNumberFormat",(e,t)=>{yx.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,a]=Wb[t.format];e._zod.check=o=>{const s=o.value;if(n){if(!Number.isInteger(s))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Nx=/*@__PURE__*/fy("$ZodCheckMaxLength",(e,t)=>{var n;yx.init(e,t),(n=e._zod.def).when??(n.when=xx),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?Kv(r):i)<=t.maximum)return;const a=Jv(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_x=/*@__PURE__*/fy("$ZodCheckMinLength",(e,t)=>{var n;yx.init(e,t),(n=e._zod.def).when??(n.when=xx),e._zod.check=n=>{const r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?Kv(r):i)>=t.minimum)return;const a=Jv(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$x=/*@__PURE__*/fy("$ZodCheckLengthEquals",(e,t)=>{var n;yx.init(e,t),(n=e._zod.def).when??(n.when=xx),e._zod.check=n=>{const r=n.value,i=r.length,a="string"==typeof r&&i>=t.length&&i<=2*t.length?Kv(r):i;if(a===t.length)return;const o=Jv(r),s=a>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tx=/*@__PURE__*/fy("$ZodCheckStringFormat",(e,t)=>{var n,r;yx.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ax=/*@__PURE__*/fy("$ZodCheckRegex",(e,t)=>{Tx.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ex=/*@__PURE__*/fy("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=fx),Tx.init(e,t)}),Px=/*@__PURE__*/fy("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=mx),Tx.init(e,t)}),zx=/*@__PURE__*/fy("$ZodCheckIncludes",(e,t)=>{yx.init(e,t);const n=Dv(t.includes);t.pattern=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Mx=/*@__PURE__*/fy("$ZodCheckStartsWith",(e,t)=>{yx.init(e,t);const n=new RegExp(`^${Dv(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ix=/*@__PURE__*/fy("$ZodCheckEndsWith",(e,t)=>{yx.init(e,t);const n=new RegExp(`.*${Dv(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Rx=/*@__PURE__*/fy("$ZodCheckOverwrite",(e,t)=>{yx.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})}),qw=X(()=>{jx=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const i of r)this.content.push(i)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed))}}}),Hw=X(()=>{Dx={major:4,minor:6,patch:7}});function Zw(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Fx(r,n)}catch(Z$t){}return async function(e,t){const n={async:!0};return Fx(await e._zod.run({value:t,issues:[]},n),n)}(e,t)},vendor:"zod",version:1}}function Xw(e){try{return"undefined"!=typeof URL&&"function"==typeof URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Yw(e){return e.replace(qx,"")}function Gw(e){return!!ow.test(e)&&Xw(`http://[${e}]`)}function Kw(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Jw(e,t,n){e.issues.length&&t.issues.push(...Hv(n,e.issues)),t.value[n]=e.value}function ek(e,t,n,r,i,a){const o=n in r,s="optional"===a;if(o||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!o)return;t.issues.push(...Hv(n,e.issues))}o||void 0!==i?void 0===e.value?(o||"defaulted"===i&&!s)&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}}function tk(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Sw,i=r.length?[...t,...r]:t;for(const s of i)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);const a=(o=e.shape,Object.keys(o).filter(e=>void 0!==o[e]._zod.optin&&"optional"===o[e]._zod.optout));var o;return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function nk(e,t,n,r,i,a,o){const s=[],l=i.keySet,c=i.catchall._zod,d=c.def.type,u=c.optin,h=c.optout;let p=0;for(const f in t){if(o&&n.issues.length!==p){if(Wv(n,p))break;p=n.issues.length}if(l.has(f))continue;if("__proto__"===f){"never"===d&&s.push(f);continue}if("never"===d){s.push(f);continue}const i=c.run({value:t[f],issues:[]},r);i instanceof Promise?e.push(i.then(e=>ek(e,n,f,t,u,h))):ek(i,n,f,t,u,h)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function rk(e,t,n,r){for(const a of e)if(0===a.issues.length)return t.value=a.value,t;const i=e.filter(e=>!Wv(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Gv(e,r,my())))}),t)}function ik(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Rv(e)&&Rv(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),i={...e,...t};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(const a of r){if("__proto__"===a)continue;const n=ik(e[a],t[a]);if(!n.valid)return{valid:!1,mergeErrorPath:[a,...n.mergeErrorPath]};i[a]=n.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=ik(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ak(e,t,n){const r=/* @__PURE__ */new Map;let i;const a=/* @__PURE__ */new Map,o=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length){if("invalid_key"!==e.code||"record"!==e.origin||1!==e.path?.length)return!1;{const t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}}else i??(i=e),n=e.keys;for(const i of n)r.has(i)||r.set(i,{}),r.get(i)[t]=!0;return!0};for(const c of t.issues)o(c,"l")||e.issues.push(c);for(const c of n.issues)o(c,"r")||e.issues.push(c);const s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){const t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(const n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}const l=ik(t.value,n.value);if(!l.valid){if(Wv(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}function ok(e,t){return e.value=t.issues.length?void 0:t.value,e}function sk(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}function lk(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ck(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Gv(e,r,my()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function dk(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function uk(e){return e.memo||(e.value=Object.freeze(e.value)),e}function hk(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ey(e))}}var pk,fk,mk,gk,bk,vk,yk,xk,wk,kk,Ok=X(()=>{Ww(),xy(),qw(),Uw(),py(),Hw(),Lx=/*@__PURE__*/fy("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dx;const r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const a of i)for(const t of a._zod.onattach)t(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(t,n,r)=>{if(t.memo)return t;let i,a=Wv(t);for(const o of n){if(o._zod.def.when){if(qv(t))continue;if(!o._zod.def.when(t))continue}else if(a)continue;const n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&!1===r?.async)throw new dy;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Yv(t.issues,n,e),a||(a=Wv(t,n)))});else{if(t.issues.length===n)continue;Yv(t.issues,n,e),a||(a=Wv(t,n))}}return i?i.then(()=>t):t},n=(n,r,a)=>{if(Wv(n))return n.aborted=!0,n;const o=t(r,i,a);if(o instanceof Promise){if(!1===a.async)throw new dy;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}const o=e._zod.parse(r,a);if(o instanceof Promise){if(!1===a.async)throw new dy;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return ny(this,"~standard",Zw(this))},set"~standard"(e){ty(this,"~standard",e)}}),Fx=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Gv(e,t,my()))}:{value:e.value},Qx=/*@__PURE__*/fy("$ZodString",(e,t)=>{Lx.init(e,t),e._zod.pattern=t.pattern??dx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Vx=/*@__PURE__*/fy("$ZodStringFormat",(e,t)=>{Tx.init(e,t),Qx.init(e,t)}),Bx=/*@__PURE__*/fy("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yy),Vx.init(e,t)}),Ux=/*@__PURE__*/fy("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Gy(e))}else t.pattern??(t.pattern=Gy());Vx.init(e,t)}),Wx=/*@__PURE__*/fy("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ky),Vx.init(e,t)}),qx=/[\t\n\r]/g,Hx=/*@__PURE__*/fy("$ZodURL",(e,t)=>{Vx.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=function(e,t){return"normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===ox.source&&!/^https?:\/\//i.test(e))return 1;try{if("undefined"!=typeof URL){const t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(e,t):Xw(e)||2}(r,t);return 1===i?void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort}):2===i?void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort}):!0===i?void(n.value=Yw(r)):(t.hostname&&!function(e,t){return t.lastIndex=0,t.test(e.hostname)}(i,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!function(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}(i,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),void(n.value=t.normalize?i.href:Yw(r)))}catch(Z$t){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Zx=/*@__PURE__*/fy("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp(Jy,"u")),Vx.init(e,t)}),Xx=/*@__PURE__*/fy("$ZodNanoID",(e,t)=>{if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);var n;t.pattern??(t.pattern=void 0===t.length?Zy:(n=t.length,new RegExp(`^[a-zA-Z0-9_-]{${n}}$`))),Vx.init(e,t)}),Yx=/*@__PURE__*/fy("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=By),Vx.init(e,t)}),Gx=/*@__PURE__*/fy("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Uy),Vx.init(e,t)}),Kx=/*@__PURE__*/fy("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Wy),Vx.init(e,t)}),Jx=/*@__PURE__*/fy("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qy),Vx.init(e,t)}),ew=/*@__PURE__*/fy("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Hy),Vx.init(e,t)}),tw=/*@__PURE__*/fy("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${vx({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${vx({precision:e.precision})}`:n;return new RegExp(`^${lx}T(?:${r})$`)}(t)),Vx.init(e,t)}),nw=/*@__PURE__*/fy("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cx),Vx.init(e,t)}),rw=/*@__PURE__*/fy("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${vx(t)}$`)),Vx.init(e,t)}),iw=/*@__PURE__*/fy("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xy),Vx.init(e,t)}),aw=/*@__PURE__*/fy("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ex),Vx.init(e,t)}),ow=/^[0-9a-fA-F:.]+$/,sw=/*@__PURE__*/fy("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tx),Vx.init(e,t),e._zod.check=n=>{Gw(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),lw=/*@__PURE__*/fy("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=nx),Vx.init(e,t)}),cw=/*@__PURE__*/fy("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=rx),Vx.init(e,t),e._zod.check=n=>{(function(e){const t=e.split("/");if(2!==t.length)return!1;const[n,r]=t;if(!r)return!1;const i=Number(r);return`${i}`===r&&!(i<0||i>128)&&Gw(n)})(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}),dw=/^[0-9a-zA-Z+/]*={0,2}$/,uw=/*@__PURE__*/fy("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=dw),Vx.init(e,t),e._zod.check=n=>{Kw(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),hw=/^[A-Za-z0-9_-]*$/,pw=/*@__PURE__*/fy("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=hw),Vx.init(e,t),e._zod.check=n=>{(function(e){if(!hw.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Kw(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fw=/*@__PURE__*/fy("$ZodE164",(e,t)=>{t.pattern??(t.pattern=sx),Vx.init(e,t)}),mw=/*@__PURE__*/fy("$ZodJWT",(e,t)=>{Vx.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),gw=/*@__PURE__*/fy("$ZodNumber",(e,t)=>{Lx.init(e,t),e._zod.pattern=hx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(Z$t){}const i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;const a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),n}}),bw=/*@__PURE__*/fy("$ZodNumberFormat",(e,t)=>{Cx.init(e,t),gw.init(e,t)}),vw=/*@__PURE__*/fy("$ZodBoolean",(e,t)=>{Lx.init(e,t),e._zod.pattern=px,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(Z$t){}const i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),yw=/*@__PURE__*/fy("$ZodAny",(e,t)=>{Lx.init(e,t),e._zod.parse=e=>e}),xw=/*@__PURE__*/fy("$ZodUnknown",(e,t)=>{Lx.init(e,t),e._zod.parse=e=>e}),ww=/*@__PURE__*/fy("$ZodNever",(e,t)=>{Lx.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),kw=e=>Array.isArray(e)?e.length:-1,Ow=/*@__PURE__*/fy("$ZodArray",(e,t)=>{Lx.init(e,t);const n=hy.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);const o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){const n=a[e],l=t.element._zod.run({value:n,issues:[]},i);if(l instanceof Promise)o.push(l.then(t=>Jw(t,r,e)));else if(Jw(l,r,e),s&&0!==l.issues.length&&Wv(l))break}return o.length?Promise.all(o).then(()=>r):r},function(e,t){const n=Xv(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{const o=t(n.value);if(o>r&&!a?.skipChecks&&"backward"!==a?.direction)for(const[t,r]of Xv(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){const t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Yv(n.issues,t,e),n}return i(n,a)}}(e,kw)}),Sw=[],Cw=/*@__PURE__*/fy("$ZodObject",(e,t)=>{Lx.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const e=()=>{const n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}const i=Cv(()=>tk(t));ay(e,"propValues",e=>{const t=e.def.shape,n={};for(const r in t){const e=t[r]._zod;if(e.values){Object.prototype.hasOwnProperty.call(n,r)||_v(n,r,/* @__PURE__ */new Set);for(const t of e.values)n[r].add(t);void 0!==e.optin&&n[r].add(void 0)}}return n});const a=Iv,o=t.catchall;let s;const l=hy.memoizer;l?.attach(e),e._zod.parse=(t,n)=>{s??(s=i.value);const r=t.value;if(!a(r))return t.issues.push({expected:"object",code:"invalid_type",input:r,inst:e}),t;t.value=l?l.alloc(e,t,{},n):{};const c=[],d=s.shape,u=n?.abortEarly;let h=t.issues.length;for(const e of s.allKeys){if(u&&t.issues.length!==h){if(Wv(t,h))break;h=t.issues.length}if("__proto__"===e)continue;const i=d[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?c.push(s.then(n=>ek(n,t,e,r,a,o))):ek(s,t,e,r,a,o)}return o?nk(c,r,t,n,i.value,e,!0===u):c.length?Promise.all(c).then(()=>t):t}}),Nw=/*@__PURE__*/fy("$ZodObjectJIT",(e,t)=>{Cw.init(e,t);const n=e._zod.parse,r=Cv(()=>tk(t)),i=hy.memoizer;let a;const o=Iv,s=!hy.jitless,l=s&&Bb.value,c=t.catchall;let d;e._zod.parse=(u,h)=>{d??(d=r.value);const p=u.value;return o(p)?s&&l&&!1===h?.async&&!0!==h.jitless?(a||(a=(t=>{const n=r.value,a=n.symbolKeys,o=new jx(["payload","ctx"],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write("const input = payload.value;");const c=Object.create(null);let d=0;for(const e of n.allKeys)c[e]="key_"+d++;o.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const e of n.allKeys){if("__proto__"===e)continue;const n=c[e],r="symbol"==typeof e?`syms[${a.indexOf(e)}]`:Mv(e),i=`${r} in input`,d=t[e],u=d?._zod?.optin,h=void 0!==u,p="optional"===d?._zod?.optout;if(o.write(`const ${n} = ${s(r)};`),h&&p){const e="optional"===u?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${l(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else h?(o.write(`\n if (${n}.issues.length) {${l(n,r)}\n }\n `),"defaulted"===u?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${l(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write("payload.value = newResult;"),o.write("return payload;"),o.compile()})(t.shape)),u=a(u,h),c?nk([],p,u,h,d,e,!0===h?.abortEarly):u):n(u,h):(u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u)}}),_w=/*@__PURE__*/fy("$ZodUnion",(e,t)=>{Lx.init(e,t),ay(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),ay(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),ay(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),ay(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){const t=e.def.options.map(e=>e._zod.pattern);return new RegExp(`^(${t.map(e=>Nv(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1;const o=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(0===t.issues.length)return t;o.push(t)}}return a?Promise.all(o).then(t=>rk(t,r,e,i)):rk(o,r,e,i)}}),$w=/*@__PURE__*/fy("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_w.init(e,t);const n=e._zod.parse;ay(e,"propValues",e=>{const t={};let n=0;for(const r of e.def.options){const i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(const[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||_v(t,e,/* @__PURE__ */new Set);for(const r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{const r=$v(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw new Error(`Invalid discriminated union option at index "${n}"`)});const r=Cv(()=>function(e){const t=/* @__PURE__ */new Map;for(const n of e.options){const r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(const e of r)if(t.has(e)){if(void 0!==e)throw new Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}(t));e._zod.parse=(i,a)=>{const o=i.value;if(!Iv(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;const s=o?.[t.discriminator],l=r.value.get(s);return!l||void 0===s&&"backward"===a.direction?t.unionFallback||"backward"===a.direction?n(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:o,path:[t.discriminator],inst:e}),i):l._zod.run(i,a)}}),Tw=/*@__PURE__*/fy("$ZodIntersection",(e,t)=>{Lx.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ak(e,t,n)):ak(e,i,a)}}),Aw=/*@__PURE__*/fy("$ZodRecord",(e,t)=>{Lx.init(e,t);const n=hy.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{const a=r.value;if(!Rv(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;const o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};const l=/* @__PURE__ */new Set;for(const n of s)if("string"==typeof n||"number"==typeof n||"symbol"==typeof n){if(l.add("number"==typeof n?n.toString():n),"__proto__"===n)continue;const s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>Gv(e,i,my())),input:n,path:[n],inst:e});continue}const c=s.value;if("__proto__"===c)continue;const d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Hv(n,e.issues)),r.value[c]=e.value})):(d.issues.length&&r.issues.push(...Hv(n,d.issues)),r.value[c]=d.value)}let c;for(const e in a)if(!l.has(e))if("loose"===t.mode){if("__proto__"===e)continue;r.value[e]=a[e]}else c=c??[],c.push(e);c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:c,continue:!0})}else{let l;r.value=n?n.alloc(e,r,{},i):{};for(const n of Reflect.ownKeys(a)){if("__proto__"===n)continue;if(!Object.prototype.propertyIsEnumerable.call(a,n))continue;let c=t.keyType._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof n&&hx.test(n)&&c.issues.length){const e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(c=e)}if(c.issues.length){"loose"===t.mode?r.value[n]=a[n]:s?(l=l??[],l.push(n)):r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(e=>Gv(e,i,my())),input:n,path:[n],inst:e});continue}const d=c.value;if("__proto__"===d)continue;const u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Hv(n,e.issues)),r.value[d]=e.value})):(u.issues.length&&r.issues.push(...Hv(n,u.issues)),r.value[d]=u.value)}l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:l,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Ew=/*@__PURE__*/fy("$ZodEnum",(e,t)=>{Lx.init(e,t);const n=kv(t.entries),r=new Set(n);e._zod.values=r,ay(e,"pattern",e=>{const t=kv(e.def.entries).filter(e=>Ub.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>Dv(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{const a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),Pw=/*@__PURE__*/fy("$ZodLiteral",(e,t)=>{Lx.init(e,t);const n=new Set(t.values);e._zod.values=n,ay(e,"pattern",e=>{const t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?Dv(e):e?Dv(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{const a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),zw=/*@__PURE__*/fy("$ZodTransform",(e,t)=>{Lx.init(e,t),e._zod.optin="optional",hy.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new uy(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new dy;return n.value=i,n}}),Mw=/*@__PURE__*/fy("$ZodOptional",(e,t)=>{Lx.init(e,t),ay(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",ay(e,"values",e=>{const t=e.def.innerType._zod.values;return t?/* @__PURE__ */new Set([...t,void 0]):void 0}),ay(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${Nv(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>ok(e,t)):ok(e,r)}return t.innerType._zod.run(e,n)}}),Iw=/*@__PURE__*/fy("$ZodExactOptional",(e,t)=>{Mw.init(e,t),ay(e,"values",e=>e.def.innerType._zod.values),ay(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Rw=/*@__PURE__*/fy("$ZodNullable",(e,t)=>{Lx.init(e,t),ay(e,"optin",e=>e.def.innerType._zod.optin),ay(e,"optout",e=>e.def.innerType._zod.optout),ay(e,"pattern",e=>{const t=e.def.innerType._zod.pattern;return t?new RegExp(`^(${Nv(t.source)}|null)$`):void 0}),ay(e,"values",e=>e.def.innerType._zod.values?/* @__PURE__ */new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),jw=/*@__PURE__*/fy("$ZodDefault",(e,t)=>{Lx.init(e,t),e._zod.optin="defaulted",ay(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>sk(e,t)):sk(r,t)}}),Dw=/*@__PURE__*/fy("$ZodPrefault",(e,t)=>{Lx.init(e,t),e._zod.optin="defaulted",ay(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Lw=/*@__PURE__*/fy("$ZodNonOptional",(e,t)=>{Lx.init(e,t),ay(e,"values",e=>{const t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>lk(t,e)):lk(i,e)}}),Fw=/*@__PURE__*/fy("$ZodCatch",(e,t)=>{Lx.init(e,t),ay(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),ay(e,"optout",e=>e.def.innerType._zod.optout),ay(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ck(e,r,t,n)):ck(e,r,t,n)}}),Qw=/*@__PURE__*/fy("$ZodPipe",(e,t)=>{Lx.init(e,t),ay(e,"values",e=>e.def.in._zod.values),ay(e,"optin",e=>e.def.in._zod.optin),ay(e,"optout",e=>e.def.out._zod.optout),ay(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>dk(e,t.in,n)):dk(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dk(e,t.out,n)):dk(r,t.out,n)}}),Vw=/*@__PURE__*/fy("$ZodReadonly",(e,t)=>{Lx.init(e,t),ay(e,"propValues",e=>e.def.innerType._zod.propValues),ay(e,"values",e=>e.def.innerType._zod.values),ay(e,"optin",e=>e.def.innerType?._zod?.optin),ay(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(uk):uk(r)}}),Bw=/*@__PURE__*/fy("$ZodCustom",(e,t)=>{yx.init(e,t),Lx.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>hk(t,n,r,e));hk(i,n,r,e)}})});function Sk(e){return null!==e&&"object"==typeof e}function Ck(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function Nk(e,t,n){const r=gk.get(e);if(void 0!==r)return r?yk:bk;if(t.has(e))return yk;t.add(e);let i=bk;const a=e=>{if(i!==yk&&e?._zod){const r=Nk(e,t,n);r>i&&(i=r)}},o=e=>{e>i&&(i=e)},s=e._zod.def;switch(s.type){case"object":{const e=$v(s);o(e?(e=>{let r=bk;for(const i of Reflect.ownKeys(e)){const a=Object.getOwnPropertyDescriptor(e,i);if(!a.enumerable)continue;const o=a.get?vk:a.value?._zod?Nk(a.value,t,n):bk;o>r&&(r=o)}return r})(e):vk),a(s.catchall);break}case"array":a(s.element);break;case"tuple":for(const e of s.items)a(e);a(s.rest);break;case"record":case"map":a(s.keyType),a(s.valueType);break;case"set":a(s.valueType);break;case"union":for(const e of s.options)a(e);break;case"intersection":a(s.left),a(s.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":a(s.innerType);break;case"pipe":a(s.in),a(s.out);break;case"function":a(s.input),a(s.output);break;case"lazy":{const r=s._cachedInner??(n?e._zod.innerType:void 0);o(r?Nk(r,t,!1):vk);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const e in s){const t=Object.getOwnPropertyDescriptor(s,e);if(!t||t.get)continue;const n=t.value;if(n&&"object"==typeof n)if(n._zod)a(n);else if(Array.isArray(n))for(const e of n)a(e)}}return t.delete(e),function(e,t){return t!==vk&&gk.set(e,t===yk),t}(e,i)}var _k,$k,Tk,Ak,Ek=X(()=>{py(),pk=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},fk="~memo",mk=[],gk=/*@__PURE__*/new WeakMap,bk=0,vk=1,yk=2,wk=[],kk={alloc(e,t,n){const r=xk;if(!r)return n;xk=void 0;const i={value:n,issues:null};return r.set(t.value,i),wk.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,n=(e,n)=>{if("backward"!==n.direction&&function(e,t){const n=e[fk]?.backEdges;return void 0!==n&&Sk(t)&&n.has(t)}(n,e.value))throw new pk;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i,a=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,o=(s,l)=>{if(void 0===n){const r=Nk(e,/* @__PURE__ */new Set,!1);if(r===bk)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,l);r===yk||a?n=!0:a=!0}const c=s.value;if(!Sk(c))return t(s,l);let d,u=l[fk];u||(u={buckets:/* @__PURE__ */new WeakMap,backEdges:void 0},l[fk]=u),r===l?d=i:(d=function(e,t){let n=e.buckets.get(t);return n||(n=/* @__PURE__ */new WeakMap,e.buckets.set(t,n)),n}(u,e),r=l,i=d);const h=d.get(c);if(h)return s.value=h.value,h.issues?h.issues.length&&s.issues.push(...Ck(h.issues)):(s.memo=!0,u.backEdges??(u.backEdges=/* @__PURE__ */new WeakSet),u.backEdges.add(h.value)),s;xk=d;const p=wk.length,f=t(s,l);xk=void 0;const m=wk.length>p?wk.pop():void 0;return f instanceof Promise?f.then(e=>(m&&(m.issues=e.issues.length?Ck(e.issues):mk),e)):(m&&(m.issues=f.issues.length?Ck(f.issues):mk),f)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}}}),Pk=X(()=>{py(),_k=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${i(e.expected)}, received ${i(function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}(e.input),e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Qv(e.values[0])}`:`Invalid option: expected one of ${Ov(e.values,"|")}`;case"too_big":{const n=e.exact?"exactly ":e.inclusive?"<=":"<",r=t(e.origin);return r?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${r.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.exact?"exactly ":e.inclusive?">=":">",r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${Ov(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(" | ")}`:!1===e.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}}}),zk=X(()=>{Tk=class{constructor(){this._map=/* @__PURE__ */new WeakMap,this._idmap=/* @__PURE__ */new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */new WeakMap,this._idmap=/* @__PURE__ */new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},($k=globalThis).__zod_globalRegistry??($k.__zod_globalRegistry=new Tk),Ak=globalThis.__zod_globalRegistry}),Mk=X(()=>{});function Ik(e){return e.checks&&(e.checks=[...e.checks]),e}function Rk(e,t){return new kx({check:"less_than",...Fv(t),value:e,inclusive:!1})}function jk(e,t){return new kx({check:"less_than",...Fv(t),value:e,inclusive:!0})}function Dk(e,t){return new Ox({check:"greater_than",...Fv(t),value:e,inclusive:!1})}function Lk(e,t){return new Ox({check:"greater_than",...Fv(t),value:e,inclusive:!0})}function Fk(e,t){return new Sx({check:"multiple_of",...Fv(t),value:e})}function Qk(e,t){return new Nx({check:"max_length",...Fv(t),maximum:e})}function Vk(e,t){return new _x({check:"min_length",...Fv(t),minimum:e})}function Bk(e,t){return new $x({check:"length_equals",...Fv(t),length:e})}function Uk(e){return new Rx({check:"overwrite",tx:e})}function Wk(e,t){const n=new yx({check:"custom",...Fv(t)});return n._zod.check=e,n}var qk,Hk,Zk,Xk,Yk=X(()=>{Ww(),py()});function Gk(e,...t){for(const n of t)for(const t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&_v(e,t,n[t]);return e}function Kk(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ak,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:/* @__PURE__ */new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Jk(e,t,n,r,i){const a="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===a)return!1;if(void 0===a||"throw"===a)throw new Error(i);return Object.assign(n,a),!0}function eO(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{const n=o.schema,a=t.processors[i.type];if(!a)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}const a=e._zod.parent;a&&(o.ref||(o.ref=a),eO(a,t,r),t.seen.get(a).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Gk(o.schema,l),"input"===t.io&&lO(e)&&(delete o.schema.examples,delete o.schema.default),"input"===t.io&&"_prefault"in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function tO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function nO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=/* @__PURE__ */new Map;for(const a of e.seen.entries()){const t=e.metadataRegistry.get(a[0])?.id;if(t){const e=r.get(t);if(e&&e!==a[0])throw new Error(`Duplicate schema id "${t}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(t,a[0])}}const i=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:i,defId:a}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};const a=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=a,{defId:a,ref:`${i("__shared")}#/${r}/${tO(a)}`}}const i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};const a=t[1].schema.id??"__schema"+e.counter++;return{defId:a,ref:i+tO(a)}})(t);r.def={...r.schema},a&&(r.defId=a);const o=r.schema;for(const e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(const a of e.seen.entries()){const e=a[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const n=a[1];if(t!==a[0]){if(e.external){const n=e.external.registry.get(a[0])?.id;if(t!==a[0]&&n){i(a);continue}}(e.metadataRegistry.get(a[0])?.id||n.cycle||n.count>1&&"ref"===e.reused)&&i(a)}else i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function rO(e){const t=e.anyOf;if(!Array.isArray(t)||0===t.length||void 0!==e.type)return;const n=[];for(const r of t){if(!r||"object"!=typeof r)return;rO(r);const e=Object.keys(r);if(1!==e.length||"type"!==e[0])return;const t=r.type;for(const r of Array.isArray(t)?t:[t]){if("string"!=typeof r)return;n.includes(r)||n.push(r)}}delete e.anyOf,e.type=1===n.length?n[0]:n}function iO(e){const t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function aO(e){const t=[];for(const a of e){if("object"!=typeof a||"object"!==a.type)return null;for(const e in a)if(!qk.has(e))return null;t.push(a)}const n={},r=/* @__PURE__ */new Set;for(const a of t){for(const e in a.properties){if(Object.prototype.hasOwnProperty.call(n,e))continue;const r=[];for(const n of t){const t=n.properties?.[e]??iO(n);null!=t&&(r.some(e=>JSON.stringify(e)===JSON.stringify(t))||r.push(t))}_v(n,e,1===r.length?r[0]:aO(r)??{allOf:r})}for(const e of a.required??[])r.add(e)}const i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{const e=[];for(const n of t){const t=iO(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function oO(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const i of qk)if(i in e)return;const n=t.filter(e=>Hk.some(t=>Array.isArray(e[t])));let r=null;if(n.length){const e=n[0],i=Hk.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;const a=t.filter(t=>t!==e),o=e[i].map(e=>aO([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}else r=aO(t);r&&(delete e.allOf,Gk(e,r))}function sO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);const n=e.seen.get(o),s=n.schema;if(!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Gk(i,s):(i.allOf=i.allOf??[],i.allOf.push(s)),Gk(i,a),t._zod.parent===o)for(const e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&n.def)for(const e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}const s=t._zod.parent;if(s&&s!==o){r(s);const t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(const e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(const t of e.seen.entries())rO(t[1].def??t[1].schema);for(const t of e.deferred)t();if(e.intersections.length){const t=/* @__PURE__ */new Map;for(const n of e.seen.values())for(const e of[n.schema,n.def]){const n=e?.allOf;if(!Array.isArray(n))continue;const r=t.get(n);r?r.push(e):t.set(n,[e])}for(const n of e.intersections)for(const e of t.get(n)??[])oO(e)}}const i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Gk(i,n.defId?n.schema:n.def??n.schema);const a=e.metadataRegistry.get(t)?.id;void 0!==a&&i.id===a&&delete i.id;const o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const l of e.seen.entries()){const e=l[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,_v(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{const n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xk(t,"input",e.processors),output:Xk(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(s){throw new Error("Error converting schema to JSON.")}}function lO(e,t){const n=t??{seen:/* @__PURE__ */new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return lO(r.element,n);if("set"===r.type)return lO(r.valueType,n);if("lazy"===r.type)return lO(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type||"catch"===r.type)return lO(r.innerType,n);if("intersection"===r.type)return lO(r.left,n)||lO(r.right,n);if("record"===r.type||"map"===r.type)return lO(r.keyType,n)||lO(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||lO(r.in,n)||lO(r.out,n);if("object"===r.type){for(const e in r.shape)if(lO(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(lO(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(lO(e,n))return!0;return!(!r.rest||!lO(r.rest,n))}return!1}var cO,dO,uO,hO,pO,fO,mO,gO,bO,vO,yO,xO,wO,kO,OO,SO,CO,NO,_O,$O,TO,AO,EO,PO,zO,MO,IO,RO,jO,DO,LO,FO,QO,VO,BO,UO,WO,qO,HO,ZO=X(()=>{zk(),py(),qk=/* @__PURE__ */new Set(["type","properties","required","additionalProperties"]),Hk=["oneOf","anyOf"],Zk=(e,t={})=>n=>{const r=Kk({...n,processors:t});return eO(e,r),nO(r,e),sO(r,e)},Xk=(e,t,n={})=>r=>{const{libraryOptions:i,target:a}=r??{},o=Kk({...i??{},target:a,io:t,processors:n});return eO(e,o),nO(o,e),sO(o,e)}});function XO(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const a of r)yO[a._zod.def.check]?.(t,a._zod.def);const i=e._zod.bag;void 0!==i.minimum&&cO(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&cO(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&dO(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&dO(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&hO(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&fO(t,i.mime);for(const a of i.patterns??[])pO(t,a);return t}function YO(e){const t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?YO(t.out):"catch"===t.type?YO(t.innerType):e._zod.optin}function GO(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const r=e.get(t)?.def;if(!r)return t;const i=GO(e,r,n);return i===r?t:i}for(const f of["anyOf","oneOf"]){const r=t[f];if(!Array.isArray(r))continue;const i=r.map(t=>GO(e,t,n));i.some((e,t)=>e!==r[t])&&(t={...t,[f]:i})}const r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes("string")&&r.some(e=>"number"===e||"integer"===e),a=t.enum??(void 0!==t.const?[t.const]:void 0);if(!i&&!a?.some(e=>"number"==typeof e))return t;const{minimum:o,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:h,...p}=t;return p.enum?p.enum=p.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof p.const&&(p.const=String(p.const)),i?(p.type="string",a||(p.pattern=(r.includes("number")?hx:ux).source),p):p}function KO(e,t,n,r,i){let a=!1;const o=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(a=!0,null));return a?(Jk(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),QO):JSON.parse(o)}var JO,eS,tS,nS=X(()=>{Uw(),Ok(),ZO(),py(),cO=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},dO=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},uO=(e,t)=>{cO(e,"minimum",t),dO(e,"maximum",t)},hO=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},pO=(e,t)=>{e.patterns??(e.patterns=/* @__PURE__ */new Set),e.patterns.add(t)},fO=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},mO=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},gO=(e,t)=>cO(e,"minimum",t.minimum),bO=(e,t)=>dO(e,"maximum",t.maximum),yO={greater_than:(e,t)=>cO(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>dO(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>hO(e,t.value),number_format:(vO=e=>(t,n)=>{mO(t,n.format);const[r,i]=e[n.format];cO(t,"minimum",r),dO(t,"maximum",i)})(Wb),bigint_format:vO(qb),min_length:gO,max_length:bO,length_equals:(e,t)=>uO(e,t.length),min_size:gO,max_size:bO,size_equals:(e,t)=>uO(e,t.size),string_format:(e,t)=>{mO(e,t.format),t.pattern&&pO(e,t.pattern),"base64"!==t.format&&"base64url"!==t.format||(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>fO(e,t.mime)},xO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wO=/* @__PURE__ */new Map([[dw,ix],[hw,ax]]),kO=e=>wO.get(e)??e,OO=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:a,maximum:o,format:s,patterns:l,contentEncoding:c,laxFormat:d}=XO(e);if("number"==typeof a&&(i.minLength=a),"number"==typeof o&&(i.maxLength=o),s&&(i.format=xO[s]??s,""===i.format&&delete i.format,("time"===s||d)&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const e=[...l].map(kO);1===e.length?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},SO=(e,t,n,r)=>{const i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=XO(e);i.type=d?"integer":"number";const u="number"==typeof c&&c>=(a??Number.NEGATIVE_INFINITY),h="number"==typeof l&&l<=(o??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;if(u?p?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c:"number"==typeof a&&(i.minimum=a),h?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:"number"==typeof o&&(i.maximum=o),s){const n=/* @__PURE__ */new Set;for(const l of s)Number.isFinite(l)&&0!==l?n.add(Math.abs(l)):Jk(e,t,i,r,`A multipleOf divisor of ${l} cannot be represented in JSON Schema`);const[a,...o]=n;void 0!==a&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},CO=(e,t,n,r)=>{n.type="boolean"},NO=(e,t,n,r)=>{n.not={}},_O=(e,t,n,r)=>{},$O=(e,t,n,r)=>{},TO=(e,t,n,r)=>{const i=kv(e._zod.def.entries);0!==i.length?(i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i):n.not={}},AO=(e,t,n,r)=>{const i=e._zod.def;if(0===i.values.length)return void(n.not={});const a=[];for(const o of i.values)if(void 0===o){if(Jk(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof o){if(Jk(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;a.push(Number(o))}else a.push(o);if(0===a.length);else if(1===a.length){const e=a[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else a.every(e=>"number"==typeof e)&&(n.type="number"),a.every(e=>"string"==typeof e)&&(n.type="string"),a.every(e=>"boolean"==typeof e)&&(n.type="boolean"),a.every(e=>null===e)&&(n.type="null"),n.enum=a},EO=(e,t,n,r)=>{Jk(e,t,n,r,"Custom types cannot be represented in JSON Schema")},PO=(e,t,n,r)=>{Jk(e,t,n,r,"Transforms cannot be represented in JSON Schema")},zO=(e,t,n,r)=>{const i=n,a=e._zod.def,{minimum:o,maximum:s}=XO(e);"number"==typeof o&&(i.minItems=o),"number"==typeof s&&(i.maxItems=s),i.type="array",i.items=eO(a.element,t,{...r,path:[...r.path,"items"]})},MO=(e,t,n,r)=>{const i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Jk(e,t,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(const l in o)_v(i.properties,l,eO(o[l],t,{...r,path:[...r.path,"properties",l]}));const s=[];for(const l of Object.keys(o)){const e=a.shape[l];("input"===t.io?void 0===YO(e):void 0===e._zod.optout)&&s.push(l)}s.length>0&&(i.required=s),"never"===a.catchall?._zod.def.type?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=eO(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(i.additionalProperties=!1)},IO=(e,t,n,r)=>{const i=e._zod.def,a=!1===i.inclusive,o=i.options.map((e,n)=>eO(e,t,{...r,path:[...r.path,a?"oneOf":"anyOf",n]}));a?n.oneOf=o:n.anyOf=o},RO=(e,t,n,r)=>{const i=e._zod.def,a=eO(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=eO(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,l=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=l,t.intersections.push(l)},jO=/* @__PURE__ */new WeakMap,DO=(e,t,n,r)=>{const i=n,a=e._zod.def;i.type="object";const o=a.keyType,s=XO(o).patterns;if("loose"===a.mode&&s&&s.size>0){const e=eO(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const t of s)_v(i.patternProperties,kO(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){i.propertyNames=eO(a.keyType,t,{...r,path:[...r.path,"propertyNames"]});let n=jO.get(t);n||(n=[],jO.set(t,n),t.deferred.push(()=>function(e){const t=/* @__PURE__ */new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const n=/* @__PURE__ */new Map;for(const r of jO.get(e)??[]){const i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||!0===a||n.has(a))continue;const o=GO(t,a,/* @__PURE__ */new Set);o!==a&&n.set(a,o)}if(n.size)for(const r of e.seen.values())for(const e of[r.schema,r.def]){const t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}(t))),n.push(e)}i.additionalProperties=eO(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const l=o._zod.values,c="input"===t.io&&void 0!==YO(a.valueType);if(l&&!a.partial&&!c){const e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(i.required=e.map(String))}},LO=(e,t,n,r)=>{const i=e._zod.def,a=eO(i.innerType,t,r),o=t.seen.get(e);"openapi-3.0"===t.target?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},FO=(e,t,n,r)=>{const i=e._zod.def;eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType},QO=Symbol(),VO=(e,t,n,r)=>{const i=e._zod.def;eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType;const a=KO(i.defaultValue,e,t,n,r);a!==QO&&(n.default=a)},BO=(e,t,n,r)=>{const i=e._zod.def;if(eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;const a=KO(i.defaultValue,e,t,n,r);a!==QO&&(n._prefault=a)},UO=(e,t,n,r)=>{const i=e._zod.def;let a;eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType;try{a=i.catchValue(void 0)}catch{return void Jk(e,t,n,r,"Dynamic catch values are not supported in JSON Schema")}n.default=a},WO=(e,t,n,r)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),o="input"===t.io?a?i.out:i.in:i.out;eO(o,t,r),t.seen.get(e).ref=o},qO=(e,t,n,r)=>{const i=e._zod.def;eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},HO=(e,t,n,r)=>{const i=e._zod.def;eO(i.innerType,t,r),t.seen.get(e).ref=i.innerType}}),rS=X(()=>{xy(),gx(),Fy(),Ok(),Ek(),Ww(),Hw(),py(),Uw(),Pk(),zk(),qw(),Mk(),Yk(),ZO(),nS(),ZO()}),iS=X(()=>{rS()});function aS(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var oS,sS,lS,cS,dS,uS,hS,pS,fS,mS,gS,bS,vS,yS,xS,wS,kS,OS,SS,CS,NS,_S,$S,TS,AS,ES,PS,zS,MS,IS,RS,jS,DS,LS,FS,QS,VS,BS,US,WS,qS,HS,ZS,XS,YS,GS,KS,JS,eC,tC,nC,rC,iC,aC,oC,sC,lC,cC,dC,uC,hC,pC,fC,mC,gC=X(()=>{rS(),py(),JO=/* @__PURE__ */new WeakSet([Object.prototype,Error.prototype]),eS=(e,t)=>{yy.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);JO.has(n)||(JO.add(n),aS(n,"format",e=>t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,i=[])=>{for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if("invalid_key"===a.code)r({issues:a.issues},[...i,...a.path]);else if("invalid_element"===a.code)r({issues:a.issues},[...i,...a.path]);else{const e=[...i,...a.path];if(0===e.length)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){const n=e[i],o=i===e.length-1;if("_errors"===n){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}(e,t)),aS(n,"flatten",e=>t=>function(e,t=e=>e.message){const n={},r=[];for(const i of e.issues)i.path.length>0?Oy(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}(e,t)),aS(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Sv,2)}),aS(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Sv,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},tS=/*@__PURE__*/fy("ZodError",eS,void 0,{Parent:Error})}),bC=X(()=>{rS(),gC(),oS=/* @__PURE__ */Sy(tS),sS=/* @__PURE__ */Cy(tS),lS=/* @__PURE__ */Ny(tS),cS=/* @__PURE__ */_y(tS),dS=/* @__PURE__ */Py(tS),uS=/* @__PURE__ */zy(tS),hS=/* @__PURE__ */My(tS),pS=/* @__PURE__ */Iy(tS),fS=/* @__PURE__ */Ry(tS),mS=/* @__PURE__ */jy(tS),gS=/* @__PURE__ */Dy(tS),bS=/* @__PURE__ */Ly(tS)});function vC(){hy.memoizer||my({memoizer:kk})}function yC(e){return function(e,t){return new xS(Ik({type:"string",...Fv(t)}))}(0,e)}function xC(e){return function(e,t){return new WS(Ik({type:"number",checks:[],...Fv(t)}))}(0,e)}function wC(e){return function(e,t){return new qS({type:"number",check:"number_format",abort:!1,format:"safeint",...Fv(t)})}(0,e)}function kC(e){return function(e,t){return new HS({type:"boolean",...Fv(t)})}(0,e)}function OC(){return new ZS({type:"any"})}function SC(){return new XS({type:"unknown"})}function CC(e,t){return function(e,t,n){return new GS({type:"array",element:t,...Fv(n)})}(0,e,t)}function NC(e,t){const n={type:"object",shape:e??{},...Fv(t)};return new KS(n)}function _C(e,t){return new JS({type:"union",options:e,...Fv(t)})}function $C(e,t,n){return new eC({type:"union",options:t,discriminator:e,...Fv(n)})}function TC(e,t,n){return t&&t._zod?new nC({type:"record",keyType:e,valueType:t,...Fv(n)}):new nC({type:"record",keyType:yC(),valueType:e,...Fv(t)})}function AC(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new rC({type:"enum",entries:n,...Fv(t)})}function EC(e,t){return new iC({type:"literal",values:Array.isArray(e)?e:[e],...Fv(t)})}function PC(e){return new oC({type:"optional",innerType:e})}function zC(e){return new lC({type:"nullable",innerType:e})}function MC(e,t){return new pC({type:"pipe",in:e,out:t})}function IC(e,t){return function(e,t,n){const r=Fv(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}(mC,e??(()=>!0),t)}var RC,jC,DC,LC,FC,QC,VC,BC,UC,WC,qC,HC,ZC,XC,YC,GC,KC,JC,eN,tN,nN,rN,iN,aN,oN,sN,lN,cN,dN,uN,hN,pN,fN,mN,gN,bN,vN,yN,xN,wN,kN,ON,SN,CN,NN,_N,$N,TN,AN,EN,PN,zN,MN,IN,RN,jN,DN,LN,FN,QN,VN,BN,UN,WN,qN,HN,ZN,XN,YN,GN,KN,JN,e_,t_,n_,r_,i_,a_,o_,s_,l_,c_,d_,u_,h_,p_,f_,m_,g_,b_,v_,y_,x_,w_,k_,O_,S_,C_,N_,__,$_,T_,A_,E_,P_,z_,M_,I_,R_,j_,D_,L_,F_,Q_,V_,B_,U_,W_,q_,H_,Z_,X_,Y_,G_,K_,J_,e$,t$,n$,r$,i$,a$,o$,s$,l$,c$,d$,u$,h$,p$,f$,m$,g$,b$,v$,y$,x$,w$,k$,O$,S$,C$,N$,_$,$$,T$,A$,E$,P$,z$,M$,I$,R$,j$,D$,L$,F$,Q$,V$,B$,U$,W$,q$,H$,Z$,X$,Y$,G$,K$,J$,eT,tT,nT,rT,iT,aT,oT,sT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,xT,wT,kT,OT,ST,CT,NT,_T,$T,TT,AT,ET,PT,zT,MT,IT,RT,jT,DT,LT,FT,QT,VT,BT,UT,WT,qT,HT,ZT,XT,YT,GT,KT,JT,eA,tA,nA,rA,iA,aA,oA,sA,lA,cA,dA,uA,hA,pA,fA,mA,gA,bA,vA,yA,xA,wA,kA,OA,SA,CA,NA,_A,$A,TA,AA,EA,PA,zA,MA,IA,RA,jA,DA,LA,FA,QA,VA,BA,UA,WA,qA,HA,ZA,XA,YA,GA,KA,JA,eE,tE,nE,rE,iE,aE,oE=X(()=>{rS(),nS(),ZO(),Pk(),iS(),bC(),vS=/*@__PURE__*/fy("ZodType",(e,t)=>(hy.localeError||my({localeError:_k()}),Lx.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(zv(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Lv(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,n){return new mC({type:"custom",check:"custom",fn:t,...Fv(n)})}(0,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){const n=/* @__PURE__ */Wk(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(ey(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(ey(r))}},e(t.value,t)),t);return n}(e,t)}(e,t))},overwrite(e){return this.check(Uk(e))},optional(){return PC(this)},exactOptional(){return new sC({type:"optional",innerType:this})},nullable(){return zC(this)},nullish(){return PC(zC(this))},nonoptional(e){return function(e,t){return new uC({type:"nonoptional",innerType:e,...Fv(t)})}(this,e)},array(){return CC(this)},or(e){return _C([this,e])},and(e){return new tC({type:"intersection",left:this,right:e})},transform(e){return MC(this,new aC({type:"transform",transform:e}))},default(e){return t=e,new cC({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():jv(t)}});var t},prefault(e){return t=e,new dC({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():jv(t)}});var t},catch(e){return new hC({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:oy(t)});var t},pipe(e){return MC(this,e)},readonly(){return new fC({type:"readonly",innerType:this})},describe(e){const t=this.clone();return Ak.add(t,{description:e}),t},meta(...e){if(0===e.length)return Ak.get(this);const t=this.clone();return Ak.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return ny(this,"~standard",{...Zw(this),jsonSchema:{input:Xk(this,"input"),output:Xk(this,"output")}})},set"~standard"(e){ty(this,"~standard",e)},parse:function e(t,n){return oS(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await sS(this,t,n,{callee:e})},safeParse(e,t){return lS(this,e,t)},async safeParseAsync(e,t){return cS(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ty(this,"spa",e)},validate(e,t){return Ay(this,e,t)},validateAsync(e,t){return Ey(this,e,t)},encode:function e(t,n){return dS(this,t,n,{callee:e})},decode:function e(t,n){return uS(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await hS(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await pS(this,t,n,{callee:e})},safeEncode(e,t){return fS(this,e,t)},safeDecode(e,t){return mS(this,e,t)},async safeEncodeAsync(e,t){return gS(this,e,t)},async safeDecodeAsync(e,t){return bS(this,e,t)},toJSONSchema(e){return Zk(this,{})(e)},get description(){return Ak.get(this)?.description},get _def(){return this._zod.def}}),yS=/*@__PURE__*/fy("_ZodString",(e,t)=>{Qx.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OO(e,t,n,r)},/*@__PURE__*/ry({format:e=>XO(e).format??null,minLength:e=>XO(e).minimum??null,maxLength:e=>XO(e).maximum??null},{regex(...e){return this.check(function(e,t){return new Ax({check:"string_format",format:"regex",...Fv(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new zx({check:"string_format",format:"includes",...Fv(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Mx({check:"string_format",format:"starts_with",...Fv(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Ix({check:"string_format",format:"ends_with",...Fv(t),suffix:e})}(...e))},min(...e){return this.check(Vk(...e))},max(...e){return this.check(Qk(...e))},length(...e){return this.check(Bk(...e))},nonempty(...e){return this.check(Vk(1,...e))},lowercase(e){return this.check(function(e){return new Ex({check:"string_format",format:"lowercase",...Fv(e)})}(e))},uppercase(e){return this.check(function(e){return new Px({check:"string_format",format:"uppercase",...Fv(e)})}(e))},trim(){return this.check(/* @__PURE__ */Uk(e=>e.trim()))},normalize(...e){return this.check(function(e){/* @__PURE__ */
5
- return Uk(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(/* @__PURE__ */Uk(e=>e.toLowerCase()))},toUpperCase(){return this.check(/* @__PURE__ */Uk(e=>e.toUpperCase()))},slugify(){return this.check(/* @__PURE__ */Uk(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})),xS=/*@__PURE__*/fy("ZodString",(e,t)=>{Qx.init(e,t),yS.init(e,t)},{email(e){return this.check(function(e,t){return new NS({type:"string",format:"email",check:"string_format",abort:!1,...Fv(t)})}(0,e))},url(e){return this.check(function(e,t){return new TS({type:"string",format:"url",check:"string_format",abort:!1,...Fv(t)})}(0,e))},jwt(e){return this.check(function(e,t){return new US({type:"string",format:"jwt",check:"string_format",abort:!1,...Fv(t)})}(0,e))},emoji(e){return this.check(function(e,t){return new AS({type:"string",format:"emoji",check:"string_format",abort:!1,...Fv(t)})}(0,e))},guid(e){return this.check(function(e,t){return new _S({type:"string",format:"guid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},uuid(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},uuidv4(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Fv(t)})}(0,e))},uuidv6(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Fv(t)})}(0,e))},uuidv7(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Fv(t)})}(0,e))},nanoid(e){return this.check(function(e,t){return new ES({type:"string",format:"nanoid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cuid(e){return this.check(function(e,t){return new PS({type:"string",format:"cuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cuid2(e){return this.check(function(e,t){return new zS({type:"string",format:"cuid2",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ulid(e){return this.check(function(e,t){return new MS({type:"string",format:"ulid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},base64(e){return this.check(function(e,t){return new QS({type:"string",format:"base64",check:"string_format",abort:!1,...Fv(t)})}(0,e))},base64url(e){return this.check(function(e,t){return new VS({type:"string",format:"base64url",check:"string_format",abort:!1,...Fv(t)})}(0,e))},xid(e){return this.check(function(e,t){return new IS({type:"string",format:"xid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ksuid(e){return this.check(function(e,t){return new RS({type:"string",format:"ksuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ipv4(e){return this.check(function(e,t){return new jS({type:"string",format:"ipv4",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ipv6(e){return this.check(function(e,t){return new DS({type:"string",format:"ipv6",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cidrv4(e){return this.check(function(e,t){return new LS({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cidrv6(e){return this.check(function(e,t){return new FS({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Fv(t)})}(0,e))},e164(e){return this.check(function(e,t){return new BS({type:"string",format:"e164",check:"string_format",abort:!1,...Fv(t)})}(0,e))},datetime(e){return this.check(function(e,t){return new kS({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Fv(t)})}(0,e))},date(e){return this.check(function(e,t){return new OS({type:"string",format:"date",check:"string_format",...Fv(t)})}(0,e))},time(e){return this.check(function(e,t){return new SS({type:"string",format:"time",check:"string_format",precision:null,...Fv(t)})}(0,e))},duration(e){return this.check(function(e,t){return new CS({type:"string",format:"duration",check:"string_format",...Fv(t)})}(0,e))}}),wS=/*@__PURE__*/fy("ZodStringFormat",(e,t)=>{Vx.init(e,t),yS.init(e,t)}),kS=/*@__PURE__*/fy("ZodISODateTime",(e,t)=>{tw.init(e,t),wS.init(e,t)}),OS=/*@__PURE__*/fy("ZodISODate",(e,t)=>{nw.init(e,t),wS.init(e,t)}),SS=/*@__PURE__*/fy("ZodISOTime",(e,t)=>{rw.init(e,t),wS.init(e,t)}),CS=/*@__PURE__*/fy("ZodISODuration",(e,t)=>{iw.init(e,t),wS.init(e,t)}),NS=/*@__PURE__*/fy("ZodEmail",(e,t)=>{Wx.init(e,t),wS.init(e,t)}),_S=/*@__PURE__*/fy("ZodGUID",(e,t)=>{Bx.init(e,t),wS.init(e,t)}),$S=/*@__PURE__*/fy("ZodUUID",(e,t)=>{Ux.init(e,t),wS.init(e,t)}),TS=/*@__PURE__*/fy("ZodURL",(e,t)=>{Hx.init(e,t),wS.init(e,t)}),AS=/*@__PURE__*/fy("ZodEmoji",(e,t)=>{Zx.init(e,t),wS.init(e,t)}),ES=/*@__PURE__*/fy("ZodNanoID",(e,t)=>{Xx.init(e,t),wS.init(e,t)}),PS=/*@__PURE__*/fy("ZodCUID",(e,t)=>{Yx.init(e,t),wS.init(e,t)}),zS=/*@__PURE__*/fy("ZodCUID2",(e,t)=>{Gx.init(e,t),wS.init(e,t)}),MS=/*@__PURE__*/fy("ZodULID",(e,t)=>{Kx.init(e,t),wS.init(e,t)}),IS=/*@__PURE__*/fy("ZodXID",(e,t)=>{Jx.init(e,t),wS.init(e,t)}),RS=/*@__PURE__*/fy("ZodKSUID",(e,t)=>{ew.init(e,t),wS.init(e,t)}),jS=/*@__PURE__*/fy("ZodIPv4",(e,t)=>{aw.init(e,t),wS.init(e,t)}),DS=/*@__PURE__*/fy("ZodIPv6",(e,t)=>{sw.init(e,t),wS.init(e,t)}),LS=/*@__PURE__*/fy("ZodCIDRv4",(e,t)=>{lw.init(e,t),wS.init(e,t)}),FS=/*@__PURE__*/fy("ZodCIDRv6",(e,t)=>{cw.init(e,t),wS.init(e,t)}),QS=/*@__PURE__*/fy("ZodBase64",(e,t)=>{uw.init(e,t),wS.init(e,t)}),VS=/*@__PURE__*/fy("ZodBase64URL",(e,t)=>{pw.init(e,t),wS.init(e,t)}),BS=/*@__PURE__*/fy("ZodE164",(e,t)=>{fw.init(e,t),wS.init(e,t)}),US=/*@__PURE__*/fy("ZodJWT",(e,t)=>{mw.init(e,t),wS.init(e,t)}),WS=/*@__PURE__*/fy("ZodNumber",(e,t)=>{gw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SO(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ry({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=XO(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=XO(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=XO(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>XO(e).format??null},{gt(e,t){return this.check(Dk(e,t))},gte(e,t){return this.check(Lk(e,t))},min(e,t){return this.check(Lk(e,t))},lt(e,t){return this.check(Rk(e,t))},lte(e,t){return this.check(jk(e,t))},max(e,t){return this.check(jk(e,t))},int(e){return this.check(wC(e))},safe(e){return this.check(wC(e))},positive(e){return this.check(Dk(0,e))},nonnegative(e){return this.check(Lk(0,e))},negative(e){return this.check(Rk(0,e))},nonpositive(e){return this.check(jk(0,e))},multipleOf(e,t){return this.check(Fk(e,t))},step(e,t){return this.check(Fk(e,t))},finite(){return this}})),qS=/*@__PURE__*/fy("ZodNumberFormat",(e,t)=>{bw.init(e,t),WS.init(e,t)}),HS=/*@__PURE__*/fy("ZodBoolean",(e,t)=>{vw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CO(e,t,n,r)}),ZS=/*@__PURE__*/fy("ZodAny",(e,t)=>{yw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_O(e,t,n,r)}),XS=/*@__PURE__*/fy("ZodUnknown",(e,t)=>{xw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$O(e,t,n,r)}),YS=/*@__PURE__*/fy("ZodNever",(e,t)=>{ww.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NO(e,t,n,r)}),GS=/*@__PURE__*/fy("ZodArray",(e,t)=>{vC(),Ow.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zO(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Vk(e,t))},nonempty(e){return this.check(Vk(1,e))},max(e,t){return this.check(Qk(e,t))},length(e,t){return this.check(Bk(e,t))},unwrap(){return this.element}}),KS=/*@__PURE__*/fy("ZodObject",(e,t)=>{vC(),Nw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MO(e,t,n,r),function(e,t,n,r){const i=function(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){const e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return AC(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(zv(this._zod.def,{catchall:e}))},passthrough(){return this.clone(zv(this._zod.def,{catchall:SC()}))},loose(){return this.clone(zv(this._zod.def,{catchall:SC()}))},strict(){return this.clone(zv(this._zod.def,{catchall:function(e,t){return new YS({type:"never",...Fv(t)})}(0,e)}));var e},strip(){return this.clone(zv(this._zod.def,{catchall:void 0}))},extend(e){return function(e,t){if(!Rv(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=Tv(e);for(const e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Lv(e,zv(e._zod.def,{shape:Bv(e,t)}))}(this,e)},safeExtend(e){return function(e,t){if(!Rv(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Lv(e,zv(e._zod.def,{shape:Bv(e,t)}))}(this,e)},merge(e){return function(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};return Pv(n,e,Reflect.ownKeys(Tv(e))),Pv(n,t,Reflect.ownKeys(Tv(t))),Lv(e,zv(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return Pv(i,e,Vv(e,t)),Lv(e,zv(n,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(Vv(e,t)),a={};return Pv(a,e,Reflect.ownKeys(Tv(e)).filter(e=>!i.has(e))),Lv(e,zv(n,{shape:a,checks:[]}))}(this,e)},partial(...e){return Uv(oC,this,e[0])},exactPartial(...e){return Uv(sC,this,e[0],"exactPartial")},required(...e){return function(e,t,n){const r=n?new Set(Vv(t,n)):void 0,i={};return Pv(i,t,Reflect.ownKeys(Tv(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),Lv(t,zv(t._zod.def,{shape:i}))}(uC,this,e[0])}}),JS=/*@__PURE__*/fy("ZodUnion",(e,t)=>{_w.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IO(e,t,n,r),e.options=t.options}),eC=/*@__PURE__*/fy("ZodDiscriminatedUnion",(e,t)=>{JS.init(e,t),$w.init(e,t)}),tC=/*@__PURE__*/fy("ZodIntersection",(e,t)=>{Tw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RO(e,t,n,r)}),nC=/*@__PURE__*/fy("ZodRecord",(e,t)=>{vC(),Aw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DO(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),rC=/*@__PURE__*/fy("ZodEnum",(e,t)=>{Ew.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TO(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const i={};for(const a of e){if(!n.has(a))throw new Error(`Key ${a} not found in enum`);i[a]=t.entries[a]}return new rC({...t,checks:[],...Fv(r),entries:i})},e.exclude=(e,r)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new rC({...t,checks:[],...Fv(r),entries:i})}}),iC=/*@__PURE__*/fy("ZodLiteral",(e,t)=>{Pw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AO(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),aC=/*@__PURE__*/fy("ZodTransform",(e,t)=>{vC(),zw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PO(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new uy(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ey(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),"input"in t||(t.input=n.value),t.inst??(t.inst=e),n.issues.push(ey(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),oC=/*@__PURE__*/fy("ZodOptional",(e,t)=>{Mw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),sC=/*@__PURE__*/fy("ZodExactOptional",(e,t)=>{Iw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),lC=/*@__PURE__*/fy("ZodNullable",(e,t)=>{Rw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),cC=/*@__PURE__*/fy("ZodDefault",(e,t)=>{jw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),dC=/*@__PURE__*/fy("ZodPrefault",(e,t)=>{Dw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),uC=/*@__PURE__*/fy("ZodNonOptional",(e,t)=>{Lw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),hC=/*@__PURE__*/fy("ZodCatch",(e,t)=>{Fw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),pC=/*@__PURE__*/fy("ZodPipe",(e,t)=>{Qw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WO(e,t,n,r),e.in=t.in,e.out=t.out}),fC=/*@__PURE__*/fy("ZodReadonly",(e,t)=>{Vw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),mC=/*@__PURE__*/fy("ZodCustom",(e,t)=>{Bw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EO(e,t,n,r)})}),sE=X(()=>{rS()}),lE=X(()=>{rS(),oE(),iS(),gC(),bC(),sE(),nS(),zk(),py(),iS(),oE(),Ok(),Pk()}),cE=X(()=>{lE(),lE()}),dE=X(()=>{Pr(),cE(),RC=()=>globalThis.trustedTypes,DC=()=>"enforce"===jC,LC=e=>{try{return JSON.parse(e),!0}catch{return!1}},FC=e=>!e.includes("<"),QC=e=>{if(typeof location>"u")return!1;if(e.startsWith(`blob:${location.origin}/`))return!0;try{return new URL(e,location.href).origin===location.origin}catch{return!1}},BC=()=>{if(void 0!==VC)return VC;let e=RC();if(!e)return VC=null;if(VC=e.createPolicy("plitzi-html",{createHTML:e=>e}),!e.defaultPolicy)try{e.createPolicy("default",{createHTML:e=>"<script><\/script>"===e||FC(e)?e:null,createScript:e=>LC(e)?e:null,createScriptURL:e=>QC(e)?e:null})}catch{}return VC},UC=/* @__PURE__ */new Map,WC=e=>{let t=BC();if(!t)return e;let n=UC.get(e);if(n)return n;let r=t.createHTML(e);return UC.size<500&&UC.set(e,r),r},qC=()=>{if(typeof document>"u")return;let e=document.documentElement.dataset.plitziScriptPolicy;return"report-only"===e||"enforce"===e?e:void 0},HC=(e=qC())=>{typeof window<"u"&&(jC=e,Qe(!e&&void 0),e&&my({jitless:!0}),BC())}}),uE=X(()=>{dE(),ZC=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},XC=({id:e,frozen:t,children:n})=>{let[r]=$(()=>{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?ZC(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:WC(r.html)}}):n}}),hE=X(()=>{ee(),YC=Q("ComponentContext",{})}),pE=X(()=>{hE()}),fE=X(()=>{te(),GC="[A-Za-z_][A-Za-z0-9_]*",KC=RegExp(`^${GC}$`),RegExp(`^!?${GC}$`),JC=/* @__PURE__ */new Set(["__proto__","constructor","prototype"]),eN=e=>KC.test(e)&&!JC.has(e),tN=e=>V(e)&&"boolean"==typeof e.value&&(void 0===e.description||"string"==typeof e.description)&&Array.isArray(e.rules)&&e.rules.every(e=>V(e)&&"boolean"==typeof e.value&&V(e.when))}),mE=X(()=>{fE(),nN=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},rN=e=>Object.entries(e).filter(([e])=>eN(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","),iN=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},aN=(e,t)=>{let n=nN(e),r=rN(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}}}),gE=X(()=>{fE(),Ml(),mE()}),bE=X(()=>{ee(),oN=Q("PluginsContext",{plugins:{},registerCustomAssets:()=>{},unregisterCustomAssets:()=>{}})}),vE=X(()=>{ee(),sN=Q("PluginAssetsContext",{assets:{}})}),yE=X(()=>{ee(),lN=Q("ElementRegistryContext",void 0)}),xE=X(()=>{bE(),vE(),yE()}),wE=X(()=>{UF(),wv(),uE(),Nr(),$o(),pE(),gE(),xE(),cN=typeof window>"u",dN=()=>()=>{},uN=()=>!0,hN=()=>!1,pN=(e,{components:t,plugins:n})=>e.split("|").map(e=>""===e?"":`${e in t.current?"c":""}${e in n?"p":""}`).join("|"),fN=e=>{if(e)return e.get();let{components:t,componentDefinitions:n}=m(YC);return{components:t,componentDefinitions:n,plugins:m(oN).plugins}},mN=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),gN=(e,t,n,r,i)=>{let a=t.current[e.type],o=e.loadStrategy??a?.definition.loadStrategy??"eager";return!n||"eager"===o||r||"lazy"===o&&i},bN=e=>e?`${e.type}:${e.rootId}:${e.slots.join(",")}`:"",vN=/* @__PURE__ */new WeakMap,yN=(e,t,n,r)=>{let i=vN.get(e);if(i&&i.id===t&&i.rootId===n&&i.plitziElementLayout===r)return i;let a={id:t,rootId:n,plitziElementLayout:r};return vN.set(e,a),a},xN=({items:e,itemElements:t,flags:n,plitziElementLayout:r,children:a,previewMode:o,rscEnabled:s,mounted:l,layoutKeyIdentifier:c,isSlot:d,layoutBody:u,registered:p,installed:f})=>{let m=(e??[]).map((e,n)=>({itemId:e,el:t[n]})).filter(e=>{let{el:t}=e;if(!t||!tl(t.definition.flag,n))return!1;if(!o||!s)return!0;let r=t.definition.runtime??"shared";return!(!l&&"client"===r)}).map(({itemId:e,el:t})=>{let{rootId:n,type:i,runtime:a}=t.definition,d=r?r.rootId:n,u=i in p.current||!!KD({type:i,plugins:f}),h=JD({key:!o&&r?`${e}_${c}`:e,type:i,internalProps:yN(t,e,d,r),components:p.current,plugins:f});return s&&"server"===a&&!cN&&o?/* @__PURE__ */z(XC,{id:e,frozen:!(l&&u),children:h},e):h});if(d&&m.push(/* @__PURE__ */z(i,{children:u},"#layout-body")),Array.isArray(a)?m.push(...a.filter(h)):h(a)&&m.push(/* @__PURE__ */z(i,{children:a},"#children")),e)return 1===m.length?m[0]:m},wN=cN?({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:a,previewMode:o,visible:s=!0})=>{let{items:l}=r,c=m(lN),{components:d,componentDefinitions:u,plugins:h}=fN(!0===o?c:void 0),p=i?.slots.includes(e)??!1,f=Fb(p?e:void 0);if((i||a||l?.length)&&gN(r,u,o,s,s))return xN({items:l,itemElements:(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),flags:n,plitziElementLayout:i,children:a,previewMode:o,rscEnabled:!0===t.getPath("rsc.enabled"),mounted:!1,layoutKeyIdentifier:bN(i),isSlot:p,layoutBody:f,registered:d,installed:h})}:({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:a,previewMode:o,visible:s=!0})=>{let{items:l}=r,c=(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),d=_(c);mN(d.current,c)||(d.current=c);let u=d.current,h=!0===t.getPath("rsc.enabled"),p=m(lN),f=!0===o?p:void 0,g=void 0!==f,b=u.map(e=>e?.definition.type??"").join("|"),v=()=>f?pN(b,f.get()):"",y=T(f?f.subscribe:dN,v,v),{components:x,componentDefinitions:w,plugins:k}=fN(f),O=i||a||l?.length,S=_(!1);s&&(S.current=!0);let N=gN(r,w,o,s,S.current),$=bN(i),A=!0===o&&h&&u.some(e=>"client"===e?.definition.runtime||"server"===e?.definition.runtime),E=T(dN,A?uN:hN,hN),P=i?.slots.includes(e)??!1,z=Fb(P?e:void 0),M=_({components:x,plugins:k});return M.current={components:x,plugins:k},C(()=>{if(!O||!N)return;let{components:e,plugins:t}=M.current;return xN({items:l,itemElements:u,flags:n,plitziElementLayout:i,children:a,previewMode:o,rscEnabled:h,mounted:E,layoutKeyIdentifier:$,isSlot:P,layoutBody:z,registered:e,installed:t})},[O,N,l,n,i,a,u,o,h,E,$,g?y:x,g?y:k,P,z])},kN={},ON=()=>{let e=kn(),[t=kN]=Dn("runtime.sources.flags",{store:e});return{store:e,flags:t}}}),kE=X(()=>{SN={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},CN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),NN=(e,t)=>({type:t.builderType??SN[t.type],label:t.label??CN(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??CN(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),_N=/* @__PURE__ */new WeakMap,$N=e=>{let t=_N.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,NN(e,t)])),_N.set(e,t)),t},TN=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:$N(t.params),...r}),AN=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,TN(r,e[r],t[r],n[r]??{})]))}),OE=X(()=>{EN=()=>e=>e,PN=(e,t)=>({type:e,bindings:{},initialState:{visibility:!0},...t,styleSelectors:{base:"",...t.styleSelectors}}),zN=()=>e=>{let{definition:t,builder:n,market:r,defaultStyle:i,settings:a}=e.content;return{...e,content:{...e.content,definition:PN(e.type,t),builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[],...n},market:{owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",...r},defaultStyle:{name:t.label,displayMode:"desktop",...i},settings:a??{}}}}}),SE=X(()=>{Sh(),MN={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...Ud]},IN={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:MN}},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:MN}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...Wd]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...Wd]},behavior:MN}}},RN={focus:{title:"Focus",type:"callback",strictParams:!0,params:{}}},jN={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"}}},...IN,...RN}}),CE=X(()=>{DN=["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"],LN=["success","danger","warning","info"],QN={addNotification:{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:(FN={placement:"top-right",appearance:"success",autoDismiss:!0,autoDismissTimeout:5e3}).placement,options:[...DN]},appearance:{type:"select",description:"Visual style of the notification: success, danger, warning or info.",default:FN.appearance,options:[...LN]},autoDismiss:{type:"boolean",description:"Whether the notification dismisses itself after a timeout.",default:FN.autoDismiss,canBind:!1},autoDismissTimeout:{type:"number",description:"Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",default:FN.autoDismissTimeout,when:e=>!0===e.autoDismiss}}}}}),NE=X(()=>{kE(),OE(),SE(),CE()}),_E=X(()=>{NE(),VN=zN()({type:"blockHtml",content:{attributes:{content:""},definition:{label:"HTML Block",description:"Renders an arbitrary raw HTML string as a block. Escape hatch when no structured element fits."},market:{category:"advanced",icon:"fa-brands fa-html5"},defaultStyle:{style:{base:{default:{}}}}}})}),$E=X(()=>{NE(),BN=zN()({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",description:"A compiled JSX block for advanced authoring."},market:{category:"advanced",icon:"fa-solid fa-code"},defaultStyle:{style:{base:{default:{}}}}}})}),TE=X(()=>{NE(),UN=zN()({type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,assets:"",scriptUrl:""},definition:{label:"Custom",description:"A custom element slot whose behaviour is supplied by a host/plugin component."},market:{category:"advanced",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}}}})}),AE=X(()=>{NE(),WN=zN()({type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",description:"A single raw HTML tag with custom attributes.",items:[]},market:{category:"advanced",icon:"fa-brands fa-html5"},defaultStyle:{style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}}}})}),EE=X(()=>{NE(),qN=zN()({type:"plitziSdk",content:{attributes:{spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",description:"Another space drawn inside this one, as a widget — its home page, no router of its own: by its key, or from its documents (`offlineData`), bound to UI generated on the fly."},market:{category:"advanced",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{}}}}}})}),PE=X(()=>{NE(),HN=zN()({type:"reference",content:{attributes:{referenceType:"element",referenceId:""},definition:{label:"Reference",description:"Places one of the components of the space, or renders another of its elements by id, in place.",items:[]},market:{category:"advanced",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",style:{base:{default:{}}}}}})}),zE=X(()=>{NE(),ZN={"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-family":"inherit","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"},XN=zN()({type:"button",contentAttributes:["content"],attributeValues:{subType:EN()(["button","submit","reset"]),contentPlacement:EN()(["before","after"]),iconPlacement:EN()(["before","after"])},content:{placeholders:["content"],attributes:{contentPlacement:"after",content:"Button",icon:"",iconPlacement:"before",subType:"button",disabled:!1},definition:{label:"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:[],styleSelectors:{icon:""}},market:{category:"basic",icon:"fa-solid fa-hand-pointer"},defaultStyle:{style:{base:{default:ZN}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:ZN}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:ZN}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:ZN}}}}}}})}),ME=X(()=>{NE(),YN=zN()({type:"dropdown",attributeValues:{popupPlacement:EN()(["left","right","top","bottom"]),popupWidth:EN()(["content","trigger"])},callbacks:{openDropdown:{action:"openDropdown",title:"Open Dropdown",type:"callback",params:{},preview:{}},closeDropdown:{action:"closeDropdown",title:"Close Dropdown",type:"callback",params:{},preview:{}},toggleDropdown:{action:"toggleDropdown",title:"Toggle Dropdown",type:"callback",params:{},preview:{}}},marks:{"aria-expanded":"on its trigger while the popup is open — what a class’s `expanded` state lights",".popup-container--no-visible":"on its dropdownPopup while closed","the popup":'drawn at the space’s root, `position: fixed` where the dropdown places it — a class on the popup sets its look, never its position (top, left, position, inset, transform); `popupWidth: "trigger"` makes it as wide as the trigger'},content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,popupWidth:"content",disabled:!1},definition:{label:"Dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],styleSelectors:{backgroundContainer:""}},market:{category:"basic",icon:"fa-solid fa-angle-down"},defaultStyle:{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}}}}},initialItems:["dropdownPopup"]})}),IE=X(()=>{NE(),GN=zN()({type:"dropdownPopup",ancestorType:"dropdown",content:{attributes:{},definition:{label:"Dropdown Popup",description:"The floating panel revealed by a dropdown.",items:[],initialState:{}},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1},market:{category:"basic",icon:"fa-regular fa-window-restore"},defaultStyle:{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:{}}},initialItems:[]})}),RE=X(()=>{NE(),KN=zN()({type:"heading",contentAttributes:["content"],attributeValues:{subType:EN()(["h1","h2","h3","h4","h5","h6"])},content:{placeholders:["content"],attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy."},market:{category:"basic",icon:"fa-solid fa-heading"},defaultStyle:{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"}}}}}}}})}),jE=X(()=>{NE(),JN=zN()({type:"link",contentAttributes:["content","href","label"],attributeValues:{mode:EN()(["page","internal","external"]),target:EN()(["self","blank","parent","top"]),contentPlacement:EN()(["before","after"]),iconPlacement:EN()(["before","after"]),current:EN()(["page","section"])},content:{attributes:{href:"#",target:"self",mode:"page",hash:"",label:"",content:"",contentPlacement:"after",icon:"",iconPlacement:"before",current:"page"},definition:{label:"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:[],styleSelectors:{icon:""}},builder:{itemsNotAllowed:["link"]},market:{category:"basic",icon:"fa-solid fa-link"},defaultStyle:{style:{base:{default:{display:"inline-block",color:"inherit","text-decoration":"none",cursor:"pointer"}}}}}})}),DE=X(()=>{NE(),e_=zN()({type:"markdown",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Markdown",headingLinks:!0},definition:{label:"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.",styleSelectors:{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:""}},market:{category:"basic",icon:"fa-brands fa-markdown"},defaultStyle:{style:{base:{default:{}}}}}})}),LE=X(()=>{NE(),t_=zN()({type:"paragraph",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Paragraph"},definition:{label:"Paragraph",description:"A block of body text (a <p>). Use for longer prose passages."},market:{category:"basic",icon:"fa-solid fa-paragraph"},defaultStyle:{style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}}}})}),FE=X(()=>{NE(),n_=zN()({type:"richText",contentAttributes:["content"],attributeValues:{format:EN()(["html","markdown","text"])},content:{attributes:{content:"",format:"html",mediaBaseUrl:""},definition:{label:"Rich Text",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:[],styleSelectors:{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:""}},market:{category:"basic",icon:"fa-solid fa-file-lines"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),QE=X(()=>{NE(),r_=zN()({type:"text",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Text"},definition:{label:"Text",description:"Inline plain-text content. Use for short runs of copy; bind its content to data for dynamic text."},market:{category:"basic",icon:"fa-solid fa-align-left"},defaultStyle:{style:{base:{default:{display:"inline"}}}}}})}),VE=X(()=>{NE(),i_={"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"},a_=zN()({type:"themeToggle",contentAttributes:["lightLabel","darkLabel","systemLabel"],attributeValues:{subType:EN()(["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",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:[],styleSelectors:{icon:"",option:""}},market:{category:"basic",icon:"fa-solid fa-circle-half-stroke"},defaultStyle:{style:{base:{default:i_},icon:{default:{}},option:{default:{...i_,"row-gap":"4px","column-gap":"4px"}}},subTypes:{}}}})}),BE=X(()=>{NE(),o_=zN()({type:"form",attributeValues:{method:EN()(["get","post"])},sourceType:"apiContainer",publishes:{values:"Each field's value, by its name",errors:"Each field's error, by its name — none while it is valid",submitted:"Whether a submit was tried — valid or not — since the form was shown or reset: what shows an error only after a submit, or hides a field's hint once one was tried (no `touched`: a field's own error shows once the field is left)"},triggers:{onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:{},actionUrl:"",method:""}},onInvalid:{action:"onInvalid",title:"On Form Refused",type:"trigger",params:{},preview:{errors:{},values:{}}}},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",description:"A <form> that groups form controls and handles submission; wire its submit through an interaction flow. Left as it is, the browser answers first for a blank required field and a malformed address, in a bubble no style reaches and in the browser's language; `noValidate: true` turns its checks off, and every rule answers under its control in the words of its `…Message` (`requiredMessage`).",items:[]},market:{category:"form",icon:"fa-solid fa-rectangle-list"},defaultStyle:{style:{base:{default:{}}}}}})}),UE=X(()=>{s_=["username","current-password","new-password","one-time-code","email","name","given-name","family-name","organization","tel","street-address","postal-code","country","url"],l_=(e,t,n)=>n&&!1!==e?!0===e?"password"===t?"current-password":"on":e:"off"}),WE=X(()=>{c_=["text","number","email","password","search","url","tel","date","time","checkbox","switch","select","textarea","hidden","color","file"],d_=["text","number","email","password","search","url","tel","date","time","color"],u_=["text","textarea","number","email","password","search","url","tel"],h_={text:"Text",number:"Number",date:"Date",time:"Time",email:"Email",search:"Search",url:"URL",tel:"Phone",password:"Password",select:"Select",checkbox:"Checkbox",switch:"Switch",textarea:"Long Text",hidden:"Hidden",color:"Color",file:"File"},p_=["checkbox","switch"]}),qE=X(()=>{UE(),WE(),NE(),f_={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"},m_={...f_,"line-height":"20px"},g_={display:"flex",cursor:"pointer","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},b_={...g_,"margin-bottom":"4px"},v_={display:"block",color:"red","margin-top":"4px"},y_={color:"red","margin-left":"4px"},x_={"border-top-style":"none","border-right-style":"none","border-bottom-style":"none","border-left-style":"none"},w_={height:"100%",width:"100%","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","padding-left":"0px",display:"block",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","box-shadow":"none"},k_={height:"100%",width:"100%","padding-right":"calc(1.15em + 8px)",display:"block",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit",appearance:"none",cursor:"inherit","box-shadow":"none"},O_={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",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","font-weight":"inherit",cursor:"pointer"},S_={...f_,cursor:"pointer"},C_={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"},N_=(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:b_},requiredMark:{default:y_},error:{default:v_}}}),__={field:w_},$_=zN()({type:"formControl",contentAttributes:["label","placeholder","options","requiredMessage","minLengthMessage","maxLengthMessage","minMessage","maxMessage","formatMessage","patternMessage","matchesMessage"],attributeValues:{subType:c_,autoComplete:s_},triggers:{onChange:{action:"onChange",title:"On Change",type:"trigger",params:{},preview:{value:"",name:""}}},content:{placeholders:["label"],attributes:{subType:"text",name:"",label:"Label",hideLabel:!1,placeholder:"",accept:"",defaultValue:"",autoComplete:!0,autoFocus:!1,disabled:!1,options:[],required:!1,requiredMessage:"",minLength:0,minLengthMessage:"",maxLength:0,maxLengthMessage:"",min:"",minMessage:"",max:"",maxMessage:"",step:"",formatMessage:"",pattern:"",patternMessage:"",matches:"",matchesMessage:"",readOnly:!1},definition:{label:"Form Control",description:"A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. Optional unless `required: true`, as an HTML field is: a `requiredMessage` alone requires nothing. A `number` field takes `min` and `max` (each said by its `minMessage`/`maxMessage` when broken) and `step`, written as numbers are — `'2'`; `''` for none. A `file` field holds the `File` picked; a `webHook` whose body holds it sends it as multipart, under its `name`, and `accept` says what the picker offers — `'image/png,image/jpeg'`. 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 box is ringed (`2px solid currentColor`) while the field inside has keyboard focus: restyle it with a `focus-within` state on the `input` slot — the box never takes `focus` itself. 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`.",styleSelectors:{label:"",requiredMark:"",input:"",field:"",icon:"",error:""}},builder:{canSnippet:!1},market:{category:"form",icon:"fa-solid fa-i-cursor"},defaultStyle:{style:{base:{default:{}}},subTypes:{hidden:N_("Form Control Hidden",{}),text:N_("Form Control Text",m_,__),number:N_("Form Control Number",m_,__),email:N_("Form Control Email",m_,__),password:N_("Form Control Password",m_,{...__,icon:O_}),search:N_("Form Control Search",m_,__),url:N_("Form Control URL",m_,__),tel:N_("Form Control Phone",m_,__),date:N_("Form Control Date",m_,__),time:N_("Form Control Time",m_,__),color:N_("Form Control Color",m_,__),file:N_("Form Control File",m_,__),textarea:N_("Form Control Textarea",{...m_,color:"inherit","font-family":"inherit",resize:"vertical"}),select:N_("Form Control Select",S_,{field:k_}),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:g_},requiredMark:{default:y_},error:{default:v_}}},switch:{name:"Form Control Switch",displayMode:"desktop",style:{base:{default:{}},input:{default:C_},label:{default:{...g_,"align-items":"center"}},requiredMark:{default:y_},error:{default:v_}}}}}}})}),HE=X(()=>{NE(),T_=zN()({type:"layoutContainer",attributeValues:{subType:EN()(["div","header","footer","nav","main","section","article","aside","address","figure"])},content:{attributes:{subType:"div"},definition:{label:"Layout Container",description:"A reusable layout shell (header/footer chrome) shared across pages.",items:[]},builder:{canDragDrop:!1},market:{category:"internal",icon:"fa-solid fa-border-all"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),ZE=X(()=>{NE(),A_=zN()({type:"loading",content:{attributes:{},definition:{label:"Loading",description:"A loading placeholder shown while data or a suspense boundary resolves."},builder:{canDragDrop:!1},market:{category:"internal",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{}}}}}})}),XE=X(()=>{NE(),E_=zN()({type:"notFound",content:{attributes:{},definition:{label:"Not Found",description:"The 404 screen shown when no route matches."},builder:{canDragDrop:!1},market:{category:"internal",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}}}})}),YE=X(()=>{vv(),NE(),P_=["locked","noBounce"],z_=zN()({type:"page",contentAttributes:["seoPageTitle","seoPageDescription"],serverTemplates:["seoPageTitle","seoPageDescription","seoImage","seoImageAlt","notFound"],attributeValues:{documentScroll:P_,seoType:Rg},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",description:"The root of a routable screen. Managed through the page ops (upsertPage/deletePage), not added as a child element.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1},market:{category:"internal",icon:"fas fa-file"},defaultStyle:{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"}}}}}})}),GE=X(()=>{NE(),M_={fill:"currentColor","font-size":"12px","font-family":"inherit"},I_=zN()({type:"chart",contentAttributes:["label","emptyText"],attributeValues:{kind:EN()(["bar","line","area","donut"]),format:EN()(["number","percent","compact"])},content:{attributes:{kind:"bar",labelField:"label",valueField:"value",series:"",titleField:"",sync:"",label:"",format:"number",showValues:!1,height:240,emptyText:"No data yet"},definition:{label:"Chart",description:"Draws rows as bars, a line, a filled line or a donut — SVG of its own, nothing to load. Bind its `items` to the rows, as a list is (`bindTemplate('items', source, '{{ … }}', { returns: 'value' })`): records read by `labelField` and `valueField`, or plain numbers. It takes its box’s width and its `height`, and the colour of the text around it — its parts (`bar`, `line`, `area`, `point`, `slice`, `grid`, `axisLabel`, `valueLabel`) restyle it. Name it with `label`: a screen reader reads that, and the rows as a table drawn with it. Several values a row — a line per server, a bar per plan — are `series: [{ field, label }]`: each in a colour of its own (`--plitzi-chart-series-1` to `-8`, a step for light and one for dark), with a legend of each one's last and highest value. Pointed at or moved through with the arrow keys, it reads every series at that row (`tooltip`).",items:[],styleSelectors:{bar:"",line:"",area:"",point:"",slice:"",hole:"",grid:"",axisLabel:"",valueLabel:"",legend:"",tooltip:"",empty:""}},market:{category:"media",icon:"fa-solid fa-chart-column"},defaultStyle:{name:"Chart",style:{base:{default:{display:"block",position:"relative",width:"100%",margin:"0px"}},bar:{default:{fill:"currentColor"}},line:{default:{fill:"none",stroke:"currentColor","stroke-width":"2.5px"}},area:{default:{fill:"currentColor","fill-opacity":"0.15"}},point:{default:{fill:"currentColor"}},slice:{default:{fill:"currentColor"}},hole:{default:{fill:"var(--plitzi-chart-hole, transparent)"}},grid:{default:{stroke:"currentColor","stroke-opacity":"0.15","stroke-width":"1px"}},axisLabel:{default:{...M_,"fill-opacity":"0.7"}},valueLabel:{default:M_},legend:{default:{display:"flex","flex-wrap":"wrap","column-gap":"16px","row-gap":"4px","list-style-type":"none","padding-left":"0px","margin-top":"8px","font-size":"12px"}},empty:{default:{"font-size":"14px",opacity:"0.7"}}}}}})}),KE=X(()=>{NE(),R_=zN()({type:"embed",contentAttributes:["src","title"],content:{attributes:{src:"",title:"",loading:"lazy"},definition:{label:"Embed",description:"Another page inside this one — a map, a video player, a form — in a frame."},market:{category:"media",icon:"fa-solid fa-window-maximize"},defaultStyle:{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"}}}}}})}),JE=X(()=>{NE(),j_=zN()({type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",description:"Renders a Font Awesome icon by its icon name."},market:{category:"media",icon:"fa-solid fa-font-awesome"},defaultStyle:{style:{base:{default:{display:"inline-block","font-size":"16px"}}}}}})}),eP=X(()=>{NE(),D_=zN()({type:"image",contentAttributes:["src","alt"],attributeValues:{fetchPriority:EN()(["high","low","auto"]),loadMode:EN()(["auto","eager","lazy"])},content:{attributes:{src:"",alt:"",decorative:!1,fetchPriority:"auto",loadMode:"auto"},definition:{label:"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."},market:{category:"media",icon:"fa-solid fa-image"},defaultStyle:{style:{base:{default:{display:"block",width:"140px",height:"auto","max-width":"100%"}}}}}})}),tP=X(()=>{NE(),L_=zN()({type:"svg",contentAttributes:["label"],content:{attributes:{content:"",label:""},definition:{label:"SVG",description:"A drawing written as SVG markup, coloured by its class."},market:{category:"media",icon:"fa-solid fa-bezier-curve"},defaultStyle:{name:"Svg",style:{base:{default:{display:"inline-flex",width:"24px",height:"24px"}}}}}})}),nP=X(()=>{NE(),F_=zN()({type:"video",contentAttributes:["src"],content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",description:"Embeds a video from a URL."},market:{category:"media",icon:"fa-solid fa-video"},defaultStyle:{style:{base:{default:{display:"block",width:"400px",height:"250px"}}}}}})}),rP=X(()=>{NE(),Q_=zN()({type:"apiContainer",attributeValues:{subType:EN()(["","div","header","footer","nav","main","section","article","aside","address","figure"]),method:EN()(["get","post","put","delete","patch"]),credentials:EN()(["include","omit","same-origin"]),pagination:EN()(["none","url","append"])},sourceType:"apiContainer",publishes:{"…":"The answer's own fields, as the service sends them",records:"The rows of a paged answer, every page loaded so far",isLoading:"Whether an answer (or a next page) is on its way",isEmpty:"Whether the answer holds nothing",hasError:"Whether the service could not be reached",errorMessage:"What to tell the visitor when it could not",isStale:"A refresh from the server failed: what shows is from before"},serverTemplates:["notFound"],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",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. `when` (a rule group over sources — `auth.isAuthenticated`, `roomData.room.closed != true`) makes it wait: it asks nothing until the rules hold — the page server holds a server one too, so a page that has nothing to ask for (a closed room, a guest) asks nothing, in either runtime. An `action` or a `connector` is resolved only by the page server: a provider naming one needs `runtime: "server"` — in the browser it never asks; a browser flow that changes data calls the action with the `runServerAction` step, then `performQuery` or `invalidateQueries` reads it again. `onApiSuccess` and `onApiError` say `url`, `method`, `status` and `data` (the answer) to their flow. 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:[]},market:{category:"provider",icon:"fa-solid fa-server"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),iP=X(()=>{NE(),V_=zN()({type:"channel",attributeValues:{subType:EN()(["","div","section","aside","main"])},sourceType:"channel",publishes:{connected:"Whether the channel is connected now",me:"This visitor's own member id",members:"Who is on the channel now",messages:"What was said on it since the page opened",last:"The last of them, or null",retained:"What the channel keeps for whoever joins"},triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:"",echo:!1,replayed:!1}},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"},echo:{label:"Heard on this page too",defaultValue:!1,type:"boolean"}}},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",description:"A realtime channel: every OTHER page on the same `topic` hears what one publishes, within milliseconds — the page that sent it too with `echo` (its `from` is then the `me` of the channel). Hidden, it stays joined and runs its flows — its `loadStrategy` defers only its children: to leave the topic while hidden, put it inside a container that carries the condition and `loadStrategy: 'visible'`. 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`), `last` and — on a `retain: true` channel — `retained`, the latest data the server said of each type, there as the page joins (`retained.lists`). 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, echo })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[]},market:{category:"provider",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),aP=X(()=>{NE(),B_=zN()({type:"carouselTrack",ancestorType:"carousel",content:{attributes:{},definition:{label:"Carousel Track",description:"Where a carousel shows its slides: what is inside is one slide, rendered once per item.",items:[]},builder:{canSnippet:!1},market:{category:"structure",icon:"fa-solid fa-film"},defaultStyle:{style:{base:{default:{position:"relative",overflow:"hidden"}}}}}})}),oP=X(()=>{NE(),U_={type:"select",label:"How far",defaultValue:"slide",options:[{label:"One slide",value:"slide"},{label:"A page — as many as it shows",value:"page"}]},W_=zN()({type:"carousel",contentAttributes:["label"],sourceType:"carousel",publishes:{items:"Every item it shows, one slide each",count:"How many items it has",index:"The slide it stands at, from 0 (a `scroll` row: the first in view)",item:"The item of that slide",playing:"Whether it moves on by itself now (autoplay, not paused)",atStart:"At its first slide — a `scroll` row at the start of its box; one that loops never is",atEnd:"At its last — a `scroll` row at the end of its box, however many it shows; one that loops never is",shown:"How many slides it shows whole (1 but for a `scroll` row)"},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:{by:U_},preview:{}},previous:{action:"previous",title:"Previous Slide",type:"callback",params:{by:U_},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",description:"Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.",items:[]},market:{category:"structure",icon:"fa-solid fa-images"},defaultStyle:{style:{base:{default:{position:"relative"}}}}},initialItems:["carouselTrack"]})}),sP=X(()=>{NE(),q_=["div","header","footer","nav","main","section","article","aside","figure"],H_=zN()({type:"container",attributeValues:{subType:EN()(["div","header","footer","nav","main","section","article","aside","address","figure","dl","dt","dd","li","h1","h2","h3","h4","h5","h6","p","span","details","summary"]),live:EN()(["","polite","assertive"])},content:{attributes:{subType:"div"},definition:{label:"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:[]},market:{category:"structure",icon:"fa-solid fa-crop-simple"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),lP=X(()=>{NE(),Z_={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"}},X_={"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"},Y_=zN()({type:"dialogContainer",contentAttributes:["headerLabel","acceptButtonLabel","rejectButtonLabel"],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",description:"A native <dialog> container shown or hidden through interactions (e.g. an onClick open/close).",items:[],loadStrategy:"lazy",styleSelectors:{backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""}},market:{category:"structure",icon:"fa-regular fa-message"},defaultStyle:{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":"rgb(0 0 0 / 50%)"}},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:Z_,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:X_},cancelButton:{default:{...X_,"margin-left":"12px"}}},subTypes:{}}},initialItems:["container"]})}),cP=X(()=>{NE(),G_=zN()({type:"focusGroup",attributeValues:{subType:EN()(["div","nav","section"])},content:{attributes:{subType:"div"},definition:{label:"Focus Group",description:"A box whose controls the arrow keys move through: up and down between them, left and right to the first of the next or previous list, down from a text field inside into them. For a search palette, a menu, a set of options — what someone goes through with the keyboard, which Tab alone took a stop at a time.",items:[]},market:{category:"structure",icon:"fa-solid fa-arrows-up-down"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),dP=X(()=>{NE(),K_=zN()({type:"list",attributeValues:{subType:EN()(["ul","ol"]),source:EN()(["none","controlled"])},sourceType:"list",publishes:{items:"Every row it draws, as its items give them",item:"Inside a row: that row's item",index:"Inside a row: its place, from 0"},content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"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:[]},market:{category:"structure",icon:"fa-solid fa-list"},defaultStyle:{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"}}}}}}},initialItems:["listItem","listItem","listItem"]})}),uP=X(()=>{NE(),J_=zN()({type:"listItem",content:{attributes:{},definition:{label:"List Item",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:[]},builder:{itemsNotAllowed:["listItem"]},market:{category:"structure",icon:"fa-solid fa-grip-lines"},defaultStyle:{style:{base:{default:{}}}}}})}),hP=X(()=>{NE(),e$=zN()({type:"modalContainer",contentAttributes:["title"],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:{placeholders:["title"],attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",description:"A modal overlay container opened and closed through interactions; use for dialogs over the page. The element itself is fixed over the whole viewport, and holds two layers side by side — neither inside the other: `backgroundContainer`, the dim layer, `rgb(0 0 0 / 50%)` (its `background-color` is the whole dim), and `rootContainer`, the dialog, centred by `top: 50%`, `left: 50%` and `transform: translate3d(-50%, -50%, 0)` — to sit it near the top, set `top` and `transform: translateX(-50%)`; flex alignment on the dim layer moves nothing. Inside the dialog, top to bottom: `headerContainer` (with `headerTitle` and `headerCloseButton`) and `bodyContainer`.",items:[],loadStrategy:"lazy",styleSelectors:{backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""}},market:{category:"structure",icon:"fa-regular fa-clone"},defaultStyle:{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":"rgb(0 0 0 / 50%)"}},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:{}}},initialItems:["container"]})}),pP=X(()=>{NE(),t$=zN()({type:"pagination",contentAttributes:["previousLabel","nextLabel","loadMoreLabel"],attributeValues:{mode:EN()(["pages","loadMore"]),target:EN()(["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",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:[],styleSelectors:{previous:"",page:"",next:"",loadMore:""}},market:{category:"structure",icon:"fa-solid fa-ellipsis"},defaultStyle:{style:{base:{default:{display:"flex","align-items":"center","row-gap":"8px","column-gap":"8px"}}},subTypes:{}}}})}),fP=X(()=>{NE(),n$=zN()({type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[]},builder:{itemsAllowed:["tabContainerHeader","tabContainerBody"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerHeader","tabContainerBody"]})}),mP=X(()=>{NE(),r$=zN()({type:"tabContainerBody",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Body",description:"The panel area inside a tabContainer that shows the active tab item.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]})}),gP=X(()=>{NE(),i$=zN()({type:"tabContainerHeader",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Header",description:"The row of tab triggers inside a tabContainer.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]})}),bP=X(()=>{NE(),a$=zN()({type:"tabContainerItem",marks:{'role="tab"':'in the header, with `aria-controls` its panel; in the body it is `role="tabpanel"`, `hidden` while not on show',"aria-selected":"on the open tab — what a class’s `current` state lights (`states: { current: { … } }`); `active` is the press, never the open tab",".active":"on the open tab too, the class the component adds",tabindex:"roving: 0 on the open tab, -1 on the rest — the arrow keys move between them"},content:{attributes:{hash:""},definition:{label:"Tab Container Item",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[]},builder:{itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",icon:"fa-regular fa-folder"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),vP=X(()=>{o$={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:{}},onView:{action:"onView",title:"On View",type:"trigger",preview:{inView:""},params:{margin:{canBind:!1,defaultValue:0,type:"number",label:"Fire this many pixels before it shows"}}},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:{}}},s$=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"]}),yP=X(()=>{Xu(),l$={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"]},c$=/<(\/?)([a-zA-Z][a-zA-Z0-9]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g,d$=/\sclass\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+)/i,u$=/^["']|["']$/g,h$=/\s*\/$/,p$=(e,t)=>{let n=d$.exec(e);if(n){let r=n[1].replace(u$,"");return e.replace(d$,` class="${_c(r,t)}"`)}let r=h$.exec(e)?.[0]??"";return`${e.slice(0,e.length-r.length)} class="${t}"${r}`},f$=(e,t)=>{if(!Object.values(t).some(Boolean))return e;let n=0;return e.replace(c$,(e,r,i,a)=>{let o=i.toLowerCase();if("pre"===o&&(n=Math.max(n+(r?-1:1),0)),r||"code"===o&&n>0)return e;let s=_c((l$[o]??[]).map(e=>t[e]));return s?`<${i}${p$(a,s)}>`:e})}}),xP=X(()=>{m$=/<\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>/gi,g$=/<\s*\/?\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>/gi,b$=/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,v$=/\s(href|src|xlink:href)\s*=\s*(?:"\s*(?:javascript|data|vbscript)\s*:[^"]*"|'\s*(?:javascript|data|vbscript)\s*:[^']*'|(?:javascript|data|vbscript)\s*:[^\s>]*)/gi,y$=e=>e.replace(m$,"").replace(g$,"").replace(b$,"").replace(v$,""),x$=(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}"`)}}),wP=X(()=>{xP(),w$=/<\s*foreignObject\b[\s\S]*?<\s*\/\s*foreignObject\s*>|<\s*\/?\s*foreignObject\b[^>]*>/gi,k$=/\s(to|from|values|by)\s*=\s*(?:"[^"]*javascript\s*:[^"]*"|'[^']*javascript\s*:[^']*')/gi,O$=/^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i,S$=e=>O$.test(e),C$=e=>y$(e).replace(w$,"").replace(k$,""),N$=/<svg\b[^>]*>/i,_$=e=>e.replace(N$,e=>e.replace(/\s(width|height)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/^<svg\b/i,'<svg width="100%" height="100%"'))}),kP=X(()=>{_E(),$E(),TE(),AE(),EE(),PE(),zE(),ME(),IE(),RE(),jE(),DE(),LE(),FE(),QE(),VE(),BE(),qE(),HE(),ZE(),XE(),YE(),GE(),KE(),JE(),eP(),tP(),nP(),rP(),iP(),aP(),oP(),sP(),lP(),cP(),dP(),uP(),hP(),pP(),fP(),mP(),gP(),bP(),$$={ApiContainer:Q_,BlockHtml:VN,BlockJsx:BN,Button:XN,Carousel:W_,CarouselTrack:B_,Channel:V_,Container:H_,Custom:UN,DialogContainer:Y_,FocusGroup:G_,Dropdown:YN,DropdownPopup:GN,Embed:R_,FontAwesome:j_,Form:o_,FormControl:$_,Heading:KN,Image:D_,LayoutContainer:T_,Link:JN,List:K_,ListItem:J_,Loading:A_,Markdown:e_,ModalContainer:e$,NodeHtml:WN,NotFound:E_,Page:z_,Pagination:t$,Paragraph:t_,PlitziSdk:qN,Reference:HN,RichText:n_,Chart:I_,Svg:L_,TabContainer:n$,TabContainerBody:r$,TabContainerHeader:i$,TabContainerItem:a$,Text:r_,ThemeToggle:a_,Video:F_},T$=Object.fromEntries(Object.values($$).flatMap(e=>"serverTemplates"in e?[[e.type,e.serverTemplates]]:[])),A$=Object.fromEntries(Object.values($$).flatMap(e=>"contentAttributes"in e?[[e.type,e.contentAttributes]]:[])),E$=e=>A$[e]??[]}),OP=X(()=>{P$=/* @__PURE__ */new Map,z$=e=>{let t=P$.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),P$.set(e,t)),t},M$=e=>{let t=e.initialState?.styleVariant,n=void 0!==t&&Object.keys(t).length>0;return Object.fromEntries(Object.entries(e.styleSelectors).map(([r,i])=>{let a="base"===r?`plitzi__${e.type}`:`plitzi__${e.type}-${r}`;if("string"!=typeof i)return[r,i];if(!n)return[r,i?`${a} ${i}`:a];!z$(e.type).test(i)&&t[e.type]?.[r]&&(i=i?`${e.type} ${i}`:e.type);let o=i.replace(/\S+/g,n=>{let i=t[n]?.[r];if(!i)return n;let a=Array.isArray(i)?i:[i];return n===e.type&&"base"===r?a.map(e=>`${n}--${e}`).join(" "):n===e.type&&"base"!==r?a.map(e=>`${n}-${r}--${e}`).join(" "):`${n} ${a.map(e=>`${n}--${e}`).join(" ")}`});return o?[r,`${a} ${o}`]:[r,a]}))}}),SP=X(()=>{Lh(),es(),te(),mh(),I$=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[a,o]of Object.entries(e)){let e=ao(o,{...t,computed:{...r}}),s=n?.[a],l=void 0!==n&&Object.hasOwn(n,a)&&(s===e||hd(s,e));r[a]=l?s:e,i&&=l}return i&&n?n:r},R$=e=>V(e)&&Object.values(e).every(e=>"string"==typeof e),j$=(e,t,n)=>{let r=V(t)?t:{};return R$(n)?{...e,state:r,computed:L$(n,e,r)}:{...e,state:r}},L$=(e,t,n)=>{let r=Vu.map(e=>t[e]);if(D$?.definitions===e&&D$.state===n&&D$.globals.every((e,t)=>e===r[t]))return D$.computed;let i=I$(e,{...Object.fromEntries(Vu.map((e,t)=>[e,r[t]])),state:n},D$?.definitions===e?D$.computed:void 0);return D$={definitions:e,state:n,globals:r,computed:i},i}}),CP=X(()=>{zl(),F$=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>Us(e.when,t));return{...e,[r]:o?o.value:i}},{}):{}}),NP=X(()=>{SP(),Lh(),cv(),CP()}),_P=X(()=>{Eh(),Ph(),yv(),xv(),wE(),kP(),Th(),Ah(),OP(),NP(),zh(),vv(),Q$={settled:/* @__PURE__ */new Set([ju])},V$=(e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:a={},origin:o="",navigation:s,...l}=n,c={...a,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:o}},d={...e};for(let u of t)d[u]=eo(e[u],c,Q$);return d},B$=e=>Object.keys(e).length>0,U$=/* @__PURE__ */new WeakMap,W$=(e,t)=>{let n=U$.get(e);if(n?.type===t)return n.keys;let r=T$[t]??[],i=Object.keys(e).filter(t=>{let n=e[t];return"string"==typeof n&&qc(n)&&!r.includes(t)});return U$.set(e,{type:t,keys:i}),i},q$=/* @__PURE__ */new WeakMap,H$=(e,t,n)=>{let r=n&&void 0===t,i=r?q$.get(e):void 0;if(i)return i;let a={...e,styleSelectors:{...e.styleSelectors,...e.initialState?.styleSelectors,...t}};return a.styleSelectors=M$(a),r&&q$.set(e,a),a},Z$=e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0),X$=(e,t,n={},r={})=>{let i,{attributes:a,definition:o}=e,{rootId:s,plitziElementLayout:l}=t,c=hu(t,["id","rootId","attributes","definition","plitziElementLayout"]);t.attributes&&(a={...a,...t.attributes});let d=a;if(Object.keys(n).length>0)if(Z$(o.bindings)){let t=Ng(n,{...e,attributes:a},i);({attributes:a,definition:o,style:i}=t)}else i={};let u=W$(d,o.type).filter(e=>a[e]===d[e]);u.length>0&&(a=V$(a,u,n));let h=Object.keys(r).length>0;return h&&(a={...a,...hu(r,["visibility","styleSelectors"])}),o=H$(o,r.styleSelectors,o===e.definition),{...t,rootId:l?l.rootId:s,attributes:h&&!B$(c)?a:{...a,...c},definition:o,elementState:h?{...o.initialState,...r}:{...o.initialState},style:i}},Y$=(e,t)=>e?W$(e,t).map(t=>e[t]):[],G$=e=>["variables",...new Set(e.flatMap(e=>sd(e)))],K$=/* @__PURE__ */new WeakMap,J$=(e,t,n)=>{let r=t?void 0:K$.get(e);if(r?.type===n)return r.sources;let i=[...Y$(e,n),...Y$(t,n)],a=i.length>0?G$(i):void 0;return t||K$.set(e,{type:n,sources:a}),a},eT={},tT=[],nT=/* @__PURE__ */new WeakMap,rT=(e,t)=>{let n=e??eT,r=t??tT,i=nT.get(n)??/* @__PURE__ */new WeakMap;nT.set(n,i);let a=i.get(r);if(a)return a;let o=Ab(e,t),s={sourcePaths:o,storePaths:o.map(e=>Eb(e))};return i.set(r,s),s},iT=["navigation.routeParams","navigation.queryParams","navigation.origin"],aT={},oT=(e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])),sT=(e,{sourcePaths:t,storePaths:n},r,i)=>({paths:[e,...r?iT:[],...n,...i?["runtime.sources.flags"]:[]],sourcePaths:t,navigation:r,flags:i}),lT=({store:e,element:t,children:n,internalProps:r,previewMode:i=!1,parentVisible:a=!0})=>{let{id:o}=r,{path:s,setElementState:l}=Rb({store:e,id:o,bindings:t.definition.bindings,previewMode:i}),{type:c,bindings:d,items:u}=t.definition,h=gu(()=>J$(t.attributes,r.attributes,c),[t.attributes,r.attributes,c]),p=(u?.length??0)>0,f=gu(()=>sT(s,rT(d,h),void 0!==h,p),[s,d,h,p]),m=wu(e,f.paths),g=m[0]??Mb,b=1+(f.navigation?iT.length:0),[v,y,x]=f.navigation?m.slice(1,b):[void 0,void 0,void 0],w=f.flags?m[m.length-1]??aT:aT,k=m.slice(b,b+f.sourcePaths.length),O=_(k);oT(O.current,k)||(O.current=k);let S=O.current,C=gu(()=>Pb(f.sourcePaths,S),[f,S]),{internalPropsParsed:N,customProps:$}=gu(()=>{let e=X$(t,r,{...C,routeParams:v,queryParams:y,origin:x},g);return{internalPropsParsed:Object.assign(e,{setElementState:l}),customProps:hu(r,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"])}},[t,r,C,v,y,x,g,l]);return{internalProps:N,customProps:$,children:wN({id:o,store:e,flags:w,definition:N.definition,plitziElementLayout:N.plitziElementLayout,children:n,previewMode:i,visible:a&&uu(N.elementState.visibility)})}}}),$P=X(()=>{cT=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */z("div",{children:"Something broke! Please refresh and try again."}):e}}}),TP=X(()=>{$P(),dT=cT}),AP=X(()=>{uT=e=>void 0!==e.nodes}),EP=X(()=>{hT="data-plitzi-devtools"}),PP=X(()=>{AP(),So(),EP()}),zP=X(()=>{PP(),pT=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:a=!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]||a&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){Reflect.deleteProperty(this.events[e],t);let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),Reflect.deleteProperty(this.events,e))}}async emit(e,t=[],...n){let r;this.debugMode&&Sr.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 a=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),a}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){e?this.events[e]&&(Reflect.deleteProperty(this.events,e),this.counts.delete(e)):(this.events={},this.counts.clear())}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}}}),MP=X(()=>{we(),fT=Q("EventBridgeContext",{})}),IP=X(()=>{zP(),MP(),mT=({children:e,debugMode:t,onInit:n})=>{let r=C(()=>new pT({debugMode:t}),[t]);x(()=>()=>{r.clear()},[r]);let i=C(()=>({eventBridge:r}),[r]);return x(()=>{n?.(i)},[n,i]),/* @__PURE__ */z(fT,{value:i,children:e})}}),RP=X(()=>{MP(),gT=Object.freeze({}),bT=Object.freeze({}),vT=(e,t=gT,n=bT,r=fT,i=!1)=>{let{eventBridge:a}=m(r);return x(()=>{if(i||!a||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&a.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&a.off(e,t,n)}},[e,t,a,n,i]),a}}),jP=X(()=>{yT={main:/* @__PURE__ */"schemaAddPage.schemaHomePage.schemaUpdatePage.schemaRemovePage.schemaAddPageFolder.schemaUpdatePageFolder.schemaRemovePageFolder.schemaUpdateSettings.schemaUpdate.schemaAddElement.schemaUpdateElement.schemaRenameElement.schemaUpdateElements.schemaRemoveElement.schemaMoveElement.schemaCloneElement.schemaAddVariable.schemaUpdateVariable.schemaRemoveVariable.schemaSetFlag.schemaRemoveFlag.schemaAddSnippet.schemaAddComponent.schemaUpdateComponent.schemaRemoveComponent.schemaDetachInstance.styleUpdate.styleAddSelector.styleUpdateSelector.styleRemoveSelector.styleRemoveSelectors.styleAddSelectorVariable.styleUpdateSelectorVariable.styleRemoveSelectorVariable.styleAddVariable.styleUpdateVariable.styleRemoveVariable.styleAddSnippet.styleUpdateSettings".split("."),builder:["builderSetBaseContext","builderSetSelected","builderSetHovered"],snippet:[],interaction:[],element:[]}}),DP=X(()=>{zP(),MP(),IP(),RP(),jP(),xT=pT}),LP=X(()=>{wT="data-plitzi-fonts",kT=e=>{x(()=>{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[${wT}]`)){let r=document.createElement("style");r.setAttribute(wT,""),r.textContent=e.faces,t.appendChild(r),n.push(r)}return()=>n.forEach(e=>e.remove())},[e])}}),FP=X(()=>{To(),OT=({initLoading:e=!1,server:t,webKey:n,internalUsage:r=!0,baseUrl:i})=>{let[a,o]=$(e);return{networkLoading:a,networkQuery:g(async(e,a={},s="get",l="")=>{try{o(!0),s=s.toLowerCase();let c=new Headers;c.append("Content-Type","application/json"),l?c.append("Authorization",`Bearer ${l}`):n&&c.append("Authorization",`Bearer ${n}`);let d="";r&&t&&(d=i??t.serverUrl);let u=a;(a instanceof FormData?Array.from(a.values()):Object.values(a)).forEach(e=>{e instanceof Blob&&"multipart/form-data"!==c.get("Content-Type")&&c.delete("Content-Type")}),u instanceof FormData||(u=new FormData,Object.entries(a).forEach(([e,t])=>{u.append(e,t)}));let h={method:s,headers:c,body:u};"application/json"===c.get("Content-Type")&&(h.body=JSON.stringify(a)),"get"===s&&delete h.body;let p=await fetch(`${d}${e}`,h),f=await p.json(),m=mi(p.status,f);return m&&hi({reason:m,url:`${d}${e}`}),f}catch(KIt){}finally{o(!1)}},[n,r,t,i])}}}),QP=X(()=>{ee(),ST=Q("PlitziContext",{}),CT=()=>{let e=m(ST);if(void 0===e)throw Error("The Plitzi context is undefined. Render the element inside a PlitziProvider.");return e},NT=e=>{let{children:t,value:n}=e;/* @__PURE__ */
5
+ return Uk(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(/* @__PURE__ */Uk(e=>e.toLowerCase()))},toUpperCase(){return this.check(/* @__PURE__ */Uk(e=>e.toUpperCase()))},slugify(){return this.check(/* @__PURE__ */Uk(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})),xS=/*@__PURE__*/fy("ZodString",(e,t)=>{Qx.init(e,t),yS.init(e,t)},{email(e){return this.check(function(e,t){return new NS({type:"string",format:"email",check:"string_format",abort:!1,...Fv(t)})}(0,e))},url(e){return this.check(function(e,t){return new TS({type:"string",format:"url",check:"string_format",abort:!1,...Fv(t)})}(0,e))},jwt(e){return this.check(function(e,t){return new US({type:"string",format:"jwt",check:"string_format",abort:!1,...Fv(t)})}(0,e))},emoji(e){return this.check(function(e,t){return new AS({type:"string",format:"emoji",check:"string_format",abort:!1,...Fv(t)})}(0,e))},guid(e){return this.check(function(e,t){return new _S({type:"string",format:"guid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},uuid(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},uuidv4(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Fv(t)})}(0,e))},uuidv6(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Fv(t)})}(0,e))},uuidv7(e){return this.check(function(e,t){return new $S({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Fv(t)})}(0,e))},nanoid(e){return this.check(function(e,t){return new ES({type:"string",format:"nanoid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cuid(e){return this.check(function(e,t){return new PS({type:"string",format:"cuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cuid2(e){return this.check(function(e,t){return new zS({type:"string",format:"cuid2",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ulid(e){return this.check(function(e,t){return new MS({type:"string",format:"ulid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},base64(e){return this.check(function(e,t){return new QS({type:"string",format:"base64",check:"string_format",abort:!1,...Fv(t)})}(0,e))},base64url(e){return this.check(function(e,t){return new VS({type:"string",format:"base64url",check:"string_format",abort:!1,...Fv(t)})}(0,e))},xid(e){return this.check(function(e,t){return new IS({type:"string",format:"xid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ksuid(e){return this.check(function(e,t){return new RS({type:"string",format:"ksuid",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ipv4(e){return this.check(function(e,t){return new jS({type:"string",format:"ipv4",check:"string_format",abort:!1,...Fv(t)})}(0,e))},ipv6(e){return this.check(function(e,t){return new DS({type:"string",format:"ipv6",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cidrv4(e){return this.check(function(e,t){return new LS({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Fv(t)})}(0,e))},cidrv6(e){return this.check(function(e,t){return new FS({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Fv(t)})}(0,e))},e164(e){return this.check(function(e,t){return new BS({type:"string",format:"e164",check:"string_format",abort:!1,...Fv(t)})}(0,e))},datetime(e){return this.check(function(e,t){return new kS({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Fv(t)})}(0,e))},date(e){return this.check(function(e,t){return new OS({type:"string",format:"date",check:"string_format",...Fv(t)})}(0,e))},time(e){return this.check(function(e,t){return new SS({type:"string",format:"time",check:"string_format",precision:null,...Fv(t)})}(0,e))},duration(e){return this.check(function(e,t){return new CS({type:"string",format:"duration",check:"string_format",...Fv(t)})}(0,e))}}),wS=/*@__PURE__*/fy("ZodStringFormat",(e,t)=>{Vx.init(e,t),yS.init(e,t)}),kS=/*@__PURE__*/fy("ZodISODateTime",(e,t)=>{tw.init(e,t),wS.init(e,t)}),OS=/*@__PURE__*/fy("ZodISODate",(e,t)=>{nw.init(e,t),wS.init(e,t)}),SS=/*@__PURE__*/fy("ZodISOTime",(e,t)=>{rw.init(e,t),wS.init(e,t)}),CS=/*@__PURE__*/fy("ZodISODuration",(e,t)=>{iw.init(e,t),wS.init(e,t)}),NS=/*@__PURE__*/fy("ZodEmail",(e,t)=>{Wx.init(e,t),wS.init(e,t)}),_S=/*@__PURE__*/fy("ZodGUID",(e,t)=>{Bx.init(e,t),wS.init(e,t)}),$S=/*@__PURE__*/fy("ZodUUID",(e,t)=>{Ux.init(e,t),wS.init(e,t)}),TS=/*@__PURE__*/fy("ZodURL",(e,t)=>{Hx.init(e,t),wS.init(e,t)}),AS=/*@__PURE__*/fy("ZodEmoji",(e,t)=>{Zx.init(e,t),wS.init(e,t)}),ES=/*@__PURE__*/fy("ZodNanoID",(e,t)=>{Xx.init(e,t),wS.init(e,t)}),PS=/*@__PURE__*/fy("ZodCUID",(e,t)=>{Yx.init(e,t),wS.init(e,t)}),zS=/*@__PURE__*/fy("ZodCUID2",(e,t)=>{Gx.init(e,t),wS.init(e,t)}),MS=/*@__PURE__*/fy("ZodULID",(e,t)=>{Kx.init(e,t),wS.init(e,t)}),IS=/*@__PURE__*/fy("ZodXID",(e,t)=>{Jx.init(e,t),wS.init(e,t)}),RS=/*@__PURE__*/fy("ZodKSUID",(e,t)=>{ew.init(e,t),wS.init(e,t)}),jS=/*@__PURE__*/fy("ZodIPv4",(e,t)=>{aw.init(e,t),wS.init(e,t)}),DS=/*@__PURE__*/fy("ZodIPv6",(e,t)=>{sw.init(e,t),wS.init(e,t)}),LS=/*@__PURE__*/fy("ZodCIDRv4",(e,t)=>{lw.init(e,t),wS.init(e,t)}),FS=/*@__PURE__*/fy("ZodCIDRv6",(e,t)=>{cw.init(e,t),wS.init(e,t)}),QS=/*@__PURE__*/fy("ZodBase64",(e,t)=>{uw.init(e,t),wS.init(e,t)}),VS=/*@__PURE__*/fy("ZodBase64URL",(e,t)=>{pw.init(e,t),wS.init(e,t)}),BS=/*@__PURE__*/fy("ZodE164",(e,t)=>{fw.init(e,t),wS.init(e,t)}),US=/*@__PURE__*/fy("ZodJWT",(e,t)=>{mw.init(e,t),wS.init(e,t)}),WS=/*@__PURE__*/fy("ZodNumber",(e,t)=>{gw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SO(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ry({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=XO(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=XO(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=XO(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>XO(e).format??null},{gt(e,t){return this.check(Dk(e,t))},gte(e,t){return this.check(Lk(e,t))},min(e,t){return this.check(Lk(e,t))},lt(e,t){return this.check(Rk(e,t))},lte(e,t){return this.check(jk(e,t))},max(e,t){return this.check(jk(e,t))},int(e){return this.check(wC(e))},safe(e){return this.check(wC(e))},positive(e){return this.check(Dk(0,e))},nonnegative(e){return this.check(Lk(0,e))},negative(e){return this.check(Rk(0,e))},nonpositive(e){return this.check(jk(0,e))},multipleOf(e,t){return this.check(Fk(e,t))},step(e,t){return this.check(Fk(e,t))},finite(){return this}})),qS=/*@__PURE__*/fy("ZodNumberFormat",(e,t)=>{bw.init(e,t),WS.init(e,t)}),HS=/*@__PURE__*/fy("ZodBoolean",(e,t)=>{vw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CO(e,t,n,r)}),ZS=/*@__PURE__*/fy("ZodAny",(e,t)=>{yw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_O(e,t,n,r)}),XS=/*@__PURE__*/fy("ZodUnknown",(e,t)=>{xw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$O(e,t,n,r)}),YS=/*@__PURE__*/fy("ZodNever",(e,t)=>{ww.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NO(e,t,n,r)}),GS=/*@__PURE__*/fy("ZodArray",(e,t)=>{vC(),Ow.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zO(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Vk(e,t))},nonempty(e){return this.check(Vk(1,e))},max(e,t){return this.check(Qk(e,t))},length(e,t){return this.check(Bk(e,t))},unwrap(){return this.element}}),KS=/*@__PURE__*/fy("ZodObject",(e,t)=>{vC(),Nw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MO(e,t,n,r),function(e,t,n,r){const i=function(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){const e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return AC(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(zv(this._zod.def,{catchall:e}))},passthrough(){return this.clone(zv(this._zod.def,{catchall:SC()}))},loose(){return this.clone(zv(this._zod.def,{catchall:SC()}))},strict(){return this.clone(zv(this._zod.def,{catchall:function(e,t){return new YS({type:"never",...Fv(t)})}(0,e)}));var e},strip(){return this.clone(zv(this._zod.def,{catchall:void 0}))},extend(e){return function(e,t){if(!Rv(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=Tv(e);for(const e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Lv(e,zv(e._zod.def,{shape:Bv(e,t)}))}(this,e)},safeExtend(e){return function(e,t){if(!Rv(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Lv(e,zv(e._zod.def,{shape:Bv(e,t)}))}(this,e)},merge(e){return function(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};return Pv(n,e,Reflect.ownKeys(Tv(e))),Pv(n,t,Reflect.ownKeys(Tv(t))),Lv(e,zv(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return Pv(i,e,Vv(e,t)),Lv(e,zv(n,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(Vv(e,t)),a={};return Pv(a,e,Reflect.ownKeys(Tv(e)).filter(e=>!i.has(e))),Lv(e,zv(n,{shape:a,checks:[]}))}(this,e)},partial(...e){return Uv(oC,this,e[0])},exactPartial(...e){return Uv(sC,this,e[0],"exactPartial")},required(...e){return function(e,t,n){const r=n?new Set(Vv(t,n)):void 0,i={};return Pv(i,t,Reflect.ownKeys(Tv(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),Lv(t,zv(t._zod.def,{shape:i}))}(uC,this,e[0])}}),JS=/*@__PURE__*/fy("ZodUnion",(e,t)=>{_w.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IO(e,t,n,r),e.options=t.options}),eC=/*@__PURE__*/fy("ZodDiscriminatedUnion",(e,t)=>{JS.init(e,t),$w.init(e,t)}),tC=/*@__PURE__*/fy("ZodIntersection",(e,t)=>{Tw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RO(e,t,n,r)}),nC=/*@__PURE__*/fy("ZodRecord",(e,t)=>{vC(),Aw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DO(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),rC=/*@__PURE__*/fy("ZodEnum",(e,t)=>{Ew.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TO(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const i={};for(const a of e){if(!n.has(a))throw new Error(`Key ${a} not found in enum`);i[a]=t.entries[a]}return new rC({...t,checks:[],...Fv(r),entries:i})},e.exclude=(e,r)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new rC({...t,checks:[],...Fv(r),entries:i})}}),iC=/*@__PURE__*/fy("ZodLiteral",(e,t)=>{Pw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AO(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),aC=/*@__PURE__*/fy("ZodTransform",(e,t)=>{vC(),zw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PO(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new uy(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ey(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),"input"in t||(t.input=n.value),t.inst??(t.inst=e),n.issues.push(ey(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),oC=/*@__PURE__*/fy("ZodOptional",(e,t)=>{Mw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),sC=/*@__PURE__*/fy("ZodExactOptional",(e,t)=>{Iw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),lC=/*@__PURE__*/fy("ZodNullable",(e,t)=>{Rw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),cC=/*@__PURE__*/fy("ZodDefault",(e,t)=>{jw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),dC=/*@__PURE__*/fy("ZodPrefault",(e,t)=>{Dw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),uC=/*@__PURE__*/fy("ZodNonOptional",(e,t)=>{Lw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),hC=/*@__PURE__*/fy("ZodCatch",(e,t)=>{Fw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),pC=/*@__PURE__*/fy("ZodPipe",(e,t)=>{Qw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WO(e,t,n,r),e.in=t.in,e.out=t.out}),fC=/*@__PURE__*/fy("ZodReadonly",(e,t)=>{Vw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),mC=/*@__PURE__*/fy("ZodCustom",(e,t)=>{Bw.init(e,t),vS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EO(e,t,n,r)})}),sE=X(()=>{rS()}),lE=X(()=>{rS(),oE(),iS(),gC(),bC(),sE(),nS(),zk(),py(),iS(),oE(),Ok(),Pk()}),cE=X(()=>{lE(),lE()}),dE=X(()=>{Pr(),cE(),RC=()=>globalThis.trustedTypes,DC=()=>"enforce"===jC,LC=e=>{try{return JSON.parse(e),!0}catch{return!1}},FC=e=>!e.includes("<"),QC=e=>{if(typeof location>"u")return!1;if(e.startsWith(`blob:${location.origin}/`))return!0;try{return new URL(e,location.href).origin===location.origin}catch{return!1}},BC=()=>{if(void 0!==VC)return VC;let e=RC();if(!e)return VC=null;if(VC=e.createPolicy("plitzi-html",{createHTML:e=>e}),!e.defaultPolicy)try{e.createPolicy("default",{createHTML:e=>"<script><\/script>"===e||FC(e)?e:null,createScript:e=>LC(e)?e:null,createScriptURL:e=>QC(e)?e:null})}catch{}return VC},UC=/* @__PURE__ */new Map,WC=e=>{let t=BC();if(!t)return e;let n=UC.get(e);if(n)return n;let r=t.createHTML(e);return UC.size<500&&UC.set(e,r),r},qC=()=>{if(typeof document>"u")return;let e=document.documentElement.dataset.plitziScriptPolicy;return"report-only"===e||"enforce"===e?e:void 0},HC=(e=qC())=>{typeof window<"u"&&(jC=e,Qe(!e&&void 0),e&&my({jitless:!0}),BC())}}),uE=X(()=>{dE(),ZC=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},XC=({id:e,frozen:t,children:n})=>{let[r]=$(()=>{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?ZC(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:WC(r.html)}}):n}}),hE=X(()=>{ee(),YC=Q("ComponentContext",{})}),pE=X(()=>{hE()}),fE=X(()=>{te(),GC="[A-Za-z_][A-Za-z0-9_]*",KC=RegExp(`^${GC}$`),RegExp(`^!?${GC}$`),JC=/* @__PURE__ */new Set(["__proto__","constructor","prototype"]),eN=e=>KC.test(e)&&!JC.has(e),tN=e=>V(e)&&"boolean"==typeof e.value&&(void 0===e.description||"string"==typeof e.description)&&Array.isArray(e.rules)&&e.rules.every(e=>V(e)&&"boolean"==typeof e.value&&V(e.when))}),mE=X(()=>{fE(),nN=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},rN=e=>Object.entries(e).filter(([e])=>eN(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","),iN=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},aN=(e,t)=>{let n=nN(e),r=rN(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}}}),gE=X(()=>{fE(),Ml(),mE()}),bE=X(()=>{ee(),oN=Q("PluginsContext",{plugins:{},registerCustomAssets:()=>{},unregisterCustomAssets:()=>{}})}),vE=X(()=>{ee(),sN=Q("PluginAssetsContext",{assets:{}})}),yE=X(()=>{ee(),lN=Q("ElementRegistryContext",void 0)}),xE=X(()=>{bE(),vE(),yE()}),wE=X(()=>{UF(),wv(),uE(),Nr(),$o(),pE(),gE(),xE(),cN=typeof window>"u",dN=()=>()=>{},uN=()=>!0,hN=()=>!1,pN=(e,{components:t,plugins:n})=>e.split("|").map(e=>""===e?"":`${e in t.current?"c":""}${e in n?"p":""}`).join("|"),fN=e=>{if(e)return e.get();let{components:t,componentDefinitions:n}=m(YC);return{components:t,componentDefinitions:n,plugins:m(oN).plugins}},mN=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),gN=(e,t,n,r,i)=>{let a=t.current[e.type],o=e.loadStrategy??a?.definition.loadStrategy??"eager";return!n||"eager"===o||r||"lazy"===o&&i},bN=e=>e?`${e.type}:${e.rootId}:${e.slots.join(",")}`:"",vN=/* @__PURE__ */new WeakMap,yN=(e,t,n,r)=>{let i=vN.get(e);if(i&&i.id===t&&i.rootId===n&&i.plitziElementLayout===r)return i;let a={id:t,rootId:n,plitziElementLayout:r};return vN.set(e,a),a},xN=({items:e,itemElements:t,flags:n,plitziElementLayout:r,children:a,previewMode:o,rscEnabled:s,mounted:l,layoutKeyIdentifier:c,isSlot:d,layoutBody:u,registered:p,installed:f})=>{let m=(e??[]).map((e,n)=>({itemId:e,el:t[n]})).filter(e=>{let{el:t}=e;if(!t||!tl(t.definition.flag,n))return!1;if(!o||!s)return!0;let r=t.definition.runtime??"shared";return!(!l&&"client"===r)}).map(({itemId:e,el:t})=>{let{rootId:n,type:i,runtime:a}=t.definition,l=r?r.rootId:n,d=i in p.current||!!KD({type:i,plugins:f}),u=JD({key:!o&&r?`${e}_${c}`:e,type:i,internalProps:yN(t,e,l,r),components:p.current,plugins:f});return s&&"server"===a&&!cN&&o?/* @__PURE__ */z(XC,{id:e,frozen:!d,children:u},e):u});if(d&&m.push(/* @__PURE__ */z(i,{children:u},"#layout-body")),Array.isArray(a)?m.push(...a.filter(h)):h(a)&&m.push(/* @__PURE__ */z(i,{children:a},"#children")),e)return 1===m.length?m[0]:m},wN=cN?({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:a,previewMode:o,visible:s=!0})=>{let{items:l}=r,c=m(lN),{components:d,componentDefinitions:u,plugins:h}=fN(!0===o?c:void 0),p=i?.slots.includes(e)??!1,f=Fb(p?e:void 0);if((i||a||l?.length)&&gN(r,u,o,s,s))return xN({items:l,itemElements:(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),flags:n,plitziElementLayout:i,children:a,previewMode:o,rscEnabled:!0===t.getPath("rsc.enabled"),mounted:!1,layoutKeyIdentifier:bN(i),isSlot:p,layoutBody:f,registered:d,installed:h})}:({id:e,store:t,flags:n,definition:r,plitziElementLayout:i,children:a,previewMode:o,visible:s=!0})=>{let{items:l}=r,c=(l??[]).map(e=>t.getPath(`schema.flat.${e}`)),d=_(c);mN(d.current,c)||(d.current=c);let u=d.current,h=!0===t.getPath("rsc.enabled"),p=m(lN),f=!0===o?p:void 0,g=void 0!==f,b=u.map(e=>e?.definition.type??"").join("|"),v=()=>f?pN(b,f.get()):"",y=T(f?f.subscribe:dN,v,v),{components:x,componentDefinitions:w,plugins:k}=fN(f),O=i||a||l?.length,S=_(!1);s&&(S.current=!0);let N=gN(r,w,o,s,S.current),$=bN(i),A=!0===o&&h&&u.some(e=>"client"===e?.definition.runtime),E=T(dN,A?uN:hN,hN),P=i?.slots.includes(e)??!1,z=Fb(P?e:void 0),M=_({components:x,plugins:k});return M.current={components:x,plugins:k},C(()=>{if(!O||!N)return;let{components:e,plugins:t}=M.current;return xN({items:l,itemElements:u,flags:n,plitziElementLayout:i,children:a,previewMode:o,rscEnabled:h,mounted:E,layoutKeyIdentifier:$,isSlot:P,layoutBody:z,registered:e,installed:t})},[O,N,l,n,i,a,u,o,h,E,$,g?y:x,g?y:k,P,z])},kN={},ON=()=>{let e=kn(),[t=kN]=Dn("runtime.sources.flags",{store:e});return{store:e,flags:t}}}),kE=X(()=>{SN={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},CN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),NN=(e,t)=>({type:t.builderType??SN[t.type],label:t.label??CN(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??CN(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),_N=/* @__PURE__ */new WeakMap,$N=e=>{let t=_N.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,NN(e,t)])),_N.set(e,t)),t},TN=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:$N(t.params),...r}),AN=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,TN(r,e[r],t[r],n[r]??{})]))}),OE=X(()=>{EN=()=>e=>e,PN=(e,t)=>({type:e,bindings:{},initialState:{visibility:!0},...t,styleSelectors:{base:"",...t.styleSelectors}}),zN=()=>e=>{let{definition:t,builder:n,market:r,defaultStyle:i,settings:a}=e.content;return{...e,content:{...e.content,definition:PN(e.type,t),builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[],...n},market:{owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",...r},defaultStyle:{name:t.label,displayMode:"desktop",...i},settings:a??{}}}}}),SE=X(()=>{Sh(),MN={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...Ud]},IN={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:MN}},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:MN}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...Wd]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...Wd]},behavior:MN}}},RN={focus:{title:"Focus",type:"callback",strictParams:!0,params:{}}},jN={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"}}},...IN,...RN}}),CE=X(()=>{DN=["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"],LN=["success","danger","warning","info"],QN={addNotification:{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:(FN={placement:"top-right",appearance:"success",autoDismiss:!0,autoDismissTimeout:5e3}).placement,options:[...DN]},appearance:{type:"select",description:"Visual style of the notification: success, danger, warning or info.",default:FN.appearance,options:[...LN]},autoDismiss:{type:"boolean",description:"Whether the notification dismisses itself after a timeout.",default:FN.autoDismiss,canBind:!1},autoDismissTimeout:{type:"number",description:"Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",default:FN.autoDismissTimeout,when:e=>!0===e.autoDismiss}}}}}),NE=X(()=>{kE(),OE(),SE(),CE()}),_E=X(()=>{NE(),VN=zN()({type:"blockHtml",content:{attributes:{content:""},definition:{label:"HTML Block",description:"Renders an arbitrary raw HTML string as a block. Escape hatch when no structured element fits."},market:{category:"advanced",icon:"fa-brands fa-html5"},defaultStyle:{style:{base:{default:{}}}}}})}),$E=X(()=>{NE(),BN=zN()({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",description:"A compiled JSX block for advanced authoring."},market:{category:"advanced",icon:"fa-solid fa-code"},defaultStyle:{style:{base:{default:{}}}}}})}),TE=X(()=>{NE(),UN=zN()({type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,assets:"",scriptUrl:""},definition:{label:"Custom",description:"A custom element slot whose behaviour is supplied by a host/plugin component."},market:{category:"advanced",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}}}})}),AE=X(()=>{NE(),WN=zN()({type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",description:"A single raw HTML tag with custom attributes.",items:[]},market:{category:"advanced",icon:"fa-brands fa-html5"},defaultStyle:{style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}}}})}),EE=X(()=>{NE(),qN=zN()({type:"plitziSdk",content:{attributes:{spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",description:"Another space drawn inside this one, as a widget — its home page, no router of its own: by its key, or from its documents (`offlineData`), bound to UI generated on the fly."},market:{category:"advanced",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{}}}}}})}),PE=X(()=>{NE(),HN=zN()({type:"reference",content:{attributes:{referenceType:"element",referenceId:""},definition:{label:"Reference",description:"Places one of the components of the space, or renders another of its elements by id, in place.",items:[]},market:{category:"advanced",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",style:{base:{default:{}}}}}})}),zE=X(()=>{NE(),ZN={"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-family":"inherit","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"},XN=zN()({type:"button",contentAttributes:["content"],attributeValues:{subType:EN()(["button","submit","reset"]),contentPlacement:EN()(["before","after"]),iconPlacement:EN()(["before","after"])},content:{placeholders:["content"],attributes:{contentPlacement:"after",content:"Button",icon:"",iconPlacement:"before",subType:"button",disabled:!1},definition:{label:"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:[],styleSelectors:{icon:""}},market:{category:"basic",icon:"fa-solid fa-hand-pointer"},defaultStyle:{style:{base:{default:ZN}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:ZN}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:ZN}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:ZN}}}}}}})}),ME=X(()=>{NE(),YN=zN()({type:"dropdown",attributeValues:{popupPlacement:EN()(["left","right","top","bottom"]),popupWidth:EN()(["content","trigger"])},callbacks:{openDropdown:{action:"openDropdown",title:"Open Dropdown",type:"callback",params:{},preview:{}},closeDropdown:{action:"closeDropdown",title:"Close Dropdown",type:"callback",params:{},preview:{}},toggleDropdown:{action:"toggleDropdown",title:"Toggle Dropdown",type:"callback",params:{},preview:{}}},marks:{"aria-expanded":"on its trigger while the popup is open — what a class’s `expanded` state lights",".popup-container--no-visible":"on its dropdownPopup while closed","the popup":'drawn at the space’s root, `position: fixed` where the dropdown places it — a class on the popup sets its look, never its position (top, left, position, inset, transform); `popupWidth: "trigger"` makes it as wide as the trigger'},content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,popupWidth:"content",disabled:!1},definition:{label:"Dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],styleSelectors:{backgroundContainer:""}},market:{category:"basic",icon:"fa-solid fa-angle-down"},defaultStyle:{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}}}}},initialItems:["dropdownPopup"]})}),IE=X(()=>{NE(),GN=zN()({type:"dropdownPopup",ancestorType:"dropdown",content:{attributes:{},definition:{label:"Dropdown Popup",description:"The floating panel revealed by a dropdown.",items:[],initialState:{}},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1},market:{category:"basic",icon:"fa-regular fa-window-restore"},defaultStyle:{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:{}}},initialItems:[]})}),RE=X(()=>{NE(),KN=zN()({type:"heading",contentAttributes:["content"],attributeValues:{subType:EN()(["h1","h2","h3","h4","h5","h6"])},content:{placeholders:["content"],attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy."},market:{category:"basic",icon:"fa-solid fa-heading"},defaultStyle:{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"}}}}}}}})}),jE=X(()=>{NE(),JN=zN()({type:"link",contentAttributes:["content","href","label"],attributeValues:{mode:EN()(["page","internal","external"]),target:EN()(["self","blank","parent","top"]),contentPlacement:EN()(["before","after"]),iconPlacement:EN()(["before","after"]),current:EN()(["page","section"])},content:{attributes:{href:"#",target:"self",mode:"page",hash:"",label:"",content:"",contentPlacement:"after",icon:"",iconPlacement:"before",current:"page"},definition:{label:"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:[],styleSelectors:{icon:""}},builder:{itemsNotAllowed:["link"]},market:{category:"basic",icon:"fa-solid fa-link"},defaultStyle:{style:{base:{default:{display:"inline-block",color:"inherit","text-decoration":"none",cursor:"pointer"}}}}}})}),DE=X(()=>{NE(),e_=zN()({type:"markdown",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Markdown",headingLinks:!0},definition:{label:"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.",styleSelectors:{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:""}},market:{category:"basic",icon:"fa-brands fa-markdown"},defaultStyle:{style:{base:{default:{}}}}}})}),LE=X(()=>{NE(),t_=zN()({type:"paragraph",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Paragraph"},definition:{label:"Paragraph",description:"A block of body text (a <p>). Use for longer prose passages."},market:{category:"basic",icon:"fa-solid fa-paragraph"},defaultStyle:{style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}}}})}),FE=X(()=>{NE(),n_=zN()({type:"richText",contentAttributes:["content"],attributeValues:{format:EN()(["html","markdown","text"])},content:{attributes:{content:"",format:"html",mediaBaseUrl:""},definition:{label:"Rich Text",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:[],styleSelectors:{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:""}},market:{category:"basic",icon:"fa-solid fa-file-lines"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),QE=X(()=>{NE(),r_=zN()({type:"text",contentAttributes:["content"],content:{placeholders:["content"],attributes:{content:"Text"},definition:{label:"Text",description:"Inline plain-text content. Use for short runs of copy; bind its content to data for dynamic text."},market:{category:"basic",icon:"fa-solid fa-align-left"},defaultStyle:{style:{base:{default:{display:"inline"}}}}}})}),VE=X(()=>{NE(),i_={"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"},a_=zN()({type:"themeToggle",contentAttributes:["lightLabel","darkLabel","systemLabel"],attributeValues:{subType:EN()(["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",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:[],styleSelectors:{icon:"",option:""}},market:{category:"basic",icon:"fa-solid fa-circle-half-stroke"},defaultStyle:{style:{base:{default:i_},icon:{default:{}},option:{default:{...i_,"row-gap":"4px","column-gap":"4px"}}},subTypes:{}}}})}),BE=X(()=>{NE(),o_=zN()({type:"form",attributeValues:{method:EN()(["get","post"])},sourceType:"apiContainer",publishes:{values:"Each field's value, by its name",errors:"Each field's error, by its name — none while it is valid",submitted:"Whether a submit was tried — valid or not — since the form was shown or reset: what shows an error only after a submit, or hides a field's hint once one was tried (no `touched`: a field's own error shows once the field is left)"},triggers:{onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:{},actionUrl:"",method:""}},onInvalid:{action:"onInvalid",title:"On Form Refused",type:"trigger",params:{},preview:{errors:{},values:{}}}},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",description:"A <form> that groups form controls and handles submission; wire its submit through an interaction flow. Left as it is, the browser answers first for a blank required field and a malformed address, in a bubble no style reaches and in the browser's language; `noValidate: true` turns its checks off, and every rule answers under its control in the words of its `…Message` (`requiredMessage`).",items:[]},market:{category:"form",icon:"fa-solid fa-rectangle-list"},defaultStyle:{style:{base:{default:{}}}}}})}),UE=X(()=>{s_=["username","current-password","new-password","one-time-code","email","name","given-name","family-name","organization","tel","street-address","postal-code","country","url"],l_=(e,t,n)=>n&&!1!==e?!0===e?"password"===t?"current-password":"on":e:"off"}),WE=X(()=>{c_=["text","number","email","password","search","url","tel","date","time","checkbox","switch","select","textarea","hidden","color","file"],d_=["text","number","email","password","search","url","tel","date","time","color"],u_=["text","textarea","number","email","password","search","url","tel"],h_={text:"Text",number:"Number",date:"Date",time:"Time",email:"Email",search:"Search",url:"URL",tel:"Phone",password:"Password",select:"Select",checkbox:"Checkbox",switch:"Switch",textarea:"Long Text",hidden:"Hidden",color:"Color",file:"File"},p_=["checkbox","switch"]}),qE=X(()=>{UE(),WE(),NE(),f_={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"},m_={...f_,"line-height":"20px"},g_={display:"flex",cursor:"pointer","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},b_={...g_,"margin-bottom":"4px"},v_={display:"block",color:"red","margin-top":"4px"},y_={color:"red","margin-left":"4px"},x_={"border-top-style":"none","border-right-style":"none","border-bottom-style":"none","border-left-style":"none"},w_={height:"100%",width:"100%","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","padding-left":"0px",display:"block",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","box-shadow":"none"},k_={height:"100%",width:"100%","padding-right":"calc(1.15em + 8px)",display:"block",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit",appearance:"none",cursor:"inherit","box-shadow":"none"},O_={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",...x_,"background-color":"transparent",color:"inherit","line-height":"inherit","font-family":"inherit","font-size":"inherit","font-weight":"inherit",cursor:"pointer"},S_={...f_,cursor:"pointer"},C_={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"},N_=(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:b_},requiredMark:{default:y_},error:{default:v_}}}),__={field:w_},$_=zN()({type:"formControl",contentAttributes:["label","placeholder","options","requiredMessage","minLengthMessage","maxLengthMessage","minMessage","maxMessage","formatMessage","patternMessage","matchesMessage"],attributeValues:{subType:c_,autoComplete:s_},triggers:{onChange:{action:"onChange",title:"On Change",type:"trigger",params:{},preview:{value:"",name:""}}},content:{placeholders:["label"],attributes:{subType:"text",name:"",label:"Label",hideLabel:!1,placeholder:"",accept:"",defaultValue:"",autoComplete:!0,autoFocus:!1,disabled:!1,options:[],required:!1,requiredMessage:"",minLength:0,minLengthMessage:"",maxLength:0,maxLengthMessage:"",min:"",minMessage:"",max:"",maxMessage:"",step:"",formatMessage:"",pattern:"",patternMessage:"",matches:"",matchesMessage:"",readOnly:!1},definition:{label:"Form Control",description:"A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. Optional unless `required: true`, as an HTML field is: a `requiredMessage` alone requires nothing. A `number` field takes `min` and `max` (each said by its `minMessage`/`maxMessage` when broken) and `step`, written as numbers are — `'2'`; `''` for none. A `file` field holds the `File` picked; a `webHook` whose body holds it sends it as multipart, under its `name`, and `accept` says what the picker offers — `'image/png,image/jpeg'`. 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 box is ringed (`2px solid currentColor`) while the field inside has keyboard focus: restyle it with a `focus-within` state on the `input` slot — the box never takes `focus` itself. 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`.",styleSelectors:{label:"",requiredMark:"",input:"",field:"",icon:"",error:""}},builder:{canSnippet:!1},market:{category:"form",icon:"fa-solid fa-i-cursor"},defaultStyle:{style:{base:{default:{}}},subTypes:{hidden:N_("Form Control Hidden",{}),text:N_("Form Control Text",m_,__),number:N_("Form Control Number",m_,__),email:N_("Form Control Email",m_,__),password:N_("Form Control Password",m_,{...__,icon:O_}),search:N_("Form Control Search",m_,__),url:N_("Form Control URL",m_,__),tel:N_("Form Control Phone",m_,__),date:N_("Form Control Date",m_,__),time:N_("Form Control Time",m_,__),color:N_("Form Control Color",m_,__),file:N_("Form Control File",m_,__),textarea:N_("Form Control Textarea",{...m_,color:"inherit","font-family":"inherit",resize:"vertical"}),select:N_("Form Control Select",S_,{field:k_}),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:g_},requiredMark:{default:y_},error:{default:v_}}},switch:{name:"Form Control Switch",displayMode:"desktop",style:{base:{default:{}},input:{default:C_},label:{default:{...g_,"align-items":"center"}},requiredMark:{default:y_},error:{default:v_}}}}}}})}),HE=X(()=>{NE(),T_=zN()({type:"layoutContainer",attributeValues:{subType:EN()(["div","header","footer","nav","main","section","article","aside","address","figure"])},content:{attributes:{subType:"div"},definition:{label:"Layout Container",description:"A reusable layout shell (header/footer chrome) shared across pages.",items:[]},builder:{canDragDrop:!1},market:{category:"internal",icon:"fa-solid fa-border-all"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),ZE=X(()=>{NE(),A_=zN()({type:"loading",content:{attributes:{},definition:{label:"Loading",description:"A loading placeholder shown while data or a suspense boundary resolves."},builder:{canDragDrop:!1},market:{category:"internal",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{}}}}}})}),XE=X(()=>{NE(),E_=zN()({type:"notFound",content:{attributes:{},definition:{label:"Not Found",description:"The 404 screen shown when no route matches."},builder:{canDragDrop:!1},market:{category:"internal",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{style:{base:{default:{display:"flex","justify-content":"center","align-items":"center"}}}}}})}),YE=X(()=>{vv(),NE(),P_=["locked","noBounce"],z_=zN()({type:"page",contentAttributes:["seoPageTitle","seoPageDescription"],serverTemplates:["seoPageTitle","seoPageDescription","seoImage","seoImageAlt","notFound"],attributeValues:{documentScroll:P_,seoType:Rg},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",description:"The root of a routable screen. Managed through the page ops (upsertPage/deletePage), not added as a child element.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1},market:{category:"internal",icon:"fas fa-file"},defaultStyle:{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"}}}}}})}),GE=X(()=>{NE(),M_={fill:"currentColor","font-size":"12px","font-family":"inherit"},I_=zN()({type:"chart",contentAttributes:["label","emptyText"],attributeValues:{kind:EN()(["bar","line","area","donut"]),format:EN()(["number","percent","compact"])},content:{attributes:{kind:"bar",labelField:"label",valueField:"value",series:"",titleField:"",sync:"",label:"",format:"number",showValues:!1,height:240,emptyText:"No data yet"},definition:{label:"Chart",description:"Draws rows as bars, a line, a filled line or a donut — SVG of its own, nothing to load. Bind its `items` to the rows, as a list is (`bindTemplate('items', source, '{{ … }}', { returns: 'value' })`): records read by `labelField` and `valueField`, or plain numbers. It takes its box’s width and its `height`, and the colour of the text around it — its parts (`bar`, `line`, `area`, `point`, `slice`, `grid`, `axisLabel`, `valueLabel`) restyle it. Name it with `label`: a screen reader reads that, and the rows as a table drawn with it. Several values a row — a line per server, a bar per plan — are `series: [{ field, label }]`: each in a colour of its own (`--plitzi-chart-series-1` to `-8`, a step for light and one for dark), with a legend of each one's last and highest value. Pointed at or moved through with the arrow keys, it reads every series at that row (`tooltip`).",items:[],styleSelectors:{bar:"",line:"",area:"",point:"",slice:"",hole:"",grid:"",axisLabel:"",valueLabel:"",legend:"",tooltip:"",empty:""}},market:{category:"media",icon:"fa-solid fa-chart-column"},defaultStyle:{name:"Chart",style:{base:{default:{display:"block",position:"relative",width:"100%",margin:"0px"}},bar:{default:{fill:"currentColor"}},line:{default:{fill:"none",stroke:"currentColor","stroke-width":"2.5px"}},area:{default:{fill:"currentColor","fill-opacity":"0.15"}},point:{default:{fill:"currentColor"}},slice:{default:{fill:"currentColor"}},hole:{default:{fill:"var(--plitzi-chart-hole, transparent)"}},grid:{default:{stroke:"currentColor","stroke-opacity":"0.15","stroke-width":"1px"}},axisLabel:{default:{...M_,"fill-opacity":"0.7"}},valueLabel:{default:M_},legend:{default:{display:"flex","flex-wrap":"wrap","column-gap":"16px","row-gap":"4px","list-style-type":"none","padding-left":"0px","margin-top":"8px","font-size":"12px"}},empty:{default:{"font-size":"14px",opacity:"0.7"}}}}}})}),KE=X(()=>{NE(),R_=zN()({type:"embed",contentAttributes:["src","title"],content:{attributes:{src:"",title:"",loading:"lazy"},definition:{label:"Embed",description:"Another page inside this one — a map, a video player, a form — in a frame."},market:{category:"media",icon:"fa-solid fa-window-maximize"},defaultStyle:{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"}}}}}})}),JE=X(()=>{NE(),j_=zN()({type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",description:"Renders a Font Awesome icon by its icon name."},market:{category:"media",icon:"fa-solid fa-font-awesome"},defaultStyle:{style:{base:{default:{display:"inline-block","font-size":"16px"}}}}}})}),eP=X(()=>{NE(),D_=zN()({type:"image",contentAttributes:["src","alt"],attributeValues:{fetchPriority:EN()(["high","low","auto"]),loadMode:EN()(["auto","eager","lazy"])},content:{attributes:{src:"",alt:"",decorative:!1,fetchPriority:"auto",loadMode:"auto"},definition:{label:"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."},market:{category:"media",icon:"fa-solid fa-image"},defaultStyle:{style:{base:{default:{display:"block",width:"140px",height:"auto","max-width":"100%"}}}}}})}),tP=X(()=>{NE(),L_=zN()({type:"svg",contentAttributes:["label"],content:{attributes:{content:"",label:""},definition:{label:"SVG",description:"A drawing written as SVG markup, coloured by its class."},market:{category:"media",icon:"fa-solid fa-bezier-curve"},defaultStyle:{name:"Svg",style:{base:{default:{display:"inline-flex",width:"24px",height:"24px"}}}}}})}),nP=X(()=>{NE(),F_=zN()({type:"video",contentAttributes:["src"],content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",description:"Embeds a video from a URL."},market:{category:"media",icon:"fa-solid fa-video"},defaultStyle:{style:{base:{default:{display:"block",width:"400px",height:"250px"}}}}}})}),rP=X(()=>{NE(),Q_=zN()({type:"apiContainer",attributeValues:{subType:EN()(["","div","header","footer","nav","main","section","article","aside","address","figure"]),method:EN()(["get","post","put","delete","patch"]),credentials:EN()(["include","omit","same-origin"]),pagination:EN()(["none","url","append"])},sourceType:"apiContainer",publishes:{"…":"The answer's own fields, as the service sends them",records:"The rows of a paged answer, every page loaded so far",isLoading:"Whether an answer (or a next page) is on its way",isEmpty:"Whether the answer holds nothing",hasError:"Whether the service could not be reached",errorMessage:"What to tell the visitor when it could not",isStale:"A refresh from the server failed: what shows is from before"},serverTemplates:["notFound"],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",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. `when` (a rule group over sources — `auth.isAuthenticated`, `roomData.room.closed != true`) makes it wait: it asks nothing until the rules hold — the page server holds a server one too, so a page that has nothing to ask for (a closed room, a guest) asks nothing, in either runtime. An `action` or a `connector` is resolved only by the page server: a provider naming one needs `runtime: "server"` — in the browser it never asks; a browser flow that changes data calls the action with the `runServerAction` step, then `performQuery` or `invalidateQueries` reads it again. `onApiSuccess` and `onApiError` say `url`, `method`, `status` and `data` (the answer) to their flow. 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:[]},market:{category:"provider",icon:"fa-solid fa-server"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),iP=X(()=>{NE(),V_=zN()({type:"channel",attributeValues:{subType:EN()(["","div","section","aside","main"])},sourceType:"channel",publishes:{connected:"Whether the channel is connected now",me:"This visitor's own member id",members:"Who is on the channel now",messages:"What was said on it since the page opened",last:"The last of them, or null",retained:"What the channel keeps for whoever joins"},triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:"",echo:!1,replayed:!1}},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"},echo:{label:"Heard on this page too",defaultValue:!1,type:"boolean"}}},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",description:"A realtime channel: every OTHER page on the same `topic` hears what one publishes, within milliseconds — the page that sent it too with `echo` (its `from` is then the `me` of the channel). Hidden, it stays joined and runs its flows — its `loadStrategy` defers only its children: to leave the topic while hidden, put it inside a container that carries the condition and `loadStrategy: 'visible'`. 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`), `last` and — on a `retain: true` channel — `retained`, the latest data the server said of each type, there as the page joins (`retained.lists`). 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, echo })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[]},market:{category:"provider",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),aP=X(()=>{NE(),B_=zN()({type:"carouselTrack",ancestorType:"carousel",content:{attributes:{},definition:{label:"Carousel Track",description:"Where a carousel shows its slides: what is inside is one slide, rendered once per item.",items:[]},builder:{canSnippet:!1},market:{category:"structure",icon:"fa-solid fa-film"},defaultStyle:{style:{base:{default:{position:"relative",overflow:"hidden"}}}}}})}),oP=X(()=>{NE(),U_={type:"select",label:"How far",defaultValue:"slide",options:[{label:"One slide",value:"slide"},{label:"A page — as many as it shows",value:"page"}]},W_=zN()({type:"carousel",contentAttributes:["label"],sourceType:"carousel",publishes:{items:"Every item it shows, one slide each",count:"How many items it has",index:"The slide it stands at, from 0 (a `scroll` row: the first in view)",item:"The item of that slide",playing:"Whether it moves on by itself now (autoplay, not paused)",atStart:"At its first slide — a `scroll` row at the start of its box; one that loops never is",atEnd:"At its last — a `scroll` row at the end of its box, however many it shows; one that loops never is",shown:"How many slides it shows whole (1 but for a `scroll` row)"},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:{by:U_},preview:{}},previous:{action:"previous",title:"Previous Slide",type:"callback",params:{by:U_},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",description:"Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.",items:[]},market:{category:"structure",icon:"fa-solid fa-images"},defaultStyle:{style:{base:{default:{position:"relative"}}}}},initialItems:["carouselTrack"]})}),sP=X(()=>{NE(),q_=["div","header","footer","nav","main","section","article","aside","figure"],H_=zN()({type:"container",attributeValues:{subType:EN()(["div","header","footer","nav","main","section","article","aside","address","figure","dl","dt","dd","li","h1","h2","h3","h4","h5","h6","p","span","details","summary"]),live:EN()(["","polite","assertive"])},content:{attributes:{subType:"div"},definition:{label:"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:[]},market:{category:"structure",icon:"fa-solid fa-crop-simple"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),lP=X(()=>{NE(),Z_={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"}},X_={"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"},Y_=zN()({type:"dialogContainer",contentAttributes:["headerLabel","acceptButtonLabel","rejectButtonLabel"],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",description:"A native <dialog> container shown or hidden through interactions (e.g. an onClick open/close).",items:[],loadStrategy:"lazy",styleSelectors:{backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""}},market:{category:"structure",icon:"fa-regular fa-message"},defaultStyle:{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":"rgb(0 0 0 / 50%)"}},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:Z_,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:X_},cancelButton:{default:{...X_,"margin-left":"12px"}}},subTypes:{}}},initialItems:["container"]})}),cP=X(()=>{NE(),G_=zN()({type:"focusGroup",attributeValues:{subType:EN()(["div","nav","section"])},content:{attributes:{subType:"div"},definition:{label:"Focus Group",description:"A box whose controls the arrow keys move through: up and down between them, left and right to the first of the next or previous list, down from a text field inside into them. For a search palette, a menu, a set of options — what someone goes through with the keyboard, which Tab alone took a stop at a time.",items:[]},market:{category:"structure",icon:"fa-solid fa-arrows-up-down"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),dP=X(()=>{NE(),K_=zN()({type:"list",attributeValues:{subType:EN()(["ul","ol"]),source:EN()(["none","controlled"])},sourceType:"list",publishes:{items:"Every row it draws, as its items give them",item:"Inside a row: that row's item",index:"Inside a row: its place, from 0"},content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"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:[]},market:{category:"structure",icon:"fa-solid fa-list"},defaultStyle:{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"}}}}}}},initialItems:["listItem","listItem","listItem"]})}),uP=X(()=>{NE(),J_=zN()({type:"listItem",content:{attributes:{},definition:{label:"List Item",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:[]},builder:{itemsNotAllowed:["listItem"]},market:{category:"structure",icon:"fa-solid fa-grip-lines"},defaultStyle:{style:{base:{default:{}}}}}})}),hP=X(()=>{NE(),e$=zN()({type:"modalContainer",contentAttributes:["title"],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:{placeholders:["title"],attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",description:"A modal overlay container opened and closed through interactions; use for dialogs over the page. The element itself is fixed over the whole viewport, and holds two layers side by side — neither inside the other: `backgroundContainer`, the dim layer, `rgb(0 0 0 / 50%)` (its `background-color` is the whole dim), and `rootContainer`, the dialog, centred by `top: 50%`, `left: 50%` and `transform: translate3d(-50%, -50%, 0)` — to sit it near the top, set `top` and `transform: translateX(-50%)`; flex alignment on the dim layer moves nothing. Inside the dialog, top to bottom: `headerContainer` (with `headerTitle` and `headerCloseButton`) and `bodyContainer`.",items:[],loadStrategy:"lazy",styleSelectors:{backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""}},market:{category:"structure",icon:"fa-regular fa-clone"},defaultStyle:{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":"rgb(0 0 0 / 50%)"}},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:{}}},initialItems:["container"]})}),pP=X(()=>{NE(),t$=zN()({type:"pagination",contentAttributes:["previousLabel","nextLabel","loadMoreLabel"],attributeValues:{mode:EN()(["pages","loadMore"]),target:EN()(["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",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:[],styleSelectors:{previous:"",page:"",next:"",loadMore:""}},market:{category:"structure",icon:"fa-solid fa-ellipsis"},defaultStyle:{style:{base:{default:{display:"flex","align-items":"center","row-gap":"8px","column-gap":"8px"}}},subTypes:{}}}})}),fP=X(()=>{NE(),n$=zN()({type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[]},builder:{itemsAllowed:["tabContainerHeader","tabContainerBody"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerHeader","tabContainerBody"]})}),mP=X(()=>{NE(),r$=zN()({type:"tabContainerBody",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Body",description:"The panel area inside a tabContainer that shows the active tab item.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]})}),gP=X(()=>{NE(),i$=zN()({type:"tabContainerHeader",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Header",description:"The row of tab triggers inside a tabContainer.",items:[]},builder:{canDelete:!1,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"]},market:{category:"structure",icon:"fa-solid fa-table-columns"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]})}),bP=X(()=>{NE(),a$=zN()({type:"tabContainerItem",marks:{'role="tab"':'in the header, with `aria-controls` its panel; in the body it is `role="tabpanel"`, `hidden` while not on show',"aria-selected":"on the open tab — what a class’s `current` state lights (`states: { current: { … } }`); `active` is the press, never the open tab",".active":"on the open tab too, the class the component adds",tabindex:"roving: 0 on the open tab, -1 on the rest — the arrow keys move between them"},content:{attributes:{hash:""},definition:{label:"Tab Container Item",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[]},builder:{itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",icon:"fa-regular fa-folder"},defaultStyle:{style:{base:{default:{}}},subTypes:{}}}})}),vP=X(()=>{o$={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:{}},onView:{action:"onView",title:"On View",type:"trigger",preview:{inView:""},params:{margin:{canBind:!1,defaultValue:0,type:"number",label:"Fire this many pixels before it shows"}}},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:{}}},s$=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"]}),yP=X(()=>{Xu(),l$={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"]},c$=/<(\/?)([a-zA-Z][a-zA-Z0-9]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g,d$=/\sclass\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+)/i,u$=/^["']|["']$/g,h$=/\s*\/$/,p$=(e,t)=>{let n=d$.exec(e);if(n){let r=n[1].replace(u$,"");return e.replace(d$,` class="${_c(r,t)}"`)}let r=h$.exec(e)?.[0]??"";return`${e.slice(0,e.length-r.length)} class="${t}"${r}`},f$=(e,t)=>{if(!Object.values(t).some(Boolean))return e;let n=0;return e.replace(c$,(e,r,i,a)=>{let o=i.toLowerCase();if("pre"===o&&(n=Math.max(n+(r?-1:1),0)),r||"code"===o&&n>0)return e;let s=_c((l$[o]??[]).map(e=>t[e]));return s?`<${i}${p$(a,s)}>`:e})}}),xP=X(()=>{m$=/<\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>/gi,g$=/<\s*\/?\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>/gi,b$=/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,v$=/\s(href|src|xlink:href)\s*=\s*(?:"\s*(?:javascript|data|vbscript)\s*:[^"]*"|'\s*(?:javascript|data|vbscript)\s*:[^']*'|(?:javascript|data|vbscript)\s*:[^\s>]*)/gi,y$=e=>e.replace(m$,"").replace(g$,"").replace(b$,"").replace(v$,""),x$=(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}"`)}}),wP=X(()=>{xP(),w$=/<\s*foreignObject\b[\s\S]*?<\s*\/\s*foreignObject\s*>|<\s*\/?\s*foreignObject\b[^>]*>/gi,k$=/\s(to|from|values|by)\s*=\s*(?:"[^"]*javascript\s*:[^"]*"|'[^']*javascript\s*:[^']*')/gi,O$=/^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i,S$=e=>O$.test(e),C$=e=>y$(e).replace(w$,"").replace(k$,""),N$=/<svg\b[^>]*>/i,_$=e=>e.replace(N$,e=>e.replace(/\s(width|height)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/^<svg\b/i,'<svg width="100%" height="100%"'))}),kP=X(()=>{_E(),$E(),TE(),AE(),EE(),PE(),zE(),ME(),IE(),RE(),jE(),DE(),LE(),FE(),QE(),VE(),BE(),qE(),HE(),ZE(),XE(),YE(),GE(),KE(),JE(),eP(),tP(),nP(),rP(),iP(),aP(),oP(),sP(),lP(),cP(),dP(),uP(),hP(),pP(),fP(),mP(),gP(),bP(),$$={ApiContainer:Q_,BlockHtml:VN,BlockJsx:BN,Button:XN,Carousel:W_,CarouselTrack:B_,Channel:V_,Container:H_,Custom:UN,DialogContainer:Y_,FocusGroup:G_,Dropdown:YN,DropdownPopup:GN,Embed:R_,FontAwesome:j_,Form:o_,FormControl:$_,Heading:KN,Image:D_,LayoutContainer:T_,Link:JN,List:K_,ListItem:J_,Loading:A_,Markdown:e_,ModalContainer:e$,NodeHtml:WN,NotFound:E_,Page:z_,Pagination:t$,Paragraph:t_,PlitziSdk:qN,Reference:HN,RichText:n_,Chart:I_,Svg:L_,TabContainer:n$,TabContainerBody:r$,TabContainerHeader:i$,TabContainerItem:a$,Text:r_,ThemeToggle:a_,Video:F_},T$=Object.fromEntries(Object.values($$).flatMap(e=>"serverTemplates"in e?[[e.type,e.serverTemplates]]:[])),A$=Object.fromEntries(Object.values($$).flatMap(e=>"contentAttributes"in e?[[e.type,e.contentAttributes]]:[])),E$=e=>A$[e]??[]}),OP=X(()=>{P$=/* @__PURE__ */new Map,z$=e=>{let t=P$.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),P$.set(e,t)),t},M$=e=>{let t=e.initialState?.styleVariant,n=void 0!==t&&Object.keys(t).length>0;return Object.fromEntries(Object.entries(e.styleSelectors).map(([r,i])=>{let a="base"===r?`plitzi__${e.type}`:`plitzi__${e.type}-${r}`;if("string"!=typeof i)return[r,i];if(!n)return[r,i?`${a} ${i}`:a];!z$(e.type).test(i)&&t[e.type]?.[r]&&(i=i?`${e.type} ${i}`:e.type);let o=i.replace(/\S+/g,n=>{let i=t[n]?.[r];if(!i)return n;let a=Array.isArray(i)?i:[i];return n===e.type&&"base"===r?a.map(e=>`${n}--${e}`).join(" "):n===e.type&&"base"!==r?a.map(e=>`${n}-${r}--${e}`).join(" "):`${n} ${a.map(e=>`${n}--${e}`).join(" ")}`});return o?[r,`${a} ${o}`]:[r,a]}))}}),SP=X(()=>{Lh(),es(),te(),mh(),I$=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[a,o]of Object.entries(e)){let e=ao(o,{...t,computed:{...r}}),s=n?.[a],l=void 0!==n&&Object.hasOwn(n,a)&&(s===e||hd(s,e));r[a]=l?s:e,i&&=l}return i&&n?n:r},R$=e=>V(e)&&Object.values(e).every(e=>"string"==typeof e),j$=(e,t,n)=>{let r=V(t)?t:{};return R$(n)?{...e,state:r,computed:L$(n,e,r)}:{...e,state:r}},L$=(e,t,n)=>{let r=Vu.map(e=>t[e]);if(D$?.definitions===e&&D$.state===n&&D$.globals.every((e,t)=>e===r[t]))return D$.computed;let i=I$(e,{...Object.fromEntries(Vu.map((e,t)=>[e,r[t]])),state:n},D$?.definitions===e?D$.computed:void 0);return D$={definitions:e,state:n,globals:r,computed:i},i}}),CP=X(()=>{zl(),F$=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>Us(e.when,t));return{...e,[r]:o?o.value:i}},{}):{}}),NP=X(()=>{SP(),Lh(),cv(),CP()}),_P=X(()=>{Eh(),Ph(),yv(),xv(),wE(),kP(),Th(),Ah(),OP(),NP(),zh(),vv(),Q$={settled:/* @__PURE__ */new Set([ju])},V$=(e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:a={},origin:o="",navigation:s,...l}=n,c={...a,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:o}},d={...e};for(let u of t)d[u]=eo(e[u],c,Q$);return d},B$=e=>Object.keys(e).length>0,U$=/* @__PURE__ */new WeakMap,W$=(e,t)=>{let n=U$.get(e);if(n?.type===t)return n.keys;let r=T$[t]??[],i=Object.keys(e).filter(t=>{let n=e[t];return"string"==typeof n&&qc(n)&&!r.includes(t)});return U$.set(e,{type:t,keys:i}),i},q$=/* @__PURE__ */new WeakMap,H$=(e,t,n)=>{let r=n&&void 0===t,i=r?q$.get(e):void 0;if(i)return i;let a={...e,styleSelectors:{...e.styleSelectors,...e.initialState?.styleSelectors,...t}};return a.styleSelectors=M$(a),r&&q$.set(e,a),a},Z$=e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0),X$=(e,t,n={},r={})=>{let i,{attributes:a,definition:o}=e,{rootId:s,plitziElementLayout:l}=t,c=hu(t,["id","rootId","attributes","definition","plitziElementLayout"]);t.attributes&&(a={...a,...t.attributes});let d=a;if(Object.keys(n).length>0)if(Z$(o.bindings)){let t=Ng(n,{...e,attributes:a},i);({attributes:a,definition:o,style:i}=t)}else i={};let u=W$(d,o.type).filter(e=>a[e]===d[e]);u.length>0&&(a=V$(a,u,n));let h=Object.keys(r).length>0;return h&&(a={...a,...hu(r,["visibility","styleSelectors"])}),o=H$(o,r.styleSelectors,o===e.definition),{...t,rootId:l?l.rootId:s,attributes:h&&!B$(c)?a:{...a,...c},definition:o,elementState:h?{...o.initialState,...r}:{...o.initialState},style:i}},Y$=(e,t)=>e?W$(e,t).map(t=>e[t]):[],G$=e=>["variables",...new Set(e.flatMap(e=>sd(e)))],K$=/* @__PURE__ */new WeakMap,J$=(e,t,n)=>{let r=t?void 0:K$.get(e);if(r?.type===n)return r.sources;let i=[...Y$(e,n),...Y$(t,n)],a=i.length>0?G$(i):void 0;return t||K$.set(e,{type:n,sources:a}),a},eT={},tT=[],nT=/* @__PURE__ */new WeakMap,rT=(e,t)=>{let n=e??eT,r=t??tT,i=nT.get(n)??/* @__PURE__ */new WeakMap;nT.set(n,i);let a=i.get(r);if(a)return a;let o=Ab(e,t),s={sourcePaths:o,storePaths:o.map(e=>Eb(e))};return i.set(r,s),s},iT=["navigation.routeParams","navigation.queryParams","navigation.origin"],aT={},oT=(e,t)=>e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])),sT=(e,{sourcePaths:t,storePaths:n},r,i)=>({paths:[e,...r?iT:[],...n,...i?["runtime.sources.flags"]:[]],sourcePaths:t,navigation:r,flags:i}),lT=({store:e,element:t,children:n,internalProps:r,previewMode:i=!1,parentVisible:a=!0})=>{let{id:o}=r,{path:s,setElementState:l}=Rb({store:e,id:o,bindings:t.definition.bindings,previewMode:i}),{type:c,bindings:d,items:u}=t.definition,h=gu(()=>J$(t.attributes,r.attributes,c),[t.attributes,r.attributes,c]),p=(u?.length??0)>0,f=gu(()=>sT(s,rT(d,h),void 0!==h,p),[s,d,h,p]),m=wu(e,f.paths),g=m[0]??Mb,b=1+(f.navigation?iT.length:0),[v,y,x]=f.navigation?m.slice(1,b):[void 0,void 0,void 0],w=f.flags?m[m.length-1]??aT:aT,k=m.slice(b,b+f.sourcePaths.length),O=_(k);oT(O.current,k)||(O.current=k);let S=O.current,C=gu(()=>Pb(f.sourcePaths,S),[f,S]),{internalPropsParsed:N,customProps:$}=gu(()=>{let e=X$(t,r,{...C,routeParams:v,queryParams:y,origin:x},g);return{internalPropsParsed:Object.assign(e,{setElementState:l}),customProps:hu(r,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"])}},[t,r,C,v,y,x,g,l]);return{internalProps:N,customProps:$,children:wN({id:o,store:e,flags:w,definition:N.definition,plitziElementLayout:N.plitziElementLayout,children:n,previewMode:i,visible:a&&uu(N.elementState.visibility)})}}}),$P=X(()=>{cT=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */z("div",{children:"Something broke! Please refresh and try again."}):e}}}),TP=X(()=>{$P(),dT=cT}),AP=X(()=>{uT=e=>void 0!==e.nodes}),EP=X(()=>{hT="data-plitzi-devtools"}),PP=X(()=>{AP(),So(),EP()}),zP=X(()=>{PP(),pT=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:a=!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]||a&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){Reflect.deleteProperty(this.events[e],t);let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),Reflect.deleteProperty(this.events,e))}}async emit(e,t=[],...n){let r;this.debugMode&&Sr.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 a=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),a}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){e?this.events[e]&&(Reflect.deleteProperty(this.events,e),this.counts.delete(e)):(this.events={},this.counts.clear())}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}}}),MP=X(()=>{we(),fT=Q("EventBridgeContext",{})}),IP=X(()=>{zP(),MP(),mT=({children:e,debugMode:t,onInit:n})=>{let r=C(()=>new pT({debugMode:t}),[t]);x(()=>()=>{r.clear()},[r]);let i=C(()=>({eventBridge:r}),[r]);return x(()=>{n?.(i)},[n,i]),/* @__PURE__ */z(fT,{value:i,children:e})}}),RP=X(()=>{MP(),gT=Object.freeze({}),bT=Object.freeze({}),vT=(e,t=gT,n=bT,r=fT,i=!1)=>{let{eventBridge:a}=m(r);return x(()=>{if(i||!a||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&a.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&a.off(e,t,n)}},[e,t,a,n,i]),a}}),jP=X(()=>{yT={main:/* @__PURE__ */"schemaAddPage.schemaHomePage.schemaUpdatePage.schemaRemovePage.schemaAddPageFolder.schemaUpdatePageFolder.schemaRemovePageFolder.schemaUpdateSettings.schemaUpdate.schemaAddElement.schemaUpdateElement.schemaRenameElement.schemaUpdateElements.schemaRemoveElement.schemaMoveElement.schemaCloneElement.schemaAddVariable.schemaUpdateVariable.schemaRemoveVariable.schemaSetFlag.schemaRemoveFlag.schemaAddSnippet.schemaAddComponent.schemaUpdateComponent.schemaRemoveComponent.schemaDetachInstance.styleUpdate.styleAddSelector.styleUpdateSelector.styleRemoveSelector.styleRemoveSelectors.styleAddSelectorVariable.styleUpdateSelectorVariable.styleRemoveSelectorVariable.styleAddVariable.styleUpdateVariable.styleRemoveVariable.styleAddSnippet.styleUpdateSettings".split("."),builder:["builderSetBaseContext","builderSetSelected","builderSetHovered"],snippet:[],interaction:[],element:[]}}),DP=X(()=>{zP(),MP(),IP(),RP(),jP(),xT=pT}),LP=X(()=>{wT="data-plitzi-fonts",kT=e=>{x(()=>{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[${wT}]`)){let r=document.createElement("style");r.setAttribute(wT,""),r.textContent=e.faces,t.appendChild(r),n.push(r)}return()=>n.forEach(e=>e.remove())},[e])}}),FP=X(()=>{To(),OT=({initLoading:e=!1,server:t,webKey:n,internalUsage:r=!0,baseUrl:i})=>{let[a,o]=$(e);return{networkLoading:a,networkQuery:g(async(e,a={},s="get",l="")=>{try{o(!0),s=s.toLowerCase();let c=new Headers;c.append("Content-Type","application/json"),l?c.append("Authorization",`Bearer ${l}`):n&&c.append("Authorization",`Bearer ${n}`);let d="";r&&t&&(d=i??t.serverUrl);let u=a;(a instanceof FormData?Array.from(a.values()):Object.values(a)).forEach(e=>{e instanceof Blob&&"multipart/form-data"!==c.get("Content-Type")&&c.delete("Content-Type")}),u instanceof FormData||(u=new FormData,Object.entries(a).forEach(([e,t])=>{u.append(e,t)}));let h={method:s,headers:c,body:u};"application/json"===c.get("Content-Type")&&(h.body=JSON.stringify(a)),"get"===s&&delete h.body;let p=await fetch(`${d}${e}`,h),f=await p.json(),m=mi(p.status,f);return m&&hi({reason:m,url:`${d}${e}`}),f}catch(KIt){}finally{o(!1)}},[n,r,t,i])}}}),QP=X(()=>{ee(),ST=Q("PlitziContext",{}),CT=()=>{let e=m(ST);if(void 0===e)throw Error("The Plitzi context is undefined. Render the element inside a PlitziProvider.");return e},NT=e=>{let{children:t,value:n}=e;/* @__PURE__ */
6
6
  return z(ST,{value:n,children:t})}}),VP=X(()=>{ee(),_T=Q("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"})}),BP=X(()=>{VP(),$T=(e,t,n=!0)=>{let{server:r}=m(_T),i=r.ssr?.renderResult;i&&n&&(i.prePaint??={},i.prePaint[e]??=`(${t.toString()})();`)}}),UP=X(()=>{mh(),TT=e=>{let t=_(e);return t.current!==e&&!hd(t.current,e)&&(t.current=e),t.current}}),WP=X(()=>{LP(),FP(),QP(),BP(),UP()}),qP=X(()=>{AT=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>":"{…}"},ET=e=>{if("object"!=typeof e||!e)return AT(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(AT).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${AT(t[e])}`).join(", ")}${n.length>4?", …":""} }`},PT=(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]))},zT=(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],a=t[i];if(!Object.is(r,a)&&(n.push({key:i,prev:ET(r),next:ET(a),ref:PT(r,a)}),n.length>=12))break}return n}}),HP=X(()=>{Pr(),MT=wt({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"})}),ZP=X(()=>{qP(),HP(),Pr(),IT=ar({max:30}),RT=[],jT=/* @__PURE__ */new Map,DT=/* @__PURE__ */new Map,LT=/* @__PURE__ */new Map,FT=/* @__PURE__ */new Map,QT=!0,VT=/* @__PURE__ */new Map,BT=/* @__PURE__ */new Map,UT=0,WT=/* @__PURE__ */new Map,qT=/* @__PURE__ */new Map,HT=!1,ZT=!1,XT=0,YT=!1,GT=!1,KT="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},JT=()=>{let e={};for(let[t,n]of FT)e[t]={parentId:DT.get(t),baseDuration:n,elementId:LT.get(t)??t,mountedAt:VT.get(t),unmountedAt:BT.get(t)};return e},eA=()=>{QT&&(QT=!1,MT.setState("tree",JT())),MT.setState("hydrated",GT),MT.setState("commits",RT)},tA=e=>{qT.delete(e),DT.delete(e),LT.delete(e),FT.delete(e),VT.delete(e),BT.delete(e),QT=!0},nA=e=>{for(let[t,n]of BT)n<=e&&tA(t)},rA=()=>{if(YT=!1,jT.size>0){let e=[...jT.values()].sort((e,t)=>e.timestamp-t.timestamp);jT.clear(),(RT=[...RT,...e]).length>200&&(RT=RT.slice(RT.length-200)),nA(RT[0].commitId)}ZT&&eA()},iA=(e,t,n)=>{DT.has(e)&&DT.get(e)===t||(QT=!0),DT.size>=2e4&&!DT.has(e)&&(DT.clear(),LT.clear(),FT.clear(),VT.clear(),BT.clear(),QT=!0),DT.set(e,t),LT.set(e,n)},aA=()=>{let e=IT.entriesSince(UT);UT=IT.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:`${ET(t.prev)} → ${ET(t.next)}`}))},oA={onRender:(e,t,n,r,i,a)=>{HT||(HT=!0,MT.setState("enabled",!0));let o=!FT.has(e);FT.set(e,r);let s,l=WT.get(e);WT.delete(e),l&&(s=zT(qT.get(e),l),qT.set(e,l));let c={id:e,elementId:LT.get(e)??e,parentId:DT.get(e),phase:o?"mount":t,actualDuration:n,baseDuration:r,changedProps:s},d=jT.get(a);d?(d.elements.push(c),d.elementCount+=1,d.duration=Math.max(d.duration,n)):(XT+=1,jT.set(a,{commitId:XT,timestamp:a,duration:n,elementCount:1,elements:[c],causes:aA()})),o&&(VT.set(e,jT.get(a)?.commitId??XT),QT=!0),YT||(YT=!0,KT(rA))},lastCommitId:()=>XT,commitsSince:e=>{let t=[...jT.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...RT,...t].filter(t=>t.commitId>e)},linkParent:iA,markMounted:e=>{BT.delete(e)&&(QT=!0)},markUnmounted:e=>{FT.has(e)?(BT.set(e,XT),QT=!0,YT||(YT=!0,KT(rA))):tA(e)},recordInputs:(e,t)=>{WT.set(e,t)},recordStoreChange:e=>{IT.record(e)},setHydrated:()=>{GT||(GT=!0,ZT&&MT.setState("hydrated",!0))},start:()=>{ZT=!0,rA(),eA()},stop:()=>{ZT=!1},clear:()=>{RT=[],jT.clear(),UT=IT.lastSeq(),WT.clear(),XT=0;for(let e of[...BT.keys()])tA(e);VT.clear(),QT=!0,eA()}}}),XP=X(()=>{ZP(),HP(),sA=()=>{let e=T(MT.subscribe,MT.getState,MT.getState);return x(()=>(oA.start(),oA.stop),[]),{...e,clear:oA.clear}}}),YP=X(()=>{ZP(),lA=()=>()=>({onChange:e=>oA.recordStoreChange(e)})}),GP=X(()=>{ZP(),XP(),YP()}),KP=/* @__PURE__ */G({default:()=>pA}),JP=X(()=>{ke(),rh(),$h(),Th(),Ah(),Eh(),Ph(),_P(),TP(),Nr(),DP(),WP(),GP(),cA=typeof window>"u",dA=(e,t,n,r)=>{x(()=>{if(n)return oA.markMounted(t),()=>oA.markUnmounted(t)},[n,t]);let i=C(()=>({[`${e}_setState`]:r}),[e,r]);vT("element",i)},uA=(e,t)=>{let n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(n=>Object.hasOwn(e,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))},hA=cA?()=>{}:dA,pA=e=>{let t=e.displayName||e.name,n=(t,{ref:n,traceId:r,parentTraceId:i,parentVisible:o})=>{let{id:s,rootId:l}=t.internalProps,{settings:{previewMode:c,debugMode:d},root:{baseElementId:u}}=CT(),h=kn(),p=ku(h,`schema.flat.${s}`);if(!p)throw Error(`Element ${s} not found, Page ${u}`);let{internalProps:f,customProps:m,children:g}=lT({store:h,element:p,internalProps:t.internalProps,children:t.children,previewMode:c,parentVisible:o}),{attributes:b,definition:v,style:y,plitziElementLayout:x,elementState:w,setElementState:k}=f;hA(s,r,!!d,k);let O=o&&uu(w.visibility),S=gu(()=>({id:s,rootId:l,visible:O,traceId:r,attributes:b,definition:v,plitziElementLayout:x,style:y,elementState:w,setElementState:k}),[b,v,w,s,x,l,y,k,O,r]),C=gu(()=>({visible:O,traceId:r}),[O,r]),N=gu(()=>{let r={...du(e,f.attributes),...t.extraProps,...m,...hu(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return g&&(r={...r,children:g}),cA?/* @__PURE__ */z(e,{...r,ref:n}):/* @__PURE__ */z(dT,{children:/* @__PURE__ */z(e,{...r,ref:n})})},[f.attributes,t,m,g,n]),_=cA?/* @__PURE__ */z(ae,{value:S,children:N}):/* @__PURE__ */z(Rc,{value:C,children:/* @__PURE__ */z(ae,{value:S,children:N})});if(d){oA.linkParent(r,i,s);let e={internalProps:t.internalProps,visible:O,attributes:b,definition:v,style:y,elementState:w,plitziElementLayout:x,children:g,...m,...t.extraProps,...hu(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return oA.recordInputs(r,e),/* @__PURE__ */z(a,{id:r,onRender:oA.onRender,children:_})}return _},r=f(({element:e,traceId:t,parentTraceId:r,parentVisible:i})=>{let a=_(void 0);return n(e,{ref:a,traceId:t,parentTraceId:r,parentVisible:i})},(e,t)=>e.traceId===t.traceId&&e.parentTraceId===t.parentTraceId&&e.parentVisible===t.parentVisible&&uA(e.element,t.element));r.displayName=`withElement(${t}).resolved`;let i=({element:t,parentVisible:n,traceId:r})=>{let{id:i,rootId:a}=t.internalProps,o=C(()=>({id:i,rootId:a,visible:n,traceId:r,plitziJsxSkipHOC:!0}),[i,a,n,r]),s=C(()=>({visible:n,traceId:r}),[n,r]),l=/* @__PURE__ */z(ae,{value:o,children:/* @__PURE__ */z(e,{...t})});/* @__PURE__ */
7
7
  return z(Rc,{value:s,children:l})},o=cA?t=>{let{id:r,rootId:i}=t.internalProps,a=m(ae),o=a?.visible??!0,s=`${r}${k()}`;if(t.plitziJsxSkipHOC)/* @__PURE__ */
8
8
  return z(ae,{value:{id:r,rootId:i,visible:o,traceId:a?.traceId??s,plitziJsxSkipHOC:!0},children:/* @__PURE__ */z(e,{...t})});let l=_(void 0);return n(t,{ref:l,traceId:s,parentTraceId:a?.traceId,parentVisible:o})}:e=>{let{id:t}=e.internalProps,n=m(Rc),a=n?.visible??!0,o=`${t}${k()}`;return e.plitziJsxSkipHOC?/* @__PURE__ */z(i,{element:e,parentVisible:a,traceId:n?.traceId??o}):/* @__PURE__ */z(r,{element:e,traceId:o,parentTraceId:n?.traceId,parentVisible:a})};return o.displayName=`withElement(${t})`,o}}),ez=X(()=>{fA=(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]}))}}),tz=X(()=>{mA=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:a,params:o,serverMarker:s,motion:l,testMarker:d,events:u,children:h})=>""===e?h:c(e,{ref:t,style:n,className:r,...i,...a?{id:a}:{},...o,...l,...u,...s,...d},h)}),nz=X(()=>{NE(),gA=(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}`}))]:[]},bA=(e,t,n,r,i)=>{let a=jN.setState,o=$N(a.params),s=jN.toggleState,l=$N(s.params),c={type:"select",options:gA(e,t),when:e=>"attribute"===e.category||"state"===e.category};return{setState:TN("setState",a,n,{title:`Update ${t.label}`,postCallback:r,params:{...o,key:{...o.key,...c},value:{...o.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:TN("toggleState",s,i,{title:`Toggle ${t.label}`,postCallback:r,params:{...l,key:{...l.key,...c}}})}}});function rz(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}function iz(e){return!!e&&(az(e)||IA(e)||!!e[yA]||!!e[OA]?.[yA]||RA(e)||jA(e))}function az(e){if(!e||!DA(e))return!1;const t=kA(e);if(null===t||t===wA[SA])return!0;const n=wA.hasOwnProperty.call(t,OA)&&t[OA];if(n===Object)return!0;if(!LA(n))return!1;let r=EA.get(n);return void 0===r&&(r=Function.toString.call(n),EA.set(n,r)),r===AA}function oz(e,t,n=!0){0===sz(e)?(n?Reflect.ownKeys(e):wA.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function sz(e){const t=e[xA];return t?t.type_:IA(e)?1:RA(e)?2:jA(e)?3:0}function lz(e,t){if(RA(e))return new Map(e);if(jA(e))return new Set(e);if(IA(e))return Array[SA].slice.call(e);const n=az(e);if(!0===t||"class_only"===t&&!n){const t=wA.getOwnPropertyDescriptors(e);delete t[xA];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[_A]&&(a[_A]=!0,a[CA]=!0),(a.get||a.set)&&(t[i]={[CA]:!0,[_A]:!0,[NA]:a[NA],[$A]:e[i]})}return wA.create(kA(e),t)}{const t=kA(e);if(null!==t&&n)return{...e};const r=wA.create(t);return wA.assign(r,e)}}function cz(e,t=!1){return uz(e)||TA(e)||!iz(e)||(sz(e)>1&&wA.defineProperties(e,{set:BA,add:BA,clear:BA,delete:BA}),wA.freeze(e),t&&oz(e,(e,t)=>{cz(t,!0)},!1)),e}function dz(){rz(2)}function uz(e){return null===e||!DA(e)||wA.isFrozen(e)}function hz(e){const t=HA[e];return t||rz(0),t}function pz(e,t){t&&(e.patchPlugin_=hz(WA),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fz(e){mz(e),e.drafts_.forEach(gz),e.drafts_=null}function mz(e){e===XA&&(XA=e.parent_)}function gz(e){const t=e[xA];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function bz(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[xA].modified_&&(fz(t),rz(4)),iz(e)&&(e=vz(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[xA].base_,e,t)}else e=vz(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cz(t,n)}(t,e,!0),fz(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vA?e:void 0}function vz(e,t){if(uz(t))return t;const n=t[xA];if(!n)return kz(t,e.handledSet_,e);if(!JA(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);wz(n,e)}return n.copy_}function yz(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}function xz(e,t,n,r){const i=QA(e),a=e.type_;if(void 0!==r&&zA(i,r,a)===t)return void MA(i,r,n,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;oz(i,(e,n)=>{if(TA(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??eE;for(const s of o)MA(i,s,n,a)}function wz(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)}yz(e)}}function kz(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||TA(e)||t.has(e)||!iz(e)||uz(e)||(t.add(e),oz(e,(r,i)=>{if(TA(i)){const t=i[xA];JA(t,n)&&(MA(e,r,VA(t),e.type_),yz(t))}else iz(i)&&kz(i,t,n)})),e}function Oz(e,t){const n=e[xA];return(n?QA(n):e)[t]}function Sz(e,t){if(!(t in e))return;let n=kA(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=kA(n)}}function Cz(e){e.modified_||(e.modified_=!0,e.parent_&&Cz(e.parent_))}function Nz(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=lz(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function _z(e,t,n,r){const[i,a]=RA(t)?hz(UA).proxyMap_(t,n):jA(t)?hz(UA).proxySet_(t,n):function(e,t){const n=IA(e),r={type_:n?1:0,scope_:t?t.scope_:YA(),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,a=tE;n&&(i=[r],a=nE);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return(n?.scope_??YA()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!JA(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const a=VA(i);xz(e,i.draft_??i,a,n),wz(i,r)})}(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function $z(e){return TA(e)||rz(10),Tz(e)}function Tz(e){if(!iz(e)||uz(e))return e;const t=e[xA];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lz(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=lz(e,!0);const i=n;return jA(n)&&(n=/* @__PURE__ */new Set),oz(i,(e,t)=>{MA(n,e,Tz(t))},r),t&&(t.finalized_=!1),n}var Az,Ez,Pz,zz,Mz,Iz,Rz,jz,Dz,Lz,Fz,Qz,Vz,Bz,Uz,Wz,qz,Hz,Zz,Xz,Yz,Gz,Kz,Jz,eM,tM,nM,rM,iM,aM,oM,sM,lM,cM,dM,uM,hM,pM,fM,mM,gM,bM,vM,yM,xM,wM,kM,OM,SM,CM,NM,_M,$M,TM,AM,EM,PM,zM,MM,IM,RM,jM,DM,LM,FM,QM,VM,BM,UM,WM,qM,HM,ZM,XM,YM,GM,KM,JM,eI,tI,nI,rI,iI,aI,oI,sI,lI,cI,dI,uI,hI,pI,fI,mI,gI,bI,vI,yI,xI,wI,kI,OI,SI,CI,NI,_I,$I,TI,AI,EI,PI,zI,MI,II,RI,jI,DI,LI,FI,QI,VI,BI,UI,WI,qI,HI,ZI,XI,YI,GI,KI,JI,eR,tR,nR,rR,iR,aR,oR,sR,lR,cR,dR,uR,hR,pR,fR,mR,gR,bR,vR,yR,xR,wR,kR,OR,SR,CR,NR,_R,$R,TR,AR,ER,PR,zR,MR,IR,RR,jR,DR,LR,FR,QR,VR,BR,UR,WR,qR,HR,ZR,XR,YR,GR,KR,JR,ej,tj,nj,rj,ij,aj,oj,sj,lj,cj,dj,uj,hj,pj,fj,mj,gj,bj,vj,yj,xj,wj,kj,Oj,Sj,Cj,Nj,_j,$j,Tj,Aj,Ej,Pj,zj,Mj,Ij,Rj,jj,Dj,Lj,Fj,Qj,Vj,Bj,Uj,Wj,qj,Hj,Zj,Xj,Yj,Gj,Kj,Jj,eD,tD,nD,rD,iD,aD,oD,sD,lD,cD,dD,uD,hD,pD,fD,mD,gD,bD,vD,yD,xD,wD,kD,OD,SD,CD,ND,_D,$D,TD,AD,ED,PD,zD,MD,ID,RD,jD,DD,LD,FD,QD,VD,BD,UD,WD,qD,HD,ZD,XD,YD,GD,KD,JD,eL=X(()=>{vA=Symbol.for("immer-nothing"),yA=Symbol.for("immer-draftable"),xA=Symbol.for("immer-state"),kA=(wA=Object).getPrototypeOf,OA="constructor",CA="configurable",NA="enumerable",_A="writable",$A="value",TA=e=>!!e&&!!e[xA],AA=wA[SA="prototype"][OA].toString(),EA=/* @__PURE__ */new WeakMap,PA=(e,t,n=sz(e))=>2===n?e.has(t):wA[SA].hasOwnProperty.call(e,t),zA=(e,t,n=sz(e))=>2===n?e.get(t):e[t],MA=(e,t,n,r=sz(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},IA=Array.isArray,RA=e=>e instanceof Map,jA=e=>e instanceof Set,DA=e=>"object"==typeof e,LA=e=>"function"==typeof e,FA=e=>"boolean"==typeof e,QA=e=>e.copy_||e.base_,VA=e=>e.modified_?e.copy_:e.base_,BA={[$A]:dz},UA="MapSet",WA="Patches",qA="ArrayMethods",HA={},ZA=e=>!!HA[e],YA=()=>XA,GA=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:ZA(UA)?hz(UA):void 0,arrayMethodsPlugin_:ZA(qA)?hz(qA):void 0}),KA=e=>XA=GA(XA,e),JA=(e,t)=>e.scope_===t,eE=[],tE={get(e,t){if(t===xA)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=QA(e);if(!PA(i,t,e.type_))return function(e,t,n){const r=Sz(t,n);return r?$A in r?r[$A]:r.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!iz(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===Oz(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||!iz(n)||n[xA])&&e.baseRefs_.has(n)}(e,0,a)){Nz(e);const n=1===e.type_?+t:t,r=_z(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in QA(e),ownKeys:e=>Reflect.ownKeys(QA(e)),set(e,t,n){const r=Sz(QA(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Oz(QA(e),t),o=r?.[xA];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(((i=n)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==n||PA(e.base_,t,e.type_)))return!0;Nz(e),Cz(e)}var i,a;return e.copy_[t]===n&&(void 0!==n||PA(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(TA(n)){const i=n[xA];JA(i,r)&&i.callbacks_.push(function(){Nz(e),xz(e,n,VA(i),t)})}else iz(n)&&e.callbacks_.push(function(){const i=QA(e);3===e.type_?i.has(n)&&kz(n,r.handledSet_,r):zA(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&kz(zA(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Nz(e),void 0!==Oz(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Cz(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=QA(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[_A]:!0,[CA]:1!==e.type_||"length"!==t,[NA]:r[NA],[$A]:n[t]}:r},defineProperty(){rz(11)},getPrototypeOf:e=>kA(e.base_),setPrototypeOf(){rz(12)}},nE={};for(let e in tE){let t=tE[e];nE[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}nE.deleteProperty=function(e,t){return nE.set.call(this,e,t,void 0)},nE.set=function(e,t,n){return tE.set.call(this,e[0],t,n,e[0])},rE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(LA(e)&&!LA(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(LA(t)||rz(6),void 0===n||LA(n)||rz(7),iz(e)){const i=KA(this),a=_z(0,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?fz(i):mz(i)}return pz(i,n),bz(r,i)}if(!e||!DA(e)){if(r=t(e),void 0===r&&(r=e),r===vA&&(r=void 0),this.autoFreeze_&&cz(r,!0),n){const t=[],i=[];hz(WA).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}rz(1)},this.produceWithPatches=(e,t)=>{if(LA(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]},FA(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);const t=e?.useStrictShallowCopy;(FA(t)||"class_only"===t)&&this.setUseStrictShallowCopy(t),FA(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){iz(e)||rz(8),TA(e)&&(e=$z(e));const t=KA(this),n=_z(0,e,void 0);return n[xA].isManual_=!0,mz(t),n}finishDraft(e,t){const n=e&&e[xA];n&&n.isManual_||rz(9);const{scope_:r}=n;return pz(r,t),bz(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=hz(WA).applyPatches_;return TA(e)?r(e,t):this.produce(e,e=>r(e,t))}},globalThis.Iterator,iE=new rE,aE=iE.produce}),tL=X(()=>{nz(),nh(),eL(),Az=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},Ez=({attributes:e,definition:t,setElementState:n})=>{let r=g((e,t)=>{let r,i;return n(n=>(r=n,i=aE(n,r=>ic(r,e,t(nc(n,e)))),i)),{prevState:r,nextState:i}},[n]),i=g(e=>{if(!e.key||void 0===e.value)return{prevState:void 0,nextState:void 0};let{key:t}=e,n=Az(e.value);return r(t,()=>n)},[r]),a=g(e=>{if(!e.key)return{prevState:void 0,nextState:void 0};let{key:t}=e;return r(t,e=>!0!==Az(e))},[r]),o=g((e,t)=>{let r=t?.prevState;e.revertOnFinish&&r&&n(r)},[n]);return C(()=>bA(e,t,i,o,a),[e,t,i,o,a])}}),nL=X(()=>{NE(),Pz='input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',zz=({label:e,nodeRef:t})=>C(()=>AN(RN,{focus:()=>{let e=t.current;((e?.matches(Pz)?e:e?.querySelector(Pz))??e)?.focus()}},{focus:{title:`Focus ${e}`}}),[e,t])}),rL=X(()=>{Mz={desktop:1024,tablet:768,mobile:0},Iz=e=>0===Mz[e]?"0":`${String(Mz[e]/16)}rem`,Rz=e=>e<=Mz.tablet?"mobile":e<=Mz.desktop?"tablet":"desktop"}),iL=X(()=>{jz=["desktop","tablet","mobile"],Dz=e=>jz.some(t=>t===e)}),aL=X(()=>{Lz=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"}}}},{})}),oL=X(()=>{Fz="https://fonts.googleapis.com",Qz={woff2:"font/woff2",woff:"font/woff"},Vz=[{source:"system",family:"system-ui",fallback:'-apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Arial",fallback:"Helvetica, sans-serif",weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Verdana",fallback:"Geneva, sans-serif",weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Trebuchet MS",fallback:"Helvetica, sans-serif",weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Georgia",fallback:'"Times New Roman", serif',weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Times New Roman",fallback:"Times, serif",weights:[400,700],styles:["normal","italic"]},{source:"system",family:"Courier New",fallback:"ui-monospace, monospace",weights:[400,700],styles:["normal","italic"]},{source:"system",family:"ui-monospace",fallback:"SFMono-Regular, Menlo, Consolas, monospace",weights:[400,700],styles:["normal","italic"]}],Bz=e=>{let t=new Set(e.map(e=>e.family));return[...e,...Vz.filter(e=>!t.has(e.family))]},Uz=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},Wz=e=>{try{return new URL(e).origin}catch{return}},qz={"<":"\\3c ",">":"\\3e "},Hz=e=>`"${e.replace(/[\\"<>]/g,e=>qz[e]??`\\${e}`)}"`,Zz=/^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})?)*$/,Xz=e=>/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e),Yz=e=>{let t=Xz(e.family)?e.family:Hz(e.family);return e.fallback?`${t}, ${e.fallback}`:t},Gz=e=>(e.split(",")[0]??"").trim().replace(/^['"]|['"]$/g,"").trim(),Kz=e=>{let t=[...new Set(e.weights)].filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:[400]},Jz=e=>encodeURIComponent(e).replace(/%20/g,"+"),eM=(e,t)=>e===t?0:e<t?-1:1,tM=(e,t=Fz)=>{let n=[...e].sort((e,t)=>eM(e.family,t.family)).map(e=>{let t=Kz(e);if(!e.styles.includes("italic"))return`family=${Jz(e.family)}:wght@${t.join(";")}`;let n=[0,1].flatMap(e=>t.map(t=>`${e},${t}`));return`family=${Jz(e.family)}:ital,wght@${n.join(";")}`}),r=[...new Set(e.map(e=>e.display??"swap"))],i=1===r.length?r[0]:"swap";return`${t.replace(/\/+$/,"")}/css2?${n.join("&")}&display=${i}`},nM=(e,t)=>`${Fz}/css2?${[...e].sort(eM).map(e=>`family=${Jz(e)}`).join("&")}&text=${encodeURIComponent(t)}&display=swap`,rM=(e="/fonts")=>t=>`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`,iM=/* @__PURE__ */new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong","inherit","initial","revert","revert-layer","unset"]),aM=e=>{let t=/* @__PURE__ */new Set;for(let n of e.matchAll(/font-family\s*:\s*([^;}]+)/g)){let e=n[1];if(e.includes("var("))continue;let r=Gz(e);r&&!iM.has(r.toLowerCase())&&t.add(r)}return[...t]},oM=(e,t)=>["@font-face{",`font-family:${Hz(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(${Hz(t.url)}) format(${Hz(t.format)});`,t.unicodeRange&&Zz.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),sM=(e,t,n)=>{let r=[],i=[],a=[],o=/* @__PURE__ */new Map,s=/* @__PURE__ */new Set,l=(e,t)=>{e&&(s.add(e),o.set(e,(o.get(e)??!1)||t))},c=e.filter(e=>"google"===e.source);if(c.length>0){let e=tM(c,n);void 0===n?(l(Fz,!1),l("https://fonts.gstatic.com",!0)):l(Wz(e),!0),c.some(e=>e.preload)&&i.push({href:e,rel:"preload",as:"style"}),r.push({href:e,rel:"stylesheet"})}return e.forEach(e=>{"remote"===e.source&&e.stylesheet&&Uz(e.stylesheet)?(l(Wz(e.stylesheet),!1),e.preload&&i.push({href:e.stylesheet,rel:"preload",as:"style"}),r.push({href:e.stylesheet,rel:"stylesheet"})):"remote"===e.source&&e.files?e.files.filter(e=>Uz(e.url)).forEach(t=>{l(Wz(t.url),!0),a.push(oM(e,{...t,url:t.url})),e.preload&&i.push({href:t.url,rel:"preload",as:"font",type:Qz[t.format],crossorigin:!0})}):"hosted"===e.source&&e.files.forEach(n=>{let r=t(n.path);l(Wz(r),!0),a.push(oM(e,{...n,url:r})),e.preload&&i.push({href:r,rel:"preload",as:"font",type:Qz[n.format],crossorigin:!0})})}),{preconnect:[...o].map(([e,t])=>t?{href:e,crossorigin:t}:{href:e}),links:[...i,...r],faces:a.join(""),origins:[...s]}}}),sL=X(()=>{oL(),te(),lM=/* @__PURE__ */new Set(["system","google","remote","hosted"]),cM=/* @__PURE__ */new Set(["auto","block","swap","fallback","optional"]),dM=/* @__PURE__ */new Set(["woff2","woff"]),uM=e=>{for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n<32||127===n)return!0}return!1},hM=class extends Error{},pM=e=>{throw new hM(e)},fM=e=>{if("string"!=typeof e)return pM("font.family must be a string");let t=e.trim();return t?t.length>100?pM("font.family cannot be longer than 100 characters"):uM(t)?pM("font.family cannot contain control characters"):t:pM("font.family cannot be empty")},mM=e=>{if(void 0===e)return[400];if(!Array.isArray(e)||0===e.length)return pM("font.weights must be a non-empty list of numbers");let t=e.map(e=>"number"!=typeof e||!Number.isInteger(e)||e<1||e>1e3?pM("font.weights must hold whole numbers between 1 and 1000"):e);return[...new Set(t)].sort((e,t)=>e-t)},gM=e=>{if(void 0===e)return["normal"];if(!Array.isArray(e)||0===e.length)return pM("font.styles must be a non-empty list");let t=e.map(e=>"normal"!==e&&"italic"!==e?pM('font.styles may only hold "normal" or "italic"'):e);return[...new Set(t)]},bM=(e,t)=>{if(!V(e))return pM(`font.files[${t}] must be an object`);let{weight:n,style:r,format:i,unicodeRange:a}=e;if("number"!=typeof n||!Number.isInteger(n)||n<1||n>1e3)return pM(`font.files[${t}].weight must be a whole number between 1 and 1000`);if("normal"!==r&&"italic"!==r)return pM(`font.files[${t}].style must be "normal" or "italic"`);if("string"!=typeof i||!dM.has(i))return pM(`font.files[${t}].format must be "woff2" or "woff"`);let o={weight:n,style:r,format:i};if(void 0!==a){if("string"!=typeof a)return pM(`font.files[${t}].unicodeRange must be a string`);o.unicodeRange=a}return o},vM=(e,t)=>"string"==typeof e&&e?e.includes("://")||e.startsWith("/")?pM(`font.files[${t}].path must be relative to the font store, not a URL`):e.split("/").includes("..")?pM(`font.files[${t}].path cannot climb out of the font store`):e:pM(`font.files[${t}].path must be a non-empty string`),yM=e=>Array.isArray(e)&&0!==e.length?e:pM("font.files must be a non-empty list"),xM=e=>{if(!V(e))return pM("a font must be an object");let{source:t,fallback:n,display:r,preload:i}=e;if("string"!=typeof t||!lM.has(t))return pM("font.source must be one of: system, google, remote, hosted");if("string"!=typeof n||!n.trim())return pM("font.fallback is required: it is what renders until the face arrives");if(void 0!==r&&("string"!=typeof r||!cM.has(r)))return pM("font.display must be one of: auto, block, swap, fallback, optional");if(void 0!==i&&"boolean"!=typeof i)return pM("font.preload must be a boolean");let a={family:fM(e.family),fallback:n.trim(),weights:mM(e.weights),styles:gM(e.styles),...void 0===r?{}:{display:r},...void 0===i?{}:{preload:i}};if("system"===t)return{...a,source:"system"};if("google"===t){let{subsets:t}=e;return void 0===t||Array.isArray(t)&&!t.some(e=>"string"!=typeof e)?{...a,source:"google",...void 0===t?{}:{subsets:t}}:pM("font.subsets must be a list of strings")}if("remote"===t){let{stylesheet:t,files:n}=e;return void 0===t&&void 0===n?pM("a remote font needs either a stylesheet URL or the font files themselves"):void 0===t?{...a,source:"remote",files:yM(n).map((e,t)=>{let n=bM(e,t),{url:r}=e;return"string"==typeof r&&Uz(r)?{...n,url:r}:pM(`font.files[${t}].url must be an https URL with no credentials in it`)})}:"string"==typeof t&&Uz(t)?{...a,source:"remote",stylesheet:t}:pM("font.stylesheet must be an https URL with no credentials in it")}return{...a,source:"hosted",files:yM(e.files).map((e,t)=>({...bM(e,t),path:vM(e.path,t)}))}}}),lL=X(()=>{rL(),wM={desktop:{columns:12,gutter:24,margin:32,maxWidth:1200},tablet:{columns:8,gutter:20,margin:24},mobile:{columns:4,gutter:16,margin:16}},kM="rgba(91, 61, 245, 0.07)",OM="rgba(91, 61, 245, 0.32)",SM=(e,t)=>`${String(e*t)}px`,CM=({columns:e,gutter:t,margin:n,maxWidth:r},i=1)=>{let a=`calc(100% - ${SM(2*n,i)})`,o=`calc((100% - ${SM(t*(e-1),i)}) / ${String(e)})`;return{width:void 0===r?a:`min(${SM(r,i)}, ${a})`,backgroundImage:`repeating-linear-gradient(to right, ${kM} 0px, ${kM} ${o}, transparent ${o}, transparent calc(${o} + ${SM(t,i)}))`,boxShadow:`inset 1px 0 ${OM}, inset -1px 0 ${OM}`}},NM=e=>`width: ${e.width}; background-image: ${e.backgroundImage};`,_M=(e=1)=>[`html::after { content: ''; position: fixed; top: 0; bottom: 0; left: 50%; z-index: 2147483000; transform: translateX(-50%); pointer-events: none; box-shadow: ${CM(wM.desktop,e).boxShadow}; ${NM(CM(wM.desktop,e))} }`,`@media (max-width: ${Iz("desktop")}) { html::after { ${NM(CM(wM.tablet,e))} } }`,`@media (max-width: ${Iz("tablet")}) { html::after { ${NM(CM(wM.mobile,e))} } }`].join("\n")}),cL=X(()=>{$M=/* @__PURE__ */function(e){return e.COLOR="color",e.SPACING="spacing",e.SHADOW="shadow",e.CUSTOM="custom",e}({}),TM=Object.values($M),AM=e=>"string"==typeof e&&TM.includes(e)}),dL=X(()=>{EM=(e,t)=>{if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>EM(e,t[n]));let n=e,r=t,i=Object.keys(n).filter(e=>void 0!==n[e]);return i.length===Object.keys(r).filter(e=>void 0!==r[e]).length&&i.every(e=>Object.hasOwn(r,e)&&EM(n[e],r[e]))},PM=e=>JSON.parse(JSON.stringify(e))}),uL=X(()=>{iL(),cL(),dL(),zM=(...e)=>[...new Set(e.flatMap(e=>Object.keys(e).filter(Dz)))],MM=e=>{if(!e)return;let{cache:t,...n}=e;return n},IM=e=>new Set(Object.values(e).flatMap(e=>Object.keys(e))),RM=(e,t,n)=>zM(t,n).every(r=>EM(MM(t[r]?.[e]),MM(n[r]?.[e]))),jM=(e,t)=>{let n={...e.platform};zM(t.platform).forEach(r=>{let i=Object.entries(t.platform[r]).filter(([t])=>!Object.hasOwn(e.platform[r],t));n[r]={...e.platform[r],...Object.fromEntries(i)}});let r={...e.variables};for(let i of Object.values($M)){let e=t.variables?.[i],n=r[i]??{},a=Object.entries(e??{}).filter(([e])=>!Object.hasOwn(n,e));a.length>0&&(r[i]={...n,...Object.fromEntries(a)})}return{platform:n,variables:r}}}),hL=X(()=>{DM={"motion-reduce":"@media (prefers-reduced-motion: reduce)","motion-safe":"@media (prefers-reduced-motion: no-preference)"},LM=Object.keys(DM),FM={"motion-reduce":"Reduced motion","motion-safe":"Motion allowed"},QM=e=>Object.hasOwn(DM,e),VM=String.raw`\d+(?:\.\d+)?(?:px|rem|em|ch)`,BM=String.raw`\((?:min|max)-width:\s*${VM}\)`,UM=new RegExp(String.raw`^container(?:\s+(?<name>-?[_a-zA-Z][\w-]*))?\s+(?<query>${BM}(?:\s+and\s+${BM})?)$`),WM=e=>{let t=UM.exec(e.trim());if(t?.groups)return{name:t.groups.name,query:t.groups.query.replace(/\s+/g," ").replace(/\(\s*/g,"(").replace(/:\s*/g,": ")}},qM=e=>{if(QM(e))return e;let t=WM(e);return t?t.name?`container ${t.name} ${t.query}`:`container ${t.query}`:void 0},HM=e=>{if(QM(e))return DM[e];let t=WM(e);return t?t.name?`@container ${t.name} ${t.query}`:`@container ${t.query}`:void 0},ZM=e=>QM(e)?FM[e]:e}),pL=X(()=>{XM=["before","after","marker","placeholder","first-letter","first-line","selection"],YM={before:"::before",after:"::after",marker:"::marker",placeholder:"::placeholder","first-letter":"::first-letter","first-line":"::first-line",selection:"::selection"},GM=e=>Object.hasOwn(YM,e),KM=e=>`::${e}`}),fL=X(()=>{JM=["hover","focus","focus-visible","focus-within","active","disabled","checked","visited","current","expanded","hidden","first","last","odd","even"],tI={hover:"Hover",focus:"Focus","focus-visible":"Focus visible","focus-within":"Focus within",active:"Active",disabled:"Disabled",checked:"Checked",visited:"Visited",current:"Current",expanded:"Expanded",hidden:"Hidden",first:"First child",last:"Last child",odd:"Odd child",even:"Even child"},nI={odd:0,even:1,first:2,last:3,visited:4,checked:5,current:6,expanded:7,"focus-within":8,hover:9,focus:10,"focus-visible":11,active:12,disabled:13,hidden:14},rI=e=>Object.hasOwn(nI,e),iI=e=>rI(e)?nI[e]:JM.length,aI=e=>Object.entries(e).sort(([e],[t])=>iI(e)-iI(t)),oI={current:':is([aria-current]:not([aria-current="false"]),[aria-pressed="true"],[aria-selected="true"],[role="tabpanel"]:not([hidden]))',expanded:'[aria-expanded="true"]',hidden:"."+(eI="plitzi-component--hidden"),first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)"},sI=e=>(rI(e)?oI[e]:void 0)??`:${e}`,lI=e=>"hidden"===e,cI=e=>">"===e}),mL=X(()=>{hL(),pL(),fL(),te(),dI=e=>{let t=[];return e.styleAncestor?t.push("ancestors",e.styleAncestor):e.styleCondition&&t.push("conditions",e.styleCondition),e.styleVariant&&t.push("variants",e.styleVariant),e.stylePseudo&&t.push("pseudos",e.stylePseudo),t.push(...e.styleState?["states",e.styleState]:["default"]),t},uI=e=>e.styleAncestor&&e.styleCondition?"an ancestor condition cannot also be under a condition":e.styleAncestor&&e.stylePseudo?"a pseudo-element has no ancestor conditions of its own":e.styleCondition&&e.styleVariant?"a condition holds the class’s own rules, not its variants’":e.styleCondition&&qM(e.styleCondition)!==e.styleCondition?`"${e.styleCondition}" is not a condition`:e.stylePseudo&&!GM(e.stylePseudo)?`"${String(e.stylePseudo)}" is not a pseudo-element`:e.styleAncestor&&cI(e.styleAncestor)&&e.styleVariant?"the element around it is named by its state, never by a variant":void 0,hI=(e,t)=>{let n=e;for(let r of t){if(!V(n)||!Object.hasOwn(n,r))return;n=n[r]}return n},pI=(e,t,n)=>{let r=e;t.slice(0,-1).forEach(e=>{let t=r[e],n=V(t)?t:{};r[e]=n,r=n});let i=t.at(-1);void 0!==i&&(r[i]=n)},fI=e=>V(e)&&Object.values(e).every(e=>"string"==typeof e||"number"==typeof e),mI=(e,t)=>{let n=hI(e,dI(t));return fI(n)?n:void 0}}),gL=X(()=>{vI=(bI=[{selector:gI=".Toastify__toast-container.plitzi-sdk-toasts",fields:{background:["--toastify-color-light","--toastify-color-dark"],text:["--toastify-text-color-light","--toastify-text-color-dark"],success:["--toastify-color-success"],danger:["--toastify-color-error"],warning:["--toastify-color-warning"],info:["--toastify-color-info"],radius:["--toastify-toast-bd-radius"],font:["--toastify-font-family"],shadow:["--toastify-toast-shadow"],padding:["--toastify-toast-padding"],minHeight:["--toastify-toast-min-height"]}},{selector:`:where(${gI} .Toastify__toast)`,fields:{fontSize:["font-size"],fontWeight:["font-weight"],lineHeight:["line-height"],border:["border"]}},{selector:`${gI} .Toastify__toast-icon`,fields:{iconSize:["width"],iconGap:["margin-inline-end"]}},{selector:`${gI} .Toastify__close-button`,fields:{closeColor:["color"]}},{selector:`${gI} .Toastify__close-button:not(:hover, :focus)`,fields:{closeOpacity:["opacity"]}},{selector:`${gI} .Toastify__progress-bar--wrp`,fields:{progressHeight:["height"]}}]).flatMap(e=>Object.keys(e.fields)),yI=e=>vI.includes(e),xI=vI.filter(yI),wI=(e,t)=>{for(let[n,r]of Object.entries(e??{})){if(!yI(n))return`\`notifications\` has no "${n}"${t?.(n,vI)||"."} It takes ${vI.join(", ")}.`;if(void 0!==r&&("string"!=typeof r||""===r.trim()||/[;{}]/.test(r)))return`\`notifications.${n}\` is ${JSON.stringify(r)}, which is not one CSS value. Write one value, like 'var(--card)', '12px' or '500'.`}},kI=e=>{let t=bI.map(()=>[]);for(let[n,r]of Object.entries(e??{})){if(!yI(n)||"string"!=typeof r||""===r.trim())continue;let e=bI.findIndex(e=>Object.hasOwn(e.fields,n));t[e].push(...(bI[e].fields[n]??[]).map(e=>` ${e}: ${r.trim()};`))}return bI.flatMap((e,n)=>t[n].length>0?[`${e.selector} {\n${t[n].join("\n")}\n}`]:[]).join("\n")},OI=(e,t)=>[e,kI(t)].filter(Boolean).join("\n\n"),SI=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),CI=(e,t)=>{let n=[];for(let r of e.split(";").map(e=>e.trim()).filter(Boolean)){let e=r.indexOf(":"),i=e>0?t(r.slice(0,e).trim()):void 0;if(!i)return;n.push([i,r.slice(e+1).trim()])}return n},NI=bI.map(e=>{let t=new Map(Object.entries(e.fields).flatMap(([e,t])=>yI(e)?t.map(t=>[t,e]):[]));return{pattern:RegExp(`(?:^|\\n)${SI(e.selector)}\\s*\\{([^}]*)\\}`,"g"),fieldOf:e=>t.get(e)}}),_I=e=>{let t={};for(let{pattern:i,fieldOf:a}of NI){let n=[...e.matchAll(i)].at(-1);for(let[e,r]of(n?CI(n[1],a):void 0)??[])t[e]=r}let n=Object.keys(t).length>0?kI(t):"";if(!n||!e.endsWith(n))return{notifications:{},customCss:e};let r=e.slice(0,e.length-n.length);return{notifications:t,customCss:r.endsWith("\n\n")?r.slice(0,-2):r}}}),bL=X(()=>{Rh(),rL(),iL(),aL(),sL(),oL(),lL(),uL(),hL(),pL(),fL(),mL(),gL()}),vL=X(()=>{Eh(),Th(),wv(),Xu(),bL(),$I=({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:a,elementState:o})=>{let{items:s}=a,l="component"===i?.type&&i.slots.includes(e),c=Fb(l?e:void 0),d=l&&!0===n&&0===(s??[]).length&&null===c,u=uu(o.visibility)&&!d;return gu(()=>_c(t,{[eI]:!u,"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)},a.styleSelectors.base),[t,u,n,i,s,r,e,a.styleSelectors.base])}}),yL=X(()=>{_h(),TI=({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=C(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let t=vd(e.params.interval);return"trigger"===e.type&&"onInterval"===e.action&&e.enabled&&t?[t]:[]}))],[t]);x(()=>{if(!n||!i.length||typeof document>"u")return;let t=new Map(i.map(e=>[e,0])),a=[],o=()=>{a.forEach(e=>clearInterval(e)),a=[]},s=()=>{o(),"visible"===document.visibilityState&&(a=i.map(n=>setInterval(()=>{let i=(t.get(n)??0)+1;t.set(n,i);let a={interval:n,count:i};r.interactionTrigger(e,bd,a)},n)))};return s(),document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s),o()}},[e,r,n,i])}}),xL=X(()=>{_h(),AI=e=>e instanceof Element&&null!==e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'),EI=()=>/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),PI=({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=C(()=>[...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]);x(()=>{if(!n||!i.length)return;let t=EI(),a=i.map(e=>({spec:e,combos:Ld(e,t).combos})),o=t=>{if(t.isComposing)return;let n=Fd(t),i=t.ctrlKey||t.metaKey||t.altKey;if(AI(t.target)&&(!i&&"escape"!==n||Bd(n)))return;let o=a.filter(e=>e.combos.includes(n)).map(e=>e.spec);if(!o.length)return;t.preventDefault();let s={key:n,shortcuts:o};r.interactionTrigger(e,Pd,s)};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,r,n,i])}}),wL=X(()=>{_h(),NE(),zI=e=>Ud.find(t=>t===e)??"smooth",MI=(e,t)=>Wd.find(t=>t===e)??t,II=async e=>{if(typeof window<"u")for(let t=0;t<20;t+=1){if(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)return;await new Promise(e=>window.requestAnimationFrame(e))}},RI=({id:e,label:t,nodeRef:n,interactions:r,previewMode:i,interactionsManager:a})=>{let o=C(()=>AN(IN,{scrollBy:e=>{let t=n.current;t?.scrollBy({left:Hd(e.x,t.clientWidth)??0,top:Hd(e.y,t.clientHeight)??0,behavior:zI(e.behavior)})},scrollTo:async e=>{let t=n.current;t&&(await II(t),t.scrollTo({left:Zd(e.x,t.scrollWidth,t.clientWidth)??t.scrollLeft,top:Zd(e.y,t.scrollHeight,t.clientHeight)??t.scrollTop,behavior:zI(e.behavior)}))},scrollIntoView:e=>{n.current?.scrollIntoView({block:MI(e.block,"start"),inline:MI(e.inline,"nearest"),behavior:zI(e.behavior)})}},{scrollBy:{title:`Scroll ${t} by`},scrollTo:{title:`Scroll ${t} to`},scrollIntoView:{title:`Scroll to ${t}`}}),[t,n]),s=C(()=>Object.values(r??{}).some(e=>"trigger"===e.type&&"onScroll"===e.action&&e.enabled),[r]);x(()=>{let t=n.current;if(!i||!s||!t||typeof window>"u")return;let r=0,o=()=>{r=0;let n=Xd(t);a.interactionTrigger(e,Yd,n)},l=()=>{0===r&&(r=window.requestAnimationFrame(o))};return t.addEventListener("scroll",l,{passive:!0}),r=window.requestAnimationFrame(o),()=>{t.removeEventListener("scroll",l),window.cancelAnimationFrame(r)}},[e,a,s,n,i]);let l=C(()=>{let e=Object.values(r??{}).find(e=>"trigger"===e.type&&"onView"===e.action&&e.enabled);if(!e)return;let t=Number(e.params?.margin??0);return Number.isFinite(t)?t:0},[r]);return x(()=>{let t=n.current;if(!i||void 0===l||!t||typeof window>"u"||typeof IntersectionObserver>"u")return;let r,o=new IntersectionObserver(t=>{let n=t.some(e=>e.isIntersecting);if(n===r)return;r=n;let i={inView:n};a.interactionTrigger(e,Gd,i)},{rootMargin:`${String(l)}px`});return o.observe(t),()=>{o.disconnect()}},[e,a,n,i,l]),o}}),kL=X(()=>{we(),jI=Q("InteractionsContext",{})}),OL=X(()=>{kL(),DI=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:a}=m(jI);x(()=>{if(e)return a.subscribe(e),()=>{a.unsubscribe(e)}},[e,a]),x(()=>{e&&a.update(e,t,n,r,i)},[e,t,n,r,i,a])}}),SL=X(()=>{LI=(e,t)=>"function"==typeof e.type?e.type(t):e.type,FI=(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},QI=(e,t)=>{if(!e)return t;let n="function"==typeof e?e(t):e,r={...t};for(let[i,a]of Object.entries(n))Object.hasOwn(t,i)&&(r[i]=FI(LI(a,t),t[i]));return r}}),CL=X(()=>{VI={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}}}}),NL=X(()=>{CL(),_h(),NE(),BI=TN("copyToClipboard",VI,async({text:e})=>{let t=Kd();if(!t)throw Error("This page has no clipboard to write to: the browser offers none here (a page not on https?)");await t(e)})}),_L=X(()=>{UI={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(a),r?.removeEventListener("abort",i),n(void 0)},a=setTimeout(i,e);r?.addEventListener("abort",i,{once:!0})})}}),$L=X(()=>{_h(),zh(),WI={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(eo(t,e));if(n&&"object"==typeof n)return{template:"",content:wd(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=eo(t,e)}catch(e){}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(e){}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}}}),TL=X(()=>{qI={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},HI=(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,qI[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}})}),AL=X(()=>{TL(),ZI=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},XI={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:ZI},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>ZI(e)&&(!0===e.cache||"true"===e.cache)},...HI(["origin","all","elements","none"],e=>!ZI(e))},preview:{response:{status:"",data:""}}}}),EL=X(()=>{YI=["missing","malformed","expired","mismatch"],GI=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),KI=e=>"object"==typeof e&&!!e&&"string"==typeof e.origin&&"string"==typeof e.cookie,JI=e=>{if("object"!=typeof e||!e)return!1;let{apis:t,path:n}=e;return Array.isArray(t)&&t.every(KI)&&"string"==typeof n},eR=e=>{let t=(e??(typeof document>"u"?void 0:document))?.querySelector('meta[name="plitzi-csrf"]')?.getAttribute("content");if(t)try{let e=JSON.parse(t);return JI(e)?e:void 0}catch{return}},tR=(e,t)=>{for(let n of e.split(";")){let e=n.indexOf("=");if(-1!==e&&n.slice(0,e).trim()===t)return decodeURIComponent(n.slice(e+1).trim())}},nR=(e,t)=>{try{return new URL(e,t).origin}catch{return}},rR=(e,t,n)=>{if(!e||"include"!==n.credentials||!GI.has((n.method??"GET").toUpperCase()))return;let r=nR(t,typeof location>"u"?void 0:location.href);return e.apis.find(e=>e.origin===r)},iR=/* @__PURE__ */new Map,aR=async(e,t,n)=>{let r=await e(`${n}${t.path}`,{credentials:"include"});if(!r.ok)return;let i=await r.json();return"string"==typeof i.token?(iR.set(n,i.token),i.token):void 0},oR=e=>tR(typeof document>"u"?"":document.cookie,e.cookie)??iR.get(e.origin),sR=(e,t)=>{let n=new Headers(e.headers);return n.set("x-csrf-token",t),{...e,headers:n}},lR=async e=>{if(403!==e.status)return!1;let t=await e.clone().json().catch(()=>{});return YI.includes(t?.reason)},cR=async(e,t={},n=globalThis.fetch)=>{let r=eR(),i=rR(r,e,t);if(!r||!i)return n(e,t);let a=oR(i)??await aR(n,r,i.origin),o=await n(e,a?sR(t,a):t);if(!(await lR(o)))return o;let s=await aR(n,r,i.origin);return s?n(e,sR(t,s)):o}}),PL=X(()=>{EL()}),zL=X(()=>{Pr(),dR=3e5,uR=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)},hR=e=>`entries.${uR(e)}`,pR=class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=wt({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(hR(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(hR(e))}usage(e){let t=this.runtimes.get(uR(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(uR(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=dR){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(hR(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(hR(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(uR(e));if(!t?.controller)return!1;t.controller.abort(),t.controller=void 0,t.inFlight=void 0;let n=hR(e);return this.getEntry(e)?this.store.setState(`${n}.isFetching`,!1):this.markUnasked(t),!0}refetch(e){let t=this.runtimes.get(uR(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(hR(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(hR(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],a=hR(n);this.getEntry(n)?this.store.setState(`${a}.isFetching`,!0):this.store.setState(a,{key:n,url:r,tags:i,isFetching:!0});let o=this.epochValue,s=e.version,l=new AbortController,c=c=>{if(o!==this.epochValue||this.runtimes.get(uR(n))!==e||e.controller!==l)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let d=s!==e.version;if("error"in c){let e=this.getEntry(n);this.store.setState(a,{key:n,url:r,tags:i,data:e?.data,error:c.error,isFetching:!1},{ttl:0})}else{let o=!d&&(t.isCacheable?.(c.data)??!0);this.store.setState(a,{key:n,url:r,tags:i,data:c.data,isFetching:!1},{ttl:o?this.ttlOf(e,t):0})}return d?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=uR(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){e.holds>0||e.observers.size>0||(this.cancelGc(e),e.gcTime<=0?this.collect(e):(e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)))}collect(e){let t=uR(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(hR(e.key),void 0,{unmount:!0}))}},fR=new pR}),ML=X(()=>{mR=/* @__PURE__ */new Set,gR=e=>{let t={...e};return mR.add(t),()=>{mR.delete(t)}},bR=e=>Promise.allSettled([...mR].filter(t=>!e||e(t)).map(e=>e.refresh())).then(()=>{})}),IL=X(()=>{zL(),Nr(),({useStore:vR}=pn()),yR=({key:e,meta:t,fetcher:n,enabled:r=!0,staleTime:i,gcTime:a=dR,isCacheable:o})=>{let s=void 0!==e,[l]=vR(hR(e??""),{store:fR.store,enabled:s}),c=s&&l?.key===e?l:void 0,d=void 0!==c&&fR.hasAnswer(c.key),u=_(n),h=_(o);x(()=>{u.current=n,h.current=o},[n,o]),x(()=>void 0===e?void 0:fR.hold(e,a),[e,a]);let{url:p}=t,f=t.tags?.join("\0")??"";x(()=>{if(r&&void 0!==e)return fR.observe(e,{meta:{url:p,tags:f?f.split("\0"):[]},staleTime:i,fetcher:e=>u.current(e),isCacheable:e=>h.current?.(e)??!0})},[r,e,p,f,i]);let m=d?c.data:void 0,b=_(void 0);void 0===m?b.current&&b.current.epoch!==fR.epoch&&(b.current=void 0):b.current={epoch:fR.epoch,data:m};let v=m??b.current?.data,y=(c?.isFetching??!1)||r&&s&&!d;return{data:v,isFetching:y,isLoading:y&&void 0===v,refetch:g(()=>{r&&void 0!==e&&fR.refetch(e)},[r,e]),cancel:g(()=>{void 0!==e&&fR.cancel(e)},[e])}}}),RL=X(()=>{ML(),xR=({id:e,url:t,enabled:n,active:r,refresh:i})=>{let a=_(!1);x(()=>{if(n)return r&&a.current&&(a.current=!1,i()),gR({id:e,url:t,refresh:()=>r?i():(a.current=!0,Promise.resolve())})},[n,r,e,t,i])}}),jL=X(()=>{zL(),ML(),IL(),RL(),wR=()=>typeof location>"u"?void 0:location.href,kR=e=>{try{return new URL(e,wR()).origin}catch{return}},OR=(e,t)=>({id:n,url:r})=>(!t||void 0!==r)&&e({url:r??"",tags:[n]}),SR=e=>{let t=kR(e);if(!t)return Promise.resolve();let n=e=>kR(e.url)===t;return Promise.all([fR.invalidate(n),bR(OR(n,!0))]).then(()=>{})},CR=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):[],NR=e=>{try{return new URL(e,wR()).href}catch{return e}},_R=({url:e,elements:t})=>{let n=e?NR(e):void 0;return e=>(void 0===n||NR(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))},$R=(e={})=>{let t=e.url||e.elements?.length?_R(e):void 0;return Promise.all([fR.invalidate(t),bR(t&&OR(t,!!e.url))]).then(()=>{})},TR=({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))]),AR=({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=CR(n);return e.length>0?$R({elements:e}):Promise.resolve()}return"origin"===i&&r?SR(r):$R()}}),DL=X(()=>{AL(),NE(),PL(),jL(),ER=/* @__PURE__ */new Set(["GET","HEAD"]),PR=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),zR=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(XI.params.staleTime.default))},MR=e=>e?{Authorization:`Bearer ${e}`}:{},IR=e=>"object"==typeof e&&e?e:{},RR=/* @__PURE__ */new Set(["authorization","content-type"]),jR=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||RR.has(e.toLowerCase())?[]:[[e,String(t)]])):{},DR=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},a,o)=>{let s=IR(r),l=Object.values(s).some(e=>e instanceof Blob),c={method:a,headers:{...jR(n),...l?{}:{"Content-Type":"application/json"},...MR(t)},credentials:i,...o?{signal:o}:{}};if(!PR.has(a))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 d=await cR(e,c).catch(t=>{throw Error(`${a} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),u="";try{u=await d.json()}catch{}return{status:d.status,data:u}},LR=TN("webHook",XI,async(e,t)=>{let n=(e.method||"get").toUpperCase();if(ER.has(n)){if(!0!==e.cache&&"true"!==e.cache)return{response:await DR(e,n,t?.signal)};let r=TR({method:n,url:e.url,credentials:e.credentials,headers:{...jR(e.headers),...MR(e.authorizationToken)}});return{response:await fR.fetchQuery(r,{meta:{url:e.url},fetcher:()=>DR(e,n),staleTime:zR(e.staleTime),isCacheable:e=>e.status<400})}}let r=await DR(e,n,t?.signal);return r.status>=200&&r.status<300&&AR({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:r}})}),LL=X(()=>{NL(),_L(),$L(),DL(),FR={copyToClipboard:BI,delayTime:UI,twigTemplate:WI,webHook:LR}}),FL=X(()=>{zl()}),QL=X(()=>{SL(),LL(),nh(),PP(),FL(),zh(),QR=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let a={...n,...r},o=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=Hc(e,a);return r&&Sr.warning("interactions",/* @__PURE__ */M("span",{children:["Twig token resolution exceeded ",5," passes for ",
@@ -1029,7 +1029,7 @@ return M("div",{className:"flex flex-col items-center",children:[/* @__PURE__ */
1029
1029
  return M("div",{className:_c("bg-ui-raised flex justify-between gap-1 px-2 py-1",{"border-ui-line-strong w-full rounded-2xl border":e.length>0}),children:[e.length>0&&/* @__PURE__ */M("div",{className:"flex grow basis-0 items-center gap-2",children:[/* @__PURE__ */z(jre,{size:"xs",className:{inputContainer:"border-none"},value:t,onChange:l,children:e.map(({id:e,title:t},r)=>{const i=n[e],a="danger"===i?.level?"⛔ ":"warning"===i?.level?"⚠ ":"";/* @__PURE__ */
1030
1030
  return z("option",{value:e,children:i&&i.count>0?`${a}${t} (${i.count})`:t},r)})}),o?.level&&/* @__PURE__ */z("i",{className:_c(uDe[o.level],"shrink-0"),title:`This flow has ${o.count} step(s) with problems — open the flagged steps to fix them.`})]}),/* @__PURE__ */M("div",{className:"flex justify-center gap-2",children:[/* @__PURE__ */z(m4,{intent:"primary",size:"xs",className:"whitespace-nowrap",onClick:s,children:"New flow"}),t&&/* @__PURE__ */z(m4,{size:"xs",intent:"secondary",border:"none",className:"text-ui-fg-subtle hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-500/15 dark:hover:text-red-400",onClick:c,title:"Remove flow",children:/* @__PURE__ */z("i",{className:"fas fa-trash-alt"})})]})]})};nh(),rB(),Xu();var RDe=({nodes:e,triggerTitle:t="When this happens...",callbackTitle:n="Do this...",nodeDefinitions:r,direction:i="vertical",dataSource:a={},elements:o,stepType:s="callback",defaultTrigger:l,onChange:c})=>{const[d,u]=$(()=>Array.isArray(e)?{}:e??{}),h=C(()=>c?gc(c,100):void 0,[c]),p=C(()=>Object.values(d).filter(e=>"trigger"===e.type).map(e=>{const t={id:e.id,title:e.title,trigger:e,nodes:{}};let n=e;for(;n;){if(t.nodes[n.id])throw new Error("Infinite Loop");t.nodes[n.id]=n,n=d[n.afterNode]}return t}),[d]),[f,m]=$(nc(p,"0.id")),b=C(()=>p.find(e=>e.id===f),[f,p]),v=C(()=>p.reduce((e,t)=>({...e,[t.id]:fDe(t.nodes,r)}),{}),[p,r]);tB(()=>{Array.isArray(e)?u({}):u(e??{})},[e]);const y=g((e,t=!1)=>{t?(u(e),h?.(e)):c?.(e)},[c,h]);/* @__PURE__ */
1031
1031
  return z("div",{className:_c("flex h-full flex-col items-center p-2","bg-[linear-gradient(90deg,#80808014_1px,transparent_0),linear-gradient(180deg,#80808014_1px,transparent_0)] bg-size-[16px_16px]",{"justify-center":0===p.length}),children:/* @__PURE__ */M(bDe,{nodes:d,direction:i,nodeDefinitions:r,dataSource:a,elements:o,defaultTrigger:l,setFlowId:m,onChange:y,children:[/* @__PURE__ */z(IDe,{flows:p,flowId:f,setFlowId:m,flowSummaries:v}),b&&/* @__PURE__ */z(MDe,{stepType:s,trigger:b.trigger,nodes:b.nodes,triggerTitle:t,callbackTitle:n})]})})};nh(),Xu(),zF(),LL(),_h(),$o();var jDe=({className:e="",id:t="",interactions:n=xd,onChange:r})=>{const[[i,a]]=qn(["sources","schema.flat"]),{interactionsManager:o}=m(jI),[s,l]=$(0),c=C(()=>o.getSubscriptor(t),[t,o,s]),d=g(e=>r?.(e),[r]),u=C(()=>{const e=[...Object.values(FR)];if(!c)return e;const{triggers:n}=c;Object.keys(n).forEach(r=>{const{title:i=`Trigger ${r}`,params:a={},preview:o={}}=n[r];e.push({action:r,title:i,type:"trigger",params:a,preview:o,elementId:t})});const r=o.getCallbacksAvailables();return Object.keys(r).forEach(t=>{const n=nc(r,t,{});Object.values(n).forEach(t=>{const{elementId:n,action:r,title:i=`Callback ${r} - ${n}`,params:a={},preview:o={},type:s="callback"}=t;e.push({action:r,elementId:n,title:i,type:s,params:a,preview:o})})}),e},[t,c,o]);x(()=>o.onUpdate(e=>{l(e)}),[o]);const h=C(()=>Object.values(i??{}).filter(e=>e.meta.source).reduce((e,t)=>({...e,[t.meta.source]:t.meta}),{}),[i]),p=C(()=>(e=>Object.values(e??{}).map(({id:e,definition:t})=>({id:e,type:t.type,label:t.label})).sort((e,t)=>e.id.localeCompare(t.id)))(a),[a]);/* @__PURE__ */
1032
- return z("div",{className:_c("flex grow flex-col",e),children:/* @__PURE__ */z(RDe,{nodes:n,direction:"vertical",dataSource:h,elements:p,nodeDefinitions:u,onChange:d},t)})};fE(),te(),iL(),pL(),fL(),cL(),cE();var DDe=IC(e=>V(e)&&"string"==typeof e.id,{message:"expected an element with an id"}),LDe=CC(DDe),FDe=IC(e=>V(e)&&"string"==typeof e.id&&V(e.flat),{message:"expected a component with an id and a flat"}),QDe=IC(e=>V(e)&&Array.isArray(e.flat),{message:"expected a schema whose `flat` is a list of elements"}),VDe=IC(e=>V(e)&&"string"==typeof e.id,{message:"expected a page folder with an id"}),BDe=IC(e=>V(e)&&"string"==typeof e.name,{message:"expected a variable with a name"}),UDe=IC(tN,{message:"expected a flag with a value and its rules"}),WDe=IC(V,{message:"expected a style attributes object"}),qDe=IC(e=>V(e)&&"string"==typeof e.family&&"string"==typeof e.source,{message:"expected a font with a family and a source"}),HDe=IC(e=>"string"==typeof e||"number"==typeof e||V(e),{message:"expected a style variable value"}),ZDe=AC(jz),XDe=IC(e=>"string"==typeof e,{message:"expected a drop position"}),YDe=IC(e=>"string"==typeof e,{message:"expected a style category"}),GDe=AC(["class","element","id"]),KDe=AC(JM),JDe=AC($M),eLe=NC({componentType:yC().optional(),styleSelector:yC().optional(),styleState:KDe.optional(),styleVariant:yC().optional(),styleAncestor:yC().optional(),stylePseudo:AC(XM).optional(),styleCondition:yC().optional()}),tLe=eLe.extend({styleSelector:yC()}),nLe=NC({variable:BDe}),rLe=NC({displayMode:ZDe,selector:yC(),category:JDe,name:yC(),value:HDe}),iLe=NC({displayMode:ZDe,selector:yC(),category:JDe,name:yC()}),aLe=NC({category:JDe,name:yC(),value:HDe}),oLe=NC({type:yC(),resource:yC(),settings:IC(V,{message:"expected a plugin settings object"})}),sLe={SPACE_UPDATED:NC({schema:QDe}),STYLE_UPDATED:NC({platform:IC(V),variables:IC(V),cache:yC()}),SPACE_ADD_PAGE:NC({page:DDe}),SPACE_UPDATE_PAGE:NC({page:DDe}),SPACE_SET_HOME_PAGE:NC({page:DDe}),SPACE_REMOVE_PAGE:NC({pageId:yC()}),SPACE_ADD_PAGE_FOLDER:NC({pageFolder:VDe}),SPACE_UPDATE_PAGE_FOLDER:NC({pageFolder:VDe}),SPACE_REMOVE_PAGE_FOLDER:NC({pageFolderId:yC()}),SPACE_ADD_VARIABLE:nLe,SPACE_UPDATE_VARIABLE:nLe,SPACE_REMOVE_VARIABLE:NC({name:yC()}),SPACE_SET_FLAG:NC({name:yC(),flag:UDe}),SPACE_REMOVE_FLAG:NC({name:yC()}),SPACE_ADD_ELEMENT:NC({element:DDe,dropPosition:XDe,to:yC(),initialItems:LDe.optional(),variables:CC(BDe).optional()}),SPACE_UPDATE_ELEMENT:NC({element:DDe}),SPACE_RENAME_ELEMENT:NC({elementId:yC(),id:yC()}),SPACE_UPDATE_ELEMENTS:NC({elements:LDe}),SPACE_REMOVE_ELEMENT:NC({elementId:yC()}),SPACE_MOVE_ELEMENT:NC({from:yC(),to:yC(),elementId:yC(),dropPosition:XDe}),SPACE_CLONE_ELEMENT:NC({to:yC(),element:DDe,dropPosition:XDe,initialItems:LDe}),SPACE_ADD_SNIPPET:NC({element:DDe,style:IC(V),to:yC(),dropPosition:XDe,initialItems:LDe.optional(),variables:CC(BDe).optional()}),SPACE_ADD_PLUGIN:NC({plugin:oLe}),SPACE_UPDATE_PLUGIN:NC({plugin:oLe}),SPACE_REMOVE_PLUGIN:NC({pluginType:yC()}),SPACE_UPDATE_SETTINGS:NC({path:yC(),value:_C([yC(),xC(),kC()])}),SPACE_UPDATE_TESTS:NC({tests:IC(V)}),SPACE_TESTS_PLAYING:NC({run:yC(),test:yC(),at:xC().int().nonnegative(),of:xC().int().positive(),played:xC().int().nonnegative(),steps:xC().int().nonnegative(),ok:kC(),ended:kC().optional(),frame:yC().optional()}),STYLE_ADD_SELECTOR:NC({displayMode:ZDe,selector:yC(),path:YDe.optional(),type:GDe,style:WDe.optional(),params:eLe}),STYLE_UPDATE_SELECTOR:NC({displayMode:ZDe,selector:yC(),path:YDe.optional(),style:WDe.optional(),params:tLe}),STYLE_REMOVE_SELECTOR:NC({displayMode:ZDe,selector:yC()}),STYLE_REMOVE_SELECTORS:NC({displayMode:ZDe,selectors:CC(yC())}),STYLE_ADD_SELECTOR_VARIABLE:rLe,STYLE_UPDATE_SELECTOR_VARIABLE:rLe,STYLE_REMOVE_SELECTOR_VARIABLE:iLe,STYLE_ADD_VARIABLE:aLe,STYLE_UPDATE_VARIABLE:aLe,STYLE_REMOVE_VARIABLE:NC({category:JDe,name:yC()}),STYLE_UPDATE_SETTINGS:NC({path:yC(),value:yC()}),STYLE_ADD_FONT:NC({font:qDe}),STYLE_UPDATE_FONT:NC({family:yC(),font:qDe}),STYLE_REMOVE_FONT:NC({family:yC()}),SPACE_ADD_COMPONENT:NC({component:FDe,from:NC({elementId:yC(),instanceId:yC()}).optional()}),SPACE_UPDATE_COMPONENT:NC({componentId:yC(),declaration:IC(V)}),SPACE_REMOVE_COMPONENT:NC({componentId:yC()}),SPACE_DETACH_INSTANCE:NC({instanceId:yC()})},lLe=(Object.fromEntries(Object.keys(sLe).map(e=>[e,e])),"\n identifier\n name\n provider\n endpoint\n prefix\n credential {\n identifier\n }\n buckets {\n identifier\n name\n bucketName\n region\n visibility\n domain\n }\n"),cLe="\n serverPlays {\n used\n limit\n resetsOn\n }\n",dLe=`\n tests\n problems\n unitPassed\n unitFailed\n unit {\n id\n title\n ok\n misses\n problem\n }\n e2eNotRun\n ${cLe}\n`,uLe={SpaceUpdate:"\n mutation SpaceUpdateMutation($environment: String!, $schema: Json!, $styleId: String!, $style: Json!) {\n SpaceUpdateSchema(environment: $environment, schema: $schema) {\n schema {\n settings\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 }\n attributes\n }\n pages\n }\n }\n StyleUpdate(id: $styleId, environment: $environment, style: $style) {\n id\n platform\n cache\n }\n }\n",SpaceUpdateSchema:"\n mutation SpaceUpdateSchemaMutation($environment: String!, $schema: Json!) {\n SpaceUpdateSchema(environment: $environment, schema: $schema) {\n schema {\n settings\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 }\n attributes\n }\n pages\n }\n }\n }\n",SpaceAddPage:"\n mutation SpaceAddPageMutation(\n $environment: String!\n $name: String!\n $slug: String!\n $id: String!\n $pageFolder: String\n ) {\n SpaceAddPage(environment: $environment, name: $name, slug: $slug, id: $id, pageFolder: $pageFolder) {\n id\n definition\n attributes\n }\n }\n",SpaceHomePage:"\n mutation SpaceHomePageMutation($environment: String!, $pageId: String!) {\n SpaceHomePage(environment: $environment, pageId: $pageId) {\n id\n }\n }\n",SpaceUpdatePage:"\n mutation SpaceUpdatePageMutation($environment: String!, $page: Json!) {\n SpaceUpdatePage(environment: $environment, page: $page) {\n id\n definition\n attributes\n }\n }\n",SpaceRemovePage:"\n mutation SpaceRemovePageMutation($environment: String!, $pageId: String!) {\n SpaceRemovePage(environment: $environment, pageId: $pageId) {\n id\n }\n }\n",SpaceAddPageFolder:"\n mutation SpaceAddPageFolderMutation($environment: String!, $name: String!, $slug: String!, $parentId: String) {\n SpaceAddPageFolder(environment: $environment, name: $name, slug: $slug, parentId: $parentId) {\n id\n name\n slug\n parentId\n }\n }\n",SpaceUpdatePageFolder:"\n mutation SpaceUpdatePageFolderMutation($environment: String!, $pageFolder: Json!) {\n SpaceUpdatePageFolder(environment: $environment, pageFolder: $pageFolder) {\n id\n name\n slug\n parentId\n }\n }\n",SpaceRemovePageFolder:"\n mutation SpaceRemovePageFolderMutation($environment: String!, $pageFolderId: String!) {\n SpaceRemovePageFolder(environment: $environment, pageFolderId: $pageFolderId) {\n id\n }\n }\n",SpaceAddVariable:"\n mutation SpaceAddVariableMutation(\n $environment: String!\n $name: String!\n $category: String\n $type: String!\n $value: String\n $subValues: [SpaceVariableSubValueInput]\n ) {\n SpaceAddVariable(\n environment: $environment\n name: $name\n category: $category\n type: $type\n value: $value\n subValues: $subValues\n ) {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n",SpaceUpdateVariable:"\n mutation SpaceUpdateVariableMutation($environment: String!, $variable: Json!) {\n SpaceUpdateVariable(environment: $environment, variable: $variable) {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n",SpaceRemoveVariable:"\n mutation SpaceRemoveVariableMutation($environment: String!, $name: String!) {\n SpaceRemoveVariable(environment: $environment, name: $name) {\n name\n }\n }\n",SpaceSetFlag:"\n mutation SpaceSetFlagMutation($environment: String!, $name: String!, $flag: JSON!) {\n SpaceSetFlag(environment: $environment, name: $name, flag: $flag) {\n name\n flag\n }\n }\n",SpaceRemoveFlag:"\n mutation SpaceRemoveFlagMutation($environment: String!, $name: String!) {\n SpaceRemoveFlag(environment: $environment, name: $name) {\n name\n }\n }\n",SpaceAddElement:"\n mutation SpaceAddElementMutation(\n $environment: String!\n $element: Json!\n $to: String!\n $dropPosition: String!\n $initialItems: [Json]!\n $variables: [SpaceVariableInput]\n ) {\n SpaceAddElement(\n environment: $environment\n element: $element\n to: $to\n dropPosition: $dropPosition\n initialItems: $initialItems\n variables: $variables\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceUpdateElement:"\n mutation SpaceUpdateElementMutation($environment: String!, $element: Json!) {\n SpaceUpdateElement(environment: $environment, element: $element) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceRenameElement:"\n mutation SpaceRenameElementMutation($environment: String!, $elementId: String!, $id: String!) {\n SpaceRenameElement(environment: $environment, elementId: $elementId, id: $id)\n }\n",SpaceUpdateElements:"\n mutation SpaceUpdateElementsMutation($environment: String!, $elements: [Json!]!) {\n SpaceUpdateElements(environment: $environment, elements: $elements) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceRemoveElement:"\n mutation SpaceRemoveElementMutation($environment: String!, $elementId: String!) {\n SpaceRemoveElement(environment: $environment, elementId: $elementId) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceMoveElement:"\n mutation SpaceMoveElementMutation(\n $environment: String!\n $elementId: String!\n $from: String!\n $to: String!\n $dropPosition: String!\n ) {\n SpaceMoveElement(\n environment: $environment\n elementId: $elementId\n from: $from\n to: $to\n dropPosition: $dropPosition\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceCloneElement:"\n mutation SpaceCloneElementMutation(\n $environment: String!\n $element: Json!\n $to: String!\n $dropPosition: String!\n $initialItems: [Json]!\n ) {\n SpaceCloneElement(\n environment: $environment\n element: $element\n to: $to\n dropPosition: $dropPosition\n initialItems: $initialItems\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceAddComponent:"\n mutation SpaceAddComponentMutation($environment: String!, $component: Json!, $from: Json) {\n SpaceAddComponent(environment: $environment, component: $component, from: $from)\n }\n",SpaceUpdateComponent:"\n mutation SpaceUpdateComponentMutation($environment: String!, $componentId: String!, $declaration: Json!) {\n SpaceUpdateComponent(environment: $environment, componentId: $componentId, declaration: $declaration)\n }\n",SpaceRemoveComponent:"\n mutation SpaceRemoveComponentMutation($environment: String!, $componentId: String!) {\n SpaceRemoveComponent(environment: $environment, componentId: $componentId)\n }\n",SpaceDetachInstance:"\n mutation SpaceDetachInstanceMutation($environment: String!, $instanceId: String!) {\n SpaceDetachInstance(environment: $environment, instanceId: $instanceId)\n }\n",SpaceAddSnippet:"\n mutation SpaceAddSnippetMutation(\n $environment: String!\n $element: Json!\n $style: Json\n $dropPosition: String!\n $to: String!\n $initialItems: [Json]!\n $variables: [SpaceVariableInput]\n ) {\n SpaceAddSnippet(\n environment: $environment\n element: $element\n style: $style\n dropPosition: $dropPosition\n to: $to\n initialItems: $initialItems\n variables: $variables\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceAddPlugin:"\n mutation SpaceAddPluginMutation($environment: String!, $pluginType: String!, $resource: String!, $override: Boolean) {\n SpaceAddPlugin(environment: $environment, pluginType: $pluginType, resource: $resource, override: $override) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceUpdatePlugin:"\n mutation SpaceUpdatePluginMutation($environment: String!, $pluginType: String!, $resource: String, $settings: Json) {\n SpaceUpdatePlugin(environment: $environment, pluginType: $pluginType, resource: $resource, settings: $settings) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceRemovePlugin:"\n mutation SpaceRemovePluginMutation($environment: String!, $pluginType: String!) {\n SpaceRemovePlugin(environment: $environment, pluginType: $pluginType) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceAddResource:"\n mutation SpaceAddResourceMutation(\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $resource: Upload!\n $type: String!\n $compression: String\n $prefix: String\n ) {\n SpaceAddResource(\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n resource: $resource\n type: $type\n compression: $compression\n prefix: $prefix\n ) {\n id\n name\n path\n size\n type\n }\n }\n",SpaceMoveResource:"\n mutation SpaceMoveResourceMutation(\n $identifier: String!\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $prefix: String!\n ) {\n SpaceMoveResource(\n identifier: $identifier\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n prefix: $prefix\n ) {\n id\n name\n path\n size\n type\n }\n }\n",SpaceRemoveResource:"\n mutation SpaceRemoveResourceMutation($identifier: String!, $cdnIdentifier: String!, $bucketIdentifier: String!) {\n SpaceRemoveResource(identifier: $identifier, cdnIdentifier: $cdnIdentifier, bucketIdentifier: $bucketIdentifier) {\n id\n }\n }\n",SpaceAddCdn:`\n mutation SpaceAddCdnMutation($name: String!, $provider: String!, $endpoint: String, $buckets: [SpaceCdnBucketInput!]!) {\n SpaceAddCdn(name: $name, provider: $provider, endpoint: $endpoint, buckets: $buckets) {\n ${lLe}\n }\n }\n`,SpaceUpdateCdn:`\n mutation SpaceUpdateCdnMutation($identifier: String!, $name: String!, $provider: String!, $endpoint: String) {\n SpaceUpdateCdn(identifier: $identifier, name: $name, provider: $provider, endpoint: $endpoint) {\n ${lLe}\n }\n }\n`,SpaceSetCdnCredential:`\n mutation SpaceSetCdnCredentialMutation($identifier: String!, $credentialIdentifier: String!) {\n SpaceSetCdnCredential(identifier: $identifier, credentialIdentifier: $credentialIdentifier) {\n ${lLe}\n }\n }\n`,SpaceRemoveCdn:"\n mutation SpaceRemoveCdnMutation($identifier: String!) {\n SpaceRemoveCdn(identifier: $identifier) {\n identifier\n }\n }\n",SpaceAddCdnBucket:`\n mutation SpaceAddCdnBucketMutation(\n $cdnIdentifier: String!\n $name: String\n $bucketName: String!\n $region: String\n $visibility: String\n $domain: String\n ) {\n SpaceAddCdnBucket(\n cdnIdentifier: $cdnIdentifier\n name: $name\n bucketName: $bucketName\n region: $region\n visibility: $visibility\n domain: $domain\n ) {\n ${lLe}\n }\n }\n`,SpaceUpdateCdnBucket:`\n mutation SpaceUpdateCdnBucketMutation(\n $cdnIdentifier: String!\n $identifier: String!\n $name: String\n $bucketName: String!\n $region: String\n $visibility: String\n $domain: String\n ) {\n SpaceUpdateCdnBucket(\n cdnIdentifier: $cdnIdentifier\n identifier: $identifier\n name: $name\n bucketName: $bucketName\n region: $region\n visibility: $visibility\n domain: $domain\n ) {\n ${lLe}\n }\n }\n`,SpaceRemoveCdnBucket:`\n mutation SpaceRemoveCdnBucketMutation($cdnIdentifier: String!, $identifier: String!) {\n SpaceRemoveCdnBucket(cdnIdentifier: $cdnIdentifier, identifier: $identifier) {\n ${lLe}\n }\n }\n`,SpaceAddAction:"\n mutation SpaceAddActionMutation($name: String!, $document: Json!) {\n SpaceAddAction(name: $name, document: $document) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceUpdateAction:"\n mutation SpaceUpdateActionMutation($identifier: String!, $name: String!, $document: Json!) {\n SpaceUpdateAction(identifier: $identifier, name: $name, document: $document) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceRemoveAction:"\n mutation SpaceRemoveActionMutation($identifier: String!) {\n SpaceRemoveAction(identifier: $identifier) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceRunAction:"\n mutation SpaceRunActionMutation($identifier: String!, $input: Json, $trigger: String) {\n SpaceRunAction(identifier: $identifier, input: $input, trigger: $trigger) {\n runId\n status\n output\n trace\n steps\n }\n }\n",SpaceSaveData:"\n mutation SpaceSaveDataMutation($files: Json!, $base: String) {\n SpaceSaveData(files: $files, base: $base) {\n ok\n version\n problems {\n file\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceSaveFunctions:"\n mutation SpaceSaveFunctionsMutation($files: Json!, $base: String) {\n SpaceSaveFunctions(files: $files, base: $base) {\n ok\n version\n manifest\n problems {\n file\n line\n column\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceRemoveFunctions:"\n mutation SpaceRemoveFunctionsMutation {\n SpaceRemoveFunctions\n }\n",SpaceInstallTemplateFunctions:"\n mutation SpaceInstallTemplateFunctionsMutation {\n SpaceInstallTemplateFunctions {\n ok\n version\n manifest\n problems {\n file\n line\n column\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceTryFunction:"\n mutation SpaceTryFunctionMutation($task: String!, $params: Json) {\n SpaceTryFunction(task: $task, params: $params) {\n runId\n status\n output\n trace\n steps\n }\n }\n",SpaceControlJob:"\n mutation SpaceControlJobMutation($jobId: String!, $control: String!) {\n SpaceControlJob(jobId: $jobId, control: $control) {\n id\n environment\n kind\n name\n trigger\n startedBy\n status\n progress\n step\n error\n attempts\n maxAttempts\n activeMs\n pauseRequested\n cancelRequested\n key\n missed\n dueAt\n createdAt\n updatedAt\n }\n }\n",SpaceAddConnector:"\n mutation SpaceAddConnectorMutation($name: String!, $manifest: Json!) {\n SpaceAddConnector(name: $name, manifest: $manifest) {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n }\n",SpaceUpdateConnector:"\n mutation SpaceUpdateConnectorMutation($identifier: String!, $name: String!, $manifest: Json!) {\n SpaceUpdateConnector(identifier: $identifier, name: $name, manifest: $manifest) {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n }\n",SpaceRemoveConnector:"\n mutation SpaceRemoveConnectorMutation($identifier: String!) {\n SpaceRemoveConnector(identifier: $identifier) {\n id\n identifier\n }\n }\n",SpaceAddCredential:"\n mutation SpaceAddCredentialMutation($name: String!, $provider: String!, $data: Json!) {\n SpaceAddCredential(name: $name, provider: $provider, data: $data) {\n name\n identifier\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n }\n }\n",SpaceUpdateCredential:"\n mutation SpaceUpdateCredentialMutation($identifier: String!, $name: String!, $provider: String!, $data: Json!) {\n SpaceUpdateCredential(identifier: $identifier, name: $name, provider: $provider, data: $data) {\n name\n identifier\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n }\n }\n",SpaceRemoveCredential:"\n mutation SpaceRemoveCredentialMutation($identifier: String!) {\n SpaceRemoveCredential(identifier: $identifier) {\n identifier\n }\n }\n",SpaceAddVisitor:"\n mutation SpaceAddVisitorMutation($email: String!, $role: String!) {\n SpaceAddVisitor(email: $email, role: $role) {\n id\n }\n }\n",SpaceRemoveVisitor:"\n mutation SpaceRemoveVisitorMutation($id: Int!) {\n SpaceRemoveVisitor(id: $id) {\n id\n }\n }\n",SpaceSetRuntimeVariable:"\n mutation SpaceSetRuntimeVariableMutation($name: String!, $value: String!) {\n SpaceSetRuntimeVariable(name: $name, value: $value)\n }\n",SpaceSetRuntimeSize:"\n mutation SpaceSetRuntimeSizeMutation($environment: String!, $size: String!) {\n SpaceSetRuntimeSize(environment: $environment, size: $size)\n }\n",SpaceStartRuntime:"\n mutation SpaceStartRuntimeMutation($environment: String!) {\n SpaceStartRuntime(environment: $environment)\n }\n",SpaceStopRuntime:"\n mutation SpaceStopRuntimeMutation($environment: String!) {\n SpaceStopRuntime(environment: $environment)\n }\n",SpaceRemoveRuntimeVariable:"\n mutation SpaceRemoveRuntimeVariableMutation($name: String!) {\n SpaceRemoveRuntimeVariable(name: $name)\n }\n",SpaceRemoveRuntime:"\n mutation SpaceRemoveRuntimeMutation {\n SpaceRemoveRuntime\n }\n",SpacePublish:"\n mutation SpacePublishMutation($environment: String!, $description: String!) {\n SpacePublish(environment: $environment, description: $description) {\n environment\n description\n revision\n publishedAt\n }\n }\n",SpacePublishFlags:"\n mutation SpacePublishFlagsMutation($environment: String!, $description: String!) {\n SpacePublishFlags(environment: $environment, description: $description) {\n environment\n hash\n publishedAt\n }\n }\n",SpaceFixIssues:"\n mutation SpaceFixIssuesMutation($environment: String!) {\n SpaceFixIssues(environment: $environment) {\n applied {\n code\n elementId\n message\n }\n schema\n }\n }\n",SpaceDeploy:"\n mutation SpaceDeployMutation(\n $environment: String!\n $domain: String!\n $revision: Int\n $credentialIdentifier: String\n $deploy: Boolean\n ) {\n SpaceDeploy(\n environment: $environment\n domain: $domain\n revision: $revision\n credentialIdentifier: $credentialIdentifier\n deploy: $deploy\n ) {\n id\n environment\n domain\n revision\n isVerified\n default\n mode\n provider\n deployId\n credential {\n identifier\n }\n createdAt\n updatedAt\n }\n }\n",SpaceRollback:"\n mutation SpaceRollbackMutation($domain: String!, $environment: String, $revision: Int) {\n SpaceRollback(domain: $domain, environment: $environment, revision: $revision) {\n id\n environment\n domain\n revision\n isVerified\n default\n mode\n provider\n deployId\n credential {\n identifier\n }\n createdAt\n updatedAt\n }\n }\n",SpaceRedeploy:"\n mutation SpaceRedeployMutation($domain: String!, $kind: String) {\n SpaceRedeploy(domain: $domain, kind: $kind)\n }\n",SpaceCancelDeploy:"\n mutation SpaceCancelDeployMutation($id: Int!) {\n SpaceCancelDeploy(id: $id)\n }\n",SpaceSetTarget:"\n mutation SpaceSetTargetMutation(\n $domain: String!\n $mode: String!\n $provider: String\n $config: Json\n $credential: String\n $bucket: Json\n ) {\n SpaceSetTarget(\n domain: $domain\n mode: $mode\n provider: $provider\n config: $config\n credential: $credential\n bucket: $bucket\n )\n }\n",SpaceCancelScheduledPublish:"\n mutation SpaceCancelScheduledPublishMutation($id: Int!) {\n SpaceCancelScheduledPublish(id: $id)\n }\n",SpaceSchedulePublish:"\n mutation SpaceSchedulePublishMutation($domain: String!, $environment: String!, $revision: Int!, $at: Int!) {\n SpaceSchedulePublish(domain: $domain, environment: $environment, revision: $revision, at: $at)\n }\n",SpaceTargetAutomation:"\n mutation SpaceTargetAutomationMutation($domain: String!, $protected: Boolean, $hook: String) {\n SpaceTargetAutomation(domain: $domain, protected: $protected, hook: $hook)\n }\n",SpaceUpdateSettings:"\n mutation SpaceUpdateSettingsMutation($environment: String!, $value: Json, $path: String) {\n SpaceUpdateSettings(environment: $environment, value: $value, path: $path) {\n settings\n }\n }\n",SpaceSetTests:`\n mutation SpaceSetTestsMutation($environment: String!, $tests: JsonObject!) {\n SpaceSetTests(environment: $environment, tests: $tests) {\n ${dLe}\n }\n }\n`,SpaceRunE2eTests:`\n mutation SpaceRunE2eTestsMutation($ids: [String!]) {\n SpaceRunE2eTests(ids: $ids) {\n results\n notRun\n ${cLe}\n }\n }\n`,StyleAddSelector:"\n mutation StyleAddSelectorMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $type: String!\n $path: String\n $style: Json\n $params: Json!\n ) {\n StyleAddSelector(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n type: $type\n path: $path\n style: $style\n params: $params\n ) {\n displayMode\n selector\n type\n path\n style\n params\n }\n }\n",StyleUpdateSelector:"\n mutation StyleUpdateSelectorMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $path: String\n $style: Json\n $params: Json!\n ) {\n StyleUpdateSelector(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n path: $path\n style: $style\n params: $params\n ) {\n displayMode\n selector\n type\n path\n style\n params\n }\n }\n",StyleRemoveSelector:"\n mutation StyleRemoveSelectorMutation($environment: String!, $displayMode: String, $selector: String!) {\n StyleRemoveSelector(environment: $environment, displayMode: $displayMode, selector: $selector) {\n displayMode\n selector\n }\n }\n",StyleRemoveSelectors:"\n mutation StyleRemoveSelectorsMutation($environment: String!, $displayMode: String, $selectors: [String!]!) {\n StyleRemoveSelectors(environment: $environment, displayMode: $displayMode, selectors: $selectors) {\n displayMode\n selectors\n }\n }\n",StyleAddSelectorVariable:"\n mutation StyleAddSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n $value: Json!\n ) {\n StyleAddSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n value: $value\n ) {\n displayMode\n selector\n category\n name\n value\n }\n }\n",StyleUpdateSelectorVariable:"\n mutation StyleUpdateSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n $value: Json!\n ) {\n StyleUpdateSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n value: $value\n ) {\n displayMode\n selector\n category\n name\n value\n }\n }\n",StyleRemoveSelectorVariable:"\n mutation StyleRemoveSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n ) {\n StyleRemoveSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n ) {\n displayMode\n selector\n category\n name\n }\n }\n",StyleAddFont:"\n mutation StyleAddFontMutation($environment: String!, $font: Json!) {\n StyleAddFont(environment: $environment, font: $font) {\n family\n }\n }\n",StyleUpdateFont:"\n mutation StyleUpdateFontMutation($environment: String!, $family: String!, $font: Json!) {\n StyleUpdateFont(environment: $environment, family: $family, font: $font) {\n family\n }\n }\n",StyleRemoveFont:"\n mutation StyleRemoveFontMutation($environment: String!, $family: String!) {\n StyleRemoveFont(environment: $environment, family: $family) {\n family\n }\n }\n",StyleAddVariable:"\n mutation StyleAddVariableMutation($environment: String!, $category: String!, $name: String!, $value: Json!) {\n StyleAddVariable(environment: $environment, category: $category, name: $name, value: $value) {\n category\n name\n value\n }\n }\n",StyleUpdateVariable:"\n mutation StyleUpdateVariableMutation($environment: String!, $category: String!, $name: String!, $value: Json!) {\n StyleUpdateVariable(environment: $environment, category: $category, name: $name, value: $value) {\n category\n name\n value\n }\n }\n",StyleRemoveVariable:"\n mutation StyleRemoveVariableMutation($environment: String!, $category: String!, $name: String!) {\n StyleRemoveVariable(environment: $environment, category: $category, name: $name) {\n category\n name\n }\n }\n",StyleUpdate:"\n mutation StyleUpdateMutation($environment: String!, $style: Json!) {\n StyleUpdate(environment: $environment, style: $style) {\n id\n variables\n platform\n mode\n cache\n }\n }\n",StyleUpdateSettings:"\n mutation StyleUpdateSettingsMutation($environment: String!, $path: String!, $value: String!) {\n StyleUpdateSettings(environment: $environment, path: $path, value: $value) {\n id\n variables\n platform\n mode\n cache\n }\n }\n"},hLe={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\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 quiet\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 category\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 id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n",SpaceLatestRevision:"\n query SpaceLatestRevisionQuery($environment: String!) {\n SpaceLatestRevision(environment: $environment) {\n snapshot {\n description\n revision\n publishedAt\n }\n }\n }\n",SpaceQuota:"\n query SpaceQuotaQuery {\n SpaceQuota {\n planName\n tier\n isFree\n periodStart\n periodEnd\n space {\n views\n viewsQuota\n viewsUnlimited\n viewsPercent\n viewsRemaining\n elements\n elementsQuota\n elementsUnlimited\n elementsPercent\n overLimit\n }\n account {\n views\n viewsQuota\n viewsUnlimited\n viewsPercent\n viewsRemaining\n elements\n elementsQuota\n elementsUnlimited\n elementsPercent\n overLimit\n }\n overLimit\n }\n }\n",SpaceIssues:"\n query SpaceIssuesQuery($environment: String!) {\n SpaceIssues(environment: $environment) {\n errors {\n code\n message\n elementId\n fixable\n fix\n }\n warnings {\n code\n message\n elementId\n fixable\n fix\n }\n suggestions {\n code\n message\n elementIds\n saves\n fix\n }\n }\n }\n",SpaceTests:`\n query SpaceTestsQuery($environment: String!) {\n SpaceTests(environment: $environment) {\n ${dLe}\n }\n }\n`,SpaceChanges:"\n query SpaceChangesQuery(\n $environment: String!\n $before: Int\n $entityId: String\n $origin: String\n $userId: Int\n $since: Float\n $limit: Int\n ) {\n SpaceChanges(\n environment: $environment\n before: $before\n entityId: $entityId\n origin: $origin\n userId: $userId\n since: $since\n limit: $limit\n ) {\n changes {\n seq\n at\n document\n author {\n userId\n name\n }\n origin\n client\n batch\n summary\n entries\n truncated\n }\n snapshots {\n revision\n environment\n description\n publishedAt\n upToSeq\n }\n nextBefore\n }\n }\n",SpaceResources:"\n query SpaceResourcesQuery(\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $filter: ResourceInput\n $page: Int\n $pageSize: Int\n $offset: Int\n ) {\n SpaceResources(\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n filter: $filter\n page: $page\n pageSize: $pageSize\n offset: $offset\n ) {\n resources {\n id\n cdnIdentifier\n bucketIdentifier\n name\n type\n size\n path\n usedBy\n createdAt\n updatedAt\n }\n }\n }\n",SpaceDeployments:"\n query SpaceDeploymentsQuery($filter: DeploymentInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceDeployments(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n environment\n revision\n domain\n isVerified\n default\n provider\n credential {\n identifier\n provider\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCdns:`\n query SpaceCdnsQuery($filter: CdnInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceCdns(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n ${lLe}\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n`,SpaceActions:"\n query SpaceActionsQuery($filter: ActionInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceActions(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceActionEvents:"\n query SpaceActionEventsQuery($actionId: String, $page: Int, $pageSize: Int) {\n SpaceActionEvents(actionId: $actionId, page: $page, pageSize: $pageSize) {\n edges {\n id\n actionId\n runId\n trigger\n status\n refused\n reason\n durationMs\n steps\n detail\n createdAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCheckAction:"\n query SpaceCheckActionQuery($identifier: String!) {\n SpaceCheckAction(identifier: $identifier) {\n valid\n issues {\n level\n path\n message\n hint\n }\n }\n }\n",SpaceActionTasks:"\n query SpaceActionTasksQuery {\n SpaceActionTasks {\n name\n namespace\n action\n title\n description\n origin\n params\n }\n }\n",SpaceData:"\n query SpaceDataQuery {\n SpaceData {\n files\n version\n }\n }\n",SpaceFunctions:"\n query SpaceFunctionsQuery {\n SpaceFunctions {\n files\n version\n manifest\n offer {\n template\n }\n sizes\n }\n }\n",SpaceJobs:"\n query SpaceJobsQuery($kind: String, $name: String, $status: String, $page: Int, $pageSize: Int) {\n SpaceJobs(kind: $kind, name: $name, status: $status, page: $page, pageSize: $pageSize) {\n edges {\n id\n environment\n kind\n name\n trigger\n startedBy\n status\n progress\n step\n error\n attempts\n maxAttempts\n activeMs\n pauseRequested\n cancelRequested\n key\n missed\n dueAt\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceConnectors:"\n query SpaceConnectorsQuery($filter: ConnectorInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceConnectors(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCredentials:"\n query SpaceCredentialsQuery($filter: CredentialInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceCredentials(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n identifier\n name\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceVersionContents:"\n query SpaceVersionContentsQuery($environment: String!, $revision: Int) {\n SpaceVersionContents(environment: $environment, revision: $revision) {\n environment\n revision\n snapshot {\n description\n publishedAt\n }\n pages\n layouts\n components\n elements\n plugins {\n type\n source\n }\n actions\n connectors\n functions {\n tasks\n routes\n }\n runtime {\n source\n }\n }\n }\n",SpaceVersionChanges:"\n query SpaceVersionChangesQuery(\n $fromEnvironment: String!\n $fromRevision: Int\n $toEnvironment: String!\n $toRevision: Int\n ) {\n SpaceVersionChanges(\n fromEnvironment: $fromEnvironment\n fromRevision: $fromRevision\n toEnvironment: $toEnvironment\n toRevision: $toRevision\n ) {\n pages {\n added\n removed\n changed\n }\n layouts\n components\n styles\n fonts\n settings\n plugins {\n added\n removed\n changed\n }\n actions\n connectors\n functions\n runtime\n total\n }\n }\n",SpaceSnapshots:"\n query SpaceSnapshotsQuery($environment: String, $limit: Int) {\n SpaceSnapshots(environment: $environment, limit: $limit) {\n environment\n revision\n description\n publishedAt\n by {\n id\n username\n }\n domains\n previewUrl\n }\n }\n",SpaceReleases:"\n query SpaceReleasesQuery($domain: String!, $limit: Int) {\n SpaceReleases(domain: $domain, limit: $limit) {\n releases {\n id\n domain\n environment\n revision\n followsLatest\n previous {\n environment\n revision\n }\n kind\n deployId\n by {\n id\n username\n }\n at\n }\n rollback {\n environment\n revision\n }\n }\n }\n",SpaceTargets:"\n query SpaceTargetsQuery {\n SpaceTargets\n }\n",SpaceScheduledPublishes:"\n query SpaceScheduledPublishesQuery {\n SpaceScheduledPublishes\n }\n",SpacePublishCheck:"\n query SpacePublishCheckQuery($domain: String!, $environment: String!, $revision: Int) {\n SpacePublishCheck(domain: $domain, environment: $environment, revision: $revision)\n }\n",SpaceDeployDetail:"\n query SpaceDeployDetailQuery($id: Int!) {\n SpaceDeployDetail(id: $id)\n }\n",SpaceVisitors:"\n query SpaceVisitorsQuery {\n SpaceVisitors {\n id\n email\n role\n claimed\n createdAt\n updatedAt\n }\n }\n",SpaceRuntime:"\n query SpaceRuntimeQuery {\n SpaceRuntime {\n environments {\n environment\n revision\n digest\n status\n error\n stoppedReason\n idleStopsAt\n endpoints\n tasks\n startedAt\n size\n }\n variables\n idleMinutes\n sizes {\n name\n label\n cpu\n memory\n bought\n displayAmount\n }\n }\n }\n"},pLe="x-plitzi-client",fLe={cli:"in a project, plitzi upgrade packages (the CLI is one of them); elsewhere, npx @plitzi/cli@latest",builder:"reload the builder: it loads the platform’s own",sdkServer:"update @plitzi/sdk-server, build the server again (plitzi build --ssr) and deploy it"},mLe={cli:"CLI",builder:"builder",sdkServer:"server"},gLe=(e,t)=>`${e}/${t}`,bLe={name:"@plitzi/plitzi-builder",version:"0.39.8",homepage:"./",license:"AGPL-3.0",files:["dist"],repository:{type:"https",url:"https://github.com/plitzi/plitzi-workspace.git"},type:"module",main:"dist/plitzi-builder.js",module:"dist/plitzi-builder.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/plitzi-builder.js",default:"./dist/plitzi-builder.js"},"./plitzi-builder.css":"./dist/plitzi-builder.css","./plitzi-builder-vendor.js":"./dist/plitzi-builder-vendor.js","./plitzi-builder-dev-vendor.js":"./dist/plitzi-builder-dev-vendor.js","./plitzi-builder-dev-vendor.js.map":"./dist/plitzi-builder-dev-vendor.js.map"},dependencies:{"@apollo/client":"^4.3.8","@codemirror/autocomplete":"^6.20.4","@codemirror/lint":"^6.9.8","@codemirror/state":"^6.7.6","@codemirror/view":"^6.43.15","@fortawesome/fontawesome-free":"^7.3.1","@plitzi/nexus":"^1.5.1","@plitzi/plitzi-sdk":"workspace:*","@plitzi/plitzi-ui":"^1.6.40","@plitzi/sdk-auth":"workspace:*","@plitzi/sdk-authoring":"workspace:*","@plitzi/sdk-dev-tools":"workspace:*","@plitzi/sdk-elements":"workspace:*","@plitzi/sdk-event-bridge":"workspace:*","@plitzi/sdk-interactions":"workspace:*","@plitzi/sdk-navigation":"workspace:*","@plitzi/sdk-plugins":"workspace:*","@plitzi/sdk-schema":"workspace:*","@plitzi/sdk-shared":"workspace:*","@plitzi/sdk-style":"workspace:*","@plitzi/sdk-variables":"workspace:*","@typescript/vfs":"^1.6.6","@valtown/codemirror-ts":"^2.3.1","apollo-upload-client":"^20.0.0",clsx:"^2.1.1",comlink:"^4.4.2",graphql:"^17.1.0","graphql-ws":"^6.4.2",immer:"^11.2.10",jszip:"^3.10.2","react-hook-form":"^7.92.0","react-router-dom":"^7.18.5",swr:"^2.5.1",uuid:"^14.0.3",zod:"^4.6.7"},peerDependencies:{react:"^19","react-dom":"^19"},devDependencies:{"@plitzi/sdk-runtime":"workspace:*","@tailwindcss/forms":"^0.5.11","@tailwindcss/postcss":"^4.3.5",eslint:"^9.39.5",postcss:"^8.5.33","postcss-scss":"^4.0.9",prettier:"^3.10.1",react:"^19.3.1","react-dom":"^19.3.1",sass:"^1.108.2","sass-embedded":"^1.108.2",stylelint:"^18.0.0","stylelint-order":"^8.1.3","stylelint-scss":"^7.5.0",terser:"^5.51.2",typescript:"^6.0.3",vite:"^8.3.8","vite-plugin-dts":"^5.1.2","vite-plugin-ejs":"^2.0.0","vite-plugin-mkcert":"^2.1.0",vitest:"^5.1.0"},scripts:{start:"vite dev --mode development",test:"vitest run","test:coverage":"",lint:"TIMING=1 eslint --cache --cache-location .eslintcache --cache-strategy content ./src","lint-style":'stylelint "**/*.scss" --custom-syntax postcss-scss',"lint-style:fix":'stylelint "**/*.scss" --custom-syntax postcss-scss --fix',typecheck:"tsc -p tsconfig.app.json --noEmit --incremental --tsBuildInfoFile .tsbuildinfo/app.tsbuildinfo","build:dev":"tsc -p tsconfig.app.json --noEmit && vite build --mode development && vite build --config vite.functions-worker.config.ts --mode development","build:dev-watch":"tsc -p tsconfig.app.json --noEmit && vite build --mode development --watch","build:dev-gzip":"tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build --mode development","build:dev-analyze":"tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build --mode development","build:prod":"tsc -p tsconfig.app.json --noEmit && vite build && vite build --config vite.functions-worker.config.ts","build:prod-watch":"tsc -p tsconfig.app.json --noEmit && vite build --watch","build:prod-gzip":"tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build","build:prod-analyze":"tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build","build-vendor:dev":"vite build --config vite.vendor.config.ts --mode development","build-vendor:prod":"vite build --config vite.vendor.config.ts"},eslintConfig:{extends:"react-app"},browserslist:{production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]}};PL(),_h();var vLe,yLe=/* @__PURE__ */new Set,xLe=e=>{if("behind"===e.kind){if(vLe===e.current)return;vLe=e.current}yLe.forEach(t=>{t(e)})},wLe=e=>async(t,n)=>{const r=await e(t,n),i=r.headers.get("x-plitzi-current");return i&&xLe({kind:"behind",current:i}),r},kLe=wLe(async(e,t={})=>{const n=new Headers(t.headers);n.set(pLe,gLe("builder",bLe.version));const r=await(e instanceof Request?fetch(e,{...t,headers:n}):cR(e,{...t,headers:n}));if(426===r.status){const e=await r.clone().json().catch(()=>{});xLe({kind:"outdated",message:V(e)&&"string"==typeof e.error?e.error:"This builder is older than Plitzi takes."})}return r}),OLe=/* @__PURE__ */new Map,SLe=()=>{const{server:e,userKey:t,webId:n}=Foe(),[r,i]=$({});return x(()=>{if(!e.apiServer||!n)return;const r=`${e.apiServer}/spaces/${n}/entitlements`,a=OLe.get(r)??(async(e,t)=>{try{const n=await kLe(e,{credentials:"include",headers:{"plitzi-access-token":t}});return n.ok?await n.json():{}}catch{return{}}})(r,t);OLe.set(r,a);let o=!0;return a.then(e=>{o&&i(e)}),()=>{o=!1}},[e.apiServer,t,n]),r},CLe=()=>{const{access:e}=SLe();return C(()=>({access:e,may:t=>((e,t)=>void 0===e||e.permissions.includes(t))(e,t)}),[e])},NLe=()=>{const{entitlements:e}=SLe();return C(()=>({entitlements:e,included:t=>((e,t)=>e?.capabilities[t]?.included??!0)(e,t),locked:t=>{const n=e?.capabilities[t];return n&&!n.included?n:void 0}}),[e])};q3();var _Le=({icon:e})=>/* @__PURE__ */M(P,{children:[e&&"string"==typeof e&&!e.startsWith("http")&&/* @__PURE__ */z(Q3,{intent:"custom",icon:e}),e&&"string"==typeof e&&e.startsWith("http")&&/* @__PURE__ */z(Q3,{intent:"custom",children:/* @__PURE__ */z("img",{src:e})}),e&&"string"!=typeof e&&/* @__PURE__ */z(Q3,{intent:"custom",children:e}),!e&&/* @__PURE__ */z(Q3,{intent:"custom",children:/* @__PURE__ */z(xIe,{})})]});nh(),Xu(),pE();var $Le=f(({id:e="",label:t="",type:n="",isActive:r=!1,children:i,className:a="",onMouseEnter:o,onClick:s})=>{const{componentDefinitions:l}=m(YC),{updateElement:c}=m(uB),d=g(()=>o?.(e),[o,e]),u=g(()=>s?.(e),[s,e]),h=g(t=>c(e,"label",t,"definition"),[c,e]),p=C(()=>nc(l.current,`${n}.market.icon`,""),[n,l]);/* @__PURE__ */
1032
+ return z("div",{className:_c("flex grow flex-col",e),children:/* @__PURE__ */z(RDe,{nodes:n,direction:"vertical",dataSource:h,elements:p,nodeDefinitions:u,onChange:d},t)})};fE(),te(),iL(),pL(),fL(),cL(),cE();var DDe=IC(e=>V(e)&&"string"==typeof e.id,{message:"expected an element with an id"}),LDe=CC(DDe),FDe=IC(e=>V(e)&&"string"==typeof e.id&&V(e.flat),{message:"expected a component with an id and a flat"}),QDe=IC(e=>V(e)&&Array.isArray(e.flat),{message:"expected a schema whose `flat` is a list of elements"}),VDe=IC(e=>V(e)&&"string"==typeof e.id,{message:"expected a page folder with an id"}),BDe=IC(e=>V(e)&&"string"==typeof e.name,{message:"expected a variable with a name"}),UDe=IC(tN,{message:"expected a flag with a value and its rules"}),WDe=IC(V,{message:"expected a style attributes object"}),qDe=IC(e=>V(e)&&"string"==typeof e.family&&"string"==typeof e.source,{message:"expected a font with a family and a source"}),HDe=IC(e=>"string"==typeof e||"number"==typeof e||V(e),{message:"expected a style variable value"}),ZDe=AC(jz),XDe=IC(e=>"string"==typeof e,{message:"expected a drop position"}),YDe=IC(e=>"string"==typeof e,{message:"expected a style category"}),GDe=AC(["class","element","id"]),KDe=AC(JM),JDe=AC($M),eLe=NC({componentType:yC().optional(),styleSelector:yC().optional(),styleState:KDe.optional(),styleVariant:yC().optional(),styleAncestor:yC().optional(),stylePseudo:AC(XM).optional(),styleCondition:yC().optional()}),tLe=eLe.extend({styleSelector:yC()}),nLe=NC({variable:BDe}),rLe=NC({displayMode:ZDe,selector:yC(),category:JDe,name:yC(),value:HDe}),iLe=NC({displayMode:ZDe,selector:yC(),category:JDe,name:yC()}),aLe=NC({category:JDe,name:yC(),value:HDe}),oLe=NC({type:yC(),resource:yC(),settings:IC(V,{message:"expected a plugin settings object"})}),sLe={SPACE_UPDATED:NC({schema:QDe}),STYLE_UPDATED:NC({platform:IC(V),variables:IC(V),cache:yC()}),SPACE_ADD_PAGE:NC({page:DDe}),SPACE_UPDATE_PAGE:NC({page:DDe}),SPACE_SET_HOME_PAGE:NC({page:DDe}),SPACE_REMOVE_PAGE:NC({pageId:yC()}),SPACE_ADD_PAGE_FOLDER:NC({pageFolder:VDe}),SPACE_UPDATE_PAGE_FOLDER:NC({pageFolder:VDe}),SPACE_REMOVE_PAGE_FOLDER:NC({pageFolderId:yC()}),SPACE_ADD_VARIABLE:nLe,SPACE_UPDATE_VARIABLE:nLe,SPACE_REMOVE_VARIABLE:NC({name:yC()}),SPACE_SET_FLAG:NC({name:yC(),flag:UDe}),SPACE_REMOVE_FLAG:NC({name:yC()}),SPACE_ADD_ELEMENT:NC({element:DDe,dropPosition:XDe,to:yC(),initialItems:LDe.optional(),variables:CC(BDe).optional()}),SPACE_UPDATE_ELEMENT:NC({element:DDe}),SPACE_RENAME_ELEMENT:NC({elementId:yC(),id:yC()}),SPACE_UPDATE_ELEMENTS:NC({elements:LDe}),SPACE_REMOVE_ELEMENT:NC({elementId:yC()}),SPACE_MOVE_ELEMENT:NC({from:yC(),to:yC(),elementId:yC(),dropPosition:XDe}),SPACE_CLONE_ELEMENT:NC({to:yC(),element:DDe,dropPosition:XDe,initialItems:LDe}),SPACE_ADD_SNIPPET:NC({element:DDe,style:IC(V),to:yC(),dropPosition:XDe,initialItems:LDe.optional(),variables:CC(BDe).optional()}),SPACE_ADD_PLUGIN:NC({plugin:oLe}),SPACE_UPDATE_PLUGIN:NC({plugin:oLe}),SPACE_REMOVE_PLUGIN:NC({pluginType:yC()}),SPACE_UPDATE_SETTINGS:NC({path:yC(),value:_C([yC(),xC(),kC()])}),SPACE_UPDATE_TESTS:NC({tests:IC(V)}),SPACE_TESTS_PLAYING:NC({run:yC(),test:yC(),at:xC().int().nonnegative(),of:xC().int().positive(),played:xC().int().nonnegative(),steps:xC().int().nonnegative(),ok:kC(),ended:kC().optional(),frame:yC().optional()}),STYLE_ADD_SELECTOR:NC({displayMode:ZDe,selector:yC(),path:YDe.optional(),type:GDe,style:WDe.optional(),params:eLe}),STYLE_UPDATE_SELECTOR:NC({displayMode:ZDe,selector:yC(),path:YDe.optional(),style:WDe.optional(),params:tLe}),STYLE_REMOVE_SELECTOR:NC({displayMode:ZDe,selector:yC()}),STYLE_REMOVE_SELECTORS:NC({displayMode:ZDe,selectors:CC(yC())}),STYLE_ADD_SELECTOR_VARIABLE:rLe,STYLE_UPDATE_SELECTOR_VARIABLE:rLe,STYLE_REMOVE_SELECTOR_VARIABLE:iLe,STYLE_ADD_VARIABLE:aLe,STYLE_UPDATE_VARIABLE:aLe,STYLE_REMOVE_VARIABLE:NC({category:JDe,name:yC()}),STYLE_UPDATE_SETTINGS:NC({path:yC(),value:yC()}),STYLE_ADD_FONT:NC({font:qDe}),STYLE_UPDATE_FONT:NC({family:yC(),font:qDe}),STYLE_REMOVE_FONT:NC({family:yC()}),SPACE_ADD_COMPONENT:NC({component:FDe,from:NC({elementId:yC(),instanceId:yC()}).optional()}),SPACE_UPDATE_COMPONENT:NC({componentId:yC(),declaration:IC(V)}),SPACE_REMOVE_COMPONENT:NC({componentId:yC()}),SPACE_DETACH_INSTANCE:NC({instanceId:yC()})},lLe=(Object.fromEntries(Object.keys(sLe).map(e=>[e,e])),"\n identifier\n name\n provider\n endpoint\n prefix\n credential {\n identifier\n }\n buckets {\n identifier\n name\n bucketName\n region\n visibility\n domain\n }\n"),cLe="\n serverPlays {\n used\n limit\n resetsOn\n }\n",dLe=`\n tests\n problems\n unitPassed\n unitFailed\n unit {\n id\n title\n ok\n misses\n problem\n }\n e2eNotRun\n ${cLe}\n`,uLe={SpaceUpdate:"\n mutation SpaceUpdateMutation($environment: String!, $schema: Json!, $styleId: String!, $style: Json!) {\n SpaceUpdateSchema(environment: $environment, schema: $schema) {\n schema {\n settings\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 }\n attributes\n }\n pages\n }\n }\n StyleUpdate(id: $styleId, environment: $environment, style: $style) {\n id\n platform\n cache\n }\n }\n",SpaceUpdateSchema:"\n mutation SpaceUpdateSchemaMutation($environment: String!, $schema: Json!) {\n SpaceUpdateSchema(environment: $environment, schema: $schema) {\n schema {\n settings\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 }\n attributes\n }\n pages\n }\n }\n }\n",SpaceAddPage:"\n mutation SpaceAddPageMutation(\n $environment: String!\n $name: String!\n $slug: String!\n $id: String!\n $pageFolder: String\n ) {\n SpaceAddPage(environment: $environment, name: $name, slug: $slug, id: $id, pageFolder: $pageFolder) {\n id\n definition\n attributes\n }\n }\n",SpaceHomePage:"\n mutation SpaceHomePageMutation($environment: String!, $pageId: String!) {\n SpaceHomePage(environment: $environment, pageId: $pageId) {\n id\n }\n }\n",SpaceUpdatePage:"\n mutation SpaceUpdatePageMutation($environment: String!, $page: Json!) {\n SpaceUpdatePage(environment: $environment, page: $page) {\n id\n definition\n attributes\n }\n }\n",SpaceRemovePage:"\n mutation SpaceRemovePageMutation($environment: String!, $pageId: String!) {\n SpaceRemovePage(environment: $environment, pageId: $pageId) {\n id\n }\n }\n",SpaceAddPageFolder:"\n mutation SpaceAddPageFolderMutation($environment: String!, $name: String!, $slug: String!, $parentId: String) {\n SpaceAddPageFolder(environment: $environment, name: $name, slug: $slug, parentId: $parentId) {\n id\n name\n slug\n parentId\n }\n }\n",SpaceUpdatePageFolder:"\n mutation SpaceUpdatePageFolderMutation($environment: String!, $pageFolder: Json!) {\n SpaceUpdatePageFolder(environment: $environment, pageFolder: $pageFolder) {\n id\n name\n slug\n parentId\n }\n }\n",SpaceRemovePageFolder:"\n mutation SpaceRemovePageFolderMutation($environment: String!, $pageFolderId: String!) {\n SpaceRemovePageFolder(environment: $environment, pageFolderId: $pageFolderId) {\n id\n }\n }\n",SpaceAddVariable:"\n mutation SpaceAddVariableMutation(\n $environment: String!\n $name: String!\n $category: String\n $type: String!\n $value: String\n $subValues: [SpaceVariableSubValueInput]\n ) {\n SpaceAddVariable(\n environment: $environment\n name: $name\n category: $category\n type: $type\n value: $value\n subValues: $subValues\n ) {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n",SpaceUpdateVariable:"\n mutation SpaceUpdateVariableMutation($environment: String!, $variable: Json!) {\n SpaceUpdateVariable(environment: $environment, variable: $variable) {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n",SpaceRemoveVariable:"\n mutation SpaceRemoveVariableMutation($environment: String!, $name: String!) {\n SpaceRemoveVariable(environment: $environment, name: $name) {\n name\n }\n }\n",SpaceSetFlag:"\n mutation SpaceSetFlagMutation($environment: String!, $name: String!, $flag: JSON!) {\n SpaceSetFlag(environment: $environment, name: $name, flag: $flag) {\n name\n flag\n }\n }\n",SpaceRemoveFlag:"\n mutation SpaceRemoveFlagMutation($environment: String!, $name: String!) {\n SpaceRemoveFlag(environment: $environment, name: $name) {\n name\n }\n }\n",SpaceAddElement:"\n mutation SpaceAddElementMutation(\n $environment: String!\n $element: Json!\n $to: String!\n $dropPosition: String!\n $initialItems: [Json]!\n $variables: [SpaceVariableInput]\n ) {\n SpaceAddElement(\n environment: $environment\n element: $element\n to: $to\n dropPosition: $dropPosition\n initialItems: $initialItems\n variables: $variables\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceUpdateElement:"\n mutation SpaceUpdateElementMutation($environment: String!, $element: Json!) {\n SpaceUpdateElement(environment: $environment, element: $element) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceRenameElement:"\n mutation SpaceRenameElementMutation($environment: String!, $elementId: String!, $id: String!) {\n SpaceRenameElement(environment: $environment, elementId: $elementId, id: $id)\n }\n",SpaceUpdateElements:"\n mutation SpaceUpdateElementsMutation($environment: String!, $elements: [Json!]!) {\n SpaceUpdateElements(environment: $environment, elements: $elements) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceRemoveElement:"\n mutation SpaceRemoveElementMutation($environment: String!, $elementId: String!) {\n SpaceRemoveElement(environment: $environment, elementId: $elementId) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceMoveElement:"\n mutation SpaceMoveElementMutation(\n $environment: String!\n $elementId: String!\n $from: String!\n $to: String!\n $dropPosition: String!\n ) {\n SpaceMoveElement(\n environment: $environment\n elementId: $elementId\n from: $from\n to: $to\n dropPosition: $dropPosition\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceCloneElement:"\n mutation SpaceCloneElementMutation(\n $environment: String!\n $element: Json!\n $to: String!\n $dropPosition: String!\n $initialItems: [Json]!\n ) {\n SpaceCloneElement(\n environment: $environment\n element: $element\n to: $to\n dropPosition: $dropPosition\n initialItems: $initialItems\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceAddComponent:"\n mutation SpaceAddComponentMutation($environment: String!, $component: Json!, $from: Json) {\n SpaceAddComponent(environment: $environment, component: $component, from: $from)\n }\n",SpaceUpdateComponent:"\n mutation SpaceUpdateComponentMutation($environment: String!, $componentId: String!, $declaration: Json!) {\n SpaceUpdateComponent(environment: $environment, componentId: $componentId, declaration: $declaration)\n }\n",SpaceRemoveComponent:"\n mutation SpaceRemoveComponentMutation($environment: String!, $componentId: String!) {\n SpaceRemoveComponent(environment: $environment, componentId: $componentId)\n }\n",SpaceDetachInstance:"\n mutation SpaceDetachInstanceMutation($environment: String!, $instanceId: String!) {\n SpaceDetachInstance(environment: $environment, instanceId: $instanceId)\n }\n",SpaceAddSnippet:"\n mutation SpaceAddSnippetMutation(\n $environment: String!\n $element: Json!\n $style: Json\n $dropPosition: String!\n $to: String!\n $initialItems: [Json]!\n $variables: [SpaceVariableInput]\n ) {\n SpaceAddSnippet(\n environment: $environment\n element: $element\n style: $style\n dropPosition: $dropPosition\n to: $to\n initialItems: $initialItems\n variables: $variables\n ) {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n",SpaceAddPlugin:"\n mutation SpaceAddPluginMutation($environment: String!, $pluginType: String!, $resource: String!, $override: Boolean) {\n SpaceAddPlugin(environment: $environment, pluginType: $pluginType, resource: $resource, override: $override) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceUpdatePlugin:"\n mutation SpaceUpdatePluginMutation($environment: String!, $pluginType: String!, $resource: String, $settings: Json) {\n SpaceUpdatePlugin(environment: $environment, pluginType: $pluginType, resource: $resource, settings: $settings) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceRemovePlugin:"\n mutation SpaceRemovePluginMutation($environment: String!, $pluginType: String!) {\n SpaceRemovePlugin(environment: $environment, pluginType: $pluginType) {\n plugins {\n type\n resource\n settings\n }\n }\n }\n",SpaceAddResource:"\n mutation SpaceAddResourceMutation(\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $resource: Upload!\n $type: String!\n $compression: String\n $prefix: String\n ) {\n SpaceAddResource(\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n resource: $resource\n type: $type\n compression: $compression\n prefix: $prefix\n ) {\n id\n name\n path\n size\n type\n }\n }\n",SpaceMoveResource:"\n mutation SpaceMoveResourceMutation(\n $identifier: String!\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $prefix: String!\n ) {\n SpaceMoveResource(\n identifier: $identifier\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n prefix: $prefix\n ) {\n id\n name\n path\n size\n type\n }\n }\n",SpaceRemoveResource:"\n mutation SpaceRemoveResourceMutation($identifier: String!, $cdnIdentifier: String!, $bucketIdentifier: String!) {\n SpaceRemoveResource(identifier: $identifier, cdnIdentifier: $cdnIdentifier, bucketIdentifier: $bucketIdentifier) {\n id\n }\n }\n",SpaceAddCdn:`\n mutation SpaceAddCdnMutation($name: String!, $provider: String!, $endpoint: String, $buckets: [SpaceCdnBucketInput!]!) {\n SpaceAddCdn(name: $name, provider: $provider, endpoint: $endpoint, buckets: $buckets) {\n ${lLe}\n }\n }\n`,SpaceUpdateCdn:`\n mutation SpaceUpdateCdnMutation($identifier: String!, $name: String!, $provider: String!, $endpoint: String) {\n SpaceUpdateCdn(identifier: $identifier, name: $name, provider: $provider, endpoint: $endpoint) {\n ${lLe}\n }\n }\n`,SpaceSetCdnCredential:`\n mutation SpaceSetCdnCredentialMutation($identifier: String!, $credentialIdentifier: String!) {\n SpaceSetCdnCredential(identifier: $identifier, credentialIdentifier: $credentialIdentifier) {\n ${lLe}\n }\n }\n`,SpaceRemoveCdn:"\n mutation SpaceRemoveCdnMutation($identifier: String!) {\n SpaceRemoveCdn(identifier: $identifier) {\n identifier\n }\n }\n",SpaceAddCdnBucket:`\n mutation SpaceAddCdnBucketMutation(\n $cdnIdentifier: String!\n $name: String\n $bucketName: String!\n $region: String\n $visibility: String\n $domain: String\n ) {\n SpaceAddCdnBucket(\n cdnIdentifier: $cdnIdentifier\n name: $name\n bucketName: $bucketName\n region: $region\n visibility: $visibility\n domain: $domain\n ) {\n ${lLe}\n }\n }\n`,SpaceUpdateCdnBucket:`\n mutation SpaceUpdateCdnBucketMutation(\n $cdnIdentifier: String!\n $identifier: String!\n $name: String\n $bucketName: String!\n $region: String\n $visibility: String\n $domain: String\n ) {\n SpaceUpdateCdnBucket(\n cdnIdentifier: $cdnIdentifier\n identifier: $identifier\n name: $name\n bucketName: $bucketName\n region: $region\n visibility: $visibility\n domain: $domain\n ) {\n ${lLe}\n }\n }\n`,SpaceRemoveCdnBucket:`\n mutation SpaceRemoveCdnBucketMutation($cdnIdentifier: String!, $identifier: String!) {\n SpaceRemoveCdnBucket(cdnIdentifier: $cdnIdentifier, identifier: $identifier) {\n ${lLe}\n }\n }\n`,SpaceAddAction:"\n mutation SpaceAddActionMutation($name: String!, $document: Json!) {\n SpaceAddAction(name: $name, document: $document) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceUpdateAction:"\n mutation SpaceUpdateActionMutation($identifier: String!, $name: String!, $document: Json!) {\n SpaceUpdateAction(identifier: $identifier, name: $name, document: $document) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceRemoveAction:"\n mutation SpaceRemoveActionMutation($identifier: String!) {\n SpaceRemoveAction(identifier: $identifier) {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n }\n",SpaceRunAction:"\n mutation SpaceRunActionMutation($identifier: String!, $input: Json, $trigger: String) {\n SpaceRunAction(identifier: $identifier, input: $input, trigger: $trigger) {\n runId\n status\n output\n trace\n steps\n }\n }\n",SpaceSaveData:"\n mutation SpaceSaveDataMutation($files: Json!, $base: String) {\n SpaceSaveData(files: $files, base: $base) {\n ok\n version\n problems {\n file\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceSaveFunctions:"\n mutation SpaceSaveFunctionsMutation($files: Json!, $base: String) {\n SpaceSaveFunctions(files: $files, base: $base) {\n ok\n version\n manifest\n problems {\n file\n line\n column\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceRemoveFunctions:"\n mutation SpaceRemoveFunctionsMutation {\n SpaceRemoveFunctions\n }\n",SpaceInstallTemplateFunctions:"\n mutation SpaceInstallTemplateFunctionsMutation {\n SpaceInstallTemplateFunctions {\n ok\n version\n manifest\n problems {\n file\n line\n column\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n",SpaceTryFunction:"\n mutation SpaceTryFunctionMutation($task: String!, $params: Json) {\n SpaceTryFunction(task: $task, params: $params) {\n runId\n status\n output\n trace\n steps\n }\n }\n",SpaceControlJob:"\n mutation SpaceControlJobMutation($jobId: String!, $control: String!) {\n SpaceControlJob(jobId: $jobId, control: $control) {\n id\n environment\n kind\n name\n trigger\n startedBy\n status\n progress\n step\n error\n attempts\n maxAttempts\n activeMs\n pauseRequested\n cancelRequested\n key\n missed\n dueAt\n createdAt\n updatedAt\n }\n }\n",SpaceAddConnector:"\n mutation SpaceAddConnectorMutation($name: String!, $manifest: Json!) {\n SpaceAddConnector(name: $name, manifest: $manifest) {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n }\n",SpaceUpdateConnector:"\n mutation SpaceUpdateConnectorMutation($identifier: String!, $name: String!, $manifest: Json!) {\n SpaceUpdateConnector(identifier: $identifier, name: $name, manifest: $manifest) {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n }\n",SpaceRemoveConnector:"\n mutation SpaceRemoveConnectorMutation($identifier: String!) {\n SpaceRemoveConnector(identifier: $identifier) {\n id\n identifier\n }\n }\n",SpaceAddCredential:"\n mutation SpaceAddCredentialMutation($name: String!, $provider: String!, $data: Json!) {\n SpaceAddCredential(name: $name, provider: $provider, data: $data) {\n name\n identifier\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n }\n }\n",SpaceUpdateCredential:"\n mutation SpaceUpdateCredentialMutation($identifier: String!, $name: String!, $provider: String!, $data: Json!) {\n SpaceUpdateCredential(identifier: $identifier, name: $name, provider: $provider, data: $data) {\n name\n identifier\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n }\n }\n",SpaceRemoveCredential:"\n mutation SpaceRemoveCredentialMutation($identifier: String!) {\n SpaceRemoveCredential(identifier: $identifier) {\n identifier\n }\n }\n",SpaceAddVisitor:"\n mutation SpaceAddVisitorMutation($email: String!, $role: String!) {\n SpaceAddVisitor(email: $email, role: $role) {\n id\n }\n }\n",SpaceRemoveVisitor:"\n mutation SpaceRemoveVisitorMutation($id: Int!) {\n SpaceRemoveVisitor(id: $id) {\n id\n }\n }\n",SpaceSetRuntimeVariable:"\n mutation SpaceSetRuntimeVariableMutation($name: String!, $value: String!) {\n SpaceSetRuntimeVariable(name: $name, value: $value)\n }\n",SpaceSetRuntimeSize:"\n mutation SpaceSetRuntimeSizeMutation($environment: String!, $size: String!) {\n SpaceSetRuntimeSize(environment: $environment, size: $size)\n }\n",SpaceStartRuntime:"\n mutation SpaceStartRuntimeMutation($environment: String!) {\n SpaceStartRuntime(environment: $environment)\n }\n",SpaceStopRuntime:"\n mutation SpaceStopRuntimeMutation($environment: String!) {\n SpaceStopRuntime(environment: $environment)\n }\n",SpaceRemoveRuntimeVariable:"\n mutation SpaceRemoveRuntimeVariableMutation($name: String!) {\n SpaceRemoveRuntimeVariable(name: $name)\n }\n",SpaceRemoveRuntime:"\n mutation SpaceRemoveRuntimeMutation {\n SpaceRemoveRuntime\n }\n",SpacePublish:"\n mutation SpacePublishMutation($environment: String!, $description: String!) {\n SpacePublish(environment: $environment, description: $description) {\n environment\n description\n revision\n publishedAt\n }\n }\n",SpacePublishFlags:"\n mutation SpacePublishFlagsMutation($environment: String!, $description: String!) {\n SpacePublishFlags(environment: $environment, description: $description) {\n environment\n hash\n publishedAt\n }\n }\n",SpaceFixIssues:"\n mutation SpaceFixIssuesMutation($environment: String!) {\n SpaceFixIssues(environment: $environment) {\n applied {\n code\n elementId\n message\n }\n schema\n }\n }\n",SpaceDeploy:"\n mutation SpaceDeployMutation(\n $environment: String!\n $domain: String!\n $revision: Int\n $credentialIdentifier: String\n $deploy: Boolean\n ) {\n SpaceDeploy(\n environment: $environment\n domain: $domain\n revision: $revision\n credentialIdentifier: $credentialIdentifier\n deploy: $deploy\n ) {\n id\n environment\n domain\n revision\n isVerified\n default\n mode\n provider\n deployId\n credential {\n identifier\n }\n createdAt\n updatedAt\n }\n }\n",SpaceRollback:"\n mutation SpaceRollbackMutation($domain: String!, $environment: String, $revision: Int) {\n SpaceRollback(domain: $domain, environment: $environment, revision: $revision) {\n id\n environment\n domain\n revision\n isVerified\n default\n mode\n provider\n deployId\n credential {\n identifier\n }\n createdAt\n updatedAt\n }\n }\n",SpaceRedeploy:"\n mutation SpaceRedeployMutation($domain: String!, $kind: String) {\n SpaceRedeploy(domain: $domain, kind: $kind)\n }\n",SpaceCancelDeploy:"\n mutation SpaceCancelDeployMutation($id: Int!) {\n SpaceCancelDeploy(id: $id)\n }\n",SpaceSetTarget:"\n mutation SpaceSetTargetMutation(\n $domain: String!\n $mode: String!\n $provider: String\n $config: Json\n $credential: String\n $bucket: Json\n ) {\n SpaceSetTarget(\n domain: $domain\n mode: $mode\n provider: $provider\n config: $config\n credential: $credential\n bucket: $bucket\n )\n }\n",SpaceCancelScheduledPublish:"\n mutation SpaceCancelScheduledPublishMutation($id: Int!) {\n SpaceCancelScheduledPublish(id: $id)\n }\n",SpaceSchedulePublish:"\n mutation SpaceSchedulePublishMutation($domain: String!, $environment: String!, $revision: Int!, $at: Int!) {\n SpaceSchedulePublish(domain: $domain, environment: $environment, revision: $revision, at: $at)\n }\n",SpaceTargetAutomation:"\n mutation SpaceTargetAutomationMutation($domain: String!, $protected: Boolean, $hook: String) {\n SpaceTargetAutomation(domain: $domain, protected: $protected, hook: $hook)\n }\n",SpaceUpdateSettings:"\n mutation SpaceUpdateSettingsMutation($environment: String!, $value: Json, $path: String) {\n SpaceUpdateSettings(environment: $environment, value: $value, path: $path) {\n settings\n }\n }\n",SpaceSetTests:`\n mutation SpaceSetTestsMutation($environment: String!, $tests: JsonObject!) {\n SpaceSetTests(environment: $environment, tests: $tests) {\n ${dLe}\n }\n }\n`,SpaceRunE2eTests:`\n mutation SpaceRunE2eTestsMutation($ids: [String!]) {\n SpaceRunE2eTests(ids: $ids) {\n results\n notRun\n ${cLe}\n }\n }\n`,StyleAddSelector:"\n mutation StyleAddSelectorMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $type: String!\n $path: String\n $style: Json\n $params: Json!\n ) {\n StyleAddSelector(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n type: $type\n path: $path\n style: $style\n params: $params\n ) {\n displayMode\n selector\n type\n path\n style\n params\n }\n }\n",StyleUpdateSelector:"\n mutation StyleUpdateSelectorMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $path: String\n $style: Json\n $params: Json!\n ) {\n StyleUpdateSelector(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n path: $path\n style: $style\n params: $params\n ) {\n displayMode\n selector\n type\n path\n style\n params\n }\n }\n",StyleRemoveSelector:"\n mutation StyleRemoveSelectorMutation($environment: String!, $displayMode: String, $selector: String!) {\n StyleRemoveSelector(environment: $environment, displayMode: $displayMode, selector: $selector) {\n displayMode\n selector\n }\n }\n",StyleRemoveSelectors:"\n mutation StyleRemoveSelectorsMutation($environment: String!, $displayMode: String, $selectors: [String!]!) {\n StyleRemoveSelectors(environment: $environment, displayMode: $displayMode, selectors: $selectors) {\n displayMode\n selectors\n }\n }\n",StyleAddSelectorVariable:"\n mutation StyleAddSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n $value: Json!\n ) {\n StyleAddSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n value: $value\n ) {\n displayMode\n selector\n category\n name\n value\n }\n }\n",StyleUpdateSelectorVariable:"\n mutation StyleUpdateSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n $value: Json!\n ) {\n StyleUpdateSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n value: $value\n ) {\n displayMode\n selector\n category\n name\n value\n }\n }\n",StyleRemoveSelectorVariable:"\n mutation StyleRemoveSelectorVariableMutation(\n $environment: String!\n $displayMode: String!\n $selector: String!\n $category: String!\n $name: String!\n ) {\n StyleRemoveSelectorVariable(\n environment: $environment\n displayMode: $displayMode\n selector: $selector\n category: $category\n name: $name\n ) {\n displayMode\n selector\n category\n name\n }\n }\n",StyleAddFont:"\n mutation StyleAddFontMutation($environment: String!, $font: Json!) {\n StyleAddFont(environment: $environment, font: $font) {\n family\n }\n }\n",StyleUpdateFont:"\n mutation StyleUpdateFontMutation($environment: String!, $family: String!, $font: Json!) {\n StyleUpdateFont(environment: $environment, family: $family, font: $font) {\n family\n }\n }\n",StyleRemoveFont:"\n mutation StyleRemoveFontMutation($environment: String!, $family: String!) {\n StyleRemoveFont(environment: $environment, family: $family) {\n family\n }\n }\n",StyleAddVariable:"\n mutation StyleAddVariableMutation($environment: String!, $category: String!, $name: String!, $value: Json!) {\n StyleAddVariable(environment: $environment, category: $category, name: $name, value: $value) {\n category\n name\n value\n }\n }\n",StyleUpdateVariable:"\n mutation StyleUpdateVariableMutation($environment: String!, $category: String!, $name: String!, $value: Json!) {\n StyleUpdateVariable(environment: $environment, category: $category, name: $name, value: $value) {\n category\n name\n value\n }\n }\n",StyleRemoveVariable:"\n mutation StyleRemoveVariableMutation($environment: String!, $category: String!, $name: String!) {\n StyleRemoveVariable(environment: $environment, category: $category, name: $name) {\n category\n name\n }\n }\n",StyleUpdate:"\n mutation StyleUpdateMutation($environment: String!, $style: Json!) {\n StyleUpdate(environment: $environment, style: $style) {\n id\n variables\n platform\n mode\n cache\n }\n }\n",StyleUpdateSettings:"\n mutation StyleUpdateSettingsMutation($environment: String!, $path: String!, $value: String!) {\n StyleUpdateSettings(environment: $environment, path: $path, value: $value) {\n id\n variables\n platform\n mode\n cache\n }\n }\n"},hLe={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\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 quiet\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 category\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 id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n",SpaceLatestRevision:"\n query SpaceLatestRevisionQuery($environment: String!) {\n SpaceLatestRevision(environment: $environment) {\n snapshot {\n description\n revision\n publishedAt\n }\n }\n }\n",SpaceQuota:"\n query SpaceQuotaQuery {\n SpaceQuota {\n planName\n tier\n isFree\n periodStart\n periodEnd\n space {\n views\n viewsQuota\n viewsUnlimited\n viewsPercent\n viewsRemaining\n elements\n elementsQuota\n elementsUnlimited\n elementsPercent\n overLimit\n }\n account {\n views\n viewsQuota\n viewsUnlimited\n viewsPercent\n viewsRemaining\n elements\n elementsQuota\n elementsUnlimited\n elementsPercent\n overLimit\n }\n overLimit\n }\n }\n",SpaceIssues:"\n query SpaceIssuesQuery($environment: String!) {\n SpaceIssues(environment: $environment) {\n errors {\n code\n message\n elementId\n fixable\n fix\n }\n warnings {\n code\n message\n elementId\n fixable\n fix\n }\n suggestions {\n code\n message\n elementIds\n saves\n fix\n }\n }\n }\n",SpaceTests:`\n query SpaceTestsQuery($environment: String!) {\n SpaceTests(environment: $environment) {\n ${dLe}\n }\n }\n`,SpaceChanges:"\n query SpaceChangesQuery(\n $environment: String!\n $before: Int\n $entityId: String\n $origin: String\n $userId: Int\n $since: Float\n $limit: Int\n ) {\n SpaceChanges(\n environment: $environment\n before: $before\n entityId: $entityId\n origin: $origin\n userId: $userId\n since: $since\n limit: $limit\n ) {\n changes {\n seq\n at\n document\n author {\n userId\n name\n }\n origin\n client\n batch\n summary\n entries\n truncated\n }\n snapshots {\n revision\n environment\n description\n publishedAt\n upToSeq\n }\n nextBefore\n }\n }\n",SpaceResources:"\n query SpaceResourcesQuery(\n $cdnIdentifier: String!\n $bucketIdentifier: String!\n $filter: ResourceInput\n $page: Int\n $pageSize: Int\n $offset: Int\n ) {\n SpaceResources(\n cdnIdentifier: $cdnIdentifier\n bucketIdentifier: $bucketIdentifier\n filter: $filter\n page: $page\n pageSize: $pageSize\n offset: $offset\n ) {\n resources {\n id\n cdnIdentifier\n bucketIdentifier\n name\n type\n size\n path\n usedBy\n createdAt\n updatedAt\n }\n }\n }\n",SpaceDeployments:"\n query SpaceDeploymentsQuery($filter: DeploymentInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceDeployments(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n environment\n revision\n domain\n isVerified\n default\n provider\n credential {\n identifier\n provider\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCdns:`\n query SpaceCdnsQuery($filter: CdnInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceCdns(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n ${lLe}\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n`,SpaceActions:"\n query SpaceActionsQuery($filter: ActionInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceActions(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n identifier\n name\n document\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceActionEvents:"\n query SpaceActionEventsQuery($actionId: String, $page: Int, $pageSize: Int) {\n SpaceActionEvents(actionId: $actionId, page: $page, pageSize: $pageSize) {\n edges {\n id\n actionId\n runId\n trigger\n status\n refused\n reason\n durationMs\n steps\n detail\n createdAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCheckAction:"\n query SpaceCheckActionQuery($identifier: String!) {\n SpaceCheckAction(identifier: $identifier) {\n valid\n issues {\n level\n path\n message\n hint\n }\n }\n }\n",SpaceActionTasks:"\n query SpaceActionTasksQuery {\n SpaceActionTasks {\n name\n namespace\n action\n title\n description\n origin\n params\n }\n }\n",SpaceData:"\n query SpaceDataQuery {\n SpaceData {\n files\n version\n }\n }\n",SpaceFunctions:"\n query SpaceFunctionsQuery {\n SpaceFunctions {\n files\n version\n manifest\n offer {\n template\n }\n sizes\n }\n }\n",SpaceJobs:"\n query SpaceJobsQuery($kind: String, $name: String, $status: String, $page: Int, $pageSize: Int) {\n SpaceJobs(kind: $kind, name: $name, status: $status, page: $page, pageSize: $pageSize) {\n edges {\n id\n environment\n kind\n name\n trigger\n startedBy\n status\n progress\n step\n error\n attempts\n maxAttempts\n activeMs\n pauseRequested\n cancelRequested\n key\n missed\n dueAt\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceConnectors:"\n query SpaceConnectorsQuery($filter: ConnectorInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceConnectors(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n id\n identifier\n name\n manifest\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceCredentials:"\n query SpaceCredentialsQuery($filter: CredentialInput, $page: Int, $pageSize: Int, $offset: Int) {\n SpaceCredentials(filter: $filter, page: $page, pageSize: $pageSize, offset: $offset) {\n edges {\n identifier\n name\n provider\n inUse\n usedIn {\n usedFrom\n name\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n from\n to\n total\n }\n }\n }\n",SpaceVersionContents:"\n query SpaceVersionContentsQuery($environment: String!, $revision: Int) {\n SpaceVersionContents(environment: $environment, revision: $revision) {\n environment\n revision\n snapshot {\n description\n publishedAt\n }\n pages\n layouts\n components\n elements\n plugins {\n type\n source\n }\n actions\n connectors\n functions {\n tasks\n routes\n }\n runtime {\n source\n }\n }\n }\n",SpaceVersionChanges:"\n query SpaceVersionChangesQuery(\n $fromEnvironment: String!\n $fromRevision: Int\n $toEnvironment: String!\n $toRevision: Int\n ) {\n SpaceVersionChanges(\n fromEnvironment: $fromEnvironment\n fromRevision: $fromRevision\n toEnvironment: $toEnvironment\n toRevision: $toRevision\n ) {\n pages {\n added\n removed\n changed\n }\n layouts\n components\n styles\n fonts\n settings\n plugins {\n added\n removed\n changed\n }\n actions\n connectors\n functions\n runtime\n total\n }\n }\n",SpaceSnapshots:"\n query SpaceSnapshotsQuery($environment: String, $limit: Int) {\n SpaceSnapshots(environment: $environment, limit: $limit) {\n environment\n revision\n description\n publishedAt\n by {\n id\n username\n }\n domains\n previewUrl\n }\n }\n",SpaceReleases:"\n query SpaceReleasesQuery($domain: String!, $limit: Int) {\n SpaceReleases(domain: $domain, limit: $limit) {\n releases {\n id\n domain\n environment\n revision\n followsLatest\n previous {\n environment\n revision\n }\n kind\n deployId\n by {\n id\n username\n }\n at\n }\n rollback {\n environment\n revision\n }\n }\n }\n",SpaceTargets:"\n query SpaceTargetsQuery {\n SpaceTargets\n }\n",SpaceScheduledPublishes:"\n query SpaceScheduledPublishesQuery {\n SpaceScheduledPublishes\n }\n",SpacePublishCheck:"\n query SpacePublishCheckQuery($domain: String!, $environment: String!, $revision: Int) {\n SpacePublishCheck(domain: $domain, environment: $environment, revision: $revision)\n }\n",SpaceDeployDetail:"\n query SpaceDeployDetailQuery($id: Int!) {\n SpaceDeployDetail(id: $id)\n }\n",SpaceVisitors:"\n query SpaceVisitorsQuery {\n SpaceVisitors {\n id\n email\n role\n claimed\n createdAt\n updatedAt\n }\n }\n",SpaceRuntime:"\n query SpaceRuntimeQuery {\n SpaceRuntime {\n environments {\n environment\n revision\n digest\n status\n error\n stoppedReason\n idleStopsAt\n endpoints\n tasks\n startedAt\n size\n }\n variables\n idleMinutes\n sizes {\n name\n label\n cpu\n memory\n bought\n displayAmount\n }\n }\n }\n"},pLe="x-plitzi-client",fLe={cli:"in a project, plitzi upgrade packages (the CLI is one of them); elsewhere, npx @plitzi/cli@latest",builder:"reload the builder: it loads the platform’s own",sdkServer:"update @plitzi/sdk-server, build the server again (plitzi build --ssr) and deploy it"},mLe={cli:"CLI",builder:"builder",sdkServer:"server"},gLe=(e,t)=>`${e}/${t}`,bLe={name:"@plitzi/plitzi-builder",version:"0.39.9",homepage:"./",license:"AGPL-3.0",files:["dist"],repository:{type:"https",url:"https://github.com/plitzi/plitzi-workspace.git"},type:"module",main:"dist/plitzi-builder.js",module:"dist/plitzi-builder.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/plitzi-builder.js",default:"./dist/plitzi-builder.js"},"./plitzi-builder.css":"./dist/plitzi-builder.css","./plitzi-builder-vendor.js":"./dist/plitzi-builder-vendor.js","./plitzi-builder-dev-vendor.js":"./dist/plitzi-builder-dev-vendor.js","./plitzi-builder-dev-vendor.js.map":"./dist/plitzi-builder-dev-vendor.js.map"},dependencies:{"@apollo/client":"^4.3.8","@codemirror/autocomplete":"^6.20.4","@codemirror/lint":"^6.9.8","@codemirror/state":"^6.7.6","@codemirror/view":"^6.43.15","@fortawesome/fontawesome-free":"^7.3.1","@plitzi/nexus":"^1.5.1","@plitzi/plitzi-sdk":"workspace:*","@plitzi/plitzi-ui":"^1.6.40","@plitzi/sdk-auth":"workspace:*","@plitzi/sdk-authoring":"workspace:*","@plitzi/sdk-dev-tools":"workspace:*","@plitzi/sdk-elements":"workspace:*","@plitzi/sdk-event-bridge":"workspace:*","@plitzi/sdk-interactions":"workspace:*","@plitzi/sdk-navigation":"workspace:*","@plitzi/sdk-plugins":"workspace:*","@plitzi/sdk-schema":"workspace:*","@plitzi/sdk-shared":"workspace:*","@plitzi/sdk-style":"workspace:*","@plitzi/sdk-variables":"workspace:*","@typescript/vfs":"^1.6.6","@valtown/codemirror-ts":"^2.3.1","apollo-upload-client":"^20.0.0",clsx:"^2.1.1",comlink:"^4.4.2",graphql:"^17.1.0","graphql-ws":"^6.4.2",immer:"^11.2.10",jszip:"^3.10.2","react-hook-form":"^7.92.0","react-router-dom":"^7.18.5",swr:"^2.5.1",uuid:"^14.0.3",zod:"^4.6.7"},peerDependencies:{react:"^19","react-dom":"^19"},devDependencies:{"@plitzi/sdk-runtime":"workspace:*","@tailwindcss/forms":"^0.5.11","@tailwindcss/postcss":"^4.3.5",eslint:"^9.39.5",postcss:"^8.5.33","postcss-scss":"^4.0.9",prettier:"^3.10.1",react:"^19.3.1","react-dom":"^19.3.1",sass:"^1.108.2","sass-embedded":"^1.108.2",stylelint:"^18.0.0","stylelint-order":"^8.1.3","stylelint-scss":"^7.5.0",terser:"^5.51.2",typescript:"^6.0.3",vite:"^8.3.8","vite-plugin-dts":"^5.1.2","vite-plugin-ejs":"^2.0.0","vite-plugin-mkcert":"^2.1.0",vitest:"^5.1.0"},scripts:{start:"vite dev --mode development",test:"vitest run","test:coverage":"",lint:"TIMING=1 eslint --cache --cache-location .eslintcache --cache-strategy content ./src","lint-style":'stylelint "**/*.scss" --custom-syntax postcss-scss',"lint-style:fix":'stylelint "**/*.scss" --custom-syntax postcss-scss --fix',typecheck:"tsc -p tsconfig.app.json --noEmit --incremental --tsBuildInfoFile .tsbuildinfo/app.tsbuildinfo","build:dev":"tsc -p tsconfig.app.json --noEmit && vite build --mode development && vite build --config vite.functions-worker.config.ts --mode development","build:dev-watch":"tsc -p tsconfig.app.json --noEmit && vite build --mode development --watch","build:dev-gzip":"tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build --mode development","build:dev-analyze":"tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build --mode development","build:prod":"tsc -p tsconfig.app.json --noEmit && vite build && vite build --config vite.functions-worker.config.ts","build:prod-watch":"tsc -p tsconfig.app.json --noEmit && vite build --watch","build:prod-gzip":"tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build","build:prod-analyze":"tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build","build-vendor:dev":"vite build --config vite.vendor.config.ts --mode development","build-vendor:prod":"vite build --config vite.vendor.config.ts"},eslintConfig:{extends:"react-app"},browserslist:{production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]}};PL(),_h();var vLe,yLe=/* @__PURE__ */new Set,xLe=e=>{if("behind"===e.kind){if(vLe===e.current)return;vLe=e.current}yLe.forEach(t=>{t(e)})},wLe=e=>async(t,n)=>{const r=await e(t,n),i=r.headers.get("x-plitzi-current");return i&&xLe({kind:"behind",current:i}),r},kLe=wLe(async(e,t={})=>{const n=new Headers(t.headers);n.set(pLe,gLe("builder",bLe.version));const r=await(e instanceof Request?fetch(e,{...t,headers:n}):cR(e,{...t,headers:n}));if(426===r.status){const e=await r.clone().json().catch(()=>{});xLe({kind:"outdated",message:V(e)&&"string"==typeof e.error?e.error:"This builder is older than Plitzi takes."})}return r}),OLe=/* @__PURE__ */new Map,SLe=()=>{const{server:e,userKey:t,webId:n}=Foe(),[r,i]=$({});return x(()=>{if(!e.apiServer||!n)return;const r=`${e.apiServer}/spaces/${n}/entitlements`,a=OLe.get(r)??(async(e,t)=>{try{const n=await kLe(e,{credentials:"include",headers:{"plitzi-access-token":t}});return n.ok?await n.json():{}}catch{return{}}})(r,t);OLe.set(r,a);let o=!0;return a.then(e=>{o&&i(e)}),()=>{o=!1}},[e.apiServer,t,n]),r},CLe=()=>{const{access:e}=SLe();return C(()=>({access:e,may:t=>((e,t)=>void 0===e||e.permissions.includes(t))(e,t)}),[e])},NLe=()=>{const{entitlements:e}=SLe();return C(()=>({entitlements:e,included:t=>((e,t)=>e?.capabilities[t]?.included??!0)(e,t),locked:t=>{const n=e?.capabilities[t];return n&&!n.included?n:void 0}}),[e])};q3();var _Le=({icon:e})=>/* @__PURE__ */M(P,{children:[e&&"string"==typeof e&&!e.startsWith("http")&&/* @__PURE__ */z(Q3,{intent:"custom",icon:e}),e&&"string"==typeof e&&e.startsWith("http")&&/* @__PURE__ */z(Q3,{intent:"custom",children:/* @__PURE__ */z("img",{src:e})}),e&&"string"!=typeof e&&/* @__PURE__ */z(Q3,{intent:"custom",children:e}),!e&&/* @__PURE__ */z(Q3,{intent:"custom",children:/* @__PURE__ */z(xIe,{})})]});nh(),Xu(),pE();var $Le=f(({id:e="",label:t="",type:n="",isActive:r=!1,children:i,className:a="",onMouseEnter:o,onClick:s})=>{const{componentDefinitions:l}=m(YC),{updateElement:c}=m(uB),d=g(()=>o?.(e),[o,e]),u=g(()=>s?.(e),[s,e]),h=g(t=>c(e,"label",t,"definition"),[c,e]),p=C(()=>nc(l.current,`${n}.market.icon`,""),[n,l]);/* @__PURE__ */
1033
1033
  return M("li",{className:_c('breadcrumb__item dark:before:text-ui-fg-subtle flex items-center gap-2 text-xs select-none before:text-black not-first:before:content-[">"] first:before:content-none',a,{"hover:text-primary-text":!r,"text-primary-text":r}),onMouseEnter:d,onClick:u,tabIndex:-1,children:[t&&/* @__PURE__ */M("div",{className:"flex cursor-pointer items-center gap-0.5 truncate",children:[/* @__PURE__ */z(_Le,{icon:p}),/* @__PURE__ */z(GU,{className:"focus-visible:m-px focus-visible:px-1 focus-visible:outline-1 focus-visible:outline-dashed",value:t,onChange:h,openMode:"doubleClick"})]}),!t&&/* @__PURE__ */z("div",{className:"cursor-pointer",children:i})]})}),TLe=(e,t)=>{if(!t)return[];const n=e[t];if(!n)return[{id:t,label:"unknown",type:"unknown"}];const{definition:{parentId:r,label:i,type:a}}=n;return r?[...TLe(e,r),{id:t,label:i,type:a}]:[{id:t,label:i,type:a}]};$o();var ALe={maskImage:"linear-gradient(to right, transparent, black 3rem)",WebkitMaskImage:"linear-gradient(to right, transparent, black 3rem)"},ELe=({limit:e=1/0})=>{const[[t,n,r,i,a]]=qn(["schema.flat","elementHovered","setHovered","elementSelected","setSelected"]),o=_(null),[s,l]=$(!1),{builderElementPermissions:c,baseElementIdOriginal:d}=m(uB),u=g(e=>{if(!e)return;const n=t[e];c(n,"canSelect",!0)&&a(e)},[a,c,t]),h=g(e=>r(e),[r]),p=C(()=>TLe(t,i),[i,t]),f=C(()=>e!==1/0&&p.length>e?p.slice(p.length-e):p,[p,e]);return x(()=>{if(o.current){const{current:{scrollWidth:e,offsetWidth:t}}=o;o.current.scrollLeft=e-t,l(e>t)}},[f]),/* @__PURE__ */M("ul",{ref:o,tabIndex:-1,className:"builder__breadcrumb flex gap-2 overflow-x-auto px-2",style:s?ALe:void 0,onMouseLeave:()=>r(void 0),children:[f.length<p.length&&/* @__PURE__ */z($Le,{onMouseEnter:h,children:/* @__PURE__ */z("i",{className:"fas fa-ellipsis-h"})}),f.length>0&&f.map(e=>{const{id:t,label:r,type:a}=e;/* @__PURE__ */
1034
1034
  return z($Le,{id:t,isActive:t===i||t===n,onMouseEnter:h,onClick:u,label:r,type:a},t)}),0===f.length&&/* @__PURE__ */z($Le,{id:d,isActive:d===i||d===n,onMouseEnter:h,onClick:u,label:"Page"},d)]})};kP(),zre();var PLe={content:"Text",href:"Link address",src:"Source",alt:"Text alternative",label:"Label",placeholder:"Placeholder",title:"Title",seoPageTitle:"Page title (search engines)",seoPageDescription:"Page description (search engines)"},zLe=/* @__PURE__ */new Set(["content","seoPageDescription"]),MLe=e=>PLe[e]??e.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()),ILe=({type:e,registered:t,attributes:n,readOnly:r,onChange:i})=>{const a=((e,t)=>t&&"manifest"in t?t.contentAttributes??[]:E$(e))(e,t),o=g((e,t,n)=>r=>i(e,t.map((e,t)=>t===n?{...e,label:r}:e)),[i]);return 0===a.length?/* @__PURE__ */z("p",{className:"text-ui-fg-subtle m-0 px-2 text-xs",children:"This element has no words, link or picture of its own to edit."}):/* @__PURE__ */M("div",{className:"flex flex-col gap-2 px-2",children:[/* @__PURE__ */z("p",{className:"text-ui-fg-subtle m-0 text-xs",children:r?"You can view this space: its content is shown, not changed.":"You can edit the content — the words, links and pictures — not the design."}),a.map(e=>{const t=n[e];if((e=>Array.isArray(e)&&e.every(e=>"object"==typeof e&&null!==e&&"label"in e&&"string"==typeof e.label))(t))/* @__PURE__ */return M("fieldset",{className:"m-0 flex flex-col gap-1 border-0 p-0",children:[/* @__PURE__ */z("legend",{className:"mb-1 text-xs font-semibold",children:MLe(e)}),t.map((n,i)=>/* @__PURE__ */z(_re,{size:"xs",value:n.label,"aria-label":`${MLe(e)} ${String(i+1)}`,readOnly:r,onChange:o(e,t,i)},String(i)))]},e);const a="string"==typeof t?t:"",s=t=>i(e,t);return zLe.has(e)?/* @__PURE__ */z(bie,{size:"xs",label:MLe(e),value:a,readOnly:r,onChange:s},e):/* @__PURE__ */z(_re,{size:"xs",label:MLe(e),value:a,readOnly:r,onChange:s},e)})]})},RLe=(e,t=!1)=>{let n={};for(let r of e){let e;if(e=2===r.length&&r[0].includes(".")?[...r[0].split("."),r[1]]:r,e.length<2)continue;let i=n;for(let t=0;t<e.length-2;t++){let n=e[t];i[n]&&"object"==typeof i[n]||(i[n]={}),i=i[n]}let a=e[e.length-2],o=e[e.length-1];t?void 0===i[a]?i[a]=o:Array.isArray(i[a])?i[a].push(o):i[a]=[i[a],o]:i[a]=o}return n},jLe=(e,t,n)=>{let r=[],i=t??[],a=n??void 0!==t;for(let[o,s]of Object.entries(e))if(s&&"object"==typeof s&&!Array.isArray(s))r.push(...jLe(s,[...i,o],a));else{let e=[...i,o];Array.isArray(s)?s.forEach(t=>{a?r.push([e.join("."),String(t)]):r.push([...e,String(t)])}):a?r.push([e.join("."),String(s)]):r.push([...e,String(s)])}return r};mc(),v4(),zre(),Vre(),XU();var DLe=f(({id:e,className:t,valueKey:n="",value:r="",disabled:i=!1,clearable:a=!1,isNewRecord:o=!1,size:s="md",required:l=!0,allowAppend:c=!0,allowRemove:d=!0,allowKeyEdit:u=!0,keysAllowed:h,onChange:p,onRemove:f})=>{let m=HU(["Input","KVInput"],{className:t,componentKey:["item","itemActions","input","rootInputContainer","rootInput"],variants:{size:s}}),[b,v]=$(n),[y,x]=$(r),[w,k]=$(),O=C(()=>!o&&(r!==y||n!==b),[o,r,y,n,b]),S=g(e=>{w?.valueKey?k(fc(w,"valueKey")):""===e&&k(e=>({...e,valueKey:"Key is required"})),v(e)},[w]),N=g(e=>{w?.value?k(fc(w,"value")):""===e&&l&&k(e=>({...e,value:"Value is required"})),x(e)},[w,l]),_=g(()=>f?.(e),[f,e]),T=g(()=>{k(void 0),v(n),x(r)},[n,r]),A=g(()=>{let t={};if(b||(t.valueKey="Key is required"),!y&&l&&(t.value="Value is required"),Object.keys(t).length)return void k(t);let r=p?.(n,b,y,e);!r?.success&&r?.errors?k(r.errors):(k({}),o&&(v(""),x("")))},[b,y,l,p,n,e,o]),E=g(()=>{let t=p?.(n,b,"",e);k(!t?.success&&t?.errors?t.errors:{})},[e,p,b,n]);/* @__PURE__ */
1035
1035
  return M("div",{className:m.item,children:[/* @__PURE__ */M("div",{className:"flex grow basis-0 gap-2",children:[(!h||!h.length)&&/* @__PURE__ */z(_re,{size:s,className:{...m,root:m.rootInput,inputContainer:m.rootInputContainer},value:b,disabled:i||!u,required:!0,error:w?.valueKey,placeholder:"Key",onChange:S}),h&&h.length>0&&/* @__PURE__ */z(jre,{size:s,className:{...m,root:m.rootInput,inputContainer:m.rootInputContainer},value:b,disabled:i||!u,required:l,placeholder:"Value",error:w?.valueKey,onChange:S,children:h.map(e=>/* @__PURE__ */z(jre.Option,{value:e.value,children:e.label||e.value},e.value))}),