@plitzi/plitzi-sdk 0.31.0 → 0.31.2

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.
@@ -1,10 +1,10 @@
1
- import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Suspense as a,cloneElement as o,createContext as s,createElement as l,forwardRef as c,isValidElement as u,lazy as d,memo as p,use as f,useCallback as h,useContext as m,useEffect as g,useId as y,useImperativeHandle as b,useLayoutEffect as v,useMemo as x,useReducer as w,useRef as k,useState as S,useSyncExternalStore as T}from"react";import{createRoot as N,hydrateRoot as C}from"react-dom/client";import*as E from"react/jsx-runtime";import{Fragment as _,jsx as O,jsxs as A}from"react/jsx-runtime";import*as I from"react-dom";import{createPortal as D}from"react-dom";var P=Object.create,M=Object.defineProperty,R=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,z=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty,F=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),$=(e,t)=>{let n={};for(var r in e)M(n,r,{get:e[r],enumerable:!0});return t||M(n,Symbol.toStringTag,{value:"Module"}),n},q=(e,t,n)=>(n=null!=e?P(z(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,a=j(t),o=0,s=a.length;o<s;o++)i=a[o],L.call(e,i)||void 0===i||M(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=R(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?n:M(n,"default",{value:e,enumerable:!0}),e)),B=/* @__PURE__ */(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)(function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),V={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"}}},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"}}}},U=["onClick","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"];function H(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 W(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=H(n[1]);if(null!==e)r.push(e);else if(t)return[]}else if(n[2]){let e=H(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=H(r);if(null!==e)n.push(e);else if(t)return[]}return n}(e,t):[]:[]}function Y(e,t,n){if(null==e||!t)return n;let r=W(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)?i[Number(a)]:i[a]}return void 0===i?n:i}function G(e,t,n){let r=W(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}function Q(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=Y(e,i);void 0!==t&&G(n,i,t)}return n}function J(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,J(e,t))),n}if(e instanceof Set){let n=/* @__PURE__ */new Set;return t.set(e,n),e.forEach(e=>n.add(J(e,t))),n}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let n=new DataView(J(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]=J(e,t)),n}let n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=J(e[r],t));return n}var K=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e);function X(e,t){let n=W(t),r=Array.isArray(e)?[...e]:K(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]:K(t);a[e]=r,i=t,a=r}return r}function Z(e,t){if(null===e)return!1;let n=W(t),r=e;for(let i of n){if(null==r||!(i in r))return!1;r=r[i]}return!0}function ee(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(0===n.length)return{...e};let r=e;for(let i of n){let e=W(i);if(!e.length||!Z(r,i))continue;let t=X(r,i),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]}r=t}return r}function te(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function f(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 h(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!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);h(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,h(t),c?f(e):a}function b(e){return o=void 0,u&&r?f(e):(r=i=void 0,a)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return y(n);if(void 0!==d)return clearTimeout(o),h(t),f(n)}return o||h(t),a}return v.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},v.flush=()=>void 0===o?a:b(p()),v.pending=()=>void 0!==o,v}function ne(e,t=0,n={}){return te(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}function re(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)}function ie(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=ie(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ae(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=" "),r+=t);return r}var oe=/* @__PURE__ */$({cva:()=>ce,cx:()=>le}),se=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,le=ae,ce=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return le(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=se(t)||se(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},{});return le(e,o,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},[]),null==n?void 0:n.class,null==n?void 0:n.className)},{cva:ue}=oe,de=(Math.pow(10,8),6048e5),pe=6e4,fe=36e5,he=Symbol.for("constructDateFrom");function me(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&he in e?e[he](t):e instanceof Date?new e.constructor(t):new Date(t)}function ge(e,t){return me(t||e,e)}function ye(e,t,n){const r=ge(e,n?.in);return isNaN(t)?me(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}var be={};function ve(){return be}function xe(e,t){const n=ve(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ge(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}function we(e,t){return xe(e,{...t,weekStartsOn:1})}function ke(e){const t=ge(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 Se={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Te(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ne={date:Te({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Te({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Te({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ce={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ee(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 _e={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Oe(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 Ae,Ie={ordinalNumber:(Ae={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ae.matchPattern);if(!n)return null;const r=n[0],i=e.match(Ae.parsePattern);if(!i)return null;let a=Ae.valueCallback?Ae.valueCallback(i[0]):i[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Oe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Oe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Oe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},De={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=Se[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ne,formatRelative:(e,t,n,r)=>Ce[e],localize:_e,match:Ie,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pe(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=ve(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=me(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=xe(o,t),l=me(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=xe(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}var Me=(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"})}},Re=(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"})}},je={p:Re,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Me(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}}",Me(r,t)).replace("{{time}}",Re(i,t))}},ze=/^D+$/,Le=/^Y+$/,Fe=["D","DD","YY","YYYY"];function $e(e){return ze.test(e)}function qe(e){return Le.test(e)}function Be(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(Fe.includes(e))throw new RangeError(r)}var Ve=class{subPriority=0;validate(e,t){return!0}},Ue=class extends Ve{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},He=class extends Ve{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>me(t,e))}set(e,t){return t.timestampIsSet?e:me(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):me(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}},We=class{run(e,t,n,r){const i=this.parse(e,t,n,r);return i?{setter:new Ue(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Ye=/^(1[0-2]|0?\d)/,Ge=/^(3[0-1]|[0-2]?\d)/,Qe=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Je=/^(5[0-3]|[0-4]?\d)/,Ke=/^(2[0-3]|[0-1]?\d)/,Xe=/^(2[0-4]|[0-1]?\d)/,Ze=/^(1[0-1]|0?\d)/,et=/^(1[0-2]|0?\d)/,tt=/^[0-5]?\d/,nt=/^[0-5]?\d/,rt=/^\d/,it=/^\d{1,2}/,at=/^\d{1,3}/,ot=/^\d{1,4}/,st=/^-?\d+/,lt=/^-?\d/,ct=/^-?\d{1,2}/,ut=/^-?\d{1,3}/,dt=/^-?\d{1,4}/,pt=/^([+-])(\d{2})(\d{2})?|Z/,ft=/^([+-])(\d{2})(\d{2})|Z/,ht=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,mt=/^([+-])(\d{2}):(\d{2})|Z/,gt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function yt(e,t){return e?{value:t(e.value),rest:e.rest}:e}function bt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function vt(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*fe+a*pe+1e3*o),rest:t.slice(n[0].length)}}function xt(e){return bt(st,e)}function wt(e,t){switch(e){case 1:return bt(rt,t);case 2:return bt(it,t);case 3:return bt(at,t);case 4:return bt(ot,t);default:return bt(new RegExp("^\\d{1,"+e+"}"),t)}}function kt(e,t){switch(e){case 1:return bt(lt,t);case 2:return bt(ct,t);case 3:return bt(ut,t);case 4:return bt(dt,t);default:return bt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function St(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Tt(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const t=r+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?i:1-i}function Nt(e){return e%400==0||e%4==0&&e%100!=0}function Ct(e,t,n){const r=ge(e,n?.in),i=function(e,t){const n=ge(e,t?.in),r=+we(n)-+function(e,t){const n=function(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=me(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=we(i),o=me(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=we(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}(e,t),r=me(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),we(r)}(n);return Math.round(r/de)+1}(r,n)-t;return r.setDate(r.getDate()-7*i),r}var Et=[31,28,31,30,31,30,31,31,30,31,30,31],_t=[31,29,31,30,31,30,31,31,30,31,30,31];function Ot(e,t,n){const r=ve(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=ge(e,n?.in),o=a.getDay(),s=7-i;return ye(a,t<0||t>6?t-(o+s)%7:((t%7+7)%7+s)%7-(o+s)%7,n)}var At={G:new class extends We{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends We{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return yt(wt(4,e),r);case"yo":return yt(n.ordinalNumber(e,{unit:"year"}),r);default:return yt(wt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Tt(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends We{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return yt(wt(4,e),r);case"Yo":return yt(n.ordinalNumber(e,{unit:"year"}),r);default:return yt(wt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const i=Pe(e,r);if(n.isTwoDigitYear){const t=Tt(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),xe(e,r)}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),xe(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends We{priority=130;parse(e,t){return kt("R"===t?4:t.length,e)}set(e,t,n){const r=me(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),we(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends We{priority=130;parse(e,t){return kt("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends We{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return wt(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends We{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return wt(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends We{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return yt(bt(Ye,e),r);case"MM":return yt(wt(2,e),r);case"Mo":return yt(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends We{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return yt(bt(Ye,e),r);case"LL":return yt(wt(2,e),r);case"Lo":return yt(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends We{priority=100;parse(e,t,n){switch(t){case"w":return bt(Je,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return xe(function(e,t,n){const r=ge(e,n?.in),i=function(e,t){const n=ge(e,t?.in),r=+xe(n,t)-+function(e,t){const n=ve(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Pe(e,t),a=me(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),xe(a,t)}(n,t);return Math.round(r/de)+1}(r,n)-t;return r.setDate(r.getDate()-7*i),ge(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends We{priority=100;parse(e,t,n){switch(t){case"I":return bt(Je,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return we(Ct(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends We{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return bt(Ge,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return wt(t.length,e)}}validate(e,t){const n=Nt(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=_t[r]:t>=1&&t<=Et[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends We{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return bt(Qe,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return wt(t.length,e)}}validate(e,t){return Nt(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends We{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends We{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return yt(wt(t.length,e),i);case"eo":return yt(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends We{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return yt(wt(t.length,e),i);case"co":return yt(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends We{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return wt(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return yt(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return yt(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return yt(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return yt(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=function(e,t,n){const r=ge(e,n?.in);return ye(r,t-function(e,t){const n=ge(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends We{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends We{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends We{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends We{priority=70;parse(e,t,n){switch(t){case"h":return bt(et,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends We{priority=70;parse(e,t,n){switch(t){case"H":return bt(Ke,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends We{priority=70;parse(e,t,n){switch(t){case"K":return bt(Ze,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends We{priority=70;parse(e,t,n){switch(t){case"k":return bt(Xe,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends We{priority=60;parse(e,t,n){switch(t){case"m":return bt(tt,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends We{priority=50;parse(e,t,n){switch(t){case"s":return bt(nt,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends We{priority=30;parse(e,t){return yt(wt(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends We{priority=10;parse(e,t){switch(t){case"X":return vt(pt,e);case"XX":return vt(ft,e);case"XXXX":return vt(ht,e);case"XXXXX":return vt(gt,e);default:return vt(mt,e)}}set(e,t,n){return t.timestampIsSet?e:me(e,e.getTime()-ke(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends We{priority=10;parse(e,t){switch(t){case"x":return vt(pt,e);case"xx":return vt(ft,e);case"xxxx":return vt(ht,e);case"xxxxx":return vt(gt,e);default:return vt(mt,e)}}set(e,t,n){return t.timestampIsSet?e:me(e,e.getTime()-ke(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends We{priority=40;parse(e){return xt(e)}set(e,t,n){return[me(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends We{priority=20;parse(e){return xt(e)}set(e,t,n){return[me(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pt=/^'([^]*?)'?$/,Mt=/''/g,Rt=/\S/,jt=/[a-zA-Z]/;function zt(e){return e.match(Pt)[1].replace(Mt,"'")}var Lt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ft=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,$t=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,qt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Bt(e){return e?parseInt(e):1}function Vt(e){return e&&parseFloat(e.replace(",","."))||0}var Ut=[31,null,31,30,31,30,31,31,30,31,30,31];function Ht(e){return e%400==0||e%4==0&&e%100!=0}var Wt=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?function(e,t){const n=()=>me(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Lt.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Lt.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Lt.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Lt.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let a;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Ft);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=Bt(n[1]),a=Bt(n[2])-1,o=Bt(n[3]),s=Bt(n[4]),l=Bt(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ut[t]||(Ht(e)?29:28))}(t,a,o)&&function(e,t){return t>=1&&t<=(Ht(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,o)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return n();const o=+a;let s,l=0;if(i.time&&(l=function(e){const t=e.match($t);if(!t)return NaN;const n=Vt(t[1]),r=Vt(t[2]),i=Vt(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*fe+r*pe+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(o+l),n=ge(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(qt);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*fe+i*pe):NaN}(i.timezone),isNaN(s)?n():ge(o+l+s,t?.in)}(e):e,Math.floor((n=t,+ge(n)/1e3)).toString();var n},Yt=e=>{return!("string"!=typeof e||!/^\d{4}-\d{2}-\d{2}$/.test(e)||(t=function(e,t,n,r){const i=()=>me(r?.in||n,NaN),a=Object.assign({},ve()),o=r?.locale??a.locale??De,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():ge(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:o},u=[new He(r?.in,n)],d=t.match(Dt).map(e=>{const t=e[0];return t in je?(0,je[t])(e,o.formatLong):e}).join("").match(It),p=[];for(let g of d){!r?.useAdditionalWeekYearTokens&&qe(g)&&Be(g,t,e),!r?.useAdditionalDayOfYearTokens&&$e(g)&&Be(g,t,e);const n=g[0],a=At[n];if(a){const{incompatibleTokens:t}=a;if(Array.isArray(t)){const e=p.find(e=>t.includes(e.token)||e.token===n);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${g}\` at the same time`)}else if("*"===a.incompatibleTokens&&p.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);p.push({token:n,fullToken:g});const r=a.run(e,g,o.match,c);if(!r)return i();u.push(r.setter),e=r.rest}else{if(n.match(jt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===g?g="'":"'"===n&&(g=zt(g)),0!==e.indexOf(g))return i();e=e.slice(g.length)}}if(e.length>0&&Rt.test(e))return i();const f=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=ge(n,r?.in);if(isNaN(+h))return i();const m={};for(const g of f){if(!g.validate(h,c))return i();const e=g.set(h,m,c);Array.isArray(e)?(h=e[0],Object.assign(m,e[1])):h=e}return h}(e,"yyyy-MM-dd",/* @__PURE__ */new Date),!((n=t)instanceof Date||"object"==typeof n&&"[object Date]"===Object.prototype.toString.call(n))&&"number"!=typeof t||isNaN(+ge(t))));var t,n},Gt=Symbol.for("immer-nothing"),Qt=Symbol.for("immer-draftable"),Jt=Symbol.for("immer-state");function Kt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xt=Object,Zt=Xt.getPrototypeOf,en="constructor",tn="prototype",nn="configurable",rn="enumerable",an="writable",on="value",sn=e=>!!e&&!!e[Jt];function ln(e){return!!e&&(dn(e)||yn(e)||!!e[Qt]||!!e[en]?.[Qt]||bn(e)||vn(e))}var cn=Xt[tn][en].toString(),un=/* @__PURE__ */new WeakMap;function dn(e){if(!e||!xn(e))return!1;const t=Zt(e);if(null===t||t===Xt[tn])return!0;const n=Xt.hasOwnProperty.call(t,en)&&t[en];if(n===Object)return!0;if(!wn(n))return!1;let r=un.get(n);return void 0===r&&(r=Function.toString.call(n),un.set(n,r)),r===cn}function pn(e,t,n=!0){0===fn(e)?(n?Reflect.ownKeys(e):Xt.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function fn(e){const t=e[Jt];return t?t.type_:yn(e)?1:bn(e)?2:vn(e)?3:0}var hn=(e,t,n=fn(e))=>2===n?e.has(t):Xt[tn].hasOwnProperty.call(e,t),mn=(e,t,n=fn(e))=>2===n?e.get(t):e[t],gn=(e,t,n,r=fn(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},yn=Array.isArray,bn=e=>e instanceof Map,vn=e=>e instanceof Set,xn=e=>"object"==typeof e,wn=e=>"function"==typeof e,kn=e=>"boolean"==typeof e,Sn=e=>e.copy_||e.base_,Tn=e=>e.modified_?e.copy_:e.base_;function Nn(e,t){if(bn(e))return new Map(e);if(vn(e))return new Set(e);if(yn(e))return Array[tn].slice.call(e);const n=dn(e);if(!0===t||"class_only"===t&&!n){const t=Xt.getOwnPropertyDescriptors(e);delete t[Jt];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[an]&&(a[an]=!0,a[nn]=!0),(a.get||a.set)&&(t[i]={[nn]:!0,[an]:!0,[rn]:a[rn],[on]:e[i]})}return Xt.create(Zt(e),t)}{const t=Zt(e);if(null!==t&&n)return{...e};const r=Xt.create(t);return Xt.assign(r,e)}}function Cn(e,t=!1){return _n(e)||sn(e)||!ln(e)||(fn(e)>1&&Xt.defineProperties(e,{set:En,add:En,clear:En,delete:En}),Xt.freeze(e),t&&pn(e,(e,t)=>{Cn(t,!0)},!1)),e}var En={[on]:function(){Kt(2)}};function _n(e){return null===e||!xn(e)||Xt.isFrozen(e)}var On="MapSet",An="Patches",In="ArrayMethods",Dn={};function Pn(e){const t=Dn[e];return t||Kt(0),t}var Mn,Rn=e=>!!Dn[e],jn=()=>Mn;function zn(e,t){t&&(e.patchPlugin_=Pn(An),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ln(e){Fn(e),e.drafts_.forEach(qn),e.drafts_=null}function Fn(e){e===Mn&&(Mn=e.parent_)}var $n=e=>Mn={drafts_:[],parent_:Mn,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:Rn(On)?Pn(On):void 0,arrayMethodsPlugin_:Rn(In)?Pn(In):void 0};function qn(e){const t=e[Jt];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Bn(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[Jt].modified_&&(Ln(t),Kt(4)),ln(e)&&(e=Vn(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Jt].base_,e,t)}else e=Vn(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cn(t,n)}(t,e,!0),Ln(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gt?e:void 0}function Vn(e,t){if(_n(t))return t;const n=t[Jt];if(!n)return Qn(t,e.handledSet_,e);if(!Hn(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);Gn(n,e)}return n.copy_}function Un(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Hn=(e,t)=>e.scope_===t,Wn=[];function Yn(e,t,n,r){const i=Sn(e),a=e.type_;if(void 0!==r&&mn(i,r,a)===t)return void gn(i,r,n,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;pn(i,(e,n)=>{if(sn(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??Wn;for(const s of o)gn(i,s,n,a)}function Gn(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)}Un(e)}}function Qn(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||sn(e)||t.has(e)||!ln(e)||_n(e)||(t.add(e),pn(e,(r,i)=>{if(sn(i)){const t=i[Jt];Hn(t,n)&&(gn(e,r,Tn(t),e.type_),Un(t))}else ln(i)&&Qn(i,t,n)})),e}var Jn={get(e,t){if(t===Jt)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=Sn(e);if(!hn(i,t,e.type_))return function(e,t,n){const r=Zn(t,n);return r?on in r?r[on]:r.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!ln(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===Xn(e.base_,t)){tr(e);const n=1===e.type_?+t:t,r=nr(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in Sn(e),ownKeys:e=>Reflect.ownKeys(Sn(e)),set(e,t,n){const r=Zn(Sn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Xn(Sn(e),t),i=r?.[Jt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||hn(e.base_,t,e.type_)))return!0;tr(e),er(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||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(sn(n)){const i=n[Jt];Hn(i,r)&&i.callbacks_.push(function(){tr(e),Yn(e,n,Tn(i),t)})}else ln(n)&&e.callbacks_.push(function(){const i=Sn(e);3===e.type_?i.has(n)&&Qn(n,r.handledSet_,r):mn(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&Qn(mn(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(tr(e),void 0!==Xn(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),er(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Sn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[an]:!0,[nn]:1!==e.type_||"length"!==t,[rn]:r[rn],[on]:n[t]}:r},defineProperty(){Kt(11)},getPrototypeOf:e=>Zt(e.base_),setPrototypeOf(){Kt(12)}},Kn={};for(let QR in Jn){let e=Jn[QR];Kn[QR]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function Xn(e,t){const n=e[Jt];return(n?Sn(n):e)[t]}function Zn(e,t){if(!(t in e))return;let n=Zt(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Zt(n)}}function er(e){e.modified_||(e.modified_=!0,e.parent_&&er(e.parent_))}function tr(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=Nn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function nr(e,t,n,r){const[i,a]=bn(t)?Pn(On).proxyMap_(t,n):vn(t)?Pn(On).proxySet_(t,n):function(e,t){const n=yn(e),r={type_:n?1:0,scope_:t?t.scope_:jn(),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=Jn;n&&(i=[r],a=Kn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return(n?.scope_??jn()).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||!Hn(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const a=Tn(i);Yn(e,i.draft_??i,a,n),Gn(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 rr(e){if(!ln(e)||_n(e))return e;const t=e[Jt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Nn(e,!0);return pn(n,(e,t)=>{gn(n,e,rr(t))},r),t&&(t.finalized_=!1),n}Kn.deleteProperty=function(e,t){return Kn.set.call(this,e,t,void 0)},Kn.set=function(e,t,n){return Jn.set.call(this,e[0],t,n,e[0])};var ir=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(wn(e)&&!wn(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(wn(t)||Kt(6),void 0===n||wn(n)||Kt(7),ln(e)){const i=$n(this),a=nr(0,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?Ln(i):Fn(i)}return zn(i,n),Bn(r,i)}if(!e||!xn(e)){if(r=t(e),void 0===r&&(r=e),r===Gt&&(r=void 0),this.autoFreeze_&&Cn(r,!0),n){const t=[],i=[];Pn(An).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Kt(1)},this.produceWithPatches=(e,t)=>{if(wn(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]},kn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),kn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),kn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;ln(e)||Kt(8),sn(e)&&(sn(t=e)||Kt(10),e=rr(t));const n=$n(this),r=nr(0,e,void 0);return r[Jt].isManual_=!0,Fn(n),r}finishDraft(e,t){const n=e&&e[Jt];n&&n.isManual_||Kt(9);const{scope_:r}=n;return zn(r,t),Bn(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=Pn(An).applyPatches_;return sn(e)?r(e,t):this.produce(e,e=>r(e,t))}},ar=ir.produce,or=s(void 0);or.displayName="ElementContext";var sr=s({});sr.displayName="PlitziServiceContext";var lr=()=>{let e=f(sr);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},cr=e=>{let{children:t,value:n}=e;/* @__PURE__ */
2
- return O(sr,{value:n,children:t})},ur=e=>"object"==typeof e&&!!e&&!Array.isArray(e),dr=(e,t)=>{if(!ur(e)||!ur(t))return t;let n={...e};for(let r of Object.keys(t))"__proto__"!==r&&(n[r]=r in e?dr(e[r],t[r]):t[r]);return n},pr=/* @__PURE__ */new Map,fr=e=>{let t=pr.get(e);return void 0===t&&(t=e.split("."),pr.size>=512&&pr.delete(pr.keys().next().value),pr.set(e,t)),t},hr=/* @__PURE__ */new Map;function mr(e,t){let n=Array.isArray(t);if("string"!=typeof t&&!n||n&&!t.length||"string"==typeof t&&!t)return e;if("string"==typeof t&&-1===t.indexOf("."))return"object"==typeof e&&e&&t in e?e[t]:void 0;if("string"==typeof t)return(e=>{let t=hr.get(e);if(!t){if(t=(e=>{if(1===e.length){let t=e[0];return e=>"object"==typeof e&&e&&t in e?e[t]:void 0}return t=>{let n=t;for(let r=0;r<e.length;r++){if("object"!=typeof n||!n)return;n=n[e[r]]}return n}})(fr(e)),hr.size>=512){let e=hr.keys().next().value;hr.delete(e)}hr.set(e,t)}return t})(t)(e);let r=e;for(let i of t){if("object"!=typeof r||!r||!(i in r))return;r=r[i]}return r}var gr,yr=Symbol("unchanged"),br=e=>/^\d+$/.test(e),vr=e=>Array.isArray(e)?e.slice():{...e},xr=(e,t,n,r,i)=>{let a=t[n],o="object"==typeof e&&e?e:{};if(n===t.length-1){let e=o[a],t=i?r(e):r;if(e===t)return yr;let n=vr(o);return n[a]=t,n}let s=xr(o[a],t,n+1,r,i);if(s===yr)return yr;let l=vr(o);return l[a]=s,l},wr=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,kr=e=>wr.test(e)?`.${e}`:`[${JSON.stringify(e)}]`,Sr=e=>wr.test(e)?e:JSON.stringify(e),Tr=e=>{let t=e.length,n="";for(let a=0;a<t-1;a++){let t=0===a?"o":"_"+(a-1);n+=`var _${a}=${t}==null?void 0:${t}${kr(e[a])};\n`}let r=t>1?"_"+(t-2):"o";n+=`var _p=${r}==null?void 0:${r}${kr(e[t-1])};\n`,n+="var _v=f?v(_p):v;\nif(_p===_v)return null;\n";let i="_v";for(let a=t-1;a>=0;a--)i=`{...${0===a?"o":`(_${a-1}||{})`},${Sr(e[a])}:${i}}`;return n+=`return ${i};`,Function("o","v","f",n)},Nr=/* @__PURE__ */new Map,Cr=(e,t,n,r,i)=>{let a=((e,t)=>{if(!(()=>{if(void 0===gr)try{Tr(["x","y"])({x:{}},1,!1),gr=!0}catch{gr=!1}return gr})())return;let n=Nr.get(e);if(n)return n;if(t.some(br))return;let r=Tr(t);return Nr.size>=256&&Nr.delete(Nr.keys().next().value),Nr.set(e,r),r})(t,n);if(a){let t=a(e,r,i);return null===t?yr:t}return xr(e,n,0,r,i)},Er=e=>"number"==typeof e||""===e||isNaN(Number(e))?e:Number(e),_r=e=>Array.isArray(e)?e.slice():{...e},Or=(e,t,n,r)=>{let i=Er(t[n]),a=_r(e);return a[i]=n===t.length-1?r:Or(e[i]??{},t,n+1,r),a},Ar=Symbol("@plitzi/sdk-store/cancel"),Ir=Symbol("no-error"),Dr=(e,t,n)=>{let r=0,i=Ir;for(;r<n;)try{for(;r<n;r++)e[r](t)}catch(e){i===Ir&&(i=e),r++}return i},Pr="__proto__";function Mr(e){let{getOwnState:t,getOwnSnapshot:n,setOwnState:r,mutateOwnKey:i,parent:a,listeners:o,pathListeners:s,changeListeners:l,interceptors:c,reportError:u}=e,d=(e,t,n)=>{let r=t;for(let i=0,a=c.length;i<a;i++){let a;try{a=c[i]({path:e,value:r,prev:n})}catch(t){return u(t,"beforeChange",e),Ar}if(a===Ar)return Ar;void 0!==a&&(r=a)}return r},p=0,f=/* @__PURE__ */new Set,h=(e,t)=>{let{items:n}=e;if(p>0)for(let r=0,i=n.length;r<i;r++)f.add(n[r]);else{e.begin();try{let e=Dr(n,t,n.length);e!==Ir&&u(e,"notify",t)}finally{e.end()}}},m=(e,t,n)=>{let r={path:e,prev:t,next:n},{items:i}=l;l.begin();try{let t=Dr(i,r,i.length);t!==Ir&&u(t,"onChange",e)}finally{l.end()}},g=(e,t,n,r)=>{let i=s.getDescendants(e);if(i)for(let a of i){let i=s.direct.get(a);if(!i)continue;let o=a.slice(r);mr(t,o)!==mr(n,o)&&h(i,e)}};return{setState:(e,u,p=!0)=>{let f=t();if("string"==typeof e&&-1!==e.indexOf(Pr)&&-1!==fr(e).indexOf(Pr))throw Error(`@plitzi/sdk-store: refused to write to unsafe path "${e}" (\`__proto__\` segment)`);if(a&&"string"==typeof e&&!(-1===e.indexOf(".")?Object.hasOwn(f,e):((e,t)=>{let n=e;for(let r=0,i=t.length;r<i;r++){if("object"!=typeof n||!n||!Object.hasOwn(n,t[r]))return!1;n=n[t[r]]}return!0})(f,fr(e))))return void a.setState(e,u,p);if("string"!=typeof e)return void((e,t,n,i)=>{let a=e?mr(n,e):void 0,u=e?"function"==typeof t?t(a):t:void 0;if(e&&c.length>0){let t=d(e,u,a);if(t===Ar)return;u=t}if(e&&a===u)return;let p=e?((e,t,n)=>{if("string"==typeof t){if(!t)return n;let r=fr(t);if(1===r.length){let t=_r(e);return t[Er(r[0])]=n,t}return Or(e,r,0,n)}return Array.isArray(t)&&t.length?Or(e,t,0,n):n})(n,e,u):"function"==typeof t?t(n):{...n,...t};if(!e&&c.length>0){let e=d(void 0,p,n);if(e===Ar)return;p=e}p!==n&&(r(p),l.length>0&&m(e,n,p),i&&(h(o,e),s.size>0&&s.direct.forEach((t,r)=>{mr(n,r)!==mr(p,r)&&h(t,e)})))})(e,u,f,p);if(-1===e.indexOf(".")){let t=f[e],r="function"==typeof u?u(t):u,a=r;if(c.length>0){let n=d(e,r,t);if(n===Ar)return;a=n}if(t===a)return;let y=l.length>0?n():void 0;if(i(e,a),void 0!==y&&m(e,y,n()),p){h(o,e);let n=s.direct.get(e);n&&h(n,e),g(e,t,a,e.length+1)}return}let y,b=fr(e);if(c.length>0){let t=mr(f,e),n=d(e,"function"==typeof u?u(t):u,t);if(n===Ar)return;y=Cr(f,e,b,n,!1)}else y=Cr(f,e,b,u,"function"==typeof u);if(y===yr)return;let v=y;r(v),l.length>0&&m(e,f,v),p&&(h(o,e),((e,t)=>{let n="";for(let r=0;r<t.length;r++){n=n?`${n}.${t[r]}`:t[r];let i=s.direct.get(n);i&&h(i,e)}})(e,b),g(e,f,v,0))},batch:e=>{p++;try{return e()}finally{if(p--,0===p&&f.size>0){let e=[...f];f.clear();let t=Dr(e,void 0,e.length);t!==Ir&&u(t,"notify",void 0)}}}}}function Rr(e,t,n,r,i,a){let o;return{unsubscribe:e.subscribe(e=>{let s=e;if(t.forEach(t=>t(e),e=>a(e,"notify",s)),n.size>0&&n.forEachAffected(e,t=>t(e),e=>a(e,"notify",s)),r.length>0){let e=i(),t={path:s,prev:o??e,next:e};o=e,r.forEach(e=>e(t),e=>a(e,"onChange",s))}}),seedBaseline:()=>{o??=i()}}}var jr=()=>{},zr=class{items=[];notifying=0;dead=0;get length(){return this.items.length-this.dead}add(e){return this.items.push(e),()=>this.remove(e)}remove(e){let t=this.items.indexOf(e);if(-1===t)return;if(this.notifying>0)return this.items[t]=jr,void this.dead++;let n=this.items.pop();t<this.items.length&&(this.items[t]=n)}begin(){this.notifying++}end(){0===--this.notifying&&this.dead>0&&this.compact()}forEach(e,t){this.begin();try{let n,{items:r}=this,i=r.length,a=0,o=!1;for(;a<i;)try{for(;a<i;a++)e(r[a])}catch(e){o||(o=!0,n=e),a++}if(o){if(!t)throw n;t(n)}}finally{this.end()}}clear(){if(this.notifying>0){let{items:e}=this;for(let t=0,n=e.length;t<n;t++)e[t]=jr;return void(this.dead=e.length)}this.items.length=0,this.dead=0}compact(){let{items:e}=this,t=0;for(let n=0;n<e.length;n++)e[n]!==jr&&(e[t++]=e[n]);e.length=t,this.dead=0}},Lr=(e,t,n)=>{let r="";for(let i=0;i<t;i++)r=r?`${r}.${e[i]}`:e[i],n(r)},Fr=class{direct=/* @__PURE__ */new Map;descendants=/* @__PURE__ */new Map;size=0;add(e,t){let n=this.direct.get(e),r=fr(e);return n||(n=new zr,this.direct.set(e,n),this.size++,Lr(r,r.length-1,t=>{let n=this.descendants.get(t);n||(n=/* @__PURE__ */new Set,this.descendants.set(t,n)),n.add(e)})),n.add(t),()=>this.remove(e,n,t,r)}remove(e,t,n,r){this.direct.get(e)===t&&(t.remove(n),!(t.length>0)&&(this.direct.delete(e),this.size--,Lr(r,r.length-1,t=>{let n=this.descendants.get(t);n&&(n.delete(e),0===n.size&&this.descendants.delete(t))})))}getDescendants(e){return this.descendants.get(e)}forEachAffected(e,t,n){let r=e=>{e&&e.forEach(t,n)};if("string"!=typeof e)return void this.direct.forEach(r);let i=fr(e);Lr(i,i.length,e=>r(this.direct.get(e))),this.descendants.get(e)?.forEach(e=>r(this.direct.get(e)))}clear(){this.direct.clear(),this.descendants.clear(),this.size=0}},$r=s(void 0);$r.displayName="StoreContext";var qr=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0};function Br(e,t){let n=m($r),r=e??n;if(!r)throw Error(`${t} must be used inside a StoreProvider`);return r}function Vr(e,t,n){let r=t.current.length;return x(()=>Array.from({length:r},(n,r)=>n=>{let i=t.current[r],a="function"==typeof i?i(e.getState()):i;e.setState(a,n)}),[e,n])}var Ur=(e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!Object.is(e[i],t[i]))return!1;return!0},Hr=[];var Wr=typeof window<"u"?v:g;function Yr(e,t,n={}){let r=Br(n.store,"useStoreSync");Array.isArray(e)?function(e,t,n,r){let{mode:i="sync",enabled:a=!0,syncStrategy:o="afterRender"}=r,s=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),l=k(!1),c=!l.current;l.current=!0;let u=k(void 0),d=a&&(c||"sync"===i&&n.some((e,t)=>!Object.is(u.current?.[t],e))),p=()=>{u.current=n,e.batch(()=>{t.forEach((t,r)=>{let i="function"==typeof t?t(e.getState()):t;e.setState(i,n[r])})})};"render"===o?d&&p():(d&&c&&p(),Wr(()=>{d&&!c&&p()},[d,n,s]))}(r,e,t,n):function(e,t,n,r){let i=void 0===t,a="function"==typeof t,o=i?Ur:Object.is,{mode:s="sync",enabled:l=!0,equalityFn:c=o,syncStrategy:u="afterRender"}=r,d=k(void 0),p=k(!1),f=!p.current;p.current=!0;let h=d.current,m=l&&(f||"sync"===s&&(void 0===h||!c(h,n))),g=(r=!0)=>{if(d.current=n,i)e.setState(void 0,e=>({...e,...n}),r);else if(a){let i=t(e.getState());e.setState(i,n,r)}else e.setState(t,n,r)};"render"===u?m&&g():(m&&f&&g(!1),Wr(()=>{m&&!f&&g()},[m,n,t]))}(r,e,t,n)}var Gr=()=>({useStore:function(e,t){return function(e,t={}){let n=Br(t.store,"useStore"),r=Array.isArray(e),i=function(e,t,n){let r=n.mode??"sync",i=n.enabled??!0,a=n.defaultValue,o=void 0===t,s=n.equalityFn??(o?Ur:Object.is),l=n.transformer,c=k(l);c.current=l;let u=x(()=>function(e,t,n){return()=>{if("string"==typeof t){let r=e.getPath(t);return void 0===r?n:r}if("function"==typeof t){let r=e.getState(),i=mr(r,t(r));return void 0===i?n:i}return e.getState()}}(e,t,a),[e,t,a]),d=k(u()),p=x(()=>n=>i&&"mount"!==r?"string"==typeof t?e.subscribePath(t,n):e.subscribe(n):()=>{},[i,r,t,e]),f=()=>{if(!i)return d.current;if("mount"===r)return u();let e=u();return s(d.current,e)?d.current:(d.current=e,e)},m=T(p,f,f);return[x(()=>c.current?c.current(m):m,[m]),h(n=>{o?e.setState(void 0,n):"function"==typeof t?e.setState(t(e.getState()),n):e.setState(t,n)},[e,t])]}(n,r?void 0:e,r?{...t,enabled:!1,transformer:void 0}:t),a=function(e,t,n){let r=n.mode??"sync",i=n.enabled??!0,a=n.defaultValue,o=n.equalityFn??qr,s=n.transformer,l=k(s);l.current=s;let c=k(t);c.current=t;let u=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),d=k(null),p=x(()=>function(e,t,n,r={}){let{equalityFn:i=qr,defaultValue:a}=r;return()=>{let r=t.current,o=r.some(e=>"function"==typeof e)?e.getState():void 0,s=r.map((t,n)=>{let r="function"==typeof t?mr(o,t(o)):e.getPath(t);if(void 0!==r||void 0===a)return r;if(Array.isArray(a)){let e=a[n];return void 0===e?r:e}return a}),l=n.current;return null!==l&&i(l,s)?l:(n.current=s,s)}}(e,c,d,{equalityFn:o,defaultValue:a}),[e,u,o,a]),f=function(e,t,n,r){let i=h(()=>{if(!n){let e=r.current??t();return r.current=e,e}return t()},[n,t,r]);return T(e,i,i)}(function(e,t,n,r,i){return x(()=>n=>{if(!r||"mount"===i)return()=>{};let a=t.current;if(a.some(e=>"function"==typeof e))return e.subscribe(n);let o=a.map(t=>e.subscribePath(t,n));return()=>o.forEach(e=>e())},[e,n,r,i])}(e,c,u,i,r),p,i,d);return[x(()=>l.current?l.current(f):f,[f]),...Vr(e,c,u)]}(n,r?e:Hr,r?t:{...t,enabled:!1,transformer:void 0});return r?a:i}(e,t)},useStoreSync:function(e,t,n){Yr(e,t,n)},useStoreGetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r=Array.isArray(e)?e:void 0,i="object"!=typeof e||Array.isArray(e)?t:e,a=Br(i?.store,"useStoreGetter"),{defaultValue:o}=i??{},s=r?.map(e=>"function"==typeof e?e.toString():e).join("|");return x(()=>r?r.map(e=>(t,n)=>{let r="function"==typeof e?e(a.getState()):mr(a.getState(),e);if(void 0!==t){let e=mr(r,t);return void 0===e&&void 0!==n?n:e}return void 0===r&&void 0!==n?n:r}):(e,t)=>{let r=a.getState();if(void 0!==n){let i=mr(r,n);if(void 0!==e){let n=mr(i,e);return void 0===n&&void 0!==t?t:n}let a=void 0===t?o:t;return void 0===i&&void 0!==a?a:i}if(void 0!==e){let n=mr(r,e);return void 0===n&&void 0!==t?t:n}return r},[a,n,s,o])}(e,t)},useStoreSetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r=Br(("object"==typeof e?e:t)?.store,"useStoreSetter");return h((e,t)=>{void 0===n?r.setState(e,t):void 0===e?r.setState(n,t):r.setState(`${n}.${e}`,t)},[r,n])}(e,t)}}),Qr={};Object.freeze(Qr);var Jr=(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?[...i,o]:[...i,o,...Jr(e[a],o,n,r)]},[]):[];Math.pow(10,8);var Kr=6048e5,Xr=36e5,Zr=Symbol.for("constructDateFrom");function ei(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Zr in e?e[Zr](t):e instanceof Date?new e.constructor(t):new Date(t)}function ti(e,t){return ei(t||e,e)}var ni={};function ri(){return ni}function ii(e,t){const n=ri(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ti(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}function ai(e,t){return ii(e,{...t,weekStartsOn:1})}function oi(e,t){const n=ti(e,t?.in),r=n.getFullYear(),i=ei(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=ai(i),o=ei(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=ai(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function si(e){const t=ti(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function li(e,...t){const n=ei.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function ci(e,t){const n=ti(e,t?.in);return n.setHours(0,0,0,0),n}function ui(e,t){const n=+ti(e)-+ti(t);return n<0?-1:n>0?1:n}function di(e,t){return+ti(e)-+ti(t)}function pi(e,t,n){const[r,i,a]=li(n?.in,e,e,t),o=ui(i,a),s=Math.abs(function(e,t){const[n,r]=li(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=ui(i,a)===-o;(function(e,t){const n=ti(e,t?.in);return+function(e,t){const n=ti(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=ti(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===ui(r,a)&&(l=!1);const c=o*(s-+l);return 0===c?0:c}var fi={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function hi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var mi={date:hi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:hi({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},gi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function yi(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 bi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:yi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yi({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:yi({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function vi(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)}}}function xi(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 wi={ordinalNumber:xi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},ki={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=fi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:mi,formatRelative:(e,t,n,r)=>gi[e],localize:bi,match:wi,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Si(e,t){const n=ti(e,t?.in),r=n.getFullYear(),i=ri(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=ei(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=ii(o,t),l=ei(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=ii(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ti(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var Ni={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ti("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ti(n+1,2)},d:(e,t)=>Ti(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)=>Ti(e.getHours()%12||12,t.length),H:(e,t)=>Ti(e.getHours(),t.length),m:(e,t)=>Ti(e.getMinutes(),t.length),s:(e,t)=>Ti(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ti(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ci={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 Ni.y(e,t)},Y:function(e,t,n,r){const i=Si(e,r),a=i>0?i:1-i;return"YY"===t?Ti(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Ti(a,t.length)},R:function(e,t){return Ti(oi(e),t.length)},u:function(e,t){return Ti(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 Ti(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 Ti(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 Ni.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 Ti(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=ti(e,t?.in),r=+ii(n,t)-+function(e,t){const n=ri(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Si(e,t),a=ei(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),ii(a,t)}(n,t);return Math.round(r/Kr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ti(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=ti(e,t?.in),r=+ai(n)-+function(e){const t=oi(e,void 0),n=ei(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ai(n)}(n);return Math.round(r/Kr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ti(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ni.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=ti(e,t?.in);return function(e,t){const[n,r]=li(void 0,e,t),i=ci(n),a=ci(r),o=+i-si(i),s=+a-si(a);return Math.round((o-s)/864e5)}(n,function(e){const t=ti(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"}):Ti(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 Ti(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 Ti(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 Ti(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ni.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ni.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ti(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ti(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ni.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ni.s(e,t)},S:function(e,t){return Ni.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return _i(r);case"XXXX":case"XX":return Oi(r);default:return Oi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _i(r);case"xxxx":case"xx":return Oi(r);default:return Oi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ei(r,":");default:return"GMT"+Oi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ei(r,":");default:return"GMT"+Oi(r,":")}},t:function(e,t,n){return Ti(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ti(+e,t.length)}};function Ei(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+Ti(a,2)}function _i(e,t){return e%60==0?(e>0?"-":"+")+Ti(Math.abs(e)/60,2):Oi(e,t)}function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ti(Math.trunc(r/60),2)+t+Ti(r%60,2)}var Ai=(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"})}},Ii=(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"})}},Di={p:Ii,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ai(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}}",Ai(r,t)).replace("{{time}}",Ii(i,t))}},Pi=/^D+$/,Mi=/^Y+$/,Ri=["D","DD","YY","YYYY"],ji=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Li=/^'([^]*?)'?$/,Fi=/''/g,$i=/[a-zA-Z]/;function qi(e,t,n){const r=ri(),i=n?.locale??r.locale??ki,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=ti(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(+ti(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(zi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Di[t])(e,i.formatLong):e}).join("").match(ji).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Bi(e)};if(Ci[t])return{isToken:!0,value:e};if(t.match($i))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 Mi.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Pi.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(Ri.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,Ci[a[0]])(s,a,i.localize,c)}).join("")}function Bi(e){const t=e.match(Li);return t?t[1].replace(Fi,"'"):e}function Vi(e,t){return function(e,t,n){const r=ri(),i=n?.locale??r.locale??ki,a=ui(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,l]=li(n?.in,...a>0?[t,e]:[e,t]),c=function(e,t,n){const r=di(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(si(l)-si(s))/1e3,d=Math.round((c-u)/60);let p;if(d<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===d?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",d,o);if(d<45)return i.formatDistance("xMinutes",d,o);if(d<90)return i.formatDistance("aboutXHours",1,o);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,o)}if(d<2520)return i.formatDistance("xDays",1,o);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,o)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,o);if(p=pi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,o)}{const e=p%12,t=Math.trunc(p/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 ei(e,Date.now())}(e),t)}var Ui={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Hi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Wi=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Gi(e){return e?parseInt(e):1}function Qi(e){return e&&parseFloat(e.replace(",","."))||0}var Ji=[31,null,31,30,31,30,31,31,30,31,30,31];function Ki(e){return e%400==0||e%4==0&&e%100!=0}var Xi={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"}},Zi={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ea={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"},ta={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"},na={ordinalNumber:(e,t)=>Number(e)+"º",era:yi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:yi({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:yi({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},ra={ordinalNumber:xi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:vi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},ia={code:"es",formatDistance:(e,t,n)=>{let r;const i=Xi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:Zi,formatRelative:(e,t,n,r)=>1!==t.getHours()?ta[e]:ea[e],localize:na,match:ra,options:{weekStartsOn:1,firstWeekContainsDate:1}},aa={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"}},oa={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sa={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"},la={ordinalNumber:(e,t)=>Number(e)+"º",era:yi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yi({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:yi({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},ca={ordinalNumber:xi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},ua={code:"pt",formatDistance:(e,t,n)=>{let r;const i=aa[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:oa,formatRelative:(e,t,n,r)=>{const i=sa[e];return"function"==typeof i?i(t):i},localize:la,match:ca,options:{weekStartsOn:0,firstWeekContainsDate:4}};var da={year:0,month:1,day:2,hour:3,minute:4,second:5},pa={},fa=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(/* @__PURE__ */new Date("2014-06-25T04:00:00.123Z")),ha="06/25/2014, 00:00:00"===fa||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===fa;function ma(e,t,n,r,i,a,o){const s=/* @__PURE__ */new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,a,o),s}var ga=36e5,ya={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ba(e,t,n){if(!e)return 0;let r,i,a=ya.timezoneZ.exec(e);if(a)return 0;if(a=ya.timezoneHH.exec(e),a)return r=parseInt(a[1],10),xa(r)?-r*ga:NaN;if(a=ya.timezoneHHMM.exec(e),a){r=parseInt(a[2],10);const e=parseInt(a[3],10);return xa(r,e)?(i=Math.abs(r)*ga+6e4*e,"+"===a[1]?-i:i):NaN}if(function(e){if(wa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),wa[e]=!0,!0}catch(t){return!1}}(e)){t=new Date(t||Date.now());const r=va(n?t:function(e){return ma(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(n?r:function(e,t,n){let r=e.getTime()-t;const i=va(new Date(r),n);if(t===i)return t;r-=i-t;const a=va(new Date(r),n);return i===a?i:Math.max(i,a)}(t,r,e))}return NaN}function va(e,t){const n=function(e,t){const n=function(e){return pa[e]||(pa[e]=ha?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),pa[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const t=da[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}(n,e):function(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(n,e)}(e,t),r=ma(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function xa(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var wa={};function ka(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}var Sa=36e5,Ta={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Na(e,t,n){t=t||0,n=n||0;const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Ca=[31,28,31,30,31,30,31,31,30,31,30,31],Ea=[31,29,31,30,31,30,31,31,30,31,30,31];function _a(e){return e%400==0||e%4==0&&e%100!=0}function Oa(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=_a(e);if(r&&n>Ea[t])return!1;if(!r&&n>Ca[t])return!1}return!0}function Aa(e,t){return!(e<0||e>52||null!=t&&(t<0||t>6))}function Ia(e,t,n){return!(e<0||e>=25||null!=t&&(t<0||t>=60)||null!=n&&(n<0||n>=60))}var Da={en:ki,es:ia,pt:ua},Pa=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?function(e,t){const n=()=>ei(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Ui.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ui.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ui.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Ui.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let a;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Hi);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=Gi(n[1]),a=Gi(n[2])-1,o=Gi(n[3]),s=Gi(n[4]),l=Gi(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ji[t]||(Ki(e)?29:28))}(t,a,o)&&function(e,t){return t>=1&&t<=(Ki(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,o)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return n();const o=+a;let s,l=0;if(i.time&&(l=function(e){const t=e.match(Wi);if(!t)return NaN;const n=Qi(t[1]),r=Qi(t[2]),i=Qi(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*Xr+6e4*r+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(o+l),n=ti(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(Yi);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*Xr+6e4*i):NaN}(i.timezone),isNaN(s)?n():ti(o+l+s,t?.in)}(e):e,t};function Ma(e,t="dd MMMM, yyyy",n="en"){return e?qi(Pa(e),t,{locale:Da[n]}):""}function Ra(e,t="dd MMMM, yyyy",n="en"){return e?qi(function(e){const t=ba("UTC",e=function(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)/* @__PURE__ */return new Date(NaN);const n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))/* @__PURE__ */return new Date(NaN);const r=function(e){const t={};let n,r=Ta.dateTimePattern.exec(e);if(r?(t.date=r[1],n=r[3]):(r=Ta.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const e=Ta.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:i,restDateString:a}=function(e,t){if(e){const n=Ta.YYY[t],r=Ta.YYYYY[t];let i=Ta.YYYY.exec(e)||r.exec(e);if(i){const t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=Ta.YY.exec(e)||n.exec(e),i){const t=i[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),o=function(e,t){if(null===t)return null;let n,r,i;if(!e||!e.length)return n=/* @__PURE__ */new Date(0),n.setUTCFullYear(t),n;let a=Ta.MM.exec(e);if(a)return n=/* @__PURE__ */new Date(0),r=parseInt(a[1],10)-1,Oa(t,r)?(n.setUTCFullYear(t,r),n):/* @__PURE__ */new Date(NaN);if(a=Ta.DDD.exec(e),a){n=/* @__PURE__ */new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const n=_a(e);return!(n&&t>366||!n&&t>365)}(t,e)?(n.setUTCFullYear(t,0,e),n):/* @__PURE__ */new Date(NaN)}if(a=Ta.MMDD.exec(e),a){n=/* @__PURE__ */new Date(0),r=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return Oa(t,r,e)?(n.setUTCFullYear(t,r,e),n):/* @__PURE__ */new Date(NaN)}if(a=Ta.Www.exec(e),a)return i=parseInt(a[1],10)-1,Aa(i)?Na(t,i):/* @__PURE__ */new Date(NaN);if(a=Ta.WwwD.exec(e),a){i=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return Aa(i,e)?Na(t,i,e):/* @__PURE__ */new Date(NaN)}return null}(a,i);if(null===o||isNaN(o.getTime()))/* @__PURE__ */return new Date(NaN);if(o){const e=o.getTime();let n,i=0;if(r.time&&(i=function(e){let t,n,r=Ta.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Ia(t)?t%24*Sa:NaN;if(r=Ta.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Ia(t,n)?t%24*Sa+6e4*n:NaN;if(r=Ta.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return Ia(t,n,e)?t%24*Sa+6e4*n+1e3*e:NaN}return null}(r.time),null===i||isNaN(i)))/* @__PURE__ */return new Date(NaN);if(r.timeZone||t.timeZone){if(n=ba(r.timeZone||t.timeZone,new Date(e+i)),isNaN(n))/* @__PURE__ */return new Date(NaN)}else n=ka(new Date(e+i)),n=ka(new Date(e+i+n));return new Date(e+i+n)}/* @__PURE__ */return new Date(NaN)}(e,void 0),!0),n=new Date(e.getTime()-t),r=/* @__PURE__ */new Date(0);return r.setFullYear(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),r.setHours(n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()),r}(Pa(e)),t,{locale:Da[n]}):""}function ja(e,t){let n=Pa(e);return di(Pa(t),n)}var za=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#e(e,t,n,r){let i=this.getTime(!0);if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):this.callbackInternal(e,t,n,r,i),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?Ma(t,"HH:mm:ss.SSS"):t}info(e,t,n){this.#e("info",e,t,n)}warning(e,t,n){this.#e("warning",e,t,n)}danger(e,t,n){this.#e("danger",e,t,n)}success(e,t,n){this.#e("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function La(e="store"){return({path:t,prev:n,next:r})=>{let i=t?mr(n,t):n,a=t?mr(r,t):r;za.info("store",e,{storeName:e,path:t,prev:i,next:a})}}var Fa=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:a,style:o,...s})=>{let l=x(()=>((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]}))})(o),[o]),c=n,u=f(or);if(!u)throw Error("This element can be rendered only under withElement HOC or inside ElementContext");let{id:d,rootId:p}=u;if(!c)throw Error(`One of these parameters [tag] is missing in elementId: ${d}`);if(!u)throw Error("This element can be rendered only under withElement HOC");if(u.plitziJsxSkipHOC)/* @__PURE__ */return O(c,{ref:e,style:l,className:r,...s,children:t});let m=lr(),y=Y(m,"settings.previewMode",!0),b=Y(m,"settings.debugMode",!1),v=Y(m,"root.baseElementId"),{className:w,attributes:S,definition:T,definition:{interactions:N,type:C,label:E,runtime:_},plitziElementLayout:A,style:I,elementState:D,setElementState:P}=u,M="server"===_?{"data-rsc-id":d}:void 0,R=x(()=>b||!y&&C&&p===v?{"data-id":d,"data-name":E||C||"unknown","data-root-id":p,"data-type":C||"unknown","data-root-render-element":!0}:{},[b,y,p,v,d,E,C]),j=Y(m,"contexts.InteractionsContext");if(!j)/* @__PURE__ */return O(c,{ref:e,style:{...I,...l},className:r,...s,...R,...M,children:t});let{interactionsManager:z,useInteractions:L}=f(j),F=h((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e),i||e.preventDefault(),z.interactionTrigger(t,n,{event:e})},[z]),$=x(()=>y&&N?Object.values(N).filter(e=>"trigger"===e.type&&e.action&&U.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=Y(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>F(e,d,t.action,s[t.action],n)}},{}):{},[d,N,s,y,F]),q=b||!(!N||!Object.keys(N).length),{useStore:B}=Gr(),[H]=B("runtime.sources",{enabled:q,defaultValue:Qr}),W=k({});W.current=H;let Q=h(()=>({dataSource:W.current}),[W]),J=x(()=>({...V,...i}),[i]),K=(({attributes:e,definition:t,setElementState:n})=>{let r=k({}),i=h(e=>{let t=r.current;if(!e.key||!e.value)return{prevState:t,nextState:t};let{key:i}=e,{value:a}=e;a=(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})(a);let o={};return o=void 0===a?ee(t,[i]):ar(t,e=>G(e,i,a)),n(o)?(r.current=o,{prevState:t,nextState:o}):{prevState:t,nextState:t}},[n]),a=h((e,t)=>{let{revertOnFinish:i}=e;if(!i||!t||!t.prevState)return;let{prevState:a}=t;r.current=a,n(a)},[n]);return x(()=>((e,t,n,r)=>({setState:{action:"setState",title:`Update ${t.label}`,type:"callback",callback:n,postCallback:r,preview:{},params:{category:{label:"Category",defaultValue:"attribute",type:"select",options:[{value:"attribute",label:"Attribute"},{value:"state",label:"State"}]},key:{label:"Key",defaultValue:void 0,type:"select",when:e=>"attribute"===e.category||"state"===e.category,options: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}`}))]:[]}},value:{label:"Value",defaultValue:void 0,type:t=>"boolean"==typeof e[t.key]?"select":"text",when:e=>!!e.category,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}))}},revertOnFinish:{label:"Revert changes after interaction",defaultValue:!1,type:"boolean"}}}}))(e,t,i,a),[e,t,i,a])})({attributes:S,definition:T,setElementState:P});L({id:d,interactions:N,triggers:J,callbacks:x(()=>({...a,...K}),[a,K]),getAdditionalParams:Q}),g(()=>{!y||!N||!Object.keys(N).length||z.interactionTrigger(d,"onLoad",{})},[]),g(()=>{if(b)return za.addProviderMethod(`getElementDataSource-${d}`,()=>W.current),()=>{za.removeProviderMethod(`getElementDataSource-${d}`)}},[b,W,d]);let X=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:a,elementState:o})=>{let{items:s}=a,l=o.visibility;return x(()=>ae(t,{"plitzi-component--hidden":!1===l||"false"===l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i&&e===i.containerId},a.styleSelectors.base),[t,l,n,i,s,r,e,a.styleSelectors.base])})({id:d,className:r,previewMode:y,baseElementId:v,definition:T,elementState:D,plitziElementLayout:A});/* @__PURE__ */
1
+ import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Suspense as a,cloneElement as o,createContext as s,createElement as l,forwardRef as c,isValidElement as u,lazy as d,memo as p,use as f,useCallback as h,useContext as m,useEffect as g,useId as y,useImperativeHandle as b,useLayoutEffect as v,useMemo as x,useReducer as w,useRef as k,useState as S,useSyncExternalStore as T}from"react";import{createRoot as N,hydrateRoot as C}from"react-dom/client";import*as E from"react/jsx-runtime";import{Fragment as _,jsx as O,jsxs as A}from"react/jsx-runtime";import*as I from"react-dom";import{createPortal as D}from"react-dom";import{c as P}from"react/compiler-runtime";var M=Object.create,R=Object.defineProperty,j=Object.getOwnPropertyDescriptor,z=Object.getOwnPropertyNames,L=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,$=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),q=(e,t)=>{let n={};for(var r in e)R(n,r,{get:e[r],enumerable:!0});return t||R(n,Symbol.toStringTag,{value:"Module"}),n},B=(e,t,n)=>(n=null!=e?M(L(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,a=z(t),o=0,s=a.length;o<s;o++)i=a[o],F.call(e,i)||void 0===i||R(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=j(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?n:R(n,"default",{value:e,enumerable:!0}),e)),V={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"}}},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"}}}},U=["onClick","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"];function H(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 W(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=H(n[1]);if(null!==e)r.push(e);else if(t)return[]}else if(n[2]){let e=H(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=H(r);if(null!==e)n.push(e);else if(t)return[]}return n}(e,t):[]:[]}function Y(e,t,n){if(null==e||!t)return n;let r=W(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)?i[Number(a)]:i[a]}return void 0===i?n:i}function G(e,t,n){let r=W(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}function Q(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=Y(e,i);void 0!==t&&G(n,i,t)}return n}function J(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,J(e,t))),n}if(e instanceof Set){let n=/* @__PURE__ */new Set;return t.set(e,n),e.forEach(e=>n.add(J(e,t))),n}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let n=new DataView(J(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]=J(e,t)),n}let n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=J(e[r],t));return n}var K=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e);function X(e,t){let n=W(t),r=Array.isArray(e)?[...e]:K(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]:K(t);a[e]=r,i=t,a=r}return r}function Z(e,t){if(null===e)return!1;let n=W(t),r=e;for(let i of n){if(null==r||!(i in r))return!1;r=r[i]}return!0}function ee(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(0===n.length)return{...e};let r=e;for(let i of n){let e=W(i);if(!e.length||!Z(r,i))continue;let t=X(r,i),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]}r=t}return r}function te(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function f(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 h(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!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);h(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,h(t),c?f(e):a}function b(e){return o=void 0,u&&r?f(e):(r=i=void 0,a)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return y(n);if(void 0!==d)return clearTimeout(o),h(t),f(n)}return o||h(t),a}return v.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},v.flush=()=>void 0===o?a:b(p()),v.pending=()=>void 0!==o,v}function ne(e,t=0,n={}){return te(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}function re(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)}function ie(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=ie(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ae(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=" "),r+=t);return r}var oe=/* @__PURE__ */q({cva:()=>ce,cx:()=>le}),se=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,le=ae,ce=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return le(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=se(t)||se(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},{});return le(e,o,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},[]),null==n?void 0:n.class,null==n?void 0:n.className)},{cva:ue}=oe,de=(Math.pow(10,8),6048e5),pe=6e4,fe=36e5,he=Symbol.for("constructDateFrom");function me(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&he in e?e[he](t):e instanceof Date?new e.constructor(t):new Date(t)}function ge(e,t){return me(t||e,e)}function ye(e,t,n){const r=ge(e,n?.in);return isNaN(t)?me(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}var be={};function ve(){return be}function xe(e,t){const n=ve(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ge(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}function we(e,t){return xe(e,{...t,weekStartsOn:1})}function ke(e){const t=ge(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 Se={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Te(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ne={date:Te({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Te({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Te({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ce={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ee(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 _e={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Oe(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 Ae,Ie={ordinalNumber:(Ae={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ae.matchPattern);if(!n)return null;const r=n[0],i=e.match(Ae.parsePattern);if(!i)return null;let a=Ae.valueCallback?Ae.valueCallback(i[0]):i[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Oe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Oe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Oe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},De={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=Se[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ne,formatRelative:(e,t,n,r)=>Ce[e],localize:_e,match:Ie,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pe(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=ve(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=me(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=xe(o,t),l=me(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=xe(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}var Me=(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"})}},Re=(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"})}},je={p:Re,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Me(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}}",Me(r,t)).replace("{{time}}",Re(i,t))}},ze=/^D+$/,Le=/^Y+$/,Fe=["D","DD","YY","YYYY"];function $e(e){return ze.test(e)}function qe(e){return Le.test(e)}function Be(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(Fe.includes(e))throw new RangeError(r)}var Ve=class{subPriority=0;validate(e,t){return!0}},Ue=class extends Ve{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},He=class extends Ve{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>me(t,e))}set(e,t){return t.timestampIsSet?e:me(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):me(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}},We=class{run(e,t,n,r){const i=this.parse(e,t,n,r);return i?{setter:new Ue(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Ye=/^(1[0-2]|0?\d)/,Ge=/^(3[0-1]|[0-2]?\d)/,Qe=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Je=/^(5[0-3]|[0-4]?\d)/,Ke=/^(2[0-3]|[0-1]?\d)/,Xe=/^(2[0-4]|[0-1]?\d)/,Ze=/^(1[0-1]|0?\d)/,et=/^(1[0-2]|0?\d)/,tt=/^[0-5]?\d/,nt=/^[0-5]?\d/,rt=/^\d/,it=/^\d{1,2}/,at=/^\d{1,3}/,ot=/^\d{1,4}/,st=/^-?\d+/,lt=/^-?\d/,ct=/^-?\d{1,2}/,ut=/^-?\d{1,3}/,dt=/^-?\d{1,4}/,pt=/^([+-])(\d{2})(\d{2})?|Z/,ft=/^([+-])(\d{2})(\d{2})|Z/,ht=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,mt=/^([+-])(\d{2}):(\d{2})|Z/,gt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function yt(e,t){return e?{value:t(e.value),rest:e.rest}:e}function bt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function vt(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*fe+a*pe+1e3*o),rest:t.slice(n[0].length)}}function xt(e){return bt(st,e)}function wt(e,t){switch(e){case 1:return bt(rt,t);case 2:return bt(it,t);case 3:return bt(at,t);case 4:return bt(ot,t);default:return bt(new RegExp("^\\d{1,"+e+"}"),t)}}function kt(e,t){switch(e){case 1:return bt(lt,t);case 2:return bt(ct,t);case 3:return bt(ut,t);case 4:return bt(dt,t);default:return bt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function St(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Tt(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const t=r+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?i:1-i}function Nt(e){return e%400==0||e%4==0&&e%100!=0}function Ct(e,t,n){const r=ge(e,n?.in),i=function(e,t){const n=ge(e,t?.in),r=+we(n)-+function(e,t){const n=function(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=me(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=we(i),o=me(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=we(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}(e,t),r=me(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),we(r)}(n);return Math.round(r/de)+1}(r,n)-t;return r.setDate(r.getDate()-7*i),r}var Et=[31,28,31,30,31,30,31,31,30,31,30,31],_t=[31,29,31,30,31,30,31,31,30,31,30,31];function Ot(e,t,n){const r=ve(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=ge(e,n?.in),o=a.getDay(),s=7-i;return ye(a,t<0||t>6?t-(o+s)%7:((t%7+7)%7+s)%7-(o+s)%7,n)}var At={G:new class extends We{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends We{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return yt(wt(4,e),r);case"yo":return yt(n.ordinalNumber(e,{unit:"year"}),r);default:return yt(wt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Tt(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends We{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return yt(wt(4,e),r);case"Yo":return yt(n.ordinalNumber(e,{unit:"year"}),r);default:return yt(wt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const i=Pe(e,r);if(n.isTwoDigitYear){const t=Tt(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),xe(e,r)}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),xe(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends We{priority=130;parse(e,t){return kt("R"===t?4:t.length,e)}set(e,t,n){const r=me(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),we(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends We{priority=130;parse(e,t){return kt("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends We{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return wt(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends We{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return wt(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends We{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return yt(bt(Ye,e),r);case"MM":return yt(wt(2,e),r);case"Mo":return yt(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends We{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return yt(bt(Ye,e),r);case"LL":return yt(wt(2,e),r);case"Lo":return yt(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends We{priority=100;parse(e,t,n){switch(t){case"w":return bt(Je,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return xe(function(e,t,n){const r=ge(e,n?.in),i=function(e,t){const n=ge(e,t?.in),r=+xe(n,t)-+function(e,t){const n=ve(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Pe(e,t),a=me(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),xe(a,t)}(n,t);return Math.round(r/de)+1}(r,n)-t;return r.setDate(r.getDate()-7*i),ge(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends We{priority=100;parse(e,t,n){switch(t){case"I":return bt(Je,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return we(Ct(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends We{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return bt(Ge,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return wt(t.length,e)}}validate(e,t){const n=Nt(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=_t[r]:t>=1&&t<=Et[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends We{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return bt(Qe,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return wt(t.length,e)}}validate(e,t){return Nt(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends We{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends We{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return yt(wt(t.length,e),i);case"eo":return yt(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends We{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return yt(wt(t.length,e),i);case"co":return yt(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Ot(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends We{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return wt(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return yt(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return yt(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return yt(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return yt(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=function(e,t,n){const r=ge(e,n?.in);return ye(r,t-function(e,t){const n=ge(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends We{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends We{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends We{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(St(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends We{priority=70;parse(e,t,n){switch(t){case"h":return bt(et,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends We{priority=70;parse(e,t,n){switch(t){case"H":return bt(Ke,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends We{priority=70;parse(e,t,n){switch(t){case"K":return bt(Ze,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends We{priority=70;parse(e,t,n){switch(t){case"k":return bt(Xe,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return wt(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends We{priority=60;parse(e,t,n){switch(t){case"m":return bt(tt,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends We{priority=50;parse(e,t,n){switch(t){case"s":return bt(nt,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return wt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends We{priority=30;parse(e,t){return yt(wt(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends We{priority=10;parse(e,t){switch(t){case"X":return vt(pt,e);case"XX":return vt(ft,e);case"XXXX":return vt(ht,e);case"XXXXX":return vt(gt,e);default:return vt(mt,e)}}set(e,t,n){return t.timestampIsSet?e:me(e,e.getTime()-ke(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends We{priority=10;parse(e,t){switch(t){case"x":return vt(pt,e);case"xx":return vt(ft,e);case"xxxx":return vt(ht,e);case"xxxxx":return vt(gt,e);default:return vt(mt,e)}}set(e,t,n){return t.timestampIsSet?e:me(e,e.getTime()-ke(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends We{priority=40;parse(e){return xt(e)}set(e,t,n){return[me(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends We{priority=20;parse(e){return xt(e)}set(e,t,n){return[me(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pt=/^'([^]*?)'?$/,Mt=/''/g,Rt=/\S/,jt=/[a-zA-Z]/;function zt(e){return e.match(Pt)[1].replace(Mt,"'")}var Lt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ft=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,$t=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,qt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Bt(e){return e?parseInt(e):1}function Vt(e){return e&&parseFloat(e.replace(",","."))||0}var Ut=[31,null,31,30,31,30,31,31,30,31,30,31];function Ht(e){return e%400==0||e%4==0&&e%100!=0}var Wt=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?function(e,t){const n=()=>me(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Lt.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Lt.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Lt.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Lt.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let a;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Ft);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=Bt(n[1]),a=Bt(n[2])-1,o=Bt(n[3]),s=Bt(n[4]),l=Bt(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ut[t]||(Ht(e)?29:28))}(t,a,o)&&function(e,t){return t>=1&&t<=(Ht(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,o)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return n();const o=+a;let s,l=0;if(i.time&&(l=function(e){const t=e.match($t);if(!t)return NaN;const n=Vt(t[1]),r=Vt(t[2]),i=Vt(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*fe+r*pe+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(o+l),n=ge(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(qt);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*fe+i*pe):NaN}(i.timezone),isNaN(s)?n():ge(o+l+s,t?.in)}(e):e,Math.floor((n=t,+ge(n)/1e3)).toString();var n},Yt=e=>{return!("string"!=typeof e||!/^\d{4}-\d{2}-\d{2}$/.test(e)||(t=function(e,t,n,r){const i=()=>me(r?.in||n,NaN),a=Object.assign({},ve()),o=r?.locale??a.locale??De,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():ge(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:o},u=[new He(r?.in,n)],d=t.match(Dt).map(e=>{const t=e[0];return t in je?(0,je[t])(e,o.formatLong):e}).join("").match(It),p=[];for(let g of d){!r?.useAdditionalWeekYearTokens&&qe(g)&&Be(g,t,e),!r?.useAdditionalDayOfYearTokens&&$e(g)&&Be(g,t,e);const n=g[0],a=At[n];if(a){const{incompatibleTokens:t}=a;if(Array.isArray(t)){const e=p.find(e=>t.includes(e.token)||e.token===n);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${g}\` at the same time`)}else if("*"===a.incompatibleTokens&&p.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);p.push({token:n,fullToken:g});const r=a.run(e,g,o.match,c);if(!r)return i();u.push(r.setter),e=r.rest}else{if(n.match(jt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===g?g="'":"'"===n&&(g=zt(g)),0!==e.indexOf(g))return i();e=e.slice(g.length)}}if(e.length>0&&Rt.test(e))return i();const f=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=ge(n,r?.in);if(isNaN(+h))return i();const m={};for(const g of f){if(!g.validate(h,c))return i();const e=g.set(h,m,c);Array.isArray(e)?(h=e[0],Object.assign(m,e[1])):h=e}return h}(e,"yyyy-MM-dd",/* @__PURE__ */new Date),!((n=t)instanceof Date||"object"==typeof n&&"[object Date]"===Object.prototype.toString.call(n))&&"number"!=typeof t||isNaN(+ge(t))));var t,n},Gt=Symbol.for("immer-nothing"),Qt=Symbol.for("immer-draftable"),Jt=Symbol.for("immer-state");function Kt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xt=Object,Zt=Xt.getPrototypeOf,en="constructor",tn="prototype",nn="configurable",rn="enumerable",an="writable",on="value",sn=e=>!!e&&!!e[Jt];function ln(e){return!!e&&(dn(e)||yn(e)||!!e[Qt]||!!e[en]?.[Qt]||bn(e)||vn(e))}var cn=Xt[tn][en].toString(),un=/* @__PURE__ */new WeakMap;function dn(e){if(!e||!xn(e))return!1;const t=Zt(e);if(null===t||t===Xt[tn])return!0;const n=Xt.hasOwnProperty.call(t,en)&&t[en];if(n===Object)return!0;if(!wn(n))return!1;let r=un.get(n);return void 0===r&&(r=Function.toString.call(n),un.set(n,r)),r===cn}function pn(e,t,n=!0){0===fn(e)?(n?Reflect.ownKeys(e):Xt.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function fn(e){const t=e[Jt];return t?t.type_:yn(e)?1:bn(e)?2:vn(e)?3:0}var hn=(e,t,n=fn(e))=>2===n?e.has(t):Xt[tn].hasOwnProperty.call(e,t),mn=(e,t,n=fn(e))=>2===n?e.get(t):e[t],gn=(e,t,n,r=fn(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},yn=Array.isArray,bn=e=>e instanceof Map,vn=e=>e instanceof Set,xn=e=>"object"==typeof e,wn=e=>"function"==typeof e,kn=e=>"boolean"==typeof e,Sn=e=>e.copy_||e.base_,Tn=e=>e.modified_?e.copy_:e.base_;function Nn(e,t){if(bn(e))return new Map(e);if(vn(e))return new Set(e);if(yn(e))return Array[tn].slice.call(e);const n=dn(e);if(!0===t||"class_only"===t&&!n){const t=Xt.getOwnPropertyDescriptors(e);delete t[Jt];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[an]&&(a[an]=!0,a[nn]=!0),(a.get||a.set)&&(t[i]={[nn]:!0,[an]:!0,[rn]:a[rn],[on]:e[i]})}return Xt.create(Zt(e),t)}{const t=Zt(e);if(null!==t&&n)return{...e};const r=Xt.create(t);return Xt.assign(r,e)}}function Cn(e,t=!1){return _n(e)||sn(e)||!ln(e)||(fn(e)>1&&Xt.defineProperties(e,{set:En,add:En,clear:En,delete:En}),Xt.freeze(e),t&&pn(e,(e,t)=>{Cn(t,!0)},!1)),e}var En={[on]:function(){Kt(2)}};function _n(e){return null===e||!xn(e)||Xt.isFrozen(e)}var On="MapSet",An="Patches",In="ArrayMethods",Dn={};function Pn(e){const t=Dn[e];return t||Kt(0),t}var Mn,Rn=e=>!!Dn[e],jn=()=>Mn;function zn(e,t){t&&(e.patchPlugin_=Pn(An),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ln(e){Fn(e),e.drafts_.forEach(qn),e.drafts_=null}function Fn(e){e===Mn&&(Mn=e.parent_)}var $n=e=>Mn={drafts_:[],parent_:Mn,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:Rn(On)?Pn(On):void 0,arrayMethodsPlugin_:Rn(In)?Pn(In):void 0};function qn(e){const t=e[Jt];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Bn(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[Jt].modified_&&(Ln(t),Kt(4)),ln(e)&&(e=Vn(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Jt].base_,e,t)}else e=Vn(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cn(t,n)}(t,e,!0),Ln(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gt?e:void 0}function Vn(e,t){if(_n(t))return t;const n=t[Jt];if(!n)return Qn(t,e.handledSet_,e);if(!Hn(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);Gn(n,e)}return n.copy_}function Un(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Hn=(e,t)=>e.scope_===t,Wn=[];function Yn(e,t,n,r){const i=Sn(e),a=e.type_;if(void 0!==r&&mn(i,r,a)===t)return void gn(i,r,n,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;pn(i,(e,n)=>{if(sn(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??Wn;for(const s of o)gn(i,s,n,a)}function Gn(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)}Un(e)}}function Qn(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||sn(e)||t.has(e)||!ln(e)||_n(e)||(t.add(e),pn(e,(r,i)=>{if(sn(i)){const t=i[Jt];Hn(t,n)&&(gn(e,r,Tn(t),e.type_),Un(t))}else ln(i)&&Qn(i,t,n)})),e}var Jn={get(e,t){if(t===Jt)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=Sn(e);if(!hn(i,t,e.type_))return function(e,t,n){const r=Zn(t,n);return r?on in r?r[on]:r.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!ln(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===Xn(e.base_,t)){tr(e);const n=1===e.type_?+t:t,r=nr(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in Sn(e),ownKeys:e=>Reflect.ownKeys(Sn(e)),set(e,t,n){const r=Zn(Sn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Xn(Sn(e),t),i=r?.[Jt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||hn(e.base_,t,e.type_)))return!0;tr(e),er(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||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(sn(n)){const i=n[Jt];Hn(i,r)&&i.callbacks_.push(function(){tr(e),Yn(e,n,Tn(i),t)})}else ln(n)&&e.callbacks_.push(function(){const i=Sn(e);3===e.type_?i.has(n)&&Qn(n,r.handledSet_,r):mn(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&Qn(mn(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(tr(e),void 0!==Xn(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),er(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Sn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[an]:!0,[nn]:1!==e.type_||"length"!==t,[rn]:r[rn],[on]:n[t]}:r},defineProperty(){Kt(11)},getPrototypeOf:e=>Zt(e.base_),setPrototypeOf(){Kt(12)}},Kn={};for(let QR in Jn){let e=Jn[QR];Kn[QR]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function Xn(e,t){const n=e[Jt];return(n?Sn(n):e)[t]}function Zn(e,t){if(!(t in e))return;let n=Zt(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Zt(n)}}function er(e){e.modified_||(e.modified_=!0,e.parent_&&er(e.parent_))}function tr(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=Nn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function nr(e,t,n,r){const[i,a]=bn(t)?Pn(On).proxyMap_(t,n):vn(t)?Pn(On).proxySet_(t,n):function(e,t){const n=yn(e),r={type_:n?1:0,scope_:t?t.scope_:jn(),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=Jn;n&&(i=[r],a=Kn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return(n?.scope_??jn()).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||!Hn(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const a=Tn(i);Yn(e,i.draft_??i,a,n),Gn(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 rr(e){if(!ln(e)||_n(e))return e;const t=e[Jt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Nn(e,!0);return pn(n,(e,t)=>{gn(n,e,rr(t))},r),t&&(t.finalized_=!1),n}Kn.deleteProperty=function(e,t){return Kn.set.call(this,e,t,void 0)},Kn.set=function(e,t,n){return Jn.set.call(this,e[0],t,n,e[0])};var ir=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(wn(e)&&!wn(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(wn(t)||Kt(6),void 0===n||wn(n)||Kt(7),ln(e)){const i=$n(this),a=nr(0,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?Ln(i):Fn(i)}return zn(i,n),Bn(r,i)}if(!e||!xn(e)){if(r=t(e),void 0===r&&(r=e),r===Gt&&(r=void 0),this.autoFreeze_&&Cn(r,!0),n){const t=[],i=[];Pn(An).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Kt(1)},this.produceWithPatches=(e,t)=>{if(wn(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]},kn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),kn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),kn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;ln(e)||Kt(8),sn(e)&&(sn(t=e)||Kt(10),e=rr(t));const n=$n(this),r=nr(0,e,void 0);return r[Jt].isManual_=!0,Fn(n),r}finishDraft(e,t){const n=e&&e[Jt];n&&n.isManual_||Kt(9);const{scope_:r}=n;return zn(r,t),Bn(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=Pn(An).applyPatches_;return sn(e)?r(e,t):this.produce(e,e=>r(e,t))}},ar=ir.produce,or=s(void 0);or.displayName="ElementContext";var sr=s({});sr.displayName="PlitziServiceContext";var lr=()=>{let e=f(sr);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},cr=e=>{let{children:t,value:n}=e;/* @__PURE__ */
2
+ return O(sr,{value:n,children:t})},ur=e=>"object"==typeof e&&!!e&&!Array.isArray(e),dr=(e,t)=>{if(!ur(e)||!ur(t))return t;let n={...e};for(let r of Object.keys(t))"__proto__"!==r&&(n[r]=r in e?dr(e[r],t[r]):t[r]);return n},pr=/* @__PURE__ */new Map,fr=e=>{let t=pr.get(e);return void 0===t&&(t=e.split("."),pr.size>=512&&pr.delete(pr.keys().next().value),pr.set(e,t)),t},hr=/* @__PURE__ */new Map;function mr(e,t){let n=Array.isArray(t);if("string"!=typeof t&&!n||n&&!t.length||"string"==typeof t&&!t)return e;if("string"==typeof t&&-1===t.indexOf("."))return"object"==typeof e&&e&&t in e?e[t]:void 0;if("string"==typeof t)return(e=>{let t=hr.get(e);if(!t){if(t=(e=>{if(1===e.length){let t=e[0];return e=>"object"==typeof e&&e&&t in e?e[t]:void 0}return t=>{let n=t;for(let r=0;r<e.length;r++){if("object"!=typeof n||!n)return;n=n[e[r]]}return n}})(fr(e)),hr.size>=512){let e=hr.keys().next().value;hr.delete(e)}hr.set(e,t)}return t})(t)(e);let r=e;for(let i of t){if("object"!=typeof r||!r||!(i in r))return;r=r[i]}return r}var gr,yr=Symbol("unchanged"),br=e=>/^\d+$/.test(e),vr=e=>Array.isArray(e)?e.slice():{...e},xr=(e,t,n,r,i)=>{let a=t[n],o="object"==typeof e&&e?e:{};if(n===t.length-1){let e=o[a],t=i?r(e):r;if(e===t)return yr;let n=vr(o);return n[a]=t,n}let s=xr(o[a],t,n+1,r,i);if(s===yr)return yr;let l=vr(o);return l[a]=s,l},wr=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,kr=e=>wr.test(e)?`.${e}`:`[${JSON.stringify(e)}]`,Sr=e=>wr.test(e)?e:JSON.stringify(e),Tr=e=>{let t=e.length,n="";for(let a=0;a<t-1;a++){let t=0===a?"o":"_"+(a-1);n+=`var _${a}=${t}==null?void 0:${t}${kr(e[a])};\n`}let r=t>1?"_"+(t-2):"o";n+=`var _p=${r}==null?void 0:${r}${kr(e[t-1])};\n`,n+="var _v=f?v(_p):v;\nif(_p===_v)return null;\n";let i="_v";for(let a=t-1;a>=0;a--)i=`{...${0===a?"o":`(_${a-1}||{})`},${Sr(e[a])}:${i}}`;return n+=`return ${i};`,Function("o","v","f",n)},Nr=/* @__PURE__ */new Map,Cr=(e,t,n,r,i)=>{let a=((e,t)=>{if(!(()=>{if(typeof window>"u")return!1;if(void 0===gr)try{Tr(["x","y"])({x:{}},1,!1),gr=!0}catch{gr=!1}return gr})())return;let n=Nr.get(e);if(n)return n;if(t.some(br))return;let r=Tr(t);return Nr.size>=256&&Nr.delete(Nr.keys().next().value),Nr.set(e,r),r})(t,n);if(a){let t=a(e,r,i);return null===t?yr:t}return xr(e,n,0,r,i)},Er=e=>"number"==typeof e||""===e||isNaN(Number(e))?e:Number(e),_r=e=>Array.isArray(e)?e.slice():{...e},Or=(e,t,n,r)=>{let i=Er(t[n]),a=_r(e);return a[i]=n===t.length-1?r:Or(e[i]??{},t,n+1,r),a},Ar=Symbol("@plitzi/nexus/cancel"),Ir=Symbol("no-error"),Dr=(e,t,n)=>{let r=0,i=Ir;for(;r<n;)try{for(;r<n;r++)e[r](t)}catch(e){i===Ir&&(i=e),r++}return i},Pr="__proto__";function Mr(e){let{getOwnState:t,getOwnSnapshot:n,setOwnState:r,mutateOwnKey:i,parent:a,listeners:o,pathListeners:s,changeListeners:l,interceptors:c,reportError:u,invalidateDescendants:d,onDelegateToParent:p}=e,f=(e,t,n)=>{let r=t;for(let i=0,a=c.length;i<a;i++){let a;try{a=c[i]({path:e,value:r,prev:n})}catch(t){return u(t,"beforeChange",e),Ar}if(a===Ar)return Ar;void 0!==a&&(r=a)}return r},h=0,m=/* @__PURE__ */new Set,g=(e,t)=>{let{items:n}=e;if(h>0)for(let r=0,i=n.length;r<i;r++)m.add(n[r]);else{e.begin();try{let e=Dr(n,t,n.length);e!==Ir&&u(e,"notify",t)}finally{e.end()}}},y=(e,t,n)=>{let r={path:e,prev:t,next:n},{items:i}=l;l.begin();try{let t=Dr(i,r,i.length);t!==Ir&&u(t,"onChange",e)}finally{l.end()}},b=(e,t,n,r)=>{let i=s.getDescendants(e);if(i)for(let a of i){let i=s.direct.get(a);if(!i)continue;let o=a.slice(r);mr(t,o)!==mr(n,o)&&g(i,e)}};return{setState:(e,u,h=!0)=>{let m=t();if("string"==typeof e&&-1!==e.indexOf(Pr)&&-1!==fr(e).indexOf(Pr))throw Error(`@plitzi/nexus: refused to write to unsafe path "${e}" (\`__proto__\` segment)`);if(a&&"string"==typeof e&&!(-1===e.indexOf(".")?Object.hasOwn(m,e):((e,t)=>{let n=e;for(let r=0,i=t.length;r<i;r++){if("object"!=typeof n||!n||!Object.hasOwn(n,t[r]))return!1;n=n[t[r]]}return!0})(m,fr(e))))return p?.(e),void a.setState(e,u,h);if("string"!=typeof e)return void((e,t,n,i)=>{let a=e?mr(n,e):void 0,u=e?"function"==typeof t?t(a):t:void 0;if(e&&c.length>0){let t=f(e,u,a);if(t===Ar)return;u=t}if(e&&a===u)return;let p=e?((e,t,n)=>{if("string"==typeof t){if(!t)return n;let r=fr(t);if(1===r.length){let t=_r(e);return t[Er(r[0])]=n,t}return Or(e,r,0,n)}return Array.isArray(t)&&t.length?Or(e,t,0,n):n})(n,e,u):"function"==typeof t?t(n):{...n,...t};if(!e&&c.length>0){let e=f(void 0,p,n);if(e===Ar)return;p=e}if(p!==n){if(r(p),l.length>0&&y(e,n,p),!i)return void d();g(o,e),s.size>0&&s.direct.forEach((t,r)=>{mr(n,r)!==mr(p,r)&&g(t,e)})}})(e,u,m,h);if(-1===e.indexOf(".")){let t=m[e],r="function"==typeof u?u(t):u,a=r;if(c.length>0){let n=f(e,r,t);if(n===Ar)return;a=n}if(t===a)return;let p=l.length>0?n():void 0;if(i(e,a),void 0!==p&&y(e,p,n()),h){g(o,e);let n=s.direct.get(e);n&&g(n,e),b(e,t,a,e.length+1)}else d();return}let v,x=fr(e);if(c.length>0){let t=mr(m,e),n=f(e,"function"==typeof u?u(t):u,t);if(n===Ar)return;v=Cr(m,e,x,n,!1)}else v=Cr(m,e,x,u,"function"==typeof u);if(v===yr)return;let w=v;r(w),l.length>0&&y(e,m,w),h?(g(o,e),((e,t)=>{let n="";for(let r=0;r<t.length;r++){n=n?`${n}.${t[r]}`:t[r];let i=s.direct.get(n);i&&g(i,e)}})(e,x),b(e,m,w,0)):d()},batch:e=>{h++;try{return e()}finally{if(h--,0===h&&m.size>0){let e=[...m];m.clear();let t=Dr(e,void 0,e.length);t!==Ir&&u(t,"notify",void 0)}}}}}var Rr=()=>{},jr=class{items=[];notifying=0;dead=0;get length(){return this.items.length-this.dead}add(e){return this.items.push(e),()=>this.remove(e)}remove(e){let t=this.items.indexOf(e);if(-1===t)return;if(this.notifying>0)return this.items[t]=Rr,void this.dead++;let n=this.items.pop();t<this.items.length&&(this.items[t]=n)}begin(){this.notifying++}end(){0===--this.notifying&&this.dead>0&&this.compact()}forEach(e,t){this.begin();try{let n,{items:r}=this,i=r.length,a=0,o=!1;for(;a<i;)try{for(;a<i;a++)e(r[a])}catch(e){o||(o=!0,n=e),a++}if(o){if(!t)throw n;t(n)}}finally{this.end()}}clear(){if(this.notifying>0){let{items:e}=this;for(let t=0,n=e.length;t<n;t++)e[t]=Rr;return void(this.dead=e.length)}this.items.length=0,this.dead=0}compact(){let{items:e}=this,t=0;for(let n=0;n<e.length;n++)e[n]!==Rr&&(e[t++]=e[n]);e.length=t,this.dead=0}},zr=(e,t,n)=>{let r="";for(let i=0;i<t;i++)r=r?`${r}.${e[i]}`:e[i],n(r)},Lr=class{direct=/* @__PURE__ */new Map;descendants=/* @__PURE__ */new Map;size=0;add(e,t){let n=this.direct.get(e),r=fr(e);return n||(n=new jr,this.direct.set(e,n),this.size++,zr(r,r.length-1,t=>{let n=this.descendants.get(t);n||(n=/* @__PURE__ */new Set,this.descendants.set(t,n)),n.add(e)})),n.add(t),()=>this.remove(e,n,t,r)}remove(e,t,n,r){this.direct.get(e)===t&&(t.remove(n),!(t.length>0)&&(this.direct.delete(e),this.size--,zr(r,r.length-1,t=>{let n=this.descendants.get(t);n&&(n.delete(e),0===n.size&&this.descendants.delete(t))})))}getDescendants(e){return this.descendants.get(e)}forEachAffected(e,t,n){let r=e=>{e&&e.forEach(t,n)};if("string"!=typeof e)return void this.direct.forEach(r);let i=fr(e);zr(i,i.length,e=>r(this.direct.get(e))),this.descendants.get(e)?.forEach(e=>r(this.direct.get(e)))}clear(){this.direct.clear(),this.descendants.clear(),this.size=0}},Fr=s(void 0);Fr.displayName="StoreContext";var $r=s(void 0);$r.displayName="StoreRegistryContext";var qr=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0};function Br(e,t,n){let r=m(Fr),i=m($r);if(e)return e;if(void 0!==n){let e=((e,t)=>{for(let n=e;n;n=n.parent)if(n.id===t)return n.store})(i,n);if(!e)throw Error(`${t}: no store registered with id "${n}" in any ancestor StoreProvider`);return e}if(!r)throw Error(`${t} must be used inside a StoreProvider`);return r}function Vr(e,t,n){let r=t.current.length;return x(()=>Array.from({length:r},(n,r)=>n=>{let i=t.current[r],a="function"==typeof i?i(e.getState()):i;e.setState(a,n)}),[e,n])}var Ur=(e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!Object.is(e[i],t[i]))return!1;return!0},Hr=[];var Wr=typeof window<"u"?v:g;function Yr(e,t,n={}){let r=n,i=Br(r.store,"useStoreSync",r.storeId);Array.isArray(e)?function(e,t,n,r){let{mode:i="sync",enabled:a=!0,syncStrategy:o="afterRender"}=r,s=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),l=k(!1),c=!l.current;l.current=!0;let u=k(void 0),d=a&&(c||"sync"===i&&n.some((e,t)=>!Object.is(u.current?.[t],e))),p=()=>{u.current=n,e.batch(()=>{t.forEach((t,r)=>{let i="function"==typeof t?t(e.getState()):t;e.setState(i,n[r])})})};"render"===o?d&&p():(d&&c&&p(),Wr(()=>{d&&!c&&p()},[d,n,s]))}(i,e,t,n):function(e,t,n,r){let i=void 0===t,a="function"==typeof t,o=i?Ur:Object.is,{mode:s="sync",enabled:l=!0,equalityFn:c=o,syncStrategy:u="afterRender"}=r,d=k(void 0),p=k(!1),f=!p.current;p.current=!0;let h=d.current,m=l&&(f||"sync"===s&&(void 0===h||!c(h,n))),g=(r=!0)=>{if(d.current=n,i)e.setState(void 0,e=>({...e,...n}),r);else if(a){let i=t(e.getState());e.setState(i,n,r)}else e.setState(t,n,r)};"render"===u?m&&g():(m&&f&&g(!1),Wr(()=>{m&&!f&&g()},[m,n,t]))}(i,e,t,n)}var Gr=()=>({useStore:function(e,t){return function(e,t={}){let n=Br(t.store,"useStore",t.storeId),r=Array.isArray(e),i=function(e,t,n){let r=n.mode??"sync",i=n.enabled??!0,a=n.defaultValue,o=void 0===t,s=n.equalityFn??(o?Ur:Object.is),l=n.transformer,c=k(l);c.current=l;let u=x(()=>function(e,t,n){return()=>{if("string"==typeof t){let r=e.getPath(t);return void 0===r?n:r}if("function"==typeof t){let r=e.getState(),i=mr(r,t(r));return void 0===i?n:i}return e.getState()}}(e,t,a),[e,t,a]),d=k(u()),p=x(()=>n=>i&&"mount"!==r?"string"==typeof t?e.subscribePath(t,n):e.subscribe(n):()=>{},[i,r,t,e]),f=()=>{if(!i)return d.current;if("mount"===r)return u();let e=u();return s(d.current,e)?d.current:(d.current=e,e)},m=T(p,f,f);return[x(()=>c.current?c.current(m):m,[m]),h(n=>{o?e.setState(void 0,n):"function"==typeof t?e.setState(t(e.getState()),n):e.setState(t,n)},[e,t])]}(n,r?void 0:e,r?{...t,enabled:!1,transformer:void 0}:t),a=function(e,t,n){let r=n.mode??"sync",i=n.enabled??!0,a=n.defaultValue,o=n.equalityFn??qr,s=n.transformer,l=k(s);l.current=s;let c=k(t);c.current=t;let u=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),d=k(null),p=x(()=>function(e,t,n,r={}){let{equalityFn:i=qr,defaultValue:a}=r;return()=>{let r=t.current,o=r.some(e=>"function"==typeof e)?e.getState():void 0,s=r.map((t,n)=>{let r="function"==typeof t?mr(o,t(o)):e.getPath(t);if(void 0!==r||void 0===a)return r;if(Array.isArray(a)){let e=a[n];return void 0===e?r:e}return a}),l=n.current;return null!==l&&i(l,s)?l:(n.current=s,s)}}(e,c,d,{equalityFn:o,defaultValue:a}),[e,u,o,a]),f=function(e,t,n,r){let i=h(()=>{if(!n){let e=r.current??t();return r.current=e,e}return t()},[n,t,r]);return T(e,i,i)}(function(e,t,n,r,i){return x(()=>n=>{if(!r||"mount"===i)return()=>{};let a=t.current;if(a.some(e=>"function"==typeof e))return e.subscribe(n);let o=a.map(t=>e.subscribePath(t,n));return()=>o.forEach(e=>e())},[e,n,r,i])}(e,c,u,i,r),p,i,d);return[x(()=>l.current?l.current(f):f,[f]),...Vr(e,c,u)]}(n,r?e:Hr,r?t:{...t,enabled:!1,transformer:void 0});return r?a:i}(e,t)},useStoreSync:function(e,t,n){Yr(e,t,n)},useStoreGetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r=Array.isArray(e)?e:void 0,i="object"!=typeof e||Array.isArray(e)?t:e,a=Br(i?.store,"useStoreGetter",i?.storeId),{defaultValue:o}=i??{},s=r?.map(e=>"function"==typeof e?e.toString():e).join("|");return x(()=>r?r.map(e=>(t,n)=>{let r="function"==typeof e?e(a.getState()):mr(a.getState(),e);if(void 0!==t){let e=mr(r,t);return void 0===e&&void 0!==n?n:e}return void 0===r&&void 0!==n?n:r}):(e,t)=>{let r=a.getState();if(void 0!==n){let i=mr(r,n);if(void 0!==e){let n=mr(i,e);return void 0===n&&void 0!==t?t:n}let a=void 0===t?o:t;return void 0===i&&void 0!==a?a:i}if(void 0!==e){let n=mr(r,e);return void 0===n&&void 0!==t?t:n}return r},[a,n,s,o])}(e,t)},useStoreSetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r="object"==typeof e?e:t,i=Br(r?.store,"useStoreSetter",r?.storeId);return h((e,t)=>{void 0===n?i.setState(e,t):void 0===e?i.setState(n,t):i.setState(`${n}.${e}`,t)},[i,n])}(e,t)}}),Qr={};Object.freeze(Qr);var Jr=(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?[...i,o]:[...i,o,...Jr(e[a],o,n,r)]},[]):[];Math.pow(10,8);var Kr=6048e5,Xr=36e5,Zr=Symbol.for("constructDateFrom");function ei(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Zr in e?e[Zr](t):e instanceof Date?new e.constructor(t):new Date(t)}function ti(e,t){return ei(t||e,e)}var ni={};function ri(){return ni}function ii(e,t){const n=ri(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ti(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}function ai(e,t){return ii(e,{...t,weekStartsOn:1})}function oi(e,t){const n=ti(e,t?.in),r=n.getFullYear(),i=ei(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=ai(i),o=ei(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=ai(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function si(e){const t=ti(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function li(e,...t){const n=ei.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function ci(e,t){const n=ti(e,t?.in);return n.setHours(0,0,0,0),n}function ui(e,t){const n=+ti(e)-+ti(t);return n<0?-1:n>0?1:n}function di(e,t){return+ti(e)-+ti(t)}function pi(e,t,n){const[r,i,a]=li(n?.in,e,e,t),o=ui(i,a),s=Math.abs(function(e,t){const[n,r]=li(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=ui(i,a)===-o;(function(e,t){const n=ti(e,t?.in);return+function(e,t){const n=ti(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=ti(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===ui(r,a)&&(l=!1);const c=o*(s-+l);return 0===c?0:c}var fi={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function hi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var mi={date:hi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:hi({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},gi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function yi(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 bi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:yi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yi({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:yi({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function vi(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)}}}function xi(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 wi={ordinalNumber:xi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},ki={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=fi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:mi,formatRelative:(e,t,n,r)=>gi[e],localize:bi,match:wi,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Si(e,t){const n=ti(e,t?.in),r=n.getFullYear(),i=ri(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=ei(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=ii(o,t),l=ei(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=ii(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ti(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var Ni={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ti("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ti(n+1,2)},d:(e,t)=>Ti(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)=>Ti(e.getHours()%12||12,t.length),H:(e,t)=>Ti(e.getHours(),t.length),m:(e,t)=>Ti(e.getMinutes(),t.length),s:(e,t)=>Ti(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ti(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ci={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 Ni.y(e,t)},Y:function(e,t,n,r){const i=Si(e,r),a=i>0?i:1-i;return"YY"===t?Ti(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Ti(a,t.length)},R:function(e,t){return Ti(oi(e),t.length)},u:function(e,t){return Ti(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 Ti(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 Ti(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 Ni.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 Ti(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=ti(e,t?.in),r=+ii(n,t)-+function(e,t){const n=ri(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Si(e,t),a=ei(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),ii(a,t)}(n,t);return Math.round(r/Kr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ti(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=ti(e,t?.in),r=+ai(n)-+function(e){const t=oi(e,void 0),n=ei(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ai(n)}(n);return Math.round(r/Kr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ti(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ni.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=ti(e,t?.in);return function(e,t){const[n,r]=li(void 0,e,t),i=ci(n),a=ci(r),o=+i-si(i),s=+a-si(a);return Math.round((o-s)/864e5)}(n,function(e){const t=ti(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"}):Ti(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 Ti(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 Ti(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 Ti(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ni.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ni.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ti(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ti(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ni.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ni.s(e,t)},S:function(e,t){return Ni.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return _i(r);case"XXXX":case"XX":return Oi(r);default:return Oi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _i(r);case"xxxx":case"xx":return Oi(r);default:return Oi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ei(r,":");default:return"GMT"+Oi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ei(r,":");default:return"GMT"+Oi(r,":")}},t:function(e,t,n){return Ti(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ti(+e,t.length)}};function Ei(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+Ti(a,2)}function _i(e,t){return e%60==0?(e>0?"-":"+")+Ti(Math.abs(e)/60,2):Oi(e,t)}function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ti(Math.trunc(r/60),2)+t+Ti(r%60,2)}var Ai=(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"})}},Ii=(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"})}},Di={p:Ii,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ai(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}}",Ai(r,t)).replace("{{time}}",Ii(i,t))}},Pi=/^D+$/,Mi=/^Y+$/,Ri=["D","DD","YY","YYYY"],ji=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Li=/^'([^]*?)'?$/,Fi=/''/g,$i=/[a-zA-Z]/;function qi(e,t,n){const r=ri(),i=n?.locale??r.locale??ki,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=ti(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(+ti(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(zi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Di[t])(e,i.formatLong):e}).join("").match(ji).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Bi(e)};if(Ci[t])return{isToken:!0,value:e};if(t.match($i))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 Mi.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Pi.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(Ri.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,Ci[a[0]])(s,a,i.localize,c)}).join("")}function Bi(e){const t=e.match(Li);return t?t[1].replace(Fi,"'"):e}function Vi(e,t){return function(e,t,n){const r=ri(),i=n?.locale??r.locale??ki,a=ui(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,l]=li(n?.in,...a>0?[t,e]:[e,t]),c=function(e,t,n){const r=di(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(si(l)-si(s))/1e3,d=Math.round((c-u)/60);let p;if(d<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===d?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",d,o);if(d<45)return i.formatDistance("xMinutes",d,o);if(d<90)return i.formatDistance("aboutXHours",1,o);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,o)}if(d<2520)return i.formatDistance("xDays",1,o);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,o)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,o);if(p=pi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,o)}{const e=p%12,t=Math.trunc(p/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 ei(e,Date.now())}(e),t)}var Ui={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Hi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Wi=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Gi(e){return e?parseInt(e):1}function Qi(e){return e&&parseFloat(e.replace(",","."))||0}var Ji=[31,null,31,30,31,30,31,31,30,31,30,31];function Ki(e){return e%400==0||e%4==0&&e%100!=0}var Xi={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"}},Zi={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ea={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"},ta={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"},na={ordinalNumber:(e,t)=>Number(e)+"º",era:yi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:yi({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:yi({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},ra={ordinalNumber:xi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:vi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},ia={code:"es",formatDistance:(e,t,n)=>{let r;const i=Xi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:Zi,formatRelative:(e,t,n,r)=>1!==t.getHours()?ta[e]:ea[e],localize:na,match:ra,options:{weekStartsOn:1,firstWeekContainsDate:1}},aa={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"}},oa={date:hi({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:hi({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:hi({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sa={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"},la={ordinalNumber:(e,t)=>Number(e)+"º",era:yi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:yi({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yi({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:yi({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:yi({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},ca={ordinalNumber:xi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:vi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vi({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},ua={code:"pt",formatDistance:(e,t,n)=>{let r;const i=aa[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:oa,formatRelative:(e,t,n,r)=>{const i=sa[e];return"function"==typeof i?i(t):i},localize:la,match:ca,options:{weekStartsOn:0,firstWeekContainsDate:4}};var da={year:0,month:1,day:2,hour:3,minute:4,second:5},pa={},fa=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(/* @__PURE__ */new Date("2014-06-25T04:00:00.123Z")),ha="06/25/2014, 00:00:00"===fa||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===fa;function ma(e,t,n,r,i,a,o){const s=/* @__PURE__ */new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,a,o),s}var ga=36e5,ya={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ba(e,t,n){if(!e)return 0;let r,i,a=ya.timezoneZ.exec(e);if(a)return 0;if(a=ya.timezoneHH.exec(e),a)return r=parseInt(a[1],10),xa(r)?-r*ga:NaN;if(a=ya.timezoneHHMM.exec(e),a){r=parseInt(a[2],10);const e=parseInt(a[3],10);return xa(r,e)?(i=Math.abs(r)*ga+6e4*e,"+"===a[1]?-i:i):NaN}if(function(e){if(wa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),wa[e]=!0,!0}catch(t){return!1}}(e)){t=new Date(t||Date.now());const r=va(n?t:function(e){return ma(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(n?r:function(e,t,n){let r=e.getTime()-t;const i=va(new Date(r),n);if(t===i)return t;r-=i-t;const a=va(new Date(r),n);return i===a?i:Math.max(i,a)}(t,r,e))}return NaN}function va(e,t){const n=function(e,t){const n=function(e){return pa[e]||(pa[e]=ha?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),pa[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const t=da[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}(n,e):function(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(n,e)}(e,t),r=ma(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function xa(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var wa={};function ka(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}var Sa=36e5,Ta={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Na(e,t,n){t=t||0,n=n||0;const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Ca=[31,28,31,30,31,30,31,31,30,31,30,31],Ea=[31,29,31,30,31,30,31,31,30,31,30,31];function _a(e){return e%400==0||e%4==0&&e%100!=0}function Oa(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=_a(e);if(r&&n>Ea[t])return!1;if(!r&&n>Ca[t])return!1}return!0}function Aa(e,t){return!(e<0||e>52||null!=t&&(t<0||t>6))}function Ia(e,t,n){return!(e<0||e>=25||null!=t&&(t<0||t>=60)||null!=n&&(n<0||n>=60))}var Da={en:ki,es:ia,pt:ua},Pa=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?function(e,t){const n=()=>ei(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Ui.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ui.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ui.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Ui.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let a;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Hi);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=Gi(n[1]),a=Gi(n[2])-1,o=Gi(n[3]),s=Gi(n[4]),l=Gi(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ji[t]||(Ki(e)?29:28))}(t,a,o)&&function(e,t){return t>=1&&t<=(Ki(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,o)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return n();const o=+a;let s,l=0;if(i.time&&(l=function(e){const t=e.match(Wi);if(!t)return NaN;const n=Qi(t[1]),r=Qi(t[2]),i=Qi(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*Xr+6e4*r+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(o+l),n=ti(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(Yi);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*Xr+6e4*i):NaN}(i.timezone),isNaN(s)?n():ti(o+l+s,t?.in)}(e):e,t};function Ma(e,t="dd MMMM, yyyy",n="en"){return e?qi(Pa(e),t,{locale:Da[n]}):""}function Ra(e,t="dd MMMM, yyyy",n="en"){return e?qi(function(e){const t=ba("UTC",e=function(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)/* @__PURE__ */return new Date(NaN);const n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))/* @__PURE__ */return new Date(NaN);const r=function(e){const t={};let n,r=Ta.dateTimePattern.exec(e);if(r?(t.date=r[1],n=r[3]):(r=Ta.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const e=Ta.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:i,restDateString:a}=function(e,t){if(e){const n=Ta.YYY[t],r=Ta.YYYYY[t];let i=Ta.YYYY.exec(e)||r.exec(e);if(i){const t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=Ta.YY.exec(e)||n.exec(e),i){const t=i[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),o=function(e,t){if(null===t)return null;let n,r,i;if(!e||!e.length)return n=/* @__PURE__ */new Date(0),n.setUTCFullYear(t),n;let a=Ta.MM.exec(e);if(a)return n=/* @__PURE__ */new Date(0),r=parseInt(a[1],10)-1,Oa(t,r)?(n.setUTCFullYear(t,r),n):/* @__PURE__ */new Date(NaN);if(a=Ta.DDD.exec(e),a){n=/* @__PURE__ */new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const n=_a(e);return!(n&&t>366||!n&&t>365)}(t,e)?(n.setUTCFullYear(t,0,e),n):/* @__PURE__ */new Date(NaN)}if(a=Ta.MMDD.exec(e),a){n=/* @__PURE__ */new Date(0),r=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return Oa(t,r,e)?(n.setUTCFullYear(t,r,e),n):/* @__PURE__ */new Date(NaN)}if(a=Ta.Www.exec(e),a)return i=parseInt(a[1],10)-1,Aa(i)?Na(t,i):/* @__PURE__ */new Date(NaN);if(a=Ta.WwwD.exec(e),a){i=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return Aa(i,e)?Na(t,i,e):/* @__PURE__ */new Date(NaN)}return null}(a,i);if(null===o||isNaN(o.getTime()))/* @__PURE__ */return new Date(NaN);if(o){const e=o.getTime();let n,i=0;if(r.time&&(i=function(e){let t,n,r=Ta.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Ia(t)?t%24*Sa:NaN;if(r=Ta.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Ia(t,n)?t%24*Sa+6e4*n:NaN;if(r=Ta.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return Ia(t,n,e)?t%24*Sa+6e4*n+1e3*e:NaN}return null}(r.time),null===i||isNaN(i)))/* @__PURE__ */return new Date(NaN);if(r.timeZone||t.timeZone){if(n=ba(r.timeZone||t.timeZone,new Date(e+i)),isNaN(n))/* @__PURE__ */return new Date(NaN)}else n=ka(new Date(e+i)),n=ka(new Date(e+i+n));return new Date(e+i+n)}/* @__PURE__ */return new Date(NaN)}(e,void 0),!0),n=new Date(e.getTime()-t),r=/* @__PURE__ */new Date(0);return r.setFullYear(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),r.setHours(n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()),r}(Pa(e)),t,{locale:Da[n]}):""}function ja(e,t){let n=Pa(e);return di(Pa(t),n)}var za=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#e(e,t,n,r){let i=this.getTime(!0);if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):this.callbackInternal(e,t,n,r,i),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?Ma(t,"HH:mm:ss.SSS"):t}info(e,t,n){this.#e("info",e,t,n)}warning(e,t,n){this.#e("warning",e,t,n)}danger(e,t,n){this.#e("danger",e,t,n)}success(e,t,n){this.#e("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function La(e="store"){return({path:t,prev:n,next:r})=>{let i=t?mr(n,t):n,a=t?mr(r,t):r;za.info("store",e,{storeName:e,path:t,prev:i,next:a})}}var Fa=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:a,style:o,...s})=>{let l=x(()=>((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]}))})(o),[o]),c=n,u=f(or);if(!u)throw Error("This element can be rendered only under withElement HOC or inside ElementContext");let{id:d,rootId:p}=u;if(!c)throw Error(`One of these parameters [tag] is missing in elementId: ${d}`);if(!u)throw Error("This element can be rendered only under withElement HOC");if(u.plitziJsxSkipHOC)/* @__PURE__ */return O(c,{ref:e,style:l,className:r,...s,children:t});let m=lr(),y=Y(m,"settings.previewMode",!0),b=Y(m,"settings.debugMode",!1),v=Y(m,"root.baseElementId"),{className:w,attributes:S,definition:T,definition:{interactions:N,type:C,label:E,runtime:_},plitziElementLayout:A,style:I,elementState:D,setElementState:P}=u,M="server"===_?{"data-rsc-id":d}:void 0,R=x(()=>b||!y&&C&&p===v?{"data-id":d,"data-name":E||C||"unknown","data-root-id":p,"data-type":C||"unknown","data-root-render-element":!0}:{},[b,y,p,v,d,E,C]),j=Y(m,"contexts.InteractionsContext");if(!j)/* @__PURE__ */return O(c,{ref:e,style:{...I,...l},className:r,...s,...R,...M,children:t});let{interactionsManager:z,useInteractions:L}=f(j),F=h((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e),i||e.preventDefault(),z.interactionTrigger(t,n,{event:e})},[z]),$=x(()=>y&&N?Object.values(N).filter(e=>"trigger"===e.type&&e.action&&U.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=Y(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>F(e,d,t.action,s[t.action],n)}},{}):{},[d,N,s,y,F]),q=b||!(!N||!Object.keys(N).length),{useStore:B}=Gr(),[H]=B("runtime.sources",{enabled:q,defaultValue:Qr}),W=k({});W.current=H;let Q=h(()=>({dataSource:W.current}),[W]),J=x(()=>({...V,...i}),[i]),K=(({attributes:e,definition:t,setElementState:n})=>{let r=k({}),i=h(e=>{let t=r.current;if(!e.key||!e.value)return{prevState:t,nextState:t};let{key:i}=e,{value:a}=e;a=(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})(a);let o={};return o=void 0===a?ee(t,[i]):ar(t,e=>G(e,i,a)),n(o)?(r.current=o,{prevState:t,nextState:o}):{prevState:t,nextState:t}},[n]),a=h((e,t)=>{let{revertOnFinish:i}=e;if(!i||!t||!t.prevState)return;let{prevState:a}=t;r.current=a,n(a)},[n]);return x(()=>((e,t,n,r)=>({setState:{action:"setState",title:`Update ${t.label}`,type:"callback",callback:n,postCallback:r,preview:{},params:{category:{label:"Category",defaultValue:"attribute",type:"select",options:[{value:"attribute",label:"Attribute"},{value:"state",label:"State"}]},key:{label:"Key",defaultValue:void 0,type:"select",when:e=>"attribute"===e.category||"state"===e.category,options: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}`}))]:[]}},value:{label:"Value",defaultValue:void 0,type:t=>"boolean"==typeof e[t.key]?"select":"text",when:e=>!!e.category,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}))}},revertOnFinish:{label:"Revert changes after interaction",defaultValue:!1,type:"boolean"}}}}))(e,t,i,a),[e,t,i,a])})({attributes:S,definition:T,setElementState:P});L({id:d,interactions:N,triggers:J,callbacks:x(()=>({...a,...K}),[a,K]),getAdditionalParams:Q}),g(()=>{!y||!N||!Object.keys(N).length||z.interactionTrigger(d,"onLoad",{})},[]),g(()=>{if(b)return za.addProviderMethod(`getElementDataSource-${d}`,()=>W.current),()=>{za.removeProviderMethod(`getElementDataSource-${d}`)}},[b,W,d]);let X=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:a,elementState:o})=>{let{items:s}=a,l=o.visibility;return x(()=>ae(t,{"plitzi-component--hidden":!1===l||"false"===l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i&&e===i.containerId},a.styleSelectors.base),[t,l,n,i,s,r,e,a.styleSelectors.base])})({id:d,className:r,previewMode:y,baseElementId:v,definition:T,elementState:D,plitziElementLayout:A});/* @__PURE__ */
3
3
  return O(c,{ref:e,style:{...I,...l},className:ae(w,X),...s,...R,...$,...M,children:t})},$a=s({});$a.displayName="ComponentContext";var qa=async(t,n=!0,r="")=>{let i;try{if(n){let e=await fetch(t),n=new Blob([await e.text()],{type:"text/javascript"});i=await import(
4
4
  /* @vite-ignore */
5
5
  /* webpackIgnore: true */
6
- URL.createObjectURL(n))}else{let t={default:void 0,ComponentProvider:WO,ComponentContext:$a,usePlitziServiceContext:lr,RootElement:Fa},n={__WEBPACK_EXTERNAL_MODULE_react__:e,__WEBPACK_EXTERNAL_MODULE_react_dom__:I,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__:E,__WEBPACK_EXTERNAL_MODULE__plitzi_plitzi_sdk__:t},a=Y(window,`plitziPlugins.${r}`);if(!a||"function"!=typeof a)return;i=await a(t,void 0,n)}}catch(jR){return}return i},Ba=(Object.defineProperty,e=>{let t={};if(!e)return t;t[e.type]=e;let{plugins:n}=e;return n&&Object.keys(n).length>0&&Object.keys(n).forEach(e=>{t={...t,...Ba(n[e])}}),t}),Va=e=>{let t={};return e&&Object.values(e).forEach(e=>{e.type&&(t={...t,...Ba(e)})}),t},Ua=(e,t)=>{if(!e)return{};let n={};return Object.keys(e).forEach(r=>{let i=e[r],{version:a,pluginSettings:o,initialItems:s,plugins:l,extraProps:c}=i;n[r]=dC(i),n[r].origin=t,n[r].version=a,n[r].type=r,n[r].initialItems=s,n[r].pluginSettings=o,n[r].extraProps=c,n[r].plugins=Ua(l,t)}),n},Ha=e=>{let t={};return e&&Object.values(e).forEach(e=>{if(!e.type)return;let{type:n,pluginSettings:r,version:i,initialItems:a,plugins:o,assets:s,content:l,extraProps:c}=e,u=dC(e);u.version=i,u.type=n,u.assets=s,u.initialItems=a,u.pluginSettings=r,u.origin="local-custom",u.content=l,u.extraProps=c,u.plugins=Ua(o,"local-custom"),t={...t,...Ba(u)}}),t},Wa=/* @__PURE__ */new Map,Ya=(e,t,n,r=!0,i=!1)=>async()=>{let a=`${e}::${t}`;if(!Wa.get(a)){let n=qa(e,e.endsWith(".mjs")||e.includes(".esm.")||e.includes(".module."),t).finally(()=>{Wa.delete(a)});Wa.set(a,{promise:n,timestamp:Date.now()})}let o=await(Wa.get(a)?.promise);if(!o)return{default:pC};let{type:s,pluginSettings:l}=Y(o,"default",{}),{version:c,initialItems:u,plugins:d}=o;if(!s)return{default:pC};let p=o.default;return i||(p=dC(o.default)),p.version=c,p.origin="remote",p.type=s,p.initialItems=u,p.pluginSettings=l,p.plugins=Ua(d,"remote"),r&&n(p),{default:p}},Ga=({url:e="",scope:t="",internalProps:n,autoRegister:r=!0,plitziJsxSkipHOC:i=!1,plitziJsxProps:o=Qr})=>{let{register:s}=f($a),l=x(()=>d(Ya(e,t,s,r,i)),[e,t]);/* @__PURE__ */
7
- return O(a,i?{children:/* @__PURE__ */O(l,{internalProps:n,plitziJsxSkipHOC:i,...o})}:{children:/* @__PURE__ */O(l,{internalProps:n})})},Qa=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:a})=>{let o={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */O(i.notFound,{internalProps:o},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return O(l,{internalProps:o,extraProps:l.extraProps},e);let c=(({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=Y(n,"assets",[]).filter(e=>"script"===e.type),{scope:i}=n;return{url:r.find(e=>e.isMain)?.params.src??Y(r,"0.params.src",""),scope:i}})({type:n,plugins:a});return c?/* @__PURE__ */O(Ga,{url:c.url,scope:c.scope,internalProps:o},e):s},Ja=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},Ka=({id:e})=>{let[t]=S(()=>{if(typeof document>"u")return null;let t=document.querySelector(`[data-rsc-id="${e}"]`);if(!t)return null;let n={};for(let e=0;e<t.attributes.length;e++){let{name:r,value:i}=t.attributes[e];"class"!==r&&"style"!==r&&"data-rsc-id"!==r&&(n[r]=i)}let r=t.getAttribute("style");return{tag:t.tagName.toLowerCase(),className:t.className,style:r?Ja(r):void 0,attrs:n,html:t.innerHTML}});return t?l(t.tag,{"data-rsc-id":e,className:t.className||void 0,style:t.style,...t.attrs,dangerouslySetInnerHTML:{__html:t.html}}):null},Xa=s({});Xa.displayName="CollectionContext";var Za=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>`},eo=/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,to=e=>e?.replace(eo,Za)??e,no=/* @__PURE__ */F((e,t)=>{t.exports=function(e){function t(t,n){if(t.template.options.rethrow)throw"string"==typeof n&&(n=new e.Error(n)),"TwigException"!==n.type||n.file||(n.file=t.template.id),n;if(e.log.error("Error parsing twig template "+t.template.id+": "),n.stack?e.log.error(n.stack):e.log.error(n.toString()),e.debug)return n.toString()}return e.trace=!1,e.debug=!1,e.cache=!0,e.noop=function(){},e.merge=function(e,t,n){return Object.keys(t).forEach(r=>{n&&!(r in e)||(e[r]=t[r])}),e},e.Error=function(e,t){this.message=e,this.name="TwigException",this.type="TwigException",this.file=t},e.Error.prototype.toString=function(){return this.name+": "+this.message},e.log={trace(...t){e.trace&&console},debug(...t){e.debug&&console}},"undefined"==typeof console?e.log.error=function(){}:(void 0!==console.error||void 0!==console.log)&&(e.log.error=function(...e){}),e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw",outputWhitespacePre:"output_whitespace_pre",outputWhitespacePost:"output_whitespace_post",outputWhitespaceBoth:"output_whitespace_both",logicWhitespacePre:"logic_whitespace_pre",logicWhitespacePost:"logic_whitespace_post",logicWhitespaceBoth:"logic_whitespace_both"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.raw,open:"{% verbatim %}",close:"{% endverbatim %}"},{type:e.token.type.outputWhitespacePre,open:"{{-",close:"}}"},{type:e.token.type.outputWhitespacePost,open:"{{",close:"-}}"},{type:e.token.type.outputWhitespaceBoth,open:"{{-",close:"-}}"},{type:e.token.type.logicWhitespacePre,open:"{%-",close:"%}"},{type:e.token.type.logicWhitespacePost,open:"{%",close:"-%}"},{type:e.token.type.logicWhitespaceBoth,open:"{%-",close:"-%}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){const n={position:null,def:null};let r=null;const i=e.token.definitions.length;let a,o,s,l;for(a=0;a<i;a++)o=e.token.definitions[a],s=t.indexOf(o.open),l=t.indexOf(o.close),e.log.trace("Twig.token.findStart: ","Searching for ",o.open," found at ",s),s>=0&&o.open.length!==o.close.length&&l<0||(s>=0&&(null===n.position||s<n.position)?(n.position=s,n.def=o,r=l):s>=0&&null!==n.position&&s===n.position&&(o.open.length>n.def.open.length?(n.position=s,n.def=o,r=l):o.open.length===n.def.open.length&&(o.close.length,n.def.close.length,l>=0&&l<r&&(n.position=s,n.def=o,r=l))));return n},e.token.findEnd=function(t,n,r){let i,a,o=null,s=!1,l=0,c=null,u=null,d=null,p=null,f=null,h=null;for(;!s;){if(c=null,u=null,d=t.indexOf(n.close,l),!(d>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"' opened near template position "+r);if(o=d,s=!0,n.type===e.token.type.comment)break;if(n.type===e.token.type.raw)break;for(a=e.token.strings.length,i=0;i<a;i+=1)f=t.indexOf(e.token.strings[i],l),f>0&&f<d&&(null===c||f<c)&&(c=f,u=e.token.strings[i]);if(null!==c)for(p=c+1,o=null,s=!1;;){if(h=t.indexOf(u,p),h<0)throw e.Error("Unclosed string in template");if("\\"!==t.slice(h-1,h)){l=h+1;break}p=h+1}}return o},e.tokenize=function(t){const n=[];let r=0,i=null,a=null;for(;t.length>0;)if(i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),null===i.position)n.push({type:e.token.type.raw,value:t,position:{start:r,end:r+i.position}}),t="";else{if(i.position>0&&n.push({type:e.token.type.raw,value:t.slice(0,Math.max(0,i.position)),position:{start:r,end:r+Math.max(0,i.position)}}),t=t.slice(i.position+i.def.open.length),r+=i.position+i.def.open.length,a=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",a),n.push({type:i.def.type,value:t.slice(0,Math.max(0,a)).trim(),position:{start:r-i.def.open.length,end:r+a+i.def.close.length}}),"\n"===t.slice(a+i.def.close.length,a+i.def.close.length+1))switch(i.def.type){case"logic_whitespace_pre":case"logic_whitespace_post":case"logic_whitespace_both":case"logic":a+=1}t=t.slice(a+i.def.close.length),r+=a+i.def.close.length}return n},e.compile=function(t){const n=this;try{const r=[],i=[];let a=[],o=null,s=null,l=null,c=null,u=null,d=null,p=null,f=null,h=null,m=null,g=null,y=null;const b=function(t){e.expression.compile.call(n,t),i.length>0?a.push(t):r.push(t)},v=function(t){if(s=e.logic.compile.call(n,t),s.position=t.position,m=s.type,g=e.logic.handler[m].open,y=e.logic.handler[m].next,e.log.trace("Twig.compile: ","Compiled logic token to ",s," next is: ",y," open is : ",g),void 0!==g&&!g){if(c=i.pop(),p=e.logic.handler[c.type],!p.next.includes(m))throw new Error(m+" not expected after a "+c.type);c.output=c.output||[],c.output=c.output.concat(a),a=[],h={type:e.token.type.logic,token:c,position:{open:c.position,close:t.position}},i.length>0?a.push(h):r.push(h)}void 0!==y&&y.length>0?(e.log.trace("Twig.compile: ","Pushing ",s," to logic stack."),i.length>0&&(c=i.pop(),c.output=c.output||[],c.output=c.output.concat(a),i.push(c),a=[]),i.push(s)):void 0!==g&&g&&(h={type:e.token.type.logic,token:s,position:s.position},i.length>0?a.push(h):r.push(h))};for(;t.length>0;){switch(o=t.shift(),u=r[r.length-1],d=a[a.length-1],f=t[0],e.log.trace("Compiling token ",o),o.type){case e.token.type.raw:i.length>0?a.push(o):r.push(o);break;case e.token.type.logic:v.call(n,o);break;case e.token.type.comment:break;case e.token.type.output:b.call(n,o);break;case e.token.type.logicWhitespacePre:case e.token.type.logicWhitespacePost:case e.token.type.logicWhitespaceBoth:case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:switch(o.type!==e.token.type.outputWhitespacePost&&o.type!==e.token.type.logicWhitespacePost&&(u&&u.type===e.token.type.raw&&(r.pop(),u.value=u.value.trimEnd(),r.push(u)),d&&d.type===e.token.type.raw&&(a.pop(),d.value=d.value.trimEnd(),a.push(d))),o.type){case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:b.call(n,o);break;case e.token.type.logicWhitespacePre:case e.token.type.logicWhitespacePost:case e.token.type.logicWhitespaceBoth:v.call(n,o)}o.type!==e.token.type.outputWhitespacePre&&o.type!==e.token.type.logicWhitespacePre&&f&&f.type===e.token.type.raw&&(t.shift(),f.value=f.value.trimStart(),t.unshift(f))}e.log.trace("Twig.compile: "," Output: ",r," Logic Stack: ",i," Pending Output: ",a)}if(i.length>0)throw l=i.pop(),new Error("Unable to find an end tag for "+l.type+", expecting one of "+l.next);return r}catch(r){if(n.options.rethrow)throw"TwigException"!==r.type||r.file||(r.file=n.id),r;e.log.error("Error compiling twig template "+n.id+": "),r.stack?e.log.error(r.stack):e.log.error(r.toString())}},e.prepare=function(t){e.log.debug("Twig.prepare: ","Tokenizing ",t);const n=e.tokenize.call(this,t);e.log.debug("Twig.prepare: ","Compiling ",n);const r=e.compile.call(this,n);return e.log.debug("Twig.prepare: ","Compiled ",r),r},e.output=function(t){const{autoescape:n}=this.options;if(!n)return t.join("");const r="string"==typeof n?n:"html",i=t.map(t=>(!t||!0===t.twigMarkup||t.twigMarkup===r||"html"===r&&"html_attr"===t.twigMarkup||(t=e.filters.escape(t,[r])),t));if(0===i.length)return"";const a=i.join("");return 0===a.length?"":new e.Markup(a,!0)},e.Templates={loaders:{},parsers:{},registry:{}},e.validateId=function(t){if("prototype"===t)throw new e.Error(t+" is not a valid twig identifier");if(e.cache&&Object.hasOwnProperty.call(e.Templates.registry,t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.registerLoader=function(t,n,r){if("function"!=typeof n)throw new e.Error("Unable to add loader for "+t+": Invalid function reference given.");r&&(n=n.bind(r)),this.loaders[t]=n},e.Templates.unRegisterLoader=function(e){this.isRegisteredLoader(e)&&delete this.loaders[e]},e.Templates.isRegisteredLoader=function(e){return Object.hasOwnProperty.call(this.loaders,e)},e.Templates.registerParser=function(t,n,r){if("function"!=typeof n)throw new e.Error("Unable to add parser for "+t+": Invalid function regerence given.");r&&(n=n.bind(r)),this.parsers[t]=n},e.Templates.unRegisterParser=function(e){this.isRegisteredParser(e)&&delete this.parsers[e]},e.Templates.isRegisteredParser=function(e){return Object.hasOwnProperty.call(this.parsers,e)},e.Templates.save=function(t){if(void 0===t.id)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return Object.hasOwnProperty.call(e.Templates.registry,t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){const a=void 0===n.id?t:n.id,o=e.Templates.registry[a];return e.cache&&void 0!==o?("function"==typeof r&&r(o),o):(n.parser=n.parser||"twig",n.id=a,void 0===n.async&&(n.async=!0),(this.loaders[n.method]||this.loaders.fs).call(this,t,n,r,i))},e.Block=function(e,t){this.template=e,this.token=t},e.Block.prototype.render=function(t,n){const r=t.template;let i;return t.template=this.template,i=this.token.expression?e.expression.parseAsync.call(t,this.token.output,n):t.parseAsync(this.token.output,n),i.then(r=>e.expression.parseAsync.call(t,{type:e.expression.type.string,value:r},n)).then(e=>(t.template=r,e))},e.ParseState=function(e,t,n){this.renderedBlocks={},this.overrideBlocks=void 0===t?{}:t,this.context=void 0===n?{}:n,this.macros={},this.nestingStack=[],this.template=e},e.ParseState.prototype.getBlock=function(e,t){let n;return!0!==t&&(n=this.overrideBlocks[e]),void 0===n&&(n=this.template.getBlock(e,t)),void 0===n&&null!==this.template.parentTemplate&&(n=this.template.parentTemplate.getBlock(e)),n},e.ParseState.prototype.getBlocks=function(e){let t={};return!1!==e&&null!==this.template.parentTemplate&&this.template.parentTemplate!==this.template&&(t=this.template.parentTemplate.getBlocks()),t={...t,...this.template.getBlocks(),...this.overrideBlocks},t},e.ParseState.prototype.getNestingStackToken=function(e){let t;return this.nestingStack.forEach(n=>{void 0===t&&n.type===e&&(t=n)}),t},e.ParseState.prototype.parse=function(n,r,i){const a=this;let o=[],s=null,l=!0,c=null,u=!0;function d(e){o.push(e)}function p(e){void 0!==e.chain&&(u=e.chain),void 0!==e.context&&(a.context=e.context),void 0!==e.output&&o.push(e.output)}if(r&&(a.context=r),c=e.async.forEach(n,t=>{switch(e.log.debug("Twig.ParseState.parse: ","Parsing token: ",t),t.type){case e.token.type.raw:o.push(e.filters.raw(t.value));break;case e.token.type.logic:return e.logic.parseAsync.call(a,t.token,a.context,u).then(p);case e.token.type.comment:break;case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:case e.token.type.output:return e.log.debug("Twig.ParseState.parse: ","Output token: ",t.stack),e.expression.parseAsync.call(a,t.stack,a.context).then(d)}}).then(()=>(o=e.output.call(a.template,o),l=!1,o)).catch(e=>{i&&t(a,e),s=e}),i)return c;if(null!==s)return t(a,s);if(l)throw new e.Error("You are using Twig.js in sync mode in combination with async extensions.");return o},e.Template=function(t){const{data:n,id:r,base:i,path:a,url:o,name:s,method:l,options:c}=t;this.base=i,this.blocks={defined:{},imported:{}},this.id=r,this.method=l,this.name=s,this.options=c,this.parentTemplate=null,this.path=a,this.url=o,function(e,t){const n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&"String"===n}(0,n)?this.tokens=e.prepare.call(this,n):this.tokens=n,void 0!==r&&e.Templates.save(this)},e.Template.prototype.getBlock=function(e,t,n=!0){let r;return!0!==t&&(r=this.blocks.defined[e]),n&&void 0===r&&(r=this.blocks.imported[e]),void 0===r&&null!==this.parentTemplate&&(r=this.parentTemplate.getBlock(e,t,n=!1)),r},e.Template.prototype.getBlocks=function(){let e={};return e={...e,...this.blocks.imported,...this.blocks.defined},e},e.Template.prototype.render=function(t,n,r){const i=this;return n=n||{},e.async.potentiallyAsync(i,r,()=>{const r=new e.ParseState(i,n.blocks,t);return r.parseAsync(i.tokens).then(t=>{let a,o;return null!==i.parentTemplate?(i.options.allowInlineIncludes&&(a=e.Templates.load(i.parentTemplate),a&&(a.options=i.options)),a||(o=e.path.parsePath(i,i.parentTemplate),a=e.Templates.loadRemote(o,{method:i.getLoaderMethod(),base:i.base,async:!1,id:o,options:i.options})),i.parentTemplate=a,i.parentTemplate.renderAsync(r.context,{blocks:r.getBlocks(!1),isInclude:!0})):!0===n.isInclude?t:t.valueOf()})})},e.Template.prototype.importFile=function(t){let n,r=null;if(!this.url&&this.options.allowInlineIncludes){if(t=this.path?e.path.parsePath(this,t):t,n=e.Templates.load(t),!n&&(n=e.Templates.loadRemote(r,{id:t,method:this.getLoaderMethod(),async:!1,path:t,options:this.options}),!n))throw new e.Error("Unable to find the template "+t);return n.options=this.options,n}return r=e.path.parsePath(this,t),n=e.Templates.loadRemote(r,{method:this.getLoaderMethod(),base:this.base,async:!1,options:this.options,id:r}),n},e.Template.prototype.getLoaderMethod=function(){return this.path?"fs":this.url?"ajax":this.method||"fs"},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e.Markup=function(e,t){if("string"!=typeof e)return e;const n=new String(e);return n.twigMarkup=void 0===t||t,n},e}}),ro=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){const r=JSON.stringify(t.tokens),{id:i}=t;let a=null;if(n.module){if(void 0===e.compiler.module[n.module])throw new e.Error("Unable to find module type "+n.module);a=e.compiler.module[n.module](i,r,n.twig)}else a=e.compiler.wrap(i,r);return a},e.compiler.module={amd:(t,n,r)=>'define(["'+r+'"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n\treturn templates;\n});",node:(t,n)=>'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n),cjs2:(t,n,r)=>'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n\tvar twig = require("twig").twig;\n\texports.template = '+e.compiler.wrap(t,n)+"\n});"},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}}),io=/* @__PURE__ */F((e,t)=>{t.exports=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};const t=function(e,t){if(null==t)return null;if(void 0!==t.indexOf)return(e===t||""!==e)&&t.includes(e);let n;for(n in t)if(Object.hasOwnProperty.call(t,n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?:":case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"??":n.precidence=15,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"b-or":n.precidence=12,n.associativity=e.expression.operator.leftToRight;break;case"b-xor":n.precidence=11,n.associativity=e.expression.operator.leftToRight;break;case"b-and":n.precidence=10,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":case"<=>":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":case"not in":case"in":case"matches":case"starts with":case"ends with":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error("Failed to lookup operator: "+t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){let i,a,o;if(e.log.trace("Twig.expression.operator.parse: ","Handling ",n),"?"===n&&(o=r.pop()),a=r.pop(),"not"!==n&&(i=r.pop()),"in"!==n&&"not in"!==n&&"??"!==n&&(i&&Array.isArray(i)&&(i=i.length),"?"!==n&&a&&Array.isArray(a)&&(a=a.length)),"matches"===n&&a&&"string"==typeof a){const e=a.match(/^\/(.*)\/([gims]?)$/),t=e[1],n=e[2];a=new RegExp(t,n)}switch(n){case":":break;case"??":void 0===i&&(i=a,a=o,o=void 0),null!=i?r.push(i):r.push(a);break;case"?:":e.lib.boolval(i)?r.push(i):r.push(a);break;case"?":void 0===i&&(i=a,a=o,o=void 0),e.lib.boolval(i)?r.push(a):r.push(o);break;case"+":a=parseFloat(a),i=parseFloat(i),r.push(i+a);break;case"-":a=parseFloat(a),i=parseFloat(i),r.push(i-a);break;case"*":a=parseFloat(a),i=parseFloat(i),r.push(i*a);break;case"/":a=parseFloat(a),i=parseFloat(i),r.push(i/a);break;case"//":a=parseFloat(a),i=parseFloat(i),r.push(Math.floor(i/a));break;case"%":a=parseFloat(a),i=parseFloat(i),r.push(i%a);break;case"~":r.push((null!=i?i.toString():"")+(null!=a?a.toString():""));break;case"not":case"!":r.push(!e.lib.boolval(a));break;case"<=>":r.push(i===a?0:i<a?-1:1);break;case"<":r.push(i<a);break;case"<=":r.push(i<=a);break;case">":r.push(i>a);break;case">=":r.push(i>=a);break;case"===":r.push(i===a);break;case"==":r.push(i==a);break;case"!==":r.push(i!==a);break;case"!=":r.push(i!=a);break;case"or":r.push(e.lib.boolval(i)||e.lib.boolval(a));break;case"b-or":r.push(i|a);break;case"b-xor":r.push(i^a);break;case"and":r.push(e.lib.boolval(i)&&e.lib.boolval(a));break;case"b-and":r.push(i&a);break;case"**":r.push(i**a);break;case"not in":r.push(!t(i,a));break;case"in":r.push(t(i,a));break;case"matches":r.push(a.test(i));break;case"starts with":r.push("string"==typeof i&&0===i.indexOf(a));break;case"ends with":r.push("string"==typeof i&&i.includes(a,i.length-a.length));break;case"..":r.push(e.functions.range(i,a));break;default:throw new e.Error("Failed to parse operator: "+n+" is an unknown operator.")}},e}}),ao=/* @__PURE__ */F((e,t)=>{t.exports=function(e){function t(t,n,r){return n?e.expression.parseAsync.call(t,n,r):e.Promise.resolve(!1)}for(e.expression={},io()(e),e.expression.reservedWords=["true","false","null","TRUE","FALSE","NULL","_context","and","b-and","or","b-or","b-xor","in","not in","if","matches","starts","ends","with"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",slice:"Twig.expression.type.slice",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},subexpression:{start:"Twig.expression.type.subexpression.start",end:"Twig.expression.type.subexpression.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.subexpression.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start,e.expression.type.subexpression.start,e.expression.type.operator.unary]},e.expression.set.operationsExtended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets,e.expression.type.slice]),e.expression.fn={compile:{push(e,t,n){n.push(e)},pushBoth(e,t,n){n.push(e),t.push(e)}},parse:{push(e,t){t.push(e)},pushValue(e,t){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_]\w*(\s?(?:as|by))?)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i){const a=r.pop();return t(this,n.params,i).then(t=>{const i=e.test(n.filter,a,t);"not"===n.modifier?r.push(!i):r.push(i)})}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile(t,n,r){let i,a=n.length-1;for(delete t.match,delete t.value;a>=0;a--){if(i=n.pop(),i.type===e.expression.type.object.start||i.type===e.expression.type.parameter.start||i.type===e.expression.type.array.start){n.push(i);break}r.push(i)}r.push(t)}},{type:e.expression.type.number,regex:/^-?\d+(\.\d+)?/,next:e.expression.set.operations,compile(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.operator.binary,regex:/(^\?\?|^\?\s*:|^(b-and)|^(b-or)|^(b-xor)|^[+\-~%?]|^(<=>)|^[:](?!\d\])|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^(and)[(|\s+]|^(or)[(|\s+]|^(in)[(|\s+]|^(not in)[(|\s+]|^(matches)|^(starts with)|^(ends with)|^\.\.)/,next:e.expression.set.expressions,transform(e,t){switch(e[0]){case"and(":case"or(":case"in(":case"not in(":return t[t.length-1].value=e[2],e[0];default:return""}},compile(t,n,r){delete t.match,t.value.match(/^\?\s*:/)&&(t.value="?:"),t.value=t.value.trim();const{value:i}=t,a=e.expression.operator.lookup(i,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",a," from ",i);n.length>0&&(n[n.length-1].type===e.expression.type.operator.unary||n[n.length-1].type===e.expression.type.operator.binary)&&(a.associativity===e.expression.operator.leftToRight&&a.precidence>=n[n.length-1].precidence||a.associativity===e.expression.operator.rightToLeft&&a.precidence>n[n.length-1].precidence);){const e=n.pop();r.push(e)}if(":"===i)if(n[n.length-1]&&"?"===n[n.length-1].value);else{const n=r.pop();if(n.type===e.expression.type.string||n.type===e.expression.type.variable)t.key=n.value;else if(n.type===e.expression.type.number)t.key=n.value.toString();else{if(!n.expression||n.type!==e.expression.type.parameter.end&&n.type!==e.expression.type.subexpression.end)throw new e.Error("Unexpected value before ':' of "+n.type+" = "+n.value);t.params=n.params}r.push(t)}else n.push(a)},parse(t,n,r){if(t.key)n.push(t);else{if(t.params)return e.expression.parseAsync.call(this,t.params,r).then(e=>{t.key=e,n.push(t),r.loop||delete t.params});e.expression.operator.parse(t.value,n)}}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile(t,n,r){delete t.match,t.value=t.value.trim();const{value:i}=t,a=e.expression.operator.lookup(i,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",a," from ",i);n.length>0&&(n[n.length-1].type===e.expression.type.operator.unary||n[n.length-1].type===e.expression.type.operator.binary)&&(a.associativity===e.expression.operator.leftToRight&&a.precidence>=n[n.length-1].precidence||a.associativity===e.expression.operator.rightToLeft&&a.precidence>n[n.length-1].precidence);){const e=n.pop();r.push(e)}n.push(a)},parse(t,n){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2[\s\S])*?\1/,next:e.expression.set.operationsExtended,compile(t,n,r){let{value:i}=t;delete t.match,i='"'===i.slice(0,1)?i.replace('\\"','"'):i.replace("\\'","'"),t.value=i.slice(1,-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.subexpression.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.subexpression.end]),compile(e,t,n){e.value="(",n.push(e),t.push(e)},parse:e.expression.fn.parse.push},{type:e.expression.type.subexpression.end,regex:/^\)/,next:e.expression.set.operationsExtended,validate(t,n){let r=n.length-1,i=!1,a=!1,o=0;for(;!i&&r>=0;){const t=n[r];i=t.type===e.expression.type.subexpression.start,i&&a&&(a=!1,i=!1),t.type===e.expression.type.parameter.start?o++:t.type===e.expression.type.parameter.end?o--:t.type===e.expression.type.subexpression.end&&(a=!0),r--}return i&&0===o},compile(t,n,r){let i;const a=t;for(i=n.pop();n.length>0&&i.type!==e.expression.type.subexpression.start;)r.push(i),i=n.pop();const o=[];for(;t.type!==e.expression.type.subexpression.start;)o.unshift(t),t=r.pop();o.unshift(t),i=n[n.length-1],void 0===i||i.type!==e.expression.type._function&&i.type!==e.expression.type.filter&&i.type!==e.expression.type.test&&i.type!==e.expression.type.key.brackets?(a.expression=!0,o.pop(),o.shift(),a.params=o,r.push(a)):(a.expression=!1,i.params=o)},parse(t,n,r){if(t.expression)return e.expression.parseAsync.call(this,t.params,r).then(e=>{n.push(e)});throw new e.Error("Unexpected subexpression end when token is not marked as an expression")}},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),validate(t,n){const r=n[n.length-1];return r&&!e.expression.reservedWords.includes(r.value.trim())},compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operationsExtended,compile(t,n,r){let i;const a=t;for(i=n.pop();n.length>0&&i.type!==e.expression.type.parameter.start;)r.push(i),i=n.pop();const o=[];for(;t.type!==e.expression.type.parameter.start;)o.unshift(t),t=r.pop();o.unshift(t),void 0===(t=r[r.length-1])||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets?(a.expression=!0,o.pop(),o.shift(),a.params=o,r.push(a)):(a.expression=!1,t.params=o)},parse(t,n,r){const i=[];let a=!1,o=null;if(t.expression)return e.expression.parseAsync.call(this,t.params,r).then(e=>{n.push(e)});for(;n.length>0;){if(o=n.pop(),o&&o.type&&o.type===e.expression.type.parameter.start){a=!0;break}i.unshift(o)}if(!a)throw new e.Error("Expected end of parameter set.");n.push(i)}},{type:e.expression.type.slice,regex:/^\[(-?\w*:-?\w*)\]/,next:e.expression.set.operationsExtended,compile(e,t,n){const r=e.match[1].split(":"),i=r[0],a=r[1];e.value="slice",e.params=[i,a],a||(e.params=[i]),n.push(e)},parse(t,n,r){const i=n.pop();let{params:a}=t;const o=this;if(parseInt(a[0],10).toString()===a[0])a[0]=parseInt(a[0],10);else{const t=r[a[0]];if(o.template.options.strictVariables&&void 0===t)throw new e.Error('Variable "'+a[0]+'" does not exist.');a[0]=t}if(a[1])if(parseInt(a[1],10).toString()===a[1])a[1]=parseInt(a[1],10);else{const t=r[a[1]];if(o.template.options.strictVariables&&void 0===t)throw new e.Error('Variable "'+a[1]+'" does not exist.');void 0===t?a=[a[0]]:a[1]=t}n.push(e.filter.call(o,t.value,i,a))}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operationsExtended,compile(t,n,r){let i,a=n.length-1;for(;a>=0&&(i=n.pop(),i.type!==e.expression.type.array.start);a--)r.push(i);r.push(t)},parse(t,n){const r=[];let i=!1,a=null;for(;n.length>0;){if(a=n.pop(),a&&a.type&&a.type===e.expression.type.array.start){i=!0;break}r.unshift(a)}if(!i)throw new e.Error("Expected end of array.");n.push(r)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operationsExtended,compile(t,n,r){let i,a=n.length-1;for(;a>=0&&(i=n.pop(),!i||i.type!==e.expression.type.object.start);a--)r.push(i);r.push(t)},parse(t,n){const r={};let i=!1,a=null,o=!1,s=null;for(;n.length>0;){if(a=n.pop(),a&&a.type&&a.type===e.expression.type.object.start){i=!0;break}if(a&&a.type&&(a.type===e.expression.type.operator.binary||a.type===e.expression.type.operator.unary)&&a.key){if(!o)throw new e.Error("Missing value for key '"+a.key+"' in object definition.");r[a.key]=s,void 0===r._keys&&(r._keys=[]),r._keys.unshift(a.key),s=null,o=!1}else o=!0,s=a}if(!i)throw new e.Error("Unexpected end of object.");n.push(r)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_-]*)/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(e,t,n){e.value=e.match[1],n.push(e)},parse(n,r,i){const a=r.pop(),o=this;return t(o,n.params,i).then(t=>e.filter.call(o,n.value,a,t)).then(e=>{r.push(e)})}},{type:e.expression.type._function,regex:/^([a-zA-Z_]\w*)\s*\(/,next:e.expression.type.parameter.start,validate:t=>t[1]&&!e.expression.reservedWords.includes(t[1]),transform:()=>"(",compile(e,t,n){e.fn=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i){const a=this,{fn:o}=n;let s;return t(a,n.params,i).then(t=>{if(e.functions[o])s=e.functions[o].apply(a,t);else{if("function"!=typeof i[o])throw new e.Error(o+" function does not exist and is not defined in the context");s=i[o](...t)}return s}).then(e=>{r.push(e)})}},{type:e.expression.type.variable,regex:/^[a-zA-Z_]\w*/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:t=>!e.expression.reservedWords.includes(t[0]),parse(t,n,r){const i=this;return e.expression.resolveAsync.call(i,r[t.value],r).then(r=>{if(i.template.options.strictVariables&&void 0===r)throw new e.Error('Variable "'+t.value+'" does not exist.');n.push(r)})}},{type:e.expression.type.key.period,regex:/^\.(\w+)/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i,a){const o=this,{key:s}=n,l=r.pop();let c;if(l&&!Object.prototype.hasOwnProperty.call(l,s)&&o.template.options.strictVariables)throw Object.keys(l).length>0?new e.Error('Key "'+s+'" for object with keys "'+Object.keys(l).join(", ")+'" does not exist.'):new e.Error('Key "'+s+'" does not exist as the object is empty.');return t(o,n.params,i).then(t=>{if(null==l)c=void 0;else{const e=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)};c="object"==typeof l&&s in l?l[s]:l["get"+e(s)]?l["get"+e(s)]:l["is"+e(s)]?l["is"+e(s)]:void 0}return e.expression.resolveAsync.call(o,c,i,t,a,l)}).then(e=>{r.push(e)})}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(t,n,r){const i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse(n,r,i,a){const o=this;let s,l,c=null;return t(o,n.params,i).then(t=>(c=t,e.expression.parseAsync.call(o,n.stack,i))).then(t=>{if(s=r.pop(),s&&!Object.prototype.hasOwnProperty.call(s,t)&&o.template.options.strictVariables){const n=Object.keys(s);throw n.length>0?new e.Error('Key "'+t+'" for array with keys "'+n.join(", ")+'" does not exist.'):new e.Error('Key "'+t+'" does not exist as the array is empty.')}return null==s?null:(l="object"==typeof s&&t in s?s[t]:null,e.expression.resolveAsync.call(o,l,s,c,a))}).then(e=>{r.push(e)})}},{type:e.expression.type._null,regex:/^(null|NULL|none|NONE)/,next:e.expression.set.operations,compile(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse(e,t,n){t.push(n)}},{type:e.expression.type.bool,regex:/^(true|TRUE|false|FALSE)/,next:e.expression.set.operations,compile(e,t,n){e.value="true"===e.match[0].toLowerCase(),delete e.match,n.push(e)},parse:e.expression.fn.parse.pushValue}],e.expression.resolveAsync=function(t,n,r,i,a){const o=this;if("function"!=typeof t)return e.Promise.resolve(t);let s=e.Promise.resolve(r);if(i&&i.type===e.expression.type.parameter.end){const t=!0;s=s.then(()=>i.params&&e.expression.parseAsync.call(o,i.params,n,t)).then(e=>(i.cleanup=!0,e))}return s.then(e=>t.apply(a||n,e||[]))},e.expression.resolve=function(t,n,r,i,a){return e.async.potentiallyAsync(this,!1,function(){return e.expression.resolveAsync.call(this,t,n,r,i,a)})},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};e.expression.definitions.length>0;)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){let n=t.value;const r=[];let i,a,o,s,l,c=0,u=null,d=[];const p=function(...n){let a=arguments.length-2;const o=new Array(a);for(;a-- >0;)o[a]=n[a];if(e.log.trace("Twig.expression.tokenize","Matched a ",i," regular expression of ",o),u&&!u.includes(i))return d.push(i+" cannot follow a "+r[r.length-1].type+" at template:"+c+" near '"+o[0].slice(0,20)+"...'"),o[0];const p=e.expression.handler[i];if(p.validate&&!p.validate(o,r))return o[0];d=[];const f={type:i,value:o[0],match:o};return t.position&&(f.position=t.position),r.push(f),l=!0,u=s,c+=o[0].length,p.transform?p.transform(o,r):""};for(e.log.debug("Twig.expression.tokenize","Tokenizing expression ",n);n.length>0;){for(i in n=n.trim(),e.expression.handler)if(Object.hasOwnProperty.call(e.expression.handler,i)){if(s=e.expression.handler[i].next,a=e.expression.handler[i].regex,e.log.trace("Checking type ",i," on ",n),l=!1,Array.isArray(a))for(o=a.length;o-- >0;)n=n.replace(a[o],p);else n=n.replace(a,p);if(l)break}if(!l)throw d.length>0?new e.Error(d.join(" OR ")):new e.Error("Unable to parse '"+n+"' at template position"+c)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",r),r},e.expression.compile=function(t){const n=e.expression.tokenize(t);let r=null;const i=[],a=[];let o=null;for(e.log.trace("Twig.expression.compile: ","Compiling ",t.value);n.length>0;)r=n.shift(),o=e.expression.handler[r.type],e.log.trace("Twig.expression.compile: ","Compiling ",r),o.compile(r,a,i),e.log.trace("Twig.expression.compile: ","Stack is",a),e.log.trace("Twig.expression.compile: ","Output is",i);for(;a.length>0;)i.push(a.pop());return e.log.trace("Twig.expression.compile: ","Final output is",i),t.stack=i,delete t.value,t},e.expression.parse=function(t,n,r,i){const a=this;Array.isArray(t)||(t=[t]);const o=[],s=[],l=e.expression.type.operator.binary;return e.async.potentiallyAsync(a,i,()=>e.async.forEach(t,(r,i)=>{let c,u=null,d=null;if(!r.cleanup)return t.length>i+1&&(d=t[i+1]),u=e.expression.handler[r.type],u.parse&&(c=u.parse.call(a,r,o,n,d)),r.type===l&&n.loop&&s.push(r),c}).then(()=>{let e=s.length,t=null;for(;e-- >0;)t=s[e],t.params&&t.key&&delete t.key;if(r){const e=o.splice(0);o.push(e)}return o.pop()}))},e}}),oo=/* @__PURE__ */F((e,t)=>{t.exports=function(e){function t(e,t){const n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&n===e}return e.filters={upper:e=>"string"!=typeof e?e:e.toUpperCase(),lower:e=>"string"!=typeof e?e:e.toLowerCase(),capitalize:e=>"string"!=typeof e?e:e.slice(0,1).toUpperCase()+e.toLowerCase().slice(1),title:e=>"string"!=typeof e?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,(e,t,n)=>t+n.toUpperCase()),length:t=>e.lib.is("Array",t)||"string"==typeof t?t.length:e.lib.is("Object",t)?void 0===t._keys?Object.keys(t).length:t._keys.length:0,reverse:e=>t("Array",e)?e.reverse():t("String",e)?e.split("").reverse().join(""):t("Object",e)?(e._keys=e._keys||Object.keys(e).reverse(),e):void 0,sort:e=>t("Array",e)?e.sort():t("Object",e)?(delete e._keys,e._keys=Object.keys(e).sort((t,n)=>{let r,i;return e[t]>e[n]==!(e[t]<=e[n])?e[t]>e[n]?1:e[t]<e[n]?-1:0:isNaN(r=parseFloat(e[t]))||isNaN(i=parseFloat(e[n]))?"string"==typeof e[t]?e[t]>e[n].toString()?1:e[t]<e[n].toString()?-1:0:"string"==typeof e[n]?e[t].toString()>e[n]?1:e[t].toString()<e[n]?-1:0:null:r>i?1:r<i?-1:0}),e):void 0,keys(e){if(null==e)return;const t=e._keys||Object.keys(e),n=[];return t.forEach(t=>{"_keys"!==t&&Object.hasOwnProperty.call(e,t)&&n.push(t)}),n},url_encode(t){if(null==t)return;if(e.lib.is("Object",t)){const n=function(t,r){const i=[];return(t._keys||Object.keys(t)).forEach(a=>{if(!Object.prototype.hasOwnProperty.call(t,a))return;const o=r?r+"["+a+"]":a,s=t[a];i.push(e.lib.is("Object",s)||Array.isArray(s)?n(s,o):encodeURIComponent(o)+"="+encodeURIComponent(s))}),i.join("&amp;")};return n(t)}let n=encodeURIComponent(t);return n=n.replace("'","%27"),n},join(e,n){if(null==e)return;let r="",i=[],a=null;return n&&n[0]&&(r=n[0]),t("Array",e)?i=e:(a=e._keys||Object.keys(e),a.forEach(t=>{"_keys"!==t&&Object.hasOwnProperty.call(e,t)&&i.push(e[t])})),i.join(r)},default(t,n){if(void 0!==n&&n.length>1)throw new e.Error("default filter expects one argument");return null==t||""===t?void 0===n?"":n[0]:t},json_encode(n){if(null==n)return"null";if("object"==typeof n&&t("Array",n)){const t=[];return n.forEach(n=>{t.push(e.filters.json_encode(n))}),"["+t.join(",")+"]"}if("object"==typeof n&&t("Date",n))return'"'+n.toISOString()+'"';if("object"==typeof n){const t=n._keys||Object.keys(n),r=[];return t.forEach(t=>{r.push(JSON.stringify(t)+":"+e.filters.json_encode(n[t]))}),"{"+r.join(",")+"}"}return JSON.stringify(n)},merge(n,r){let i=[],a=0,o=[];if(t("Array",n)?r.forEach(e=>{t("Array",e)||(i={})}):i={},t("Array",i)||(i._keys=[]),t("Array",n)?n.forEach(e=>{i._keys&&i._keys.push(a),i[a]=e,a++}):(o=n._keys||Object.keys(n),o.forEach(e=>{i[e]=n[e],i._keys.push(e);const t=parseInt(e,10);!isNaN(t)&&t>=a&&(a=t+1)})),r.forEach(e=>{t("Array",e)?e.forEach(e=>{i._keys&&i._keys.push(a),i[a]=e,a++}):(o=e._keys||Object.keys(e),o.forEach(t=>{i[t]||i._keys.push(t),i[t]=e[t];const n=parseInt(t,10);!isNaN(n)&&n>=a&&(a=n+1)}))}),0===r.length)throw new e.Error("Filter merge expects at least one parameter");return i},date(t,n){const r=e.functions.date(t),i=n&&Boolean(n.length)?n[0]:"F j, Y H:i";return e.lib.date(i.replace(/\\\\/g,"\\"),r)},date_modify(t,n){if(null==t)return;if(void 0===n||1!==n.length)throw new e.Error("date_modify filter expects 1 argument");const r=n[0];let i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),/* @__PURE__ */new Date(1e3*i)},replace(t,n){if(null==t)return;const r=n[0];let i;for(i in r)Object.hasOwnProperty.call(r,i)&&"_keys"!==i&&(t=e.lib.replaceAll(t,i,r[i]));return t},format(t,n){if(null!=t&&""!==t)return e.lib.vsprintf(t,n)},striptags(t,n){if(null!=t)return e.lib.stripTags(t,n)},escape(t,n){if(null==t||""===t)return;let r="html";if(n&&Boolean(n.length)&&!0!==n[0]&&(r=n[0]),"html"===r){const n=t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return new e.Markup(n,"html")}if("js"===r){const n=t.toString();let r="";for(let t=0;t<n.length;t++)if(n[t].match(/^[a-zA-Z0-9,._]$/))r+=n[t];else{const i=n.charAt(t),a=n.charCodeAt(t),o={"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};o[i]?r+=o[i]:r+=e.lib.sprintf("\\u%04s",a.toString(16).toUpperCase())}return new e.Markup(r,"js")}if("css"===r){const n=t.toString();let r="";for(let e=0;e<n.length;e++)n[e].match(/^[a-zA-Z0-9]$/)?r+=n[e]:r+="\\"+n.charCodeAt(e).toString(16).toUpperCase()+" ";return new e.Markup(r,"css")}if("url"===r){const n=e.filters.url_encode(t);return new e.Markup(n,"url")}if("html_attr"===r){const n=t.toString();let r="";for(let t=0;t<n.length;t++)if(n[t].match(/^[a-zA-Z0-9,.\-_]$/))r+=n[t];else if(n[t].match(/^[&<>"]$/))r+=n[t].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");else{const i=n.charCodeAt(t);r+=i<=31&&9!==i&&10!==i&&13!==i?"&#xFFFD;":i<128?e.lib.sprintf("&#x%02s;",i.toString(16).toUpperCase()):e.lib.sprintf("&#x%04s;",i.toString(16).toUpperCase())}return new e.Markup(r,"html_attr")}throw new e.Error("escape strategy unsupported")},e:(t,n)=>e.filters.escape(t,n),nl2br(t){if(null==t||""===t)return;const n="<br />BACKSLASH_n_replace";return t=e.filters.escape(t).replace(/\r\n/g,n).replace(/\r/g,n).replace(/\n/g,n),t=e.lib.replaceAll(t,"BACKSLASH_n_replace","\n"),new e.Markup(t)},number_format(e,t){let n=e;const r=t&&t[0]?t[0]:void 0,i=t&&void 0!==t[1]?t[1]:".",a=t&&void 0!==t[2]?t[2]:",";n=String(n).replace(/[^0-9+\-Ee.]/g,"");const o=isFinite(Number(n))?Number(n):0,s=isFinite(Number(r))?Math.abs(r):0;let l="";return l=(s?function(e,t){const n=10**t;return String(Math.round(e*n)/n)}(o,s):String(Math.round(o))).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(l[1]||"").length<s&&(l[1]=l[1]||"",l[1]+=new Array(s-l[1].length+1).join("0")),l.join(i)},trim(e,t){if(null==e)return;let n,r=String(e);n=t&&t[0]?String(t[0]):" \n\r\t\f\v            ​\u2028\u2029 ";for(let i=0;i<r.length;i++)if(!n.includes(r.charAt(i))){r=r.slice(Math.max(0,i));break}for(let i=r.length-1;i>=0;i--)if(!n.includes(r.charAt(i))){r=r.slice(0,Math.max(0,i+1));break}return n.includes(r.charAt(0))?"":r},truncate(e,t){let n=30,r=!1,i="...";if(e=String(e),t&&(t[0]&&(n=t[0]),t[1]&&(r=t[1]),t[2]&&(i=t[2])),e.length>n){if(r&&(n=e.indexOf(" ",n),-1===n))return e;e=e.slice(0,n)+i}return e},slice(t,n){if(null==t)return;if(void 0===n||0===n.length)throw new e.Error("slice filter expects at least 1 argument");const r=n[0]||0;let i=n.length>1?n[1]:t.length;const a=r>=0?r:Math.max(t.length+r,0);if(i<0&&(i=t.length-a+i),e.lib.is("Array",t)){const e=[];for(let n=a;n<a+i&&n<t.length;n++)e.push(t[n]);return e}if(e.lib.is("String",t))return t.slice(a,a+i);throw new e.Error("slice filter expects value to be an array or string")},abs(e){if(null!=e)return Math.abs(e)},first(e){if(t("Array",e))return e[0];if(t("Object",e)){if("_keys"in e)return e[e._keys[0]]}else if("string"==typeof e)return e.slice(0,1)},split(t,n){if(null!=t){if(void 0===n||0===n.length||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){const e=n[0],r=n[1],i=t.split(e);if(void 0===r)return i;if(r<0)return t.split(e,i.length+r);const a=[];if(""===e)for(;i.length>0;){let e="";for(let t=0;t<r&&i.length>0;t++)e+=i.shift();a.push(e)}else{for(let e=0;e<r-1&&i.length>0;e++)a.push(i.shift());i.length>0&&a.push(i.join(e))}return a}throw new e.Error("split filter expects value to be a string")}},last(t){if(e.lib.is("Object",t)){let e;return e=void 0===t._keys?Object.keys(t):t._keys,t[e[e.length-1]]}return e.lib.is("Number",t)?t.toString().slice(-1):t[t.length-1]},raw:t=>new e.Markup(t||""),batch(t,n){let r=n.shift();const i=n.shift();let a,o;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r);const s=e.lib.chunkArray(t,r);if(i&&t.length%r!==0){for(a=s.pop(),o=r-a.length;o--;)a.push(i);s.push(a)}return s},round(t,n){const r=(n=n||[]).length>0?n[0]:0,i=n.length>1?n[1]:"common";if(t=parseFloat(t),r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if("common"===i)return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*10**r)/10**r},spaceless:e=>e.replace(/>\s+</g,"><").trim()},e.filter=function(t,n,r){if(!e.filters[t])throw new e.Error("Unable to find filter "+t);return e.filters[t].call(this,n,r)},e.filter.extend=function(t,n){e.filters[t]=n},e}}),so=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.functions={range(e,t,n){const r=[];let i,a;const o=n||1;let s=!1;if(isNaN(e)||isNaN(t)?isNaN(e)&&isNaN(t)?(s=!0,i=e.charCodeAt(0),a=t.charCodeAt(0)):(i=isNaN(e)?0:e,a=isNaN(t)?0:t):(i=parseInt(e,10),a=parseInt(t,10)),i>a)for(;i>=a;)r.push(s?String.fromCharCode(i):i),i-=o;else for(;i<=a;)r.push(s?String.fromCharCode(i):i),i+=o;return r},cycle:(e,t)=>e[t%e.length],dump(...e){const t=[...e];let n=0,r="";const i=function(e){let t="";for(;e>0;)e--,t+=" ";return t},a=function(e){r+=i(n),"object"==typeof e?o(e):"function"==typeof e?r+="function()\n":"string"==typeof e?r+="string("+e.length+') "'+e+'"\n':"number"==typeof e?r+="number("+e+")\n":"boolean"==typeof e&&(r+="bool("+e+")\n")},o=function(e){let t;if(null===e)r+="NULL\n";else if(void 0===e)r+="undefined\n";else if("object"==typeof e){for(t in r+=i(n)+typeof e,n++,r+="("+function(e){let t,n=0;for(t in e)Object.hasOwnProperty.call(e,t)&&n++;return n}(e)+") {\n",e)Object.hasOwnProperty.call(e,t)&&(r+=i(n)+"["+t+"]=> \n",a(e[t]));n--,r+=i(n)+"}\n"}else a(e)};return 0===t.length&&t.push(this.context),t.forEach(e=>{o(e)}),r},date(t){let n;if(null==t||""===t)n=/* @__PURE__ */new Date;else if(e.lib.is("Date",t))n=t;else if(e.lib.is("String",t))n=t.match(/^\d+$/)?/* @__PURE__ */new Date(1e3*t):/* @__PURE__ */new Date(1e3*e.lib.strtotime(t));else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);n=/* @__PURE__ */new Date(1e3*t)}return n},block(e){const t=this,n=t.getBlock(e);if(void 0!==n)return n.render(t,t.context)},parent(){const t=this;return t.getBlock(t.getNestingStackToken(e.logic.type.block).blockName,!0).render(t,t.context)},attribute:(t,n,r)=>e.lib.is("Object",t)&&Object.hasOwnProperty.call(t,n)?"function"==typeof t[n]?t[n].apply(void 0,r):t[n]:t&&t[n]||void 0,max:(t,...n)=>e.lib.is("Object",t)?(delete t._keys,e.lib.max(t)):Reflect.apply(e.lib.max,null,[t,...n]),min:(t,...n)=>e.lib.is("Object",t)?(delete t._keys,e.lib.min(t)):Reflect.apply(e.lib.min,null,[t,...n]),template_from_string(t){return void 0===t&&(t=""),e.Templates.parsers.twig({options:this.template.options,data:t})},random(t){const n=2147483648;function r(e){const t=Math.floor(Math.random()*n),r=Math.min.call(null,0,e),i=Math.max.call(null,0,e);return r+Math.floor((i-r+1)*t/n)}if(e.lib.is("Number",t))return r(t);if(e.lib.is("String",t))return t.charAt(r(t.length-1));if(e.lib.is("Array",t))return t[r(t.length-1)];if(e.lib.is("Object",t)){const e=Object.keys(t);return t[e[r(e.length-1)]]}return r(2147483647)},source(n,r){const{namespaces:i}=this.template.options;let a,o=!1;const s=void 0!==t&&void 0!==t.exports&&"undefined"==typeof window;let l,c=n;i&&"object"==typeof i&&(c=e.path.expandNamespace(i,c)),l=s?"fs":"ajax";const u={id:n,path:c,method:l,parser:"source",async:!1,fetchTemplateSource:!0};void 0===r&&(r=!1);try{a=e.Templates.loadRemote(n,u),null==a?a="":o=!0}catch(d){e.log.debug("Twig.functions.source: ","Problem loading template ",d)}return o||r?a:'Template "{name}" is not defined.'.replace("{name}",n)}},e._function=function(t,n,r){if(!e.functions[t])throw new e.Error("Unable to find function "+t);return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}}),lo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sprintf=function(e,...t){const n=/%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g,r=[e,...t];let i=1;const a=function(e,t,n,r){n||(n=" ");const i=e.length>=t?"":new Array(1+t-e.length>>>0).join(n);return r?e+i:i+e},o=function(e,t,n,r,i){const o=r-e.length;return o>0&&(e=n||"0"!==i?a(e,r,i,n):[e.slice(0,t.length),a("",o,"0",!0),e.slice(t.length)].join("")),e},s=function(e,t,n,r,i,s){return o(a((Number(e)>>>0).toString(t),i||0,"0",!1),"",n,r,s)},l=function(e,t,n,r,i){return null!=r&&(e=e.slice(0,r)),o(e,"",t,n,i)},c=function(e,t,n,c,u,d){let p,f=0,h="";if("%%"===e)return"%";let m=" ",g=!1,y="",b=0,v=0;for(b=0,v=n.length;b<v;b++)switch(n.charAt(b)){case" ":case"0":m=n.charAt(b);break;case"+":y="+";break;case"-":g=!0;break;case"'":b+1<v&&(m=n.charAt(b+1),b++)}let x,w=0;if(w=c?+c:0,!isFinite(w))throw new Error("Width must be finite");if(x=u?+u:"d"===d?0:"fFeE".includes(d)?6:void 0,t&&0===+t)throw new Error("Argument number must be greater than zero");if(t&&+t>=r.length)throw new Error("Too few arguments");switch(p=t?r[+t]:r[i++],d){case"%":return"%";case"s":return l(String(p),g,w,x,m);case"c":return l(String.fromCharCode(+String(p)),g,w,x,m);case"b":return s(p,2,g,w,x,m);case"o":return s(p,8,g,w,x,m);case"x":return s(p,16,g,w,x,m);case"X":return s(p,16,g,w,x,m).toUpperCase();case"u":return s(p,10,g,w,x,m);case"i":case"d":return f=+String(p)||0,f=Math.round(f-f%1),h=f<0?"-":y,p=h+a(String(Math.abs(f)),x??0,"0",!1),g&&"0"===m&&(m=" "),o(String(p),h,g,w,m);case"e":case"E":case"f":case"F":case"g":case"G":{f=+String(p),h=f<0?"-":y;const e="efg".indexOf(d.toLowerCase()),t=Math.abs(f);let n="";n=0===e?t.toExponential(x):1===e?t.toFixed(x):t.toPrecision(x);const r=o(h+n,h,g,w,m);return"eEfFgG".indexOf(d)%2==0?r:r.toUpperCase()}default:return""}};try{return e.replace(n,c)}catch(u){return!1}}}),co=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.vsprintf=function(e,n){return(0,t.sprintf)(e,...n)};var t=lo()}),uo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._phpCastString=function(e){if("boolean"==typeof e)return e?"1":"";if("string"==typeof e)return e;if("number"==typeof e)return isNaN(e)?"NAN":isFinite(e)?e+"":(e<0?"-":"")+"INF";if(void 0===e)return"";if("object"==typeof e)return Array.isArray(e)?"Array":null!==e?"Object":"";throw new Error("Unsupported value type")}}),po=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.strip_tags=function(e,n){n=(((n||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");const r=/<\/?([a-z0-9]*)\b[^>]*>?/gi,i=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;let a=(0,t._phpCastString)(e);for(a=a.endsWith("<")?a.slice(0,-1):a;;){const e=a;if(a=e.replace(i,"").replace(r,function(e,t){return n.includes("<"+t.toLowerCase()+">")?e:""}),e===a)return a}};var t=uo()}),fo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._php_cast_int=function(e){return"number"==typeof e?isNaN(e)||!isFinite(e)?0:e<0?Math.ceil(e):Math.floor(e):"string"==typeof e?parseInt(e,10)||0:+!!e}}),ho=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._php_cast_float=function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e)||0:(0,t._php_cast_int)(e)};var t=fo()}),mo=/* @__PURE__ */F(e=>{function t(e,t){let n=Math.floor(Math.abs(e)+.5);return("PHP_ROUND_HALF_DOWN"===t&&e===n-.5||"PHP_ROUND_HALF_EVEN"===t&&e===.5+2*Math.floor(n/2)||"PHP_ROUND_HALF_ODD"===t&&e===.5+2*Math.floor(n/2)-1)&&(n-=1),e<0?-n:n}Object.defineProperty(e,"__esModule",{value:!0}),e.round=function(e,i=0,a="PHP_ROUND_HALF_UP"){let o;if(e=(0,n._php_cast_float)(e),i=(0,r._php_cast_int)(i),o=Math.pow(10,i),isNaN(e)||!isFinite(e))return e;if(Math.trunc(e)===e&&i>=0)return e;const s=14-Math.floor(Math.log10(Math.abs(e)));return s>i&&s-15<i?(e=t(e*Math.pow(10,s),a),e/=Math.pow(10,Math.abs(i-s))):e*=o,(e=t(e,a))/o};var n=ho(),r=fo()}),go=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.min=function(...e){if(0===e.length)throw new Error("At least one value should be passed to min()");let i;if(1===e.length){const r=e[0];if(void 0===r||!t(r))throw new Error("Wrong parameter count for min()");if(i=n(r),0===i.length)throw new Error("Array must contain at least one element for min()")}else i=e;const a=i[0];if(void 0===a)throw new Error("Array must contain at least one element for min()");let o=a;for(let t=1;t<i.length;t+=1){const e=i[t];void 0!==e&&-1===r(o,e)&&(o=e)}return o};var t=e=>"object"==typeof e&&null!==e,n=e=>Array.isArray(e)?e:Object.values(e).filter(e=>void 0!==e),r=(e,i)=>{const a=Number(e),o=Number(i);if(e===i)return 0;if(t(e)){if(t(i)){const t=n(e),a=n(i);if(a.length>t.length)return 1;if(a.length<t.length)return-1;for(let e=0;e<t.length;e+=1){const n=t[e],i=a[e];if(void 0===n||void 0===i)continue;const o=r(n,i);if(0!==o)return o}return 0}return-1}return t(i)?1:Number.isNaN(o)&&!Number.isNaN(a)?0===e?0:a<0?1:-1:Number.isNaN(a)&&!Number.isNaN(o)?0===i?0:o>0?1:-1:"string"==typeof e&&"string"==typeof i&&Number.isNaN(a)&&Number.isNaN(o)?i>e?1:-1:o>a?1:-1}}),yo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.max=function(...e){if(0===e.length)throw new Error("At least one value should be passed to max()");let i;if(1===e.length){const r=e[0];if(void 0===r||!t(r))throw new Error("Wrong parameter count for max()");if(i=n(r),0===i.length)throw new Error("Array must contain at least one element for max()")}else i=e;const a=i[0];if(void 0===a)throw new Error("Array must contain at least one element for max()");let o=a;for(let t=1;t<i.length;t+=1){const e=i[t];void 0!==e&&1===r(o,e)&&(o=e)}return o};var t=e=>"object"==typeof e&&null!==e,n=e=>Array.isArray(e)?e:Object.values(e).filter(e=>void 0!==e),r=(e,i)=>{const a=Number(e),o=Number(i);if(e===i)return 0;if(t(e)){if(t(i)){const t=n(e),a=n(i);if(a.length>t.length)return 1;if(a.length<t.length)return-1;for(let e=0;e<t.length;e+=1){const n=t[e],i=a[e];if(void 0===n||void 0===i)continue;const o=r(n,i);if(0!==o)return o}return 0}return-1}return t(i)?1:Number.isNaN(o)&&!Number.isNaN(a)?0===e?0:a<0?1:-1:Number.isNaN(a)&&!Number.isNaN(o)?0===i?0:o>0?1:-1:"string"==typeof e&&"string"==typeof i&&Number.isNaN(a)&&Number.isNaN(o)?i>e?1:-1:o>a?1:-1}}),bo=/* @__PURE__ */F(e=>{function t(e,t){switch(t?.toLowerCase()){case"a":e+=12===e?-12:0;break;case"p":e+=12!==e?12:0}return e}function n(e){let t=+e;return e.length<4&&t<100&&(t+=t<70?2e3:1900),t}function r(e){return{jan:0,january:0,i:0,feb:1,february:1,ii:1,mar:2,march:2,iii:2,apr:3,april:3,iv:3,may:4,v:4,jun:5,june:5,vi:5,jul:6,july:6,vii:6,aug:7,august:7,viii:7,sep:8,sept:8,september:8,ix:8,oct:9,october:9,x:9,nov:10,november:10,xi:10,dec:11,december:11,xii:11}[e.toLowerCase()]??NaN}function i(e,t=0){return{mon:1,monday:1,tue:2,tuesday:2,wed:3,wednesday:3,thu:4,thursday:4,fri:5,friday:5,sat:6,saturday:6,sun:0,sunday:0}[e.toLowerCase()]||t}function a(e,t=NaN){const n=e?.match(/(?:GMT)?([+-])(\d+)(:?)(\d{0,2})/i);if(!n)return t;const r="-"===n[1]?-1:1;let i=+(n[2]??0),a=+(n[4]??0);return n[4]||n[3]||(a=Math.floor(i%100),i=Math.floor(i/100)),r*(60*i+a)*60}Object.defineProperty(e,"__esModule",{value:!0}),e.strtotime=function(e,t){const n=null==t?Math.floor(Date.now()/1e3):t;e=String(e);const r=[s.yesterday,s.now,s.noon,s.midnightOrToday,s.tomorrow,s.timestamp,s.firstOrLastDay,s.backOrFrontOf,s.timeTiny12,s.timeShort12,s.timeLong12,s.mssqltime,s.oracledate,s.timeShort24,s.timeLong24,s.iso8601long,s.gnuNoColon,s.iso8601noColon,s.americanShort,s.american,s.iso8601date4,s.iso8601dateSlash,s.dateSlash,s.gnuDateShortOrIso8601date2,s.gnuDateShorter,s.dateFull,s.pointedDate4,s.pointedDate2,s.dateNoDay,s.dateNoDayRev,s.dateTextual,s.dateNoYear,s.dateNoYearRev,s.dateNoColon,s.xmlRpc,s.xmlRpcNoColon,s.soap,s.wddx,s.exif,s.pgydotd,s.isoWeekDay,s.pgTextShort,s.pgTextReverse,s.clf,s.year4,s.ago,s.dayText,s.relativeTextWeek,s.relativeText,s.monthFullOrMonthAbbr,s.tzCorrection,s.tzAbbr,s.dateShortWithTimeShort12,s.dateShortWithTimeLong12,s.dateShortWithTimeShort,s.dateShortWithTimeLong,s.relative,s.whitespace],i={...l};for(;e.length;){let t=null,n=null;for(const i of r){const r=e.match(i.regex);r&&(!t||r[0].length>t[0].length)&&(t=r,n=i)}if(!n||!t)return!1;if(n.callback&&!1===n.callback.apply(i,t))return!1;e=e.substr(t[0].length),n=null,t=null}return Math.floor(i.toDate(/* @__PURE__ */new Date(1e3*n)).getTime()/1e3)};var o={acdt:37800,acst:34200,addt:-7200,adt:-10800,aedt:39600,aest:36e3,ahdt:-32400,ahst:-36e3,akdt:-28800,akst:-32400,amt:-13840,apt:-10800,ast:-14400,awdt:32400,awst:28800,awt:-10800,bdst:7200,bdt:-36e3,bmt:-14309,bst:3600,cast:34200,cat:7200,cddt:-14400,cdt:-18e3,cemt:10800,cest:7200,cet:3600,cmt:-15408,cpt:-18e3,cst:-21600,cwt:-18e3,chst:36e3,dmt:-1521,eat:10800,eddt:-10800,edt:-14400,eest:10800,eet:7200,emt:-26248,ept:-14400,est:-18e3,ewt:-14400,ffmt:-14660,fmt:-4056,gdt:39600,gmt:0,gst:36e3,hdt:-34200,hkst:32400,hkt:28800,hmt:-19776,hpt:-34200,hst:-36e3,hwt:-34200,iddt:14400,idt:10800,imt:25025,ist:7200,jdt:36e3,jmt:8440,jst:32400,kdt:36e3,kmt:5736,kst:30600,lst:9394,mddt:-18e3,mdst:16279,mdt:-21600,mest:7200,met:3600,mmt:9017,mpt:-21600,msd:14400,msk:10800,mst:-25200,mwt:-21600,nddt:-5400,ndt:-9052,npt:-9e3,nst:-12600,nwt:-9e3,nzdt:46800,nzmt:41400,nzst:43200,pddt:-21600,pdt:-25200,pkst:21600,pkt:18e3,plmt:25590,pmt:-13236,ppmt:-17340,ppt:-25200,pst:-28800,pwt:-25200,qmt:-18840,rmt:5794,sast:7200,sdmt:-16800,sjmt:-20173,smt:-13884,sst:-39600,tbmt:10751,tmt:12344,uct:0,utc:0,wast:7200,wat:3600,wemt:7200,west:3600,wet:0,wib:25200,wita:28800,wit:32400,wmt:5040,yddt:-25200,ydt:-28800,ypt:-28800,yst:-32400,ywt:-28800,a:3600,b:7200,c:10800,d:14400,e:18e3,f:21600,g:25200,h:28800,i:32400,k:36e3,l:39600,m:43200,n:-3600,o:-7200,p:-10800,q:-14400,r:-18e3,s:-21600,t:-25200,u:-28800,v:-32400,w:-36e3,x:-39600,y:-43200,z:0},s={yesterday:{regex:/^yesterday/i,name:"yesterday",callback(){return this.rd-=1,this.resetTime()}},now:{regex:/^now/i,name:"now"},noon:{regex:/^noon/i,name:"noon",callback(){return this.resetTime()&&this.time(12,0,0,0)}},midnightOrToday:{regex:/^(midnight|today)/i,name:"midnight | today",callback(){return this.resetTime()}},tomorrow:{regex:/^tomorrow/i,name:"tomorrow",callback(){return this.rd+=1,this.resetTime()}},timestamp:{regex:/^@(-?\d+)/i,name:"timestamp",callback(e,t){return this.rs+=+t,this.y=1970,this.m=0,this.d=1,this.dates=0,this.resetTime()&&this.zone(0)}},firstOrLastDay:{regex:/^(first|last) day of/i,name:"firstdayof | lastdayof",callback(e,t){"first"===t.toLowerCase()?this.firstOrLastDayOfMonth=1:this.firstOrLastDayOfMonth=-1}},backOrFrontOf:{regex:new RegExp("^(back|front) of (2[0-4]|[01]?[0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))?","i"),name:"backof | frontof",callback(e,n,r,i){let a=+r,o=15;return"back"===n.toLowerCase()||(a-=1,o=45),a=t(a,i),this.resetTime()&&this.time(a,o,0,0)}},weekdayOf:{regex:new RegExp("^(first|second|third|fourth|fifth|sixth|seventh|eighth?|ninth|tenth|eleventh|twelfth|next|last|previous|this)[ \\t]+(sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat)[ \\t]+of","i"),name:"weekdayof"},mssqltime:{regex:new RegExp("^(0?[1-9]|1[0-2]):([0-5][0-9]):(60|[0-5][0-9])[:.]([0-9]+)(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"mssqltime",callback(e,n,r,i,a,o){return this.time(t(+n,o),+r,+i,+a.substr(0,3))}},oracledate:{regex:/^(\d{2})-([A-Z]{3})-(\d{2})$/i,name:"d-M-y",callback(e,t,n,r){const i={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[n.toUpperCase()]??NaN;return this.ymd(2e3+parseInt(r,10),i,parseInt(t,10))}},timeLong12:{regex:new RegExp("^(0?[1-9]|1[0-2])[:.]([0-5]?[0-9])[:.](60|[0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timelong12",callback(e,n,r,i,a){return this.time(t(+n,a),+r,+i,0)}},timeShort12:{regex:new RegExp("^(0?[1-9]|1[0-2])[:.]([0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timeshort12",callback(e,n,r,i){return this.time(t(+n,i),+r,0,0)}},timeTiny12:{regex:new RegExp("^(0?[1-9]|1[0-2])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timetiny12",callback(e,n,r){return this.time(t(+n,r),0,0,0)}},soap:{regex:new RegExp("^([0-9]{4})-(0[0-9]|1[0-2])-(0[0-9]|[1-2][0-9]|3[01])T([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])(?:\\.([0-9]+))((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)?","i"),name:"soap",callback(e,t,n,r,i,o,s,l,c){return this.ymd(+t,+n-1,+r)&&this.time(+i,+o,+s,+l.substr(0,3))&&this.zone(a(c))}},wddx:{regex:new RegExp("^([0-9]{4})-(1[0-2]|0?[0-9])-(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)T(2[0-4]|[01]?[0-9]):([0-5]?[0-9]):(60|[0-5]?[0-9])"),name:"wddx",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},exif:{regex:new RegExp("^([0-9]{4}):(0[0-9]|1[0-2]):(0[0-9]|[1-2][0-9]|3[01]) ([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])","i"),name:"exif",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},xmlRpc:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])T(2[0-4]|[01]?[0-9]):([0-5][0-9]):(60|[0-5][0-9])"),name:"xmlrpc",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},xmlRpcNoColon:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])[Tt](2[0-4]|[01]?[0-9])([0-5][0-9])(60|[0-5][0-9])"),name:"xmlrpcnocolon",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},clf:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)/(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)/([0-9]{4}):([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])[ \\t]+((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)","i"),name:"clf",callback(e,t,n,i,o,s,l,c){return this.ymd(+i,r(n),+t)&&this.time(+o,+s,+l,0)&&this.zone(a(c))}},iso8601long:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])(?:\\.([0-9]+))","i"),name:"iso8601long",callback(e,t,n,r,i){return this.time(+t,+n,+r,+i.substr(0,3))}},dateTextual:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]+([0-9]{1,4})","i"),name:"datetextual",callback(e,t,i,a){return this.ymd(n(a),r(t),+i)}},pointedDate4:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[.\\t-](1[0-2]|0?[0-9])[.-]([0-9]{4})"),name:"pointeddate4",callback(e,t,n,r){return this.ymd(+r,+n-1,+t)}},pointedDate2:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[.\\t](1[0-2]|0?[0-9])\\.([0-9]{2})"),name:"pointeddate2",callback(e,t,r,i){return this.ymd(n(i),+r-1,+t)}},timeLong24:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])"),name:"timelong24",callback(e,t,n,r){return this.time(+t,+n,+r,0)}},dateNoColon:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])"),name:"datenocolon",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},pgydotd:{regex:new RegExp("^([0-9]{4})\\.?(00[1-9]|0[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6])"),name:"pgydotd",callback(e,t,n){return this.ymd(+t,0,+n)}},timeShort24:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])","i"),name:"timeshort24",callback(e,t,n){return this.time(+t,+n,0,0)}},iso8601noColon:{regex:new RegExp("^t?([01][0-9]|2[0-4])([0-5][0-9])(60|[0-5][0-9])","i"),name:"iso8601nocolon",callback(e,t,n,r){return this.time(+t,+n,+r,0)}},iso8601dateSlash:{regex:new RegExp("^([0-9]{4})/(0[0-9]|1[0-2])/(0[0-9]|[1-2][0-9]|3[01])/"),name:"iso8601dateslash",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},dateSlash:{regex:new RegExp("^([0-9]{4})/(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"dateslash",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},american:{regex:new RegExp("^(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)/([0-9]{1,4})"),name:"american",callback(e,t,r,i){return this.ymd(n(i),+t-1,+r)}},americanShort:{regex:new RegExp("^(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"americanshort",callback(e,t,n){return this.ymd(this.y,+t-1,+n)}},gnuDateShortOrIso8601date2:{regex:new RegExp("^([0-9]{1,4})-(1[0-2]|0?[0-9])-(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"gnudateshort | iso8601date2",callback(e,t,r,i){return this.ymd(n(t),+r-1,+i)}},iso8601date4:{regex:new RegExp("^([+-]?[0-9]{4})-(0[0-9]|1[0-2])-(0[0-9]|[1-2][0-9]|3[01])"),name:"iso8601date4",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},gnuNoColon:{regex:new RegExp("^t?([01][0-9]|2[0-4])([0-5][0-9])","i"),name:"gnunocolon",callback(e,t,n){switch(this.times){case 0:return this.time(+t,+n,0,this.f);case 1:return this.y=100*+t+ +n,this.times++,!0;default:return!1}}},gnuDateShorter:{regex:new RegExp("^([0-9]{4})-(1[0-2]|0?[0-9])"),name:"gnudateshorter",callback(e,t,n){return this.ymd(+t,+n-1,1)}},pgTextReverse:{regex:new RegExp("^(\\d{3,4}|[4-9]\\d|3[2-9])-(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)-(0[0-9]|[1-2][0-9]|3[01])","i"),name:"pgtextreverse",callback(e,t,i,a){return this.ymd(n(t),r(i),+a)}},dateFull:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[ \\t.-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ \\t.-]*([0-9]{1,4})","i"),name:"datefull",callback(e,t,i,a){return this.ymd(n(a),r(i),+t)}},dateNoDay:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*([0-9]{4})","i"),name:"datenoday",callback(e,t,n){return this.ymd(+n,r(t),1)}},dateNoDayRev:{regex:new RegExp("^([0-9]{4})[ .\\t-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})","i"),name:"datenodayrev",callback(e,t,n){return this.ymd(+t,r(n),1)}},pgTextShort:{regex:new RegExp("^(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)-(0[0-9]|[1-2][0-9]|3[01])-([0-9]{1,4})","i"),name:"pgtextshort",callback(e,t,i,a){return this.ymd(n(a),r(t),+i)}},dateNoYear:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*","i"),name:"datenoyear",callback(e,t,n){return this.ymd(this.y,r(t),+n)}},dateNoYearRev:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[ .\\t-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})","i"),name:"datenoyearrev",callback(e,t,n){return this.ymd(this.y,r(n),+t)}},isoWeekDay:{regex:new RegExp("^([0-9]{4})-?W(0[1-9]|[1-4][0-9]|5[0-3])(?:-?([0-7]))?"),name:"isoweekday | isoweek",callback(e,t,n,r){const i=r?+r:1;if(!this.ymd(+t,0,1))return!1;let a=new Date(this.y,this.m,this.d).getDay();return a=0-(a>4?a-7:a),this.rd+=a+7*(+n-1)+i,!0}},relativeText:{regex:new RegExp("^(first|second|third|fourth|fifth|sixth|seventh|eighth?|ninth|tenth|eleventh|twelfth|next|last|previous|this)[ \\t]+((?:second|sec|minute|min|hour|day|fortnight|forthnight|month|year)s?|weeks|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?)","i"),name:"relativetext",callback(e,t,n){const{amount:r,behavior:a}=function(e){const t=e.toLowerCase();return{amount:{last:-1,previous:-1,this:0,first:1,next:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eight:8,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12}[t]??0,behavior:{this:1}[t]||0}}(t);switch(n.toLowerCase()){case"sec":case"secs":case"second":case"seconds":this.rs+=r;break;case"min":case"mins":case"minute":case"minutes":this.ri+=r;break;case"hour":case"hours":this.rh+=r;break;case"day":case"days":this.rd+=r;break;case"fortnight":case"fortnights":case"forthnight":case"forthnights":this.rd+=14*r;break;case"week":case"weeks":this.rd+=7*r;break;case"month":case"months":this.rm+=r;break;case"year":case"years":this.ry+=r;break;case"mon":case"monday":case"tue":case"tuesday":case"wed":case"wednesday":case"thu":case"thursday":case"fri":case"friday":case"sat":case"saturday":case"sun":case"sunday":this.resetTime(),this.weekday=i(n,7),this.weekdayBehavior=1,this.rd+=7*(r>0?r-1:r)}}},relative:{regex:new RegExp("^([+-]*)[ \\t]*(\\d+)[ \\t]*((?:second|sec|minute|min|hour|day|fortnight|forthnight|month|year)s?|weeks|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?|week)","i"),name:"relative",callback(e,t,n,r){const a=t.replace(/[^-]/g,"").length,o=+n*Math.pow(-1,a);switch(r.toLowerCase()){case"sec":case"secs":case"second":case"seconds":this.rs+=o;break;case"min":case"mins":case"minute":case"minutes":this.ri+=o;break;case"hour":case"hours":this.rh+=o;break;case"day":case"days":this.rd+=o;break;case"fortnight":case"fortnights":case"forthnight":case"forthnights":this.rd+=14*o;break;case"week":case"weeks":this.rd+=7*o;break;case"month":case"months":this.rm+=o;break;case"year":case"years":this.ry+=o;break;case"mon":case"monday":case"tue":case"tuesday":case"wed":case"wednesday":case"thu":case"thursday":case"fri":case"friday":case"sat":case"saturday":case"sun":case"sunday":this.resetTime(),this.weekday=i(r,7),this.weekdayBehavior=1,this.rd+=7*(o>0?o-1:o)}}},dayText:{regex:new RegExp("^(sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?)","i"),name:"daytext",callback(e,t){this.resetTime(),this.weekday=i(t,0),2!==this.weekdayBehavior&&(this.weekdayBehavior=1)}},relativeTextWeek:{regex:new RegExp("^(next|last|previous|this)[ \\t]+week","i"),name:"relativetextweek",callback(e,t){switch(this.weekdayBehavior=2,t.toLowerCase()){case"this":this.rd+=0;break;case"next":this.rd+=7;break;case"last":case"previous":this.rd-=7}isNaN(this.weekday)&&(this.weekday=1)}},monthFullOrMonthAbbr:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)","i"),name:"monthfull | monthabbr",callback(e,t){return this.ymd(this.y,r(t),this.d)}},tzCorrection:{regex:new RegExp("^((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)","i"),name:"tzcorrection",callback(e){return this.zone(a(e))}},tzAbbr:{regex:new RegExp("^\\(?([a-zA-Z]{1,6})\\)?"),name:"tzabbr",callback(e,t){const n=o[t.toLowerCase()];return null!=n&&!Number.isNaN(n)&&this.zone(n)}},ago:{regex:/^ago/i,name:"ago",callback(){this.ry=-this.ry,this.rm=-this.rm,this.rd=-this.rd,this.rh=-this.rh,this.ri=-this.ri,this.rs=-this.rs,this.rf=-this.rf}},year4:{regex:new RegExp("^([0-9]{4})"),name:"year4",callback(e,t){return this.y=+t,!0}},whitespace:{regex:/^[ .,\t]+/,name:"whitespace"},dateShortWithTimeLong:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])","i"),name:"dateshortwithtimelong",callback(e,t,n,i,a,o){return this.ymd(this.y,r(t),+n)&&this.time(+i,+a,+o,0)}},dateShortWithTimeLong12:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*(0?[1-9]|1[0-2])[:.]([0-5]?[0-9])[:.](60|[0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"dateshortwithtimelong12",callback(e,n,i,a,o,s,l){return this.ymd(this.y,r(n),+i)&&this.time(t(+a,l),+o,+s,0)}},dateShortWithTimeShort:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])","i"),name:"dateshortwithtimeshort",callback(e,t,n,i,a){return this.ymd(this.y,r(t),+n)&&this.time(+i,+a,0,0)}},dateShortWithTimeShort12:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*(0?[1-9]|1[0-2])[:.]([0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"dateshortwithtimeshort12",callback(e,n,i,a,o,s){return this.ymd(this.y,r(n),+i)&&this.time(t(+a,s),+o,0,0)}}},l={y:NaN,m:NaN,d:NaN,h:NaN,i:NaN,s:NaN,f:NaN,ry:0,rm:0,rd:0,rh:0,ri:0,rs:0,rf:0,weekday:NaN,weekdayBehavior:0,firstOrLastDayOfMonth:0,z:NaN,dates:0,times:0,zones:0,ymd(e,t,n){return!(this.dates>0||(this.dates++,this.y=e,this.m=t,this.d=n,0))},time(e,t,n,r){return!(this.times>0||(this.times++,this.h=e,this.i=t,this.s=n,this.f=r,0))},resetTime(){return this.h=0,this.i=0,this.s=0,this.f=0,this.times=0,!0},zone(e){return this.zones<=1&&(this.zones++,this.z=e,!0)},toDate(e){switch(this.dates&&!this.times&&(this.h=this.i=this.s=this.f=0),isNaN(this.y)&&(this.y=e.getFullYear()),isNaN(this.m)&&(this.m=e.getMonth()),isNaN(this.d)&&(this.d=e.getDate()),isNaN(this.h)&&(this.h=e.getHours()),isNaN(this.i)&&(this.i=e.getMinutes()),isNaN(this.s)&&(this.s=e.getSeconds()),isNaN(this.f)&&(this.f=e.getMilliseconds()),this.firstOrLastDayOfMonth){case 1:this.d=1;break;case-1:this.d=0,this.m+=1}if(!isNaN(this.weekday)){const t=new Date(e.getTime());t.setFullYear(this.y,this.m,this.d),t.setHours(this.h,this.i,this.s,this.f);const n=t.getDay();if(2===this.weekdayBehavior)0===n&&0!==this.weekday&&(this.weekday=-6),0===this.weekday&&0!==n&&(this.weekday=7),this.d-=n,this.d+=this.weekday;else{let e=this.weekday-n;(this.rd<0&&e<0||this.rd>=0&&e<=-this.weekdayBehavior)&&(e+=7),this.weekday>=0?this.d+=e:this.d-=7-(Math.abs(this.weekday)-n),this.weekday=NaN}}this.y+=this.ry,this.m+=this.rm,this.d+=this.rd,this.h+=this.rh,this.i+=this.ri,this.s+=this.rs,this.f+=this.rf,this.ry=this.rm=this.rd=0,this.rh=this.ri=this.rs=this.rf=0;const t=new Date(e.getTime());switch(t.setFullYear(this.y,this.m,this.d),t.setHours(this.h,this.i,this.s,this.f),this.firstOrLastDayOfMonth){case 1:t.setDate(1);break;case-1:t.setMonth(t.getMonth()+1,0)}return isNaN(this.z)||t.getTimezoneOffset()===this.z||(t.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),t.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds()-this.z,t.getMilliseconds())),t}}}),vo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.date=function(e,t){let n,r=/* @__PURE__ */new Date;const i=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],a=/\\?(.?)/gi,o=function(e,t){return r=e,Object.hasOwn(n,r)?String(n[e]()):t;var r},s=function(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n};return n={d:function(){return s(n.j(),2)},D:function(){return String(n.l()).slice(0,3)},j:function(){return r.getDate()},l:function(){return(i[Number(n.w())]??"")+"day"},N:function(){return Number(n.w())||7},S:function(){const e=Number(n.j());let t=e%10;return t<=3&&1===Number.parseInt(String(e%100/10),10)&&(t=0),["st","nd","rd"][t-1]||"th"},w:function(){return r.getDay()},z:function(){const e=new Date(Number(n.Y()),Number(n.n())-1,Number(n.j())),t=new Date(Number(n.Y()),0,1);return Math.round((e.getTime()-t.getTime())/864e5)},W:function(){const e=new Date(Number(n.Y()),Number(n.n())-1,Number(n.j())-Number(n.N())+3),t=new Date(e.getFullYear(),0,4);return s(1+Math.round((e.getTime()-t.getTime())/864e5/7),2)},F:function(){return i[6+Number(n.n())]??""},m:function(){return s(n.n(),2)},M:function(){return String(n.F()).slice(0,3)},n:function(){return r.getMonth()+1},t:function(){return new Date(Number(n.Y()),Number(n.n()),0).getDate()},L:function(){const e=Number(n.Y());return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){const e=Number(n.n()),t=Number(n.W());return Number(n.Y())+(12===e&&t<9?1:1===e&&t>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return String(n.Y()).slice(-2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return String(n.a()).toUpperCase()},B:function(){const e=3600*r.getUTCHours(),t=60*r.getUTCMinutes(),n=r.getUTCSeconds();return s(Math.floor((e+t+n+3600)/86.4)%1e3,3)},g:function(){return Number(n.G())%12||12},G:function(){return r.getHours()},h:function(){return s(n.g(),2)},H:function(){return s(n.G(),2)},i:function(){return s(r.getMinutes(),2)},s:function(){return s(r.getSeconds(),2)},u:function(){return s(1e3*r.getMilliseconds(),6)},e:function(){throw new Error("Not supported (see source code of date() for timezone on how to add support)")},I:function(){const e=new Date(Number(n.Y()),0),t=Date.UTC(Number(n.Y()),0),r=new Date(Number(n.Y()),6),i=Date.UTC(Number(n.Y()),6);return e.getTime()-t!==r.getTime()-i?1:0},O:function(){const e=r.getTimezoneOffset(),t=Math.abs(e);return(e>0?"-":"+")+s(100*Math.floor(t/60)+t%60,4)},P:function(){const e=String(n.O());return e.slice(0,3)+":"+e.slice(3,5)},T:function(){return"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(a,o)},r:function(){return"D, d M Y H:i:s O".replace(a,o)},U:function(){return r.getTime()/1e3|0}},l=e,r=void 0===(c=t)?/* @__PURE__ */new Date:c instanceof Date?new Date(c):/* @__PURE__ */new Date(1e3*Number(c)),l.replace(a,o);var l,c}}),xo=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolval=function(e){return!1!==e&&0!==e&&0!==e&&""!==e&&"0"!==e&&(!Array.isArray(e)||0!==e.length)&&null!=e}}),wo=/* @__PURE__ */F((e,t)=>{t.exports=function(e){const{sprintf:t}=lo(),{vsprintf:n}=co(),{strip_tags:r}=po(),{round:i}=mo(),{min:a}=go(),{max:o}=yo(),{strtotime:s}=bo(),{date:l}=vo(),{boolval:c}=xo();return e.lib={},e.lib.sprintf=t,e.lib.vsprintf=n,e.lib.round=i,e.lib.max=o,e.lib.min=a,e.lib.stripTags=r,e.lib.strtotime=s,e.lib.date=l,e.lib.boolval=c,e.lib.is=function(e,t){if(null==t)return!1;switch(e){case"Array":return Array.isArray(t);case"Date":return t instanceof Date;case"String":return"string"==typeof t||t instanceof String;case"Number":return"number"==typeof t||t instanceof Number;case"Function":return"function"==typeof t;case"Object":return t instanceof Object;default:return!1}},e.lib.replaceAll=function(e,t,n){const r="string"==typeof e?e:e.toString(),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return r.replace(new RegExp(i,"g"),n)},e.lib.chunkArray=function(e,t){const n=[];let r=0;const i=e.length;if(t<1||!Array.isArray(e))return[];for(;r<i;)n.push(e.slice(r,r+=t));return n},e}}),ko=/* @__PURE__ */F((e,t)=>{t.exports=function(e){e.Templates.registerLoader("ajax",function(t,n,r,i){let a;const{precompiled:o}=n,s=this.parsers[n.parser]||this.parser.twig;if("undefined"==typeof XMLHttpRequest)throw new e.Error('Unsupported platform: Unable to do ajax requests because there is no "XMLHTTPRequest" implementation');const l=new XMLHttpRequest;return l.onreadystatechange=function(){let c=null;4===l.readyState&&(200===l.status||window.cordova&&0===l.status?(e.log.debug("Got template ",l.responseText),c=!0===o?JSON.parse(l.responseText):l.responseText,n.url=t,n.data=c,a=s.call(this,n),"function"==typeof r&&r(a)):"function"==typeof i&&i(l))},l.open("GET",t,Boolean(n.async)),l.overrideMimeType("text/plain"),l.send(),!!n.async||a})}}),So=/* @__PURE__ */F((e,t)=>{t.exports={}}),To=/* @__PURE__ */F((e,t)=>{t.exports=function(e){let t,n;try{t=So(),n=So()}catch(r){}e.Templates.registerLoader("fs",function(i,a,o,s){let l,c=null;const{precompiled:u}=a,d=this.parsers[a.parser]||this.parser.twig;if(!t||!n)throw new e.Error('Unsupported platform: Unable to load from file because there is no "fs" or "path" implementation');const p=function(e,t){e?"function"==typeof s&&s(e):(!0===u&&(t=JSON.parse(t)),a.data=t,a.path=a.path||i,l=d.call(this,a),"function"==typeof o&&o(l))};if(a.path=a.path||i,a.async)return t.stat(a.path,(n,r)=>{!n&&r.isFile()?t.readFile(a.path,"utf8",p):"function"==typeof s&&s(new e.Error("Unable to find template file "+a.path))}),!0;try{if(!t.statSync(a.path).isFile())throw new e.Error("Unable to find template file "+a.path)}catch(r){throw new e.Error("Unable to find template file "+a.path+". "+r)}return c=t.readFileSync(a.path,"utf8"),p(void 0,c),l})}}),No=/* @__PURE__ */F((e,t)=>{t.exports=function(e){for(e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",apply:"Twig.logic.type.apply",endapply:"Twig.logic.type.endapply",do:"Twig.logic.type.do",shortblock:"Twig.logic.type.shortblock",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from",embed:"Twig.logic.type.embed",endembed:"Twig.logic.type.endembed",with:"Twig.logic.type.with",endwith:"Twig.logic.type.endwith",deprecated:"Twig.logic.type.deprecated"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s?([\s\S]+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile(t){const n=t.match[1];return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(a=>(r=!0,e.lib.boolval(a)?(r=!1,i.parseAsync(t.output,n)):"")).then(e=>({chain:r,output:e}))}},{type:e.logic.type.elseif,regex:/^elseif\s*([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile(t){const n=t.match[1];return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(a=>r&&e.lib.boolval(a)?(r=!1,i.parseAsync(t.output,n)):"").then(e=>({chain:r,output:e}))}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse(t,n,r){let i=e.Promise.resolve("");return r&&(i=this.parseAsync(t.output,n)),i.then(e=>({chain:r,output:e}))}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([\S\s]+?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile(t){const n=t.match[1],r=t.match[2],i=t.match[3];let a=null;if(t.keyVar=null,t.valueVar=null,n.includes(",")){if(a=n.split(","),2!==a.length)throw new e.Error("Invalid expression in for loop: "+n);t.keyVar=a[0].trim(),t.valueVar=a[1].trim()}else t.valueVar=n.trim();return t.expression=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,i&&(t.conditional=e.expression.compile.call(this,{type:e.expression.type.expression,value:i}).stack),delete t.match,t},parse(t,n,r){const i=[];let a,o,s=0;const l=this,{conditional:c}=t,u=function(r,o){const u={...n};return u[t.valueVar]=o,t.keyVar&&(u[t.keyVar]=r),u.loop=function(e,t){const r=void 0!==c;return{index:e+1,index0:e,revindex:r?void 0:t-e,revindex0:r?void 0:t-e-1,first:0===e,last:r?void 0:e===t-1,length:r?void 0:t,parent:n}}(s,a),(void 0===c?e.Promise.resolve(!0):e.expression.parseAsync.call(l,c,u)).then(e=>{if(e)return l.parseAsync(t.output,u).then(e=>{i.push(e),s+=1})}).then(()=>{delete u.loop,delete u[t.valueVar],delete u[t.keyVar],e.merge(n,u,!0)})};return e.expression.parseAsync.call(l,t.expression,n).then(t=>Array.isArray(t)?(a=t.length,e.async.forEach(t,e=>u(s,e))):e.lib.is("Object",t)?(o=void 0===t._keys?Object.keys(t):t._keys,a=o.length,e.async.forEach(o,e=>{if("_keys"!==e)return u(e,t[e])})):void 0).then(()=>({chain:0===i.length,context:n,output:e.output.call(l.template,i)}))}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack;return t.key=n,t.expression=i,delete t.match,t},parse(t,n,r){const{key:i}=t;return e.expression.parseAsync.call(this,t.expression,n).then(e=>(e===n&&(e={...e}),n[i]=e,{chain:r,context:n}))}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:e=>(e.key=e.match[1].trim(),delete e.match,e),parse(e,t,n){const r=this,{key:i}=e;return r.parseAsync(e.output,t).then(e=>(r.context[i]=e,t[i]=e,{chain:n,context:t}))}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile(t){const n="|"+t.match[1].trim();return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return i.parseAsync(t.output,n).then(r=>{const a=[{type:e.expression.type.string,value:r}].concat(t.stack);return e.expression.parseAsync.call(i,a,n)}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.apply,regex:/^apply\s+(.+)$/,next:[e.logic.type.endapply],open:!0,compile(t){const n="|"+t.match[1].trim();return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return i.parseAsync(t.output,n).then(r=>{const a=[{type:e.expression.type.string,value:r}].concat(t.stack);return e.expression.parseAsync.call(i,a,n)}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endapply,regex:/^endapply$/,next:[],open:!1},{type:e.logic.type.do,regex:/^do\s+([\S\s]+)$/,next:[],open:!0,compile(t){const n=t.match[1];return t.expression=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){return e.expression.parseAsync.call(this,t.expression,n).then(()=>({chain:r,context:n}))}},{type:e.logic.type.block,regex:/^block\s+(\w+)$/,next:[e.logic.type.endblock],open:!0,compile:e=>(e.blockName=e.match[1].trim(),delete e.match,e),parse(t,n,r){const i=this;let a=e.Promise.resolve();return i.template.blocks.defined[t.blockName]=new e.Block(i.template,t),(null===i.template.parentTemplate||i.template.parentTemplate instanceof e.Template)&&(a=i.getBlock(t.blockName).render(i,n)),a.then(e=>({chain:r,output:e}))}},{type:e.logic.type.shortblock,regex:/^block\s+(\w+)\s+(.+)$/,next:[],open:!0,compile(t){return t.expression=t.match[2].trim(),t.output=e.expression.compile({type:e.expression.type.expression,value:t.expression}).stack,e.logic.handler[e.logic.type.block].compile.apply(this,[t])},parse(...t){return e.logic.handler[e.logic.type.block].parse.apply(this,t)}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+(\w+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(e=>{if(Array.isArray(e)){const t=e.reverse().reduce((e,t)=>{try{return{render:i.template.importFile(t),fileName:t}}catch(n){return e}},{render:null,fileName:null});null!==t.fileName&&(i.template.parentTemplate=t.fileName)}else i.template.parentTemplate=e;return{chain:r,output:""}})}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(t=>{const n=i.template.importFile(t),r=new e.ParseState(n);return r.parseAsync(n.tokens).then(()=>{i.template.blocks.imported={...i.template.blocks.imported,...r.getBlocks()}})}).then(()=>({chain:r,output:""}))}},{type:e.logic.type.include,regex:/^include\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,next:[],open:!0,compile(t){const{match:n}=t,r=n[1].trim(),i=void 0!==n[2],a=n[3],o=void 0!==n[4]&&n[4].length;return delete t.match,t.only=o,t.ignoreMissing=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,void 0!==a&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:a.trim()}).stack),t},parse(t,n,r){let i=t.only?{}:{...n};const{ignoreMissing:a}=t,o=this;let s=null;const l={chain:r,output:""};return s=void 0===t.withStack?e.Promise.resolve():e.expression.parseAsync.call(o,t.withStack,n).then(e=>{i={...i,...e}}),s.then(()=>e.expression.parseAsync.call(o,t.stack,n)).then(t=>{let n;n=Array.isArray(t)?t:[t];const r=n.reduce((t,n)=>{if(null===t.render){if(n instanceof e.Template)return{render:n.renderAsync(i,{isInclude:!0}),lastError:null};try{return{render:o.template.importFile(n).renderAsync(i,{isInclude:!0}),lastError:null}}catch(r){return{render:null,lastError:r}}}return t},{render:null,lastError:null});if(null!==r.render)return r.render;if(null===r.render&&a)return"";throw r.lastError}).then(e=>(""!==e&&(l.output=e),l))}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse(t,n,r){return this.parseAsync(t.output,n).then(t=>{let n=t.replace(/>\s+</g,"><").trim();return n=new e.Markup(n),{chain:r,output:n}})}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+(\w+)\s*\(\s*((?:\w+(?:\s*=\s*([\s\S]+))?(?:,\s*)?)*)\s*\)$/,next:[e.logic.type.endmacro],open:!0,compile(t){const n=t.match[1],r=t.match[2].split(/\s*,\s*/),i=r.map(e=>e.split(/\s*=\s*/)[0]),a=i.length;if(a>1){const t={};for(let n=0;n<a;n++){const r=i[n];if(t[r])throw new e.Error("Duplicate arguments for parameter: "+r);t[r]=1}}return t.macroName=n,t.parameters=i,t.defaults=r.reduce(function(t,n){const r=n.split(/\s*=\s*/),i=r[0],a=r[1];return t[i]=a?e.expression.compile.call(this,{type:e.expression.type.expression,value:a}).stack:void 0,t},{}),delete t.match,t},parse(t,n,r){const i=this;return i.macros[t.macroName]=function(...r){const a={...i.context,_self:i.macros};return e.async.forEach(t.parameters,function(i,o){return void 0!==r[o]?(a[i]=r[o],!0):void 0!==t.defaults[i]?e.expression.parseAsync.call(this,t.defaults[i],n).then(t=>(a[i]=t,e.Promise.resolve())):(a[i]=void 0,!0)}).then(()=>i.parseAsync(t.output,a))},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+(\w+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this,a={chain:r,output:""};return"_self"===t.expression?(n[t.contextName]=i.macros,a):e.expression.parseAsync.call(i,t.stack,n).then(e=>i.template.importFile(e||t.expression)).then(r=>{const i=new e.ParseState(r);return i.parseAsync(r.tokens).then(()=>(n[t.contextName]=i.macros,a))})}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2].trim().split(/\s*,\s*/),i={};for(const e of r){const t=e.match(/^(\w+)\s+as\s+(\w+)$/);t?i[t[1].trim()]=t[2].trim():e.match(/^(\w+)$/)&&(i[e]=e)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;let a;return a="_self"===t.expression?e.Promise.resolve(i.macros):e.expression.parseAsync.call(i,t.stack,n).then(e=>i.template.importFile(e||t.expression)).then(t=>{const n=new e.ParseState(t);return n.parseAsync(t.tokens).then(()=>n.macros)}),a.then(e=>{for(const r in t.macroNames)void 0!==e[r]&&(n[t.macroNames[r]]=e[r]);return{chain:r,output:""}})}},{type:e.logic.type.embed,regex:/^embed\s+(.+?)(?:\s+(ignore missing))?(?:\s+with\s+([\S\s]+?))?(?:\s+(only))?$/,next:[e.logic.type.endembed],open:!0,compile(t){const{match:n}=t,r=n[1].trim(),i=void 0!==n[2],a=n[3],o=void 0!==n[4]&&n[4].length;return delete t.match,t.only=o,t.ignoreMissing=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,void 0!==a&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:a.trim()}).stack),t},parse(t,n,r){let i={},a=e.Promise.resolve(),o=this;return t.only||(i={...n}),void 0!==t.withStack&&(a=e.expression.parseAsync.call(o,t.withStack,n).then(e=>{i={...i,...e}})),a.then(()=>e.expression.parseAsync.call(o,t.stack,i)).then(n=>{const r=new e.Template({data:t.output,base:o.template.base,path:o.template.path,url:o.template.url,name:o.template.name,method:o.template.method,options:o.template.options});try{r.importFile(n)}catch(a){if(t.ignoreMissing)return"";throw o=null,a}return r.parentTemplate=n,r.renderAsync(i,{isInclude:!0})}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endembed,regex:/^endembed$/,next:[],open:!1},{type:e.logic.type.with,regex:/^(?:with(?:\s+([\S\s]+?))?)(?:\s|$)(only)?$/,next:[e.logic.type.endwith],open:!0,compile(t){const{match:n}=t,r=n[1],i=void 0!==n[2]&&n[2].length;return delete t.match,t.only=i,void 0!==r&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r.trim()}).stack),t},parse(t,n,r){let i,a={},o=e.Promise.resolve();t.only||(a={...n}),void 0!==t.withStack&&(o=e.expression.parseAsync.call(this,t.withStack,n).then(e=>{for(i in e)Object.hasOwnProperty.call(e,i)&&(a[i]=e[i])}));const s=new e.ParseState(this.template,void 0,a);return o.then(()=>s.parseAsync(t.output)).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endwith,regex:/^endwith$/,next:[],open:!1},{type:e.logic.type.deprecated,regex:/^deprecated\s+(.+)$/,next:[],open:!0,compile:e=>e,parse:()=>({})}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.logic.extendType(t.type),e.logic.handler[t.type]=t};e.logic.definitions.length>0;)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){const n=t.value.trim();let r=e.logic.tokenize.call(this,n);const i=e.logic.handler[r.type];return i.compile&&(r=i.compile.call(this,r),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){let n=null,r=null,i=null,a=null,o=null,s=null,l=null;for(n in t=t.trim(),e.logic.handler)if(Object.hasOwnProperty.call(e.logic.handler,n))for(r=e.logic.handler[n].type,i=e.logic.handler[n].regex,a=i,Array.isArray(i)||(a=[i]),o=a.length,s=0;s<o;s++)if(l=a[s].exec(t),null!==l)return e.log.trace("Twig.logic.tokenize: ","Matched a ",r," regular expression of ",l),{type:r,match:l};throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r,i){return e.async.potentiallyAsync(this,i,function(){e.log.debug("Twig.logic.parse: ","Parsing logic token ",t);const i=e.logic.handler[t.type];let a;const o=this;return i.parse?(o.nestingStack.unshift(t),a=i.parse.call(o,t,n||{},r),e.isPromise(a)?a=a.then(e=>(o.nestingStack.shift(),e)):o.nestingStack.shift(),a):""})},e}}),Co=/* @__PURE__ */F((e,t)=>{t.exports=function(e){e.Templates.registerParser("source",e=>e.data||"")}}),Eo=/* @__PURE__ */F((e,t)=>{t.exports=function(e){e.Templates.registerParser("twig",t=>new e.Template(t))}}),_o=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.path={},e.path.expandNamespace=function(e,t){const n=Object.keys(e),r=new RegExp(`^(?:@(${n.join("|")})/|(${n.join("|")})::)`);return t.replace(r,(t,n,r)=>`${e[void 0===n?r:n]}/`)},e.path.parsePath=function(t,n){const{namespaces:r}=t.options,i=n||"";let a=r&&"object"==typeof r?e.path.expandNamespace(r,i):i;return a===i&&(a=e.path.relativePath(t,i)),a},e.path.relativePath=function(t,n){let r,i,a="/";const o=[];let s,l=n||"";if(t.url)r=void 0===t.base?t.url:t.base.replace(/([^/])$/,"$1/");else if(t.path){const e=So(),n=e.sep||a,i=new RegExp("^\\.{1,2}"+n.replace("\\","\\\\"));l=l.replace(/\//g,n),void 0!==t.base&&null===l.match(i)?(l=l.replace(t.base,""),r=t.base+n):r=e.normalize(t.path),r=r.replace(n+n,n),a=n}else{if(!t.name&&!t.id||!t.method||"fs"===t.method||"ajax"===t.method)throw new e.Error("Cannot extend an inline template.");r=t.base||t.name||t.id}for(i=r.split(a),i.pop(),i=i.concat(l.split(a));i.length>0;)s=i.shift(),"."===s||(".."===s&&o.length>0&&".."!==o[o.length-1]?o.pop():o.push(s));return o.join(a)},e}}),Oo=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.tests={empty(e){if(!0===e)return!1;if(null==e)return!0;if("number"==typeof e)return!1;if(e.length>0)return!1;for(const t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0},odd:e=>e%2==1,even:e=>e%2==0,"divisible by":(e,t)=>e%t[0]===0,divisibleby:(t,n)=>e.tests["divisible by"](t,n),defined:e=>void 0!==e,none:e=>null===e,null(e){return this.none(e)},"same as":(e,t)=>e===t[0],sameas:(t,n)=>e.tests["same as"](t,n),iterable:t=>t&&(e.lib.is("Array",t)||e.lib.is("Object",t))},e.test=function(t,n,r){if(!e.tests[t])throw e.Error("Test "+t+" is not defined.");return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}}),Ao=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.ParseState.prototype.parseAsync=function(e,t){return this.parse(e,t,!0)},e.expression.parseAsync=function(t,n,r){return e.expression.parse.call(this,t,n,r,!0)},e.logic.parseAsync=function(t,n,r){return e.logic.parse.call(this,t,n,r,!0)},e.Template.prototype.renderAsync=function(e,t){return this.render(e,t,!0)},e.async={},e.isPromise=function(e){return e&&e.then&&"function"==typeof e.then},e.async.potentiallyAsync=function(t,n,r){return n?e.Promise.resolve(r.call(t)):function(t,n,r){let i=r.call(t),a=null,o=!0;if(!e.isPromise(i))return i;if(i.then(e=>{i=e,o=!1}).catch(e=>{a=e}),null!==a)throw a;if(o)throw new e.Error("You are using Twig.js in sync mode in combination with async extensions.");return i}(t,0,r)},e.Thenable=function(e,t,n){this.then=e,this._value=n?t:null,this._state=n||0},e.Thenable.prototype.catch=function(e){return 1===this._state?this:this.then(null,e)},e.Thenable.resolvedThen=function(t){try{return e.Promise.resolve(t(this._value))}catch(n){return e.Promise.reject(n)}},e.Thenable.rejectedThen=function(t,n){if(!n||"function"!=typeof n)return this;const r=this._value;let i;try{i=n(r)}catch(a){i=e.Promise.reject(a)}return e.Promise.resolve(i)},e.Promise=function(t){let n=0,r=null,i=function(e,t){n=e,r=t};return function(e,t,n){try{e(function(e){i(1,e)},n)}catch(r){n(r)}}(t,0,function(e){i(2,e)}),1===n?e.Promise.resolve(r):2===n?e.Promise.reject(r):(i=new e.FullPromise,i.promise)},e.FullPromise=function(){let t=null;function n(e){e(o._value)}function r(e,t){t(o._value)}let i=function(e,n){t=function(e,t,n){const r=[t,n,-2];return e?-2===e[2]?e=[e,r]:e.push(r):e=r,e}(t,e,n)};function a(e,a){if(!o._state&&(o._value=a,o._state=e,i=1===e?n:r,t)){if(-2===t[2])return i(t[0],t[1]),void(t=null);t.forEach(e=>{i(e[0],e[1])}),t=null}}const o=new e.Thenable((t,n)=>{const r="function"==typeof t;if(1===o._state&&!r)return e.Promise.resolve(o._value);if(1===o._state)try{return e.Promise.resolve(t(o._value))}catch(s){return e.Promise.reject(s)}const a="function"==typeof n;return new e.Promise((e,o)=>{i(r?n=>{try{e(t(n))}catch(s){o(s)}}:e,a?t=>{try{e(n(t))}catch(s){o(s)}}:o)})});return a.promise=o,a},e.Promise.defaultResolved=new e.Thenable(e.Thenable.resolvedThen,void 0,1),e.Promise.emptyStringResolved=new e.Thenable(e.Thenable.resolvedThen,"",1),e.Promise.resolve=function(t){return 0===arguments.length||void 0===t?e.Promise.defaultResolved:e.isPromise(t)?t:""===t?e.Promise.emptyStringResolved:new e.Thenable(e.Thenable.resolvedThen,t,1)},e.Promise.reject=function(t){return new e.Thenable(e.Thenable.rejectedThen,t,2)},e.Promise.all=function(t){const n=new Array(t.length);return e.async.forEach(t,(t,r)=>{if(e.isPromise(t)){if(1!==t._state)return t.then(e=>{n[r]=e});n[r]=t._value}else n[r]=t}).then(()=>n)},e.async.forEach=function(t,n){const r=t?t.length:0;let i=0;return function a(){let o=null;do{if(i===r)return e.Promise.resolve();o=n(t[i],i),i++}while(!o||!e.isPromise(o)||1===o._state);return o.then(a)}()},e}}),Io=/* @__PURE__ */F((e,t)=>{t.exports=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(t){const{id:n}=t,r={strictVariables:t.strict_variables||!1,autoescape:null!==t.autoescape&&t.autoescape||!1,allowInlineIncludes:t.allowInlineIncludes||!1,rethrow:t.rethrow||!1,namespaces:t.namespaces};if(e.cache&&n&&e.validateId(n),void 0!==t.debug&&(e.debug=t.debug),void 0!==t.trace&&(e.trace=t.trace),void 0!==t.data)return e.Templates.parsers.twig({data:t.data,path:Object.hasOwnProperty.call(t,"path")?t.path:void 0,module:t.module,id:n,options:r});if(void 0!==t.ref){if(void 0!==t.id)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(t.ref)}if(void 0!==t.method){if(!e.Templates.isRegisteredLoader(t.method))throw new e.Error('Loader for "'+t.method+'" is not defined.');return e.Templates.loadRemote(t.name||t.href||t.path||n||void 0,{id:n,method:t.method,parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error)}return void 0!==t.href?e.Templates.loadRemote(t.href,{id:n,method:"ajax",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error):void 0!==t.path?e.Templates.loadRemote(t.path,{id:n,method:"fs",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error):void 0},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){const r=n.filename,i=n.filename,a=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]});return function(e){return a.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={});const i=(n=n||{}).settings||{},a=i["twig options"],o={path:t,base:i.views,load(e){a&&a.allowAsync?e.renderAsync(n).then(e=>r(null,e),r):r(null,String(e.render(n)))},error(e){r(e)}};if(a)for(const e in a)Object.hasOwnProperty.call(a,e)&&(o[e]=a[e]);e.exports.twig(o)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e.exports.path=e.path,e.exports.filters=e.filters,e.exports.tests=e.tests,e.exports.functions=e.functions,e.exports.Promise=e.Promise,e}}),Do=/* @__PURE__ */F((e,t)=>{t.exports=function e(){const t={VERSION:"3.0.0"};return no()(t),ro()(t),ao()(t),oo()(t),so()(t),wo()(t),ko()(t),To()(t),No()(t),Co()(t),Eo()(t),_o()(t),Oo()(t),Ao()(t),Io()(t),t.exports.factory=e,t.exports}}),Po=/* @__PURE__ */q(/* @__PURE__ */F((e,t)=>{t.exports=Do()()})(),1);Po.default.extendFilter("object_as_json",e=>"object"==typeof e?JSON.stringify(e):e);var Mo="{{\\s*(?<token>[a-zA-Z_][a-zA-Z0-9_]*(?:\\??\\.[a-zA-Z_][a-zA-Z0-9_]*)*)[^}]*}}",Ro=new RegExp(Mo,"g"),jo=RegExp(`^${Mo}$`),zo=(e,t=!1)=>{if("string"!=typeof e)return!1;let n=t?jo:Ro;return n.lastIndex=0,n.test(e.trim())},Lo=(e,t={},n=!1,r=!1)=>{if("string"!=typeof e||!zo(e))return e;try{Ro.lastIndex=0;let i=e;n&&[...i.matchAll(Ro)].forEach(e=>{e.groups&&(i=i.replace(e[0],`{{ ${e.groups.token} | default('${e[0]}') }}`))}),r&&[...i.matchAll(Ro)].forEach(e=>{e.groups&&(i=i.replace(e[0],`{{ ${e.groups.token} | object_as_json }}`))}),"variables"in t&&(t={...t,...t.variables});let a=Po.default.twig({data:i}).render(t);if(!r)return a;try{return JSON.parse(a)||a}catch{return a}}catch{return e}};function Fo(e,t){if(!Boolean(e))throw new Error(t)}function $o(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var qo=/\r\n|[\n\r]/g;function Bo(e,t){let n=0,r=1;for(const i of e.body.matchAll(qo)){if("number"==typeof i.index||$o(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Vo(e){return Uo(e.source,Bo(e.source,e.start))}function Uo(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=`${e.name}:${o}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+Ho([[`${o} |`,n[0]],...n.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+Ho([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,u[i+1]]])}function Ho(e){const t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}var Wo=class e extends Error{constructor(t,...n){var r,i,a;const{nodes:o,source:s,positions:l,path:c,originalError:u,extensions:d}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(n);super(t),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=u?u:void 0,this.nodes=Yo(Array.isArray(o)?o:o?[o]:void 0);const p=Yo(null===(r=this.nodes)||void 0===r?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==p||null===(i=p[0])||void 0===i?void 0:i.source,this.positions=null!=l?l:null==p?void 0:p.map(e=>e.start),this.locations=l&&s?l.map(e=>Bo(s,e)):null==p?void 0:p.map(e=>Bo(e.source,e.start));const f="object"==typeof(h=null==u?void 0:u.extensions)&&null!==h?null==u?void 0:u.extensions:void 0;var h;this.extensions=null!==(a=null!=d?d:f)&&void 0!==a?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+Vo(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Uo(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Yo(e){return void 0===e||0===e.length?void 0:e}function Go(e,t,n){return new Wo(`Syntax Error: ${n}`,{source:e,positions:[t]})}var Qo,Jo,Ko,Xo,Zo=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},es=class{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ts={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},ns=new Set(Object.keys(ts));function rs(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&ns.has(t)}function is(e){return 9===e||32===e}function as(e){return e>=48&&e<=57}function os(e){return e>=97&&e<=122||e>=65&&e<=90}function ss(e){return os(e)||95===e}function ls(e){return os(e)||as(e)||95===e}function cs(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var a;const t=e[o],s=us(t);s!==t.length&&(r=null!==(a=r)&&void 0!==a?a:o,i=o,0!==o&&s<n&&(n=s))}return e.map((e,t)=>0===t?e:e.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function us(e){let t=0;for(;t<e.length&&is(e.charCodeAt(t));)++t;return t}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Qo||(Qo={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION"}(Jo||(Jo={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"}(Ko||(Ko={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(Xo||(Xo={}));var ds=class{constructor(e){const t=new es(Xo.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Xo.EOF)do{if(e.next)e=e.next;else{const t=bs(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Xo.COMMENT);return e}};function ps(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function fs(e,t){return hs(e.charCodeAt(t))&&ms(e.charCodeAt(t+1))}function hs(e){return e>=55296&&e<=56319}function ms(e){return e>=56320&&e<=57343}function gs(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return Xo.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ys(e,t,n,r,i){const a=e.line;return new es(t,n,r,a,1+n-e.lineStart,i)}function bs(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return vs(e,i);case 33:return ys(e,Xo.BANG,i,i+1);case 36:return ys(e,Xo.DOLLAR,i,i+1);case 38:return ys(e,Xo.AMP,i,i+1);case 40:return ys(e,Xo.PAREN_L,i,i+1);case 41:return ys(e,Xo.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return ys(e,Xo.SPREAD,i,i+3);break;case 58:return ys(e,Xo.COLON,i,i+1);case 61:return ys(e,Xo.EQUALS,i,i+1);case 64:return ys(e,Xo.AT,i,i+1);case 91:return ys(e,Xo.BRACKET_L,i,i+1);case 93:return ys(e,Xo.BRACKET_R,i,i+1);case 123:return ys(e,Xo.BRACE_L,i,i+1);case 124:return ys(e,Xo.PIPE,i,i+1);case 125:return ys(e,Xo.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?_s(e,i):ks(e,i)}if(as(t)||45===t)return xs(e,i,t);if(ss(t))return Os(e,i);throw Go(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":ps(t)||fs(n,i)?`Unexpected character: ${gs(e,i)}.`:`Invalid character: ${gs(e,i)}.`)}return ys(e,Xo.EOF,r,r)}function vs(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(ps(e))++i;else{if(!fs(n,i))break;i+=2}}return ys(e,Xo.COMMENT,t,i,n.slice(t+1,i))}function xs(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(45===a&&(a=r.charCodeAt(++i)),48===a){if(a=r.charCodeAt(++i),as(a))throw Go(e.source,i,`Invalid number, unexpected digit after 0: ${gs(e,i)}.`)}else i=ws(e,i,a),a=r.charCodeAt(i);if(46===a&&(o=!0,a=r.charCodeAt(++i),i=ws(e,i,a),a=r.charCodeAt(i)),69!==a&&101!==a||(o=!0,a=r.charCodeAt(++i),43!==a&&45!==a||(a=r.charCodeAt(++i)),i=ws(e,i,a),a=r.charCodeAt(i)),46===a||ss(a))throw Go(e.source,i,`Invalid number, expected digit but got: ${gs(e,i)}.`);return ys(e,o?Xo.FLOAT:Xo.INT,t,i,r.slice(t,i))}function ws(e,t,n){if(!as(n))throw Go(e.source,t,`Invalid number, expected digit but got: ${gs(e,t)}.`);const r=e.source.body;let i=t+1;for(;as(r.charCodeAt(i));)++i;return i}function ks(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(a,i),ys(e,Xo.STRING,t,i+1,o);if(92===r){o+=n.slice(a,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Ss(e,i):Ts(e,i):Es(e,i);o+=t.value,i+=t.size,a=i;continue}if(10===r||13===r)break;if(ps(r))++i;else{if(!fs(n,i))throw Go(e.source,i,`Invalid character within String: ${gs(e,i)}.`);i+=2}}throw Go(e.source,i,"Unterminated string.")}function Ss(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!ps(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Cs(e),r<0)break}throw Go(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ts(e,t){const n=e.source.body,r=Ns(n,t+2);if(ps(r))return{value:String.fromCodePoint(r),size:6};if(hs(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=Ns(n,t+8);if(ms(e))return{value:String.fromCodePoint(r,e),size:12}}throw Go(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ns(e,t){return Cs(e.charCodeAt(t))<<12|Cs(e.charCodeAt(t+1))<<8|Cs(e.charCodeAt(t+2))<<4|Cs(e.charCodeAt(t+3))}function Cs(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Es(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Go(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function _s(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,o=a,s="";const l=[];for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);const r=ys(e,Xo.BLOCK_STRING,t,a+3,cs(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(ps(r))++a;else{if(!fs(n,a))throw Go(e.source,a,`Invalid character within String: ${gs(e,a)}.`);a+=2}else s+=n.slice(o,a),l.push(s),13===r&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,i=a;else s+=n.slice(o,a),o=a+1,a+=4}throw Go(e.source,a,"Unterminated string.")}function Os(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&ls(n.charCodeAt(i));)++i;return ys(e,Xo.NAME,t,i,n.slice(t,i))}function As(e){return Is(e,[])}function Is(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Is(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Is(e[a],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+n.map(([e,n])=>e+": "+Is(n,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var Ds=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;const r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){const t=As(e);throw new Error(`Cannot use ${r} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1},Ps=class{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Fo(!1,`Body must be a string. Received: ${As(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Fo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Fo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}},Ms=class{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const t=function(e){return Ds(e,Ps)}(e)?e:new Ps(e);this._lexer=new ds(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Xo.NAME);return this.node(e,{kind:Ko.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ko.DOCUMENT,definitions:this.many(Xo.SOF,this.parseDefinition,Xo.EOF)})}parseDefinition(){if(this.peek(Xo.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===Xo.BRACE_L)throw Go(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===Xo.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw Go(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Xo.BRACE_L))return this.node(e,{kind:Ko.OPERATION_DEFINITION,operation:Qo.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let r;return this.peek(Xo.NAME)&&(r=this.parseName()),this.node(e,{kind:Ko.OPERATION_DEFINITION,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Xo.NAME);switch(e.value){case"query":return Qo.QUERY;case"mutation":return Qo.MUTATION;case"subscription":return Qo.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Xo.PAREN_L,this.parseVariableDefinition,Xo.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ko.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(Xo.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Xo.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Xo.DOLLAR),this.node(e,{kind:Ko.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ko.SELECTION_SET,selections:this.many(Xo.BRACE_L,this.parseSelection,Xo.BRACE_R)})}parseSelection(){return this.peek(Xo.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Xo.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:Ko.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Xo.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Xo.PAREN_L,t,Xo.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Xo.COLON),this.node(t,{kind:Ko.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Xo.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Xo.NAME)?this.node(e,{kind:Ko.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ko.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:Ko.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Ko.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Xo.BRACKET_L:return this.parseList(e);case Xo.BRACE_L:return this.parseObject(e);case Xo.INT:return this.advanceLexer(),this.node(t,{kind:Ko.INT,value:t.value});case Xo.FLOAT:return this.advanceLexer(),this.node(t,{kind:Ko.FLOAT,value:t.value});case Xo.STRING:case Xo.BLOCK_STRING:return this.parseStringLiteral();case Xo.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:Ko.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Ko.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Ko.NULL});default:return this.node(t,{kind:Ko.ENUM,value:t.value})}case Xo.DOLLAR:if(e){if(this.expectToken(Xo.DOLLAR),this._lexer.token.kind===Xo.NAME){const e=this._lexer.token.value;throw Go(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Ko.STRING,value:e.value,block:e.kind===Xo.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Ko.LIST,values:this.any(Xo.BRACKET_L,()=>this.parseValueLiteral(e),Xo.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Ko.OBJECT,fields:this.any(Xo.BRACE_L,()=>this.parseObjectField(e),Xo.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Xo.COLON),this.node(t,{kind:Ko.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Xo.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Xo.AT),this.node(t,{kind:Ko.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Xo.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Xo.BRACKET_R),t=this.node(e,{kind:Ko.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Xo.BANG)?this.node(e,{kind:Ko.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Ko.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Xo.STRING)||this.peek(Xo.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(Xo.BRACE_L,this.parseOperationTypeDefinition,Xo.BRACE_R);return this.node(e,{kind:Ko.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Xo.COLON);const n=this.parseNamedType();return this.node(e,{kind:Ko.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ko.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:Ko.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Xo.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseFieldDefinition,Xo.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Xo.COLON);const i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:Ko.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(Xo.PAREN_L,this.parseInputValueDef,Xo.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Xo.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(Xo.EQUALS)&&(i=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:Ko.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:Ko.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Ko.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Xo.EQUALS)?this.delimitedMany(Xo.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Ko.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseEnumValueDefinition,Xo.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ko.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Go(this._lexer.source,this._lexer.token.start,`${Rs(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Ko.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseInputValueDef,Xo.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Xo.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Xo.BRACE_L,this.parseOperationTypeDefinition,Xo.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ko.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ko.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinitionExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(Xo.AT);const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.DIRECTIVE_EXTENSION,name:t,directives:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Xo.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ko.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,directives:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Xo.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Jo,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(Xo.AT),n=this.parseName();let r,i;return!t&&this.expectOptionalToken(Xo.DOT)&&(r=this.parseName()),(t||r)&&this.expectOptionalToken(Xo.PAREN_L)&&(i=this.parseName(),this.expectToken(Xo.COLON),this.expectToken(Xo.PAREN_R)),t?i?this.node(e,{kind:Ko.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:i}):this.node(e,{kind:Ko.DIRECTIVE_COORDINATE,name:n}):r?i?this.node(e,{kind:Ko.ARGUMENT_COORDINATE,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:Ko.MEMBER_COORDINATE,name:n,memberName:r}):this.node(e,{kind:Ko.TYPE_COORDINATE,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Zo(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Go(this._lexer.source,t.start,`Expected ${js(e)}, found ${Rs(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Xo.NAME||t.value!==e)throw Go(this._lexer.source,t.start,`Expected "${e}", found ${Rs(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Xo.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Go(this._lexer.source,t.start,`Unexpected ${Rs(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==Xo.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw Go(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function Rs(e){const t=e.value;return js(e.kind)+(null!=t?` "${t}"`:"")}function js(e){return function(e){return e===Xo.BANG||e===Xo.DOLLAR||e===Xo.AMP||e===Xo.PAREN_L||e===Xo.PAREN_R||e===Xo.DOT||e===Xo.SPREAD||e===Xo.COLON||e===Xo.EQUALS||e===Xo.AT||e===Xo.BRACKET_L||e===Xo.BRACKET_R||e===Xo.BRACE_L||e===Xo.PIPE||e===Xo.BRACE_R}(e)?`"${e}"`:e}var zs=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Ls(e){return Fs[e.charCodeAt(0)]}var Fs=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],$s=Object.freeze({});function qs(e,t,n=ts){const r=/* @__PURE__ */new Map;for(const y of Object.values(Ko))r.set(y,Bs(t,y));let i,a,o,s=Array.isArray(e),l=[e],c=-1,u=[],d=e;const p=[],f=[];do{c++;const e=c===l.length,y=e&&0!==u.length;if(e){if(a=0===f.length?void 0:p[p.length-1],d=o,o=f.pop(),y)if(s){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d={...d};for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(o){if(a=s?c:l[c],d=o[a],null==d)continue;p.push(a)}let b;if(!Array.isArray(d)){var h,m;rs(d)||Fo(!1,`Invalid AST Node: ${As(d)}.`);const n=e?null===(h=r.get(d.kind))||void 0===h?void 0:h.leave:null===(m=r.get(d.kind))||void 0===m?void 0:m.enter;if(b=null==n?void 0:n.call(t,d,a,o,p,f),b===$s)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(u.push([a,b]),!e)){if(!rs(b)){p.pop();continue}d=b}}var g;void 0===b&&y&&u.push([a,d]),e?p.pop():(i={inArray:s,index:c,keys:l,edits:u,prev:i},s=Array.isArray(d),l=s?d:null!==(g=n[d.kind])&&void 0!==g?g:[],c=-1,u=[],o&&f.push(o),o=d)}while(void 0!==i);return 0!==u.length?u[u.length-1][1]:e}function Bs(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var Vs={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Us(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=Gs(e.variableDefinitions)?Ws("(\n",Us(e.variableDefinitions,"\n"),"\n)"):Ws("(",Us(e.variableDefinitions,", "),")"),n=Ws("",e.description,"\n")+Us([e.operation,Us([e.name,t]),Us(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>Ws("",i,"\n")+e+": "+t+Ws(" = ",n)+Ws(" ",Us(r," "))},SelectionSet:{leave:({selections:e})=>Hs(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const a=Ws("",e,": ")+t;let o=a+Ws("(",Us(n,", "),")");return o.length>80&&(o=a+Ws("(\n",Ys(Us(n,"\n")),"\n)")),Us([o,Us(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ws(" ",Us(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Us(["...",Ws("on ",e),Us(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>Ws("",a,"\n")+`fragment ${e}${Ws("(",Us(n,", "),")")} on ${t} ${Ws("",Us(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e){const t=e.replace(/"""/g,'\\"""'),n=t.split(/\r\n|[\n\r]/g),r=1===n.length,i=n.length>1&&n.slice(1).every(e=>0===e.length||is(e.charCodeAt(0))),a=t.endsWith('\\"""'),o=e.endsWith('"')&&!a,s=e.endsWith("\\"),l=o||s,c=!r||e.length>70||l||i||a;let u="";const d=r&&is(e.charCodeAt(0));return(c&&!d||i)&&(u+="\n"),u+=t,(c||l)&&(u+="\n"),'"""'+u+'"""'}(e):`"${e.replace(zs,Ls)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Us(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Us(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ws("(",Us(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Ws("",e,"\n")+Us(["schema",Us(t," "),Hs(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Ws("",e,"\n")+Us(["scalar",t,Us(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ws("",e,"\n")+Us(["type",t,Ws("implements ",Us(n," & ")),Us(r," "),Hs(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Ws("",e,"\n")+t+(Gs(n)?Ws("(\n",Ys(Us(n,"\n")),"\n)"):Ws("(",Us(n,", "),")"))+": "+r+Ws(" ",Us(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Ws("",e,"\n")+Us([t+": "+n,Ws("= ",r),Us(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ws("",e,"\n")+Us(["interface",t,Ws("implements ",Us(n," & ")),Us(r," "),Hs(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Ws("",e,"\n")+Us(["union",t,Us(n," "),Ws("= ",Us(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Ws("",e,"\n")+Us(["enum",t,Us(n," "),Hs(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Ws("",e,"\n")+Us([t,Us(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Ws("",e,"\n")+Us(["input",t,Us(n," "),Hs(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:a})=>Ws("",e,"\n")+"directive @"+t+(Gs(n)?Ws("(\n",Ys(Us(n,"\n")),"\n)"):Ws("(",Us(n,", "),")"))+Ws(" ",Us(r," "))+(i?" repeatable":"")+" on "+Us(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Us(["extend schema",Us(e," "),Hs(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Us(["extend scalar",e,Us(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Us(["extend type",e,Ws("implements ",Us(t," & ")),Us(n," "),Hs(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Us(["extend interface",e,Ws("implements ",Us(t," & ")),Us(n," "),Hs(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Us(["extend union",e,Us(t," "),Ws("= ",Us(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Us(["extend enum",e,Us(t," "),Hs(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Us(["extend input",e,Us(t," "),Hs(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>Us(["extend directive @"+e,Us(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>Us([e,Ws(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>Us([e,Ws(".",t),Ws("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>Us(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>Us(["@",e,Ws("(",t,":)")])}};function Us(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function Hs(e){return Ws("{\n",Ys(Us(e,"\n")),"\n}")}function Ws(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Ys(e){return Ws(" ",e.replace(/\n/g,"\n "))}function Gs(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var Qs=function(e,t){return Qs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qs(e,t)};function Js(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Qs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ks=function(){return Ks=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ks.apply(this,arguments)};function Xs(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(jR){s=[6,jR],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Zs(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function el(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function tl(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function nl(e){return this instanceof nl?(this.v=e,this):new nl(e)}function rl(e){return"function"==typeof e}function il(e){var t=e(function(e){Error.call(e),e.stack=/* @__PURE__ */(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var al=il(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function ol(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sl=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Zs(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(f){e={error:f}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(rl(l))try{l()}catch(jR){i=jR instanceof al?jR.errors:[jR]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Zs(c),d=u.next();!d.done;d=u.next()){var p=d.value;try{ul(p)}catch(h){i=null!=i?i:[],h instanceof al?i=tl(tl([],el(i)),el(h.errors)):i.push(h)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new al(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ul(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ol(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ol(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ll=sl.EMPTY;function cl(e){return e instanceof sl||e&&"closed"in e&&rl(e.remove)&&rl(e.add)&&rl(e.unsubscribe)}function ul(e){rl(e)?e():e.unsubscribe()}var dl={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=dl.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,tl([e,t],el(n))):setTimeout.apply(void 0,tl([e,t],el(n)))},clearTimeout:function(e){var t=dl.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function pl(e){dl.setTimeout(function(){throw e})}function fl(){}var hl=ml("C",void 0,void 0);function ml(e,t,n){return{kind:e,value:t,error:n}}function gl(e){e()}var yl=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cl(t)&&t.add(n)):n.destination=kl,n}return Js(t,e),t.create=function(e,t,n){return new vl(e,t,n)},t.prototype.next=function(e){this.isStopped?wl(function(e){return ml("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?wl(ml("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?wl(hl,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(sl);Function.prototype.bind;var bl=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){xl(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){xl(n)}else xl(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){xl(t)}},e}(),vl=function(e){function t(t,n,r){var i,a=e.call(this)||this;return i=rl(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,a.destination=new bl(i),a}return Js(t,e),t}(yl);function xl(e){pl(e)}function wl(e,t){var n=null;n&&dl.setTimeout(function(){return n(e,t)})}var kl={closed:!0,next:fl,error:function(e){throw e},complete:fl},Sl="function"==typeof Symbol&&Symbol.observable||"@@observable";function Tl(e){return e}var Nl=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof yl||function(e){return e&&rl(e.next)&&rl(e.error)&&rl(e.complete)}(r)&&cl(r)?e:new vl(e,t,n);return gl(function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Cl(t))(function(t,r){var i=new vl({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Sl]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?Tl:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Cl(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Cl(e){var t;return null!==(t=null!=e?e:void 0)&&void 0!==t?t:Promise}function El(e){return function(t){if(function(e){return rl(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function _l(e,t,n,r,i){return new Ol(e,t,n,r,i)}var Ol=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return Js(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(yl),Al=il(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Il=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Js(t,e),t.prototype.lift=function(e){var t=new Dl(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Al},t.prototype.next=function(e){var t=this;gl(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=Zs(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;gl(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;gl(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?ll:(this.currentObservers=null,a.push(e),new sl(function(){t.currentObservers=null,ol(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Nl;return e.source=this,e},t.create=function(e,t){return new Dl(e,t)},t}(Nl),Dl=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Js(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:ll},t}(Il),Pl=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return Js(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Il),Ml={now:function(){return(Ml.delegate||Date).now()},delegate:void 0},Rl=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ml);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return Js(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,l=1;l<r.length&&r[l]<=o;l+=2)s=l;s&&r.splice(0,s+1)}},t}(Il),jl=function(e){function t(t,n){return e.call(this)||this}return Js(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(sl),zl={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=zl.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,tl([e,t],el(n))):setInterval.apply(void 0,tl([e,t],el(n)))},clearInterval:function(e){var t=zl.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Ll=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Js(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),zl.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&zl.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)/* @__PURE__ */return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(jR){r=!0,n=jR||/* @__PURE__ */new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ol(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(jl),Fl=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ml.now,e}(),$l=new(function(e){function t(t,n){void 0===n&&(n=Fl.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Js(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Fl))(Ll),ql=new Nl(function(e){return e.complete()});function Bl(e){return e&&rl(e.schedule)}function Vl(e){return Bl((t=e)[t.length-1])?e.pop():void 0;var t}var Ul=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Hl(e){return rl(null==e?void 0:e.then)}function Wl(e){return rl(e[Sl])}function Yl(e){return Symbol.asyncIterator&&rl(null==e?void 0:e[Symbol.asyncIterator])}function Gl(e){/* @__PURE__ */
6
+ URL.createObjectURL(n))}else{let t={default:void 0,ComponentProvider:GO,ComponentContext:$a,usePlitziServiceContext:lr,RootElement:Fa},n={__WEBPACK_EXTERNAL_MODULE_react__:e,__WEBPACK_EXTERNAL_MODULE_react_dom__:I,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__:E,__WEBPACK_EXTERNAL_MODULE__plitzi_plitzi_sdk__:t},a=Y(window,`plitziPlugins.${r}`);if(!a||"function"!=typeof a)return;i=await a(t,void 0,n)}}catch(jR){return}return i},Ba=(Object.defineProperty,e=>{let t={};if(!e)return t;t[e.type]=e;let{plugins:n}=e;return n&&Object.keys(n).length>0&&Object.keys(n).forEach(e=>{t={...t,...Ba(n[e])}}),t}),Va=e=>{let t={};return e&&Object.values(e).forEach(e=>{e.type&&(t={...t,...Ba(e)})}),t},Ua=(e,t)=>{if(!e)return{};let n={};return Object.keys(e).forEach(r=>{let i=e[r],{version:a,pluginSettings:o,initialItems:s,plugins:l,extraProps:c}=i;n[r]=dC(i),n[r].origin=t,n[r].version=a,n[r].type=r,n[r].initialItems=s,n[r].pluginSettings=o,n[r].extraProps=c,n[r].plugins=Ua(l,t)}),n},Ha=e=>{let t={};return e&&Object.values(e).forEach(e=>{if(!e.type)return;let{type:n,pluginSettings:r,version:i,initialItems:a,plugins:o,assets:s,content:l,extraProps:c}=e,u=dC(e);u.version=i,u.type=n,u.assets=s,u.initialItems=a,u.pluginSettings=r,u.origin="local-custom",u.content=l,u.extraProps=c,u.plugins=Ua(o,"local-custom"),t={...t,...Ba(u)}}),t},Wa=/* @__PURE__ */new Map,Ya=(e,t,n,r=!0,i=!1)=>async()=>{let a=`${e}::${t}`;if(!Wa.get(a)){let n=qa(e,e.endsWith(".mjs")||e.includes(".esm.")||e.includes(".module."),t).finally(()=>{Wa.delete(a)});Wa.set(a,{promise:n,timestamp:Date.now()})}let o=await(Wa.get(a)?.promise);if(!o)return{default:pC};let{type:s,pluginSettings:l}=Y(o,"default",{}),{version:c,initialItems:u,plugins:d}=o;if(!s)return{default:pC};let p=o.default;return i||(p=dC(o.default)),p.version=c,p.origin="remote",p.type=s,p.initialItems=u,p.pluginSettings=l,p.plugins=Ua(d,"remote"),r&&n(p),{default:p}},Ga=({url:e="",scope:t="",internalProps:n,autoRegister:r=!0,plitziJsxSkipHOC:i=!1,plitziJsxProps:o=Qr})=>{let{register:s}=f($a),l=x(()=>d(Ya(e,t,s,r,i)),[e,t]);/* @__PURE__ */
7
+ return O(a,i?{children:/* @__PURE__ */O(l,{internalProps:n,plitziJsxSkipHOC:i,...o})}:{children:/* @__PURE__ */O(l,{internalProps:n})})},Qa=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:a})=>{let o={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */O(i.notFound,{internalProps:o},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return O(l,{internalProps:o,extraProps:l.extraProps},e);let c=(({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=Y(n,"assets",[]).filter(e=>"script"===e.type),{scope:i}=n;return{url:r.find(e=>e.isMain)?.params.src??Y(r,"0.params.src",""),scope:i}})({type:n,plugins:a});return c?/* @__PURE__ */O(Ga,{url:c.url,scope:c.scope,internalProps:o},e):s},Ja=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},Ka=({id:e})=>{let[t]=S(()=>{if(typeof document>"u")return null;let t=document.querySelector(`[data-rsc-id="${e}"]`);if(!t)return null;let n={};for(let e=0;e<t.attributes.length;e++){let{name:r,value:i}=t.attributes[e];"class"!==r&&"style"!==r&&"data-rsc-id"!==r&&(n[r]=i)}let r=t.getAttribute("style");return{tag:t.tagName.toLowerCase(),className:t.className,style:r?Ja(r):void 0,attrs:n,html:t.innerHTML}});return t?l(t.tag,{"data-rsc-id":e,className:t.className||void 0,style:t.style,...t.attrs,dangerouslySetInnerHTML:{__html:t.html}}):null},Xa=s({});Xa.displayName="CollectionContext";var Za=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>`},eo=/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,to=e=>e?.replace(eo,Za)??e,no=/* @__PURE__ */$((e,t)=>{t.exports=function(e){function t(t,n){if(t.template.options.rethrow)throw"string"==typeof n&&(n=new e.Error(n)),"TwigException"!==n.type||n.file||(n.file=t.template.id),n;if(e.log.error("Error parsing twig template "+t.template.id+": "),n.stack?e.log.error(n.stack):e.log.error(n.toString()),e.debug)return n.toString()}return e.trace=!1,e.debug=!1,e.cache=!0,e.noop=function(){},e.merge=function(e,t,n){return Object.keys(t).forEach(r=>{n&&!(r in e)||(e[r]=t[r])}),e},e.Error=function(e,t){this.message=e,this.name="TwigException",this.type="TwigException",this.file=t},e.Error.prototype.toString=function(){return this.name+": "+this.message},e.log={trace(...t){e.trace&&console},debug(...t){e.debug&&console}},"undefined"==typeof console?e.log.error=function(){}:(void 0!==console.error||void 0!==console.log)&&(e.log.error=function(...e){}),e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw",outputWhitespacePre:"output_whitespace_pre",outputWhitespacePost:"output_whitespace_post",outputWhitespaceBoth:"output_whitespace_both",logicWhitespacePre:"logic_whitespace_pre",logicWhitespacePost:"logic_whitespace_post",logicWhitespaceBoth:"logic_whitespace_both"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.raw,open:"{% verbatim %}",close:"{% endverbatim %}"},{type:e.token.type.outputWhitespacePre,open:"{{-",close:"}}"},{type:e.token.type.outputWhitespacePost,open:"{{",close:"-}}"},{type:e.token.type.outputWhitespaceBoth,open:"{{-",close:"-}}"},{type:e.token.type.logicWhitespacePre,open:"{%-",close:"%}"},{type:e.token.type.logicWhitespacePost,open:"{%",close:"-%}"},{type:e.token.type.logicWhitespaceBoth,open:"{%-",close:"-%}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){const n={position:null,def:null};let r=null;const i=e.token.definitions.length;let a,o,s,l;for(a=0;a<i;a++)o=e.token.definitions[a],s=t.indexOf(o.open),l=t.indexOf(o.close),e.log.trace("Twig.token.findStart: ","Searching for ",o.open," found at ",s),s>=0&&o.open.length!==o.close.length&&l<0||(s>=0&&(null===n.position||s<n.position)?(n.position=s,n.def=o,r=l):s>=0&&null!==n.position&&s===n.position&&(o.open.length>n.def.open.length?(n.position=s,n.def=o,r=l):o.open.length===n.def.open.length&&(o.close.length,n.def.close.length,l>=0&&l<r&&(n.position=s,n.def=o,r=l))));return n},e.token.findEnd=function(t,n,r){let i,a,o=null,s=!1,l=0,c=null,u=null,d=null,p=null,f=null,h=null;for(;!s;){if(c=null,u=null,d=t.indexOf(n.close,l),!(d>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"' opened near template position "+r);if(o=d,s=!0,n.type===e.token.type.comment)break;if(n.type===e.token.type.raw)break;for(a=e.token.strings.length,i=0;i<a;i+=1)f=t.indexOf(e.token.strings[i],l),f>0&&f<d&&(null===c||f<c)&&(c=f,u=e.token.strings[i]);if(null!==c)for(p=c+1,o=null,s=!1;;){if(h=t.indexOf(u,p),h<0)throw e.Error("Unclosed string in template");if("\\"!==t.slice(h-1,h)){l=h+1;break}p=h+1}}return o},e.tokenize=function(t){const n=[];let r=0,i=null,a=null;for(;t.length>0;)if(i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),null===i.position)n.push({type:e.token.type.raw,value:t,position:{start:r,end:r+i.position}}),t="";else{if(i.position>0&&n.push({type:e.token.type.raw,value:t.slice(0,Math.max(0,i.position)),position:{start:r,end:r+Math.max(0,i.position)}}),t=t.slice(i.position+i.def.open.length),r+=i.position+i.def.open.length,a=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",a),n.push({type:i.def.type,value:t.slice(0,Math.max(0,a)).trim(),position:{start:r-i.def.open.length,end:r+a+i.def.close.length}}),"\n"===t.slice(a+i.def.close.length,a+i.def.close.length+1))switch(i.def.type){case"logic_whitespace_pre":case"logic_whitespace_post":case"logic_whitespace_both":case"logic":a+=1}t=t.slice(a+i.def.close.length),r+=a+i.def.close.length}return n},e.compile=function(t){const n=this;try{const r=[],i=[];let a=[],o=null,s=null,l=null,c=null,u=null,d=null,p=null,f=null,h=null,m=null,g=null,y=null;const b=function(t){e.expression.compile.call(n,t),i.length>0?a.push(t):r.push(t)},v=function(t){if(s=e.logic.compile.call(n,t),s.position=t.position,m=s.type,g=e.logic.handler[m].open,y=e.logic.handler[m].next,e.log.trace("Twig.compile: ","Compiled logic token to ",s," next is: ",y," open is : ",g),void 0!==g&&!g){if(c=i.pop(),p=e.logic.handler[c.type],!p.next.includes(m))throw new Error(m+" not expected after a "+c.type);c.output=c.output||[],c.output=c.output.concat(a),a=[],h={type:e.token.type.logic,token:c,position:{open:c.position,close:t.position}},i.length>0?a.push(h):r.push(h)}void 0!==y&&y.length>0?(e.log.trace("Twig.compile: ","Pushing ",s," to logic stack."),i.length>0&&(c=i.pop(),c.output=c.output||[],c.output=c.output.concat(a),i.push(c),a=[]),i.push(s)):void 0!==g&&g&&(h={type:e.token.type.logic,token:s,position:s.position},i.length>0?a.push(h):r.push(h))};for(;t.length>0;){switch(o=t.shift(),u=r[r.length-1],d=a[a.length-1],f=t[0],e.log.trace("Compiling token ",o),o.type){case e.token.type.raw:i.length>0?a.push(o):r.push(o);break;case e.token.type.logic:v.call(n,o);break;case e.token.type.comment:break;case e.token.type.output:b.call(n,o);break;case e.token.type.logicWhitespacePre:case e.token.type.logicWhitespacePost:case e.token.type.logicWhitespaceBoth:case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:switch(o.type!==e.token.type.outputWhitespacePost&&o.type!==e.token.type.logicWhitespacePost&&(u&&u.type===e.token.type.raw&&(r.pop(),u.value=u.value.trimEnd(),r.push(u)),d&&d.type===e.token.type.raw&&(a.pop(),d.value=d.value.trimEnd(),a.push(d))),o.type){case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:b.call(n,o);break;case e.token.type.logicWhitespacePre:case e.token.type.logicWhitespacePost:case e.token.type.logicWhitespaceBoth:v.call(n,o)}o.type!==e.token.type.outputWhitespacePre&&o.type!==e.token.type.logicWhitespacePre&&f&&f.type===e.token.type.raw&&(t.shift(),f.value=f.value.trimStart(),t.unshift(f))}e.log.trace("Twig.compile: "," Output: ",r," Logic Stack: ",i," Pending Output: ",a)}if(i.length>0)throw l=i.pop(),new Error("Unable to find an end tag for "+l.type+", expecting one of "+l.next);return r}catch(r){if(n.options.rethrow)throw"TwigException"!==r.type||r.file||(r.file=n.id),r;e.log.error("Error compiling twig template "+n.id+": "),r.stack?e.log.error(r.stack):e.log.error(r.toString())}},e.prepare=function(t){e.log.debug("Twig.prepare: ","Tokenizing ",t);const n=e.tokenize.call(this,t);e.log.debug("Twig.prepare: ","Compiling ",n);const r=e.compile.call(this,n);return e.log.debug("Twig.prepare: ","Compiled ",r),r},e.output=function(t){const{autoescape:n}=this.options;if(!n)return t.join("");const r="string"==typeof n?n:"html",i=t.map(t=>(!t||!0===t.twigMarkup||t.twigMarkup===r||"html"===r&&"html_attr"===t.twigMarkup||(t=e.filters.escape(t,[r])),t));if(0===i.length)return"";const a=i.join("");return 0===a.length?"":new e.Markup(a,!0)},e.Templates={loaders:{},parsers:{},registry:{}},e.validateId=function(t){if("prototype"===t)throw new e.Error(t+" is not a valid twig identifier");if(e.cache&&Object.hasOwnProperty.call(e.Templates.registry,t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.registerLoader=function(t,n,r){if("function"!=typeof n)throw new e.Error("Unable to add loader for "+t+": Invalid function reference given.");r&&(n=n.bind(r)),this.loaders[t]=n},e.Templates.unRegisterLoader=function(e){this.isRegisteredLoader(e)&&delete this.loaders[e]},e.Templates.isRegisteredLoader=function(e){return Object.hasOwnProperty.call(this.loaders,e)},e.Templates.registerParser=function(t,n,r){if("function"!=typeof n)throw new e.Error("Unable to add parser for "+t+": Invalid function regerence given.");r&&(n=n.bind(r)),this.parsers[t]=n},e.Templates.unRegisterParser=function(e){this.isRegisteredParser(e)&&delete this.parsers[e]},e.Templates.isRegisteredParser=function(e){return Object.hasOwnProperty.call(this.parsers,e)},e.Templates.save=function(t){if(void 0===t.id)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return Object.hasOwnProperty.call(e.Templates.registry,t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){const a=void 0===n.id?t:n.id,o=e.Templates.registry[a];return e.cache&&void 0!==o?("function"==typeof r&&r(o),o):(n.parser=n.parser||"twig",n.id=a,void 0===n.async&&(n.async=!0),(this.loaders[n.method]||this.loaders.fs).call(this,t,n,r,i))},e.Block=function(e,t){this.template=e,this.token=t},e.Block.prototype.render=function(t,n){const r=t.template;let i;return t.template=this.template,i=this.token.expression?e.expression.parseAsync.call(t,this.token.output,n):t.parseAsync(this.token.output,n),i.then(r=>e.expression.parseAsync.call(t,{type:e.expression.type.string,value:r},n)).then(e=>(t.template=r,e))},e.ParseState=function(e,t,n){this.renderedBlocks={},this.overrideBlocks=void 0===t?{}:t,this.context=void 0===n?{}:n,this.macros={},this.nestingStack=[],this.template=e},e.ParseState.prototype.getBlock=function(e,t){let n;return!0!==t&&(n=this.overrideBlocks[e]),void 0===n&&(n=this.template.getBlock(e,t)),void 0===n&&null!==this.template.parentTemplate&&(n=this.template.parentTemplate.getBlock(e)),n},e.ParseState.prototype.getBlocks=function(e){let t={};return!1!==e&&null!==this.template.parentTemplate&&this.template.parentTemplate!==this.template&&(t=this.template.parentTemplate.getBlocks()),t={...t,...this.template.getBlocks(),...this.overrideBlocks},t},e.ParseState.prototype.getNestingStackToken=function(e){let t;return this.nestingStack.forEach(n=>{void 0===t&&n.type===e&&(t=n)}),t},e.ParseState.prototype.parse=function(n,r,i){const a=this;let o=[],s=null,l=!0,c=null,u=!0;function d(e){o.push(e)}function p(e){void 0!==e.chain&&(u=e.chain),void 0!==e.context&&(a.context=e.context),void 0!==e.output&&o.push(e.output)}if(r&&(a.context=r),c=e.async.forEach(n,t=>{switch(e.log.debug("Twig.ParseState.parse: ","Parsing token: ",t),t.type){case e.token.type.raw:o.push(e.filters.raw(t.value));break;case e.token.type.logic:return e.logic.parseAsync.call(a,t.token,a.context,u).then(p);case e.token.type.comment:break;case e.token.type.outputWhitespacePre:case e.token.type.outputWhitespacePost:case e.token.type.outputWhitespaceBoth:case e.token.type.output:return e.log.debug("Twig.ParseState.parse: ","Output token: ",t.stack),e.expression.parseAsync.call(a,t.stack,a.context).then(d)}}).then(()=>(o=e.output.call(a.template,o),l=!1,o)).catch(e=>{i&&t(a,e),s=e}),i)return c;if(null!==s)return t(a,s);if(l)throw new e.Error("You are using Twig.js in sync mode in combination with async extensions.");return o},e.Template=function(t){const{data:n,id:r,base:i,path:a,url:o,name:s,method:l,options:c}=t;this.base=i,this.blocks={defined:{},imported:{}},this.id=r,this.method=l,this.name=s,this.options=c,this.parentTemplate=null,this.path=a,this.url=o,function(e,t){const n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&"String"===n}(0,n)?this.tokens=e.prepare.call(this,n):this.tokens=n,void 0!==r&&e.Templates.save(this)},e.Template.prototype.getBlock=function(e,t,n=!0){let r;return!0!==t&&(r=this.blocks.defined[e]),n&&void 0===r&&(r=this.blocks.imported[e]),void 0===r&&null!==this.parentTemplate&&(r=this.parentTemplate.getBlock(e,t,n=!1)),r},e.Template.prototype.getBlocks=function(){let e={};return e={...e,...this.blocks.imported,...this.blocks.defined},e},e.Template.prototype.render=function(t,n,r){const i=this;return n=n||{},e.async.potentiallyAsync(i,r,()=>{const r=new e.ParseState(i,n.blocks,t);return r.parseAsync(i.tokens).then(t=>{let a,o;return null!==i.parentTemplate?(i.options.allowInlineIncludes&&(a=e.Templates.load(i.parentTemplate),a&&(a.options=i.options)),a||(o=e.path.parsePath(i,i.parentTemplate),a=e.Templates.loadRemote(o,{method:i.getLoaderMethod(),base:i.base,async:!1,id:o,options:i.options})),i.parentTemplate=a,i.parentTemplate.renderAsync(r.context,{blocks:r.getBlocks(!1),isInclude:!0})):!0===n.isInclude?t:t.valueOf()})})},e.Template.prototype.importFile=function(t){let n,r=null;if(!this.url&&this.options.allowInlineIncludes){if(t=this.path?e.path.parsePath(this,t):t,n=e.Templates.load(t),!n&&(n=e.Templates.loadRemote(r,{id:t,method:this.getLoaderMethod(),async:!1,path:t,options:this.options}),!n))throw new e.Error("Unable to find the template "+t);return n.options=this.options,n}return r=e.path.parsePath(this,t),n=e.Templates.loadRemote(r,{method:this.getLoaderMethod(),base:this.base,async:!1,options:this.options,id:r}),n},e.Template.prototype.getLoaderMethod=function(){return this.path?"fs":this.url?"ajax":this.method||"fs"},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e.Markup=function(e,t){if("string"!=typeof e)return e;const n=new String(e);return n.twigMarkup=void 0===t||t,n},e}}),ro=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){const r=JSON.stringify(t.tokens),{id:i}=t;let a=null;if(n.module){if(void 0===e.compiler.module[n.module])throw new e.Error("Unable to find module type "+n.module);a=e.compiler.module[n.module](i,r,n.twig)}else a=e.compiler.wrap(i,r);return a},e.compiler.module={amd:(t,n,r)=>'define(["'+r+'"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n\treturn templates;\n});",node:(t,n)=>'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n),cjs2:(t,n,r)=>'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n\tvar twig = require("twig").twig;\n\texports.template = '+e.compiler.wrap(t,n)+"\n});"},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}}),io=/* @__PURE__ */$((e,t)=>{t.exports=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};const t=function(e,t){if(null==t)return null;if(void 0!==t.indexOf)return(e===t||""!==e)&&t.includes(e);let n;for(n in t)if(Object.hasOwnProperty.call(t,n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?:":case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"??":n.precidence=15,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"b-or":n.precidence=12,n.associativity=e.expression.operator.leftToRight;break;case"b-xor":n.precidence=11,n.associativity=e.expression.operator.leftToRight;break;case"b-and":n.precidence=10,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":case"<=>":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":case"not in":case"in":case"matches":case"starts with":case"ends with":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error("Failed to lookup operator: "+t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){let i,a,o;if(e.log.trace("Twig.expression.operator.parse: ","Handling ",n),"?"===n&&(o=r.pop()),a=r.pop(),"not"!==n&&(i=r.pop()),"in"!==n&&"not in"!==n&&"??"!==n&&(i&&Array.isArray(i)&&(i=i.length),"?"!==n&&a&&Array.isArray(a)&&(a=a.length)),"matches"===n&&a&&"string"==typeof a){const e=a.match(/^\/(.*)\/([gims]?)$/),t=e[1],n=e[2];a=new RegExp(t,n)}switch(n){case":":break;case"??":void 0===i&&(i=a,a=o,o=void 0),null!=i?r.push(i):r.push(a);break;case"?:":e.lib.boolval(i)?r.push(i):r.push(a);break;case"?":void 0===i&&(i=a,a=o,o=void 0),e.lib.boolval(i)?r.push(a):r.push(o);break;case"+":a=parseFloat(a),i=parseFloat(i),r.push(i+a);break;case"-":a=parseFloat(a),i=parseFloat(i),r.push(i-a);break;case"*":a=parseFloat(a),i=parseFloat(i),r.push(i*a);break;case"/":a=parseFloat(a),i=parseFloat(i),r.push(i/a);break;case"//":a=parseFloat(a),i=parseFloat(i),r.push(Math.floor(i/a));break;case"%":a=parseFloat(a),i=parseFloat(i),r.push(i%a);break;case"~":r.push((null!=i?i.toString():"")+(null!=a?a.toString():""));break;case"not":case"!":r.push(!e.lib.boolval(a));break;case"<=>":r.push(i===a?0:i<a?-1:1);break;case"<":r.push(i<a);break;case"<=":r.push(i<=a);break;case">":r.push(i>a);break;case">=":r.push(i>=a);break;case"===":r.push(i===a);break;case"==":r.push(i==a);break;case"!==":r.push(i!==a);break;case"!=":r.push(i!=a);break;case"or":r.push(e.lib.boolval(i)||e.lib.boolval(a));break;case"b-or":r.push(i|a);break;case"b-xor":r.push(i^a);break;case"and":r.push(e.lib.boolval(i)&&e.lib.boolval(a));break;case"b-and":r.push(i&a);break;case"**":r.push(i**a);break;case"not in":r.push(!t(i,a));break;case"in":r.push(t(i,a));break;case"matches":r.push(a.test(i));break;case"starts with":r.push("string"==typeof i&&0===i.indexOf(a));break;case"ends with":r.push("string"==typeof i&&i.includes(a,i.length-a.length));break;case"..":r.push(e.functions.range(i,a));break;default:throw new e.Error("Failed to parse operator: "+n+" is an unknown operator.")}},e}}),ao=/* @__PURE__ */$((e,t)=>{t.exports=function(e){function t(t,n,r){return n?e.expression.parseAsync.call(t,n,r):e.Promise.resolve(!1)}for(e.expression={},io()(e),e.expression.reservedWords=["true","false","null","TRUE","FALSE","NULL","_context","and","b-and","or","b-or","b-xor","in","not in","if","matches","starts","ends","with"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",slice:"Twig.expression.type.slice",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},subexpression:{start:"Twig.expression.type.subexpression.start",end:"Twig.expression.type.subexpression.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.subexpression.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start,e.expression.type.subexpression.start,e.expression.type.operator.unary]},e.expression.set.operationsExtended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets,e.expression.type.slice]),e.expression.fn={compile:{push(e,t,n){n.push(e)},pushBoth(e,t,n){n.push(e),t.push(e)}},parse:{push(e,t){t.push(e)},pushValue(e,t){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_]\w*(\s?(?:as|by))?)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i){const a=r.pop();return t(this,n.params,i).then(t=>{const i=e.test(n.filter,a,t);"not"===n.modifier?r.push(!i):r.push(i)})}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile(t,n,r){let i,a=n.length-1;for(delete t.match,delete t.value;a>=0;a--){if(i=n.pop(),i.type===e.expression.type.object.start||i.type===e.expression.type.parameter.start||i.type===e.expression.type.array.start){n.push(i);break}r.push(i)}r.push(t)}},{type:e.expression.type.number,regex:/^-?\d+(\.\d+)?/,next:e.expression.set.operations,compile(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.operator.binary,regex:/(^\?\?|^\?\s*:|^(b-and)|^(b-or)|^(b-xor)|^[+\-~%?]|^(<=>)|^[:](?!\d\])|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^(and)[(|\s+]|^(or)[(|\s+]|^(in)[(|\s+]|^(not in)[(|\s+]|^(matches)|^(starts with)|^(ends with)|^\.\.)/,next:e.expression.set.expressions,transform(e,t){switch(e[0]){case"and(":case"or(":case"in(":case"not in(":return t[t.length-1].value=e[2],e[0];default:return""}},compile(t,n,r){delete t.match,t.value.match(/^\?\s*:/)&&(t.value="?:"),t.value=t.value.trim();const{value:i}=t,a=e.expression.operator.lookup(i,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",a," from ",i);n.length>0&&(n[n.length-1].type===e.expression.type.operator.unary||n[n.length-1].type===e.expression.type.operator.binary)&&(a.associativity===e.expression.operator.leftToRight&&a.precidence>=n[n.length-1].precidence||a.associativity===e.expression.operator.rightToLeft&&a.precidence>n[n.length-1].precidence);){const e=n.pop();r.push(e)}if(":"===i)if(n[n.length-1]&&"?"===n[n.length-1].value);else{const n=r.pop();if(n.type===e.expression.type.string||n.type===e.expression.type.variable)t.key=n.value;else if(n.type===e.expression.type.number)t.key=n.value.toString();else{if(!n.expression||n.type!==e.expression.type.parameter.end&&n.type!==e.expression.type.subexpression.end)throw new e.Error("Unexpected value before ':' of "+n.type+" = "+n.value);t.params=n.params}r.push(t)}else n.push(a)},parse(t,n,r){if(t.key)n.push(t);else{if(t.params)return e.expression.parseAsync.call(this,t.params,r).then(e=>{t.key=e,n.push(t),r.loop||delete t.params});e.expression.operator.parse(t.value,n)}}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile(t,n,r){delete t.match,t.value=t.value.trim();const{value:i}=t,a=e.expression.operator.lookup(i,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",a," from ",i);n.length>0&&(n[n.length-1].type===e.expression.type.operator.unary||n[n.length-1].type===e.expression.type.operator.binary)&&(a.associativity===e.expression.operator.leftToRight&&a.precidence>=n[n.length-1].precidence||a.associativity===e.expression.operator.rightToLeft&&a.precidence>n[n.length-1].precidence);){const e=n.pop();r.push(e)}n.push(a)},parse(t,n){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2[\s\S])*?\1/,next:e.expression.set.operationsExtended,compile(t,n,r){let{value:i}=t;delete t.match,i='"'===i.slice(0,1)?i.replace('\\"','"'):i.replace("\\'","'"),t.value=i.slice(1,-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.subexpression.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.subexpression.end]),compile(e,t,n){e.value="(",n.push(e),t.push(e)},parse:e.expression.fn.parse.push},{type:e.expression.type.subexpression.end,regex:/^\)/,next:e.expression.set.operationsExtended,validate(t,n){let r=n.length-1,i=!1,a=!1,o=0;for(;!i&&r>=0;){const t=n[r];i=t.type===e.expression.type.subexpression.start,i&&a&&(a=!1,i=!1),t.type===e.expression.type.parameter.start?o++:t.type===e.expression.type.parameter.end?o--:t.type===e.expression.type.subexpression.end&&(a=!0),r--}return i&&0===o},compile(t,n,r){let i;const a=t;for(i=n.pop();n.length>0&&i.type!==e.expression.type.subexpression.start;)r.push(i),i=n.pop();const o=[];for(;t.type!==e.expression.type.subexpression.start;)o.unshift(t),t=r.pop();o.unshift(t),i=n[n.length-1],void 0===i||i.type!==e.expression.type._function&&i.type!==e.expression.type.filter&&i.type!==e.expression.type.test&&i.type!==e.expression.type.key.brackets?(a.expression=!0,o.pop(),o.shift(),a.params=o,r.push(a)):(a.expression=!1,i.params=o)},parse(t,n,r){if(t.expression)return e.expression.parseAsync.call(this,t.params,r).then(e=>{n.push(e)});throw new e.Error("Unexpected subexpression end when token is not marked as an expression")}},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),validate(t,n){const r=n[n.length-1];return r&&!e.expression.reservedWords.includes(r.value.trim())},compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operationsExtended,compile(t,n,r){let i;const a=t;for(i=n.pop();n.length>0&&i.type!==e.expression.type.parameter.start;)r.push(i),i=n.pop();const o=[];for(;t.type!==e.expression.type.parameter.start;)o.unshift(t),t=r.pop();o.unshift(t),void 0===(t=r[r.length-1])||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets?(a.expression=!0,o.pop(),o.shift(),a.params=o,r.push(a)):(a.expression=!1,t.params=o)},parse(t,n,r){const i=[];let a=!1,o=null;if(t.expression)return e.expression.parseAsync.call(this,t.params,r).then(e=>{n.push(e)});for(;n.length>0;){if(o=n.pop(),o&&o.type&&o.type===e.expression.type.parameter.start){a=!0;break}i.unshift(o)}if(!a)throw new e.Error("Expected end of parameter set.");n.push(i)}},{type:e.expression.type.slice,regex:/^\[(-?\w*:-?\w*)\]/,next:e.expression.set.operationsExtended,compile(e,t,n){const r=e.match[1].split(":"),i=r[0],a=r[1];e.value="slice",e.params=[i,a],a||(e.params=[i]),n.push(e)},parse(t,n,r){const i=n.pop();let{params:a}=t;const o=this;if(parseInt(a[0],10).toString()===a[0])a[0]=parseInt(a[0],10);else{const t=r[a[0]];if(o.template.options.strictVariables&&void 0===t)throw new e.Error('Variable "'+a[0]+'" does not exist.');a[0]=t}if(a[1])if(parseInt(a[1],10).toString()===a[1])a[1]=parseInt(a[1],10);else{const t=r[a[1]];if(o.template.options.strictVariables&&void 0===t)throw new e.Error('Variable "'+a[1]+'" does not exist.');void 0===t?a=[a[0]]:a[1]=t}n.push(e.filter.call(o,t.value,i,a))}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operationsExtended,compile(t,n,r){let i,a=n.length-1;for(;a>=0&&(i=n.pop(),i.type!==e.expression.type.array.start);a--)r.push(i);r.push(t)},parse(t,n){const r=[];let i=!1,a=null;for(;n.length>0;){if(a=n.pop(),a&&a.type&&a.type===e.expression.type.array.start){i=!0;break}r.unshift(a)}if(!i)throw new e.Error("Expected end of array.");n.push(r)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.pushBoth,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operationsExtended,compile(t,n,r){let i,a=n.length-1;for(;a>=0&&(i=n.pop(),!i||i.type!==e.expression.type.object.start);a--)r.push(i);r.push(t)},parse(t,n){const r={};let i=!1,a=null,o=!1,s=null;for(;n.length>0;){if(a=n.pop(),a&&a.type&&a.type===e.expression.type.object.start){i=!0;break}if(a&&a.type&&(a.type===e.expression.type.operator.binary||a.type===e.expression.type.operator.unary)&&a.key){if(!o)throw new e.Error("Missing value for key '"+a.key+"' in object definition.");r[a.key]=s,void 0===r._keys&&(r._keys=[]),r._keys.unshift(a.key),s=null,o=!1}else o=!0,s=a}if(!i)throw new e.Error("Unexpected end of object.");n.push(r)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_-]*)/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(e,t,n){e.value=e.match[1],n.push(e)},parse(n,r,i){const a=r.pop(),o=this;return t(o,n.params,i).then(t=>e.filter.call(o,n.value,a,t)).then(e=>{r.push(e)})}},{type:e.expression.type._function,regex:/^([a-zA-Z_]\w*)\s*\(/,next:e.expression.type.parameter.start,validate:t=>t[1]&&!e.expression.reservedWords.includes(t[1]),transform:()=>"(",compile(e,t,n){e.fn=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i){const a=this,{fn:o}=n;let s;return t(a,n.params,i).then(t=>{if(e.functions[o])s=e.functions[o].apply(a,t);else{if("function"!=typeof i[o])throw new e.Error(o+" function does not exist and is not defined in the context");s=i[o](...t)}return s}).then(e=>{r.push(e)})}},{type:e.expression.type.variable,regex:/^[a-zA-Z_]\w*/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:t=>!e.expression.reservedWords.includes(t[0]),parse(t,n,r){const i=this;return e.expression.resolveAsync.call(i,r[t.value],r).then(r=>{if(i.template.options.strictVariables&&void 0===r)throw new e.Error('Variable "'+t.value+'" does not exist.');n.push(r)})}},{type:e.expression.type.key.period,regex:/^\.(\w+)/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse(n,r,i,a){const o=this,{key:s}=n,l=r.pop();let c;if(l&&!Object.prototype.hasOwnProperty.call(l,s)&&o.template.options.strictVariables)throw Object.keys(l).length>0?new e.Error('Key "'+s+'" for object with keys "'+Object.keys(l).join(", ")+'" does not exist.'):new e.Error('Key "'+s+'" does not exist as the object is empty.');return t(o,n.params,i).then(t=>{if(null==l)c=void 0;else{const e=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)};c="object"==typeof l&&s in l?l[s]:l["get"+e(s)]?l["get"+e(s)]:l["is"+e(s)]?l["is"+e(s)]:void 0}return e.expression.resolveAsync.call(o,c,i,t,a,l)}).then(e=>{r.push(e)})}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile(t,n,r){const i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse(n,r,i,a){const o=this;let s,l,c=null;return t(o,n.params,i).then(t=>(c=t,e.expression.parseAsync.call(o,n.stack,i))).then(t=>{if(s=r.pop(),s&&!Object.prototype.hasOwnProperty.call(s,t)&&o.template.options.strictVariables){const n=Object.keys(s);throw n.length>0?new e.Error('Key "'+t+'" for array with keys "'+n.join(", ")+'" does not exist.'):new e.Error('Key "'+t+'" does not exist as the array is empty.')}return null==s?null:(l="object"==typeof s&&t in s?s[t]:null,e.expression.resolveAsync.call(o,l,s,c,a))}).then(e=>{r.push(e)})}},{type:e.expression.type._null,regex:/^(null|NULL|none|NONE)/,next:e.expression.set.operations,compile(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.pushValue},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operationsExtended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse(e,t,n){t.push(n)}},{type:e.expression.type.bool,regex:/^(true|TRUE|false|FALSE)/,next:e.expression.set.operations,compile(e,t,n){e.value="true"===e.match[0].toLowerCase(),delete e.match,n.push(e)},parse:e.expression.fn.parse.pushValue}],e.expression.resolveAsync=function(t,n,r,i,a){const o=this;if("function"!=typeof t)return e.Promise.resolve(t);let s=e.Promise.resolve(r);if(i&&i.type===e.expression.type.parameter.end){const t=!0;s=s.then(()=>i.params&&e.expression.parseAsync.call(o,i.params,n,t)).then(e=>(i.cleanup=!0,e))}return s.then(e=>t.apply(a||n,e||[]))},e.expression.resolve=function(t,n,r,i,a){return e.async.potentiallyAsync(this,!1,function(){return e.expression.resolveAsync.call(this,t,n,r,i,a)})},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};e.expression.definitions.length>0;)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){let n=t.value;const r=[];let i,a,o,s,l,c=0,u=null,d=[];const p=function(...n){let a=arguments.length-2;const o=new Array(a);for(;a-- >0;)o[a]=n[a];if(e.log.trace("Twig.expression.tokenize","Matched a ",i," regular expression of ",o),u&&!u.includes(i))return d.push(i+" cannot follow a "+r[r.length-1].type+" at template:"+c+" near '"+o[0].slice(0,20)+"...'"),o[0];const p=e.expression.handler[i];if(p.validate&&!p.validate(o,r))return o[0];d=[];const f={type:i,value:o[0],match:o};return t.position&&(f.position=t.position),r.push(f),l=!0,u=s,c+=o[0].length,p.transform?p.transform(o,r):""};for(e.log.debug("Twig.expression.tokenize","Tokenizing expression ",n);n.length>0;){for(i in n=n.trim(),e.expression.handler)if(Object.hasOwnProperty.call(e.expression.handler,i)){if(s=e.expression.handler[i].next,a=e.expression.handler[i].regex,e.log.trace("Checking type ",i," on ",n),l=!1,Array.isArray(a))for(o=a.length;o-- >0;)n=n.replace(a[o],p);else n=n.replace(a,p);if(l)break}if(!l)throw d.length>0?new e.Error(d.join(" OR ")):new e.Error("Unable to parse '"+n+"' at template position"+c)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",r),r},e.expression.compile=function(t){const n=e.expression.tokenize(t);let r=null;const i=[],a=[];let o=null;for(e.log.trace("Twig.expression.compile: ","Compiling ",t.value);n.length>0;)r=n.shift(),o=e.expression.handler[r.type],e.log.trace("Twig.expression.compile: ","Compiling ",r),o.compile(r,a,i),e.log.trace("Twig.expression.compile: ","Stack is",a),e.log.trace("Twig.expression.compile: ","Output is",i);for(;a.length>0;)i.push(a.pop());return e.log.trace("Twig.expression.compile: ","Final output is",i),t.stack=i,delete t.value,t},e.expression.parse=function(t,n,r,i){const a=this;Array.isArray(t)||(t=[t]);const o=[],s=[],l=e.expression.type.operator.binary;return e.async.potentiallyAsync(a,i,()=>e.async.forEach(t,(r,i)=>{let c,u=null,d=null;if(!r.cleanup)return t.length>i+1&&(d=t[i+1]),u=e.expression.handler[r.type],u.parse&&(c=u.parse.call(a,r,o,n,d)),r.type===l&&n.loop&&s.push(r),c}).then(()=>{let e=s.length,t=null;for(;e-- >0;)t=s[e],t.params&&t.key&&delete t.key;if(r){const e=o.splice(0);o.push(e)}return o.pop()}))},e}}),oo=/* @__PURE__ */$((e,t)=>{t.exports=function(e){function t(e,t){const n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&n===e}return e.filters={upper:e=>"string"!=typeof e?e:e.toUpperCase(),lower:e=>"string"!=typeof e?e:e.toLowerCase(),capitalize:e=>"string"!=typeof e?e:e.slice(0,1).toUpperCase()+e.toLowerCase().slice(1),title:e=>"string"!=typeof e?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,(e,t,n)=>t+n.toUpperCase()),length:t=>e.lib.is("Array",t)||"string"==typeof t?t.length:e.lib.is("Object",t)?void 0===t._keys?Object.keys(t).length:t._keys.length:0,reverse:e=>t("Array",e)?e.reverse():t("String",e)?e.split("").reverse().join(""):t("Object",e)?(e._keys=e._keys||Object.keys(e).reverse(),e):void 0,sort:e=>t("Array",e)?e.sort():t("Object",e)?(delete e._keys,e._keys=Object.keys(e).sort((t,n)=>{let r,i;return e[t]>e[n]==!(e[t]<=e[n])?e[t]>e[n]?1:e[t]<e[n]?-1:0:isNaN(r=parseFloat(e[t]))||isNaN(i=parseFloat(e[n]))?"string"==typeof e[t]?e[t]>e[n].toString()?1:e[t]<e[n].toString()?-1:0:"string"==typeof e[n]?e[t].toString()>e[n]?1:e[t].toString()<e[n]?-1:0:null:r>i?1:r<i?-1:0}),e):void 0,keys(e){if(null==e)return;const t=e._keys||Object.keys(e),n=[];return t.forEach(t=>{"_keys"!==t&&Object.hasOwnProperty.call(e,t)&&n.push(t)}),n},url_encode(t){if(null==t)return;if(e.lib.is("Object",t)){const n=function(t,r){const i=[];return(t._keys||Object.keys(t)).forEach(a=>{if(!Object.prototype.hasOwnProperty.call(t,a))return;const o=r?r+"["+a+"]":a,s=t[a];i.push(e.lib.is("Object",s)||Array.isArray(s)?n(s,o):encodeURIComponent(o)+"="+encodeURIComponent(s))}),i.join("&amp;")};return n(t)}let n=encodeURIComponent(t);return n=n.replace("'","%27"),n},join(e,n){if(null==e)return;let r="",i=[],a=null;return n&&n[0]&&(r=n[0]),t("Array",e)?i=e:(a=e._keys||Object.keys(e),a.forEach(t=>{"_keys"!==t&&Object.hasOwnProperty.call(e,t)&&i.push(e[t])})),i.join(r)},default(t,n){if(void 0!==n&&n.length>1)throw new e.Error("default filter expects one argument");return null==t||""===t?void 0===n?"":n[0]:t},json_encode(n){if(null==n)return"null";if("object"==typeof n&&t("Array",n)){const t=[];return n.forEach(n=>{t.push(e.filters.json_encode(n))}),"["+t.join(",")+"]"}if("object"==typeof n&&t("Date",n))return'"'+n.toISOString()+'"';if("object"==typeof n){const t=n._keys||Object.keys(n),r=[];return t.forEach(t=>{r.push(JSON.stringify(t)+":"+e.filters.json_encode(n[t]))}),"{"+r.join(",")+"}"}return JSON.stringify(n)},merge(n,r){let i=[],a=0,o=[];if(t("Array",n)?r.forEach(e=>{t("Array",e)||(i={})}):i={},t("Array",i)||(i._keys=[]),t("Array",n)?n.forEach(e=>{i._keys&&i._keys.push(a),i[a]=e,a++}):(o=n._keys||Object.keys(n),o.forEach(e=>{i[e]=n[e],i._keys.push(e);const t=parseInt(e,10);!isNaN(t)&&t>=a&&(a=t+1)})),r.forEach(e=>{t("Array",e)?e.forEach(e=>{i._keys&&i._keys.push(a),i[a]=e,a++}):(o=e._keys||Object.keys(e),o.forEach(t=>{i[t]||i._keys.push(t),i[t]=e[t];const n=parseInt(t,10);!isNaN(n)&&n>=a&&(a=n+1)}))}),0===r.length)throw new e.Error("Filter merge expects at least one parameter");return i},date(t,n){const r=e.functions.date(t),i=n&&Boolean(n.length)?n[0]:"F j, Y H:i";return e.lib.date(i.replace(/\\\\/g,"\\"),r)},date_modify(t,n){if(null==t)return;if(void 0===n||1!==n.length)throw new e.Error("date_modify filter expects 1 argument");const r=n[0];let i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),/* @__PURE__ */new Date(1e3*i)},replace(t,n){if(null==t)return;const r=n[0];let i;for(i in r)Object.hasOwnProperty.call(r,i)&&"_keys"!==i&&(t=e.lib.replaceAll(t,i,r[i]));return t},format(t,n){if(null!=t&&""!==t)return e.lib.vsprintf(t,n)},striptags(t,n){if(null!=t)return e.lib.stripTags(t,n)},escape(t,n){if(null==t||""===t)return;let r="html";if(n&&Boolean(n.length)&&!0!==n[0]&&(r=n[0]),"html"===r){const n=t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return new e.Markup(n,"html")}if("js"===r){const n=t.toString();let r="";for(let t=0;t<n.length;t++)if(n[t].match(/^[a-zA-Z0-9,._]$/))r+=n[t];else{const i=n.charAt(t),a=n.charCodeAt(t),o={"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};o[i]?r+=o[i]:r+=e.lib.sprintf("\\u%04s",a.toString(16).toUpperCase())}return new e.Markup(r,"js")}if("css"===r){const n=t.toString();let r="";for(let e=0;e<n.length;e++)n[e].match(/^[a-zA-Z0-9]$/)?r+=n[e]:r+="\\"+n.charCodeAt(e).toString(16).toUpperCase()+" ";return new e.Markup(r,"css")}if("url"===r){const n=e.filters.url_encode(t);return new e.Markup(n,"url")}if("html_attr"===r){const n=t.toString();let r="";for(let t=0;t<n.length;t++)if(n[t].match(/^[a-zA-Z0-9,.\-_]$/))r+=n[t];else if(n[t].match(/^[&<>"]$/))r+=n[t].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");else{const i=n.charCodeAt(t);r+=i<=31&&9!==i&&10!==i&&13!==i?"&#xFFFD;":i<128?e.lib.sprintf("&#x%02s;",i.toString(16).toUpperCase()):e.lib.sprintf("&#x%04s;",i.toString(16).toUpperCase())}return new e.Markup(r,"html_attr")}throw new e.Error("escape strategy unsupported")},e:(t,n)=>e.filters.escape(t,n),nl2br(t){if(null==t||""===t)return;const n="<br />BACKSLASH_n_replace";return t=e.filters.escape(t).replace(/\r\n/g,n).replace(/\r/g,n).replace(/\n/g,n),t=e.lib.replaceAll(t,"BACKSLASH_n_replace","\n"),new e.Markup(t)},number_format(e,t){let n=e;const r=t&&t[0]?t[0]:void 0,i=t&&void 0!==t[1]?t[1]:".",a=t&&void 0!==t[2]?t[2]:",";n=String(n).replace(/[^0-9+\-Ee.]/g,"");const o=isFinite(Number(n))?Number(n):0,s=isFinite(Number(r))?Math.abs(r):0;let l="";return l=(s?function(e,t){const n=10**t;return String(Math.round(e*n)/n)}(o,s):String(Math.round(o))).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(l[1]||"").length<s&&(l[1]=l[1]||"",l[1]+=new Array(s-l[1].length+1).join("0")),l.join(i)},trim(e,t){if(null==e)return;let n,r=String(e);n=t&&t[0]?String(t[0]):" \n\r\t\f\v            ​\u2028\u2029 ";for(let i=0;i<r.length;i++)if(!n.includes(r.charAt(i))){r=r.slice(Math.max(0,i));break}for(let i=r.length-1;i>=0;i--)if(!n.includes(r.charAt(i))){r=r.slice(0,Math.max(0,i+1));break}return n.includes(r.charAt(0))?"":r},truncate(e,t){let n=30,r=!1,i="...";if(e=String(e),t&&(t[0]&&(n=t[0]),t[1]&&(r=t[1]),t[2]&&(i=t[2])),e.length>n){if(r&&(n=e.indexOf(" ",n),-1===n))return e;e=e.slice(0,n)+i}return e},slice(t,n){if(null==t)return;if(void 0===n||0===n.length)throw new e.Error("slice filter expects at least 1 argument");const r=n[0]||0;let i=n.length>1?n[1]:t.length;const a=r>=0?r:Math.max(t.length+r,0);if(i<0&&(i=t.length-a+i),e.lib.is("Array",t)){const e=[];for(let n=a;n<a+i&&n<t.length;n++)e.push(t[n]);return e}if(e.lib.is("String",t))return t.slice(a,a+i);throw new e.Error("slice filter expects value to be an array or string")},abs(e){if(null!=e)return Math.abs(e)},first(e){if(t("Array",e))return e[0];if(t("Object",e)){if("_keys"in e)return e[e._keys[0]]}else if("string"==typeof e)return e.slice(0,1)},split(t,n){if(null!=t){if(void 0===n||0===n.length||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){const e=n[0],r=n[1],i=t.split(e);if(void 0===r)return i;if(r<0)return t.split(e,i.length+r);const a=[];if(""===e)for(;i.length>0;){let e="";for(let t=0;t<r&&i.length>0;t++)e+=i.shift();a.push(e)}else{for(let e=0;e<r-1&&i.length>0;e++)a.push(i.shift());i.length>0&&a.push(i.join(e))}return a}throw new e.Error("split filter expects value to be a string")}},last(t){if(e.lib.is("Object",t)){let e;return e=void 0===t._keys?Object.keys(t):t._keys,t[e[e.length-1]]}return e.lib.is("Number",t)?t.toString().slice(-1):t[t.length-1]},raw:t=>new e.Markup(t||""),batch(t,n){let r=n.shift();const i=n.shift();let a,o;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r);const s=e.lib.chunkArray(t,r);if(i&&t.length%r!==0){for(a=s.pop(),o=r-a.length;o--;)a.push(i);s.push(a)}return s},round(t,n){const r=(n=n||[]).length>0?n[0]:0,i=n.length>1?n[1]:"common";if(t=parseFloat(t),r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if("common"===i)return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*10**r)/10**r},spaceless:e=>e.replace(/>\s+</g,"><").trim()},e.filter=function(t,n,r){if(!e.filters[t])throw new e.Error("Unable to find filter "+t);return e.filters[t].call(this,n,r)},e.filter.extend=function(t,n){e.filters[t]=n},e}}),so=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.functions={range(e,t,n){const r=[];let i,a;const o=n||1;let s=!1;if(isNaN(e)||isNaN(t)?isNaN(e)&&isNaN(t)?(s=!0,i=e.charCodeAt(0),a=t.charCodeAt(0)):(i=isNaN(e)?0:e,a=isNaN(t)?0:t):(i=parseInt(e,10),a=parseInt(t,10)),i>a)for(;i>=a;)r.push(s?String.fromCharCode(i):i),i-=o;else for(;i<=a;)r.push(s?String.fromCharCode(i):i),i+=o;return r},cycle:(e,t)=>e[t%e.length],dump(...e){const t=[...e];let n=0,r="";const i=function(e){let t="";for(;e>0;)e--,t+=" ";return t},a=function(e){r+=i(n),"object"==typeof e?o(e):"function"==typeof e?r+="function()\n":"string"==typeof e?r+="string("+e.length+') "'+e+'"\n':"number"==typeof e?r+="number("+e+")\n":"boolean"==typeof e&&(r+="bool("+e+")\n")},o=function(e){let t;if(null===e)r+="NULL\n";else if(void 0===e)r+="undefined\n";else if("object"==typeof e){for(t in r+=i(n)+typeof e,n++,r+="("+function(e){let t,n=0;for(t in e)Object.hasOwnProperty.call(e,t)&&n++;return n}(e)+") {\n",e)Object.hasOwnProperty.call(e,t)&&(r+=i(n)+"["+t+"]=> \n",a(e[t]));n--,r+=i(n)+"}\n"}else a(e)};return 0===t.length&&t.push(this.context),t.forEach(e=>{o(e)}),r},date(t){let n;if(null==t||""===t)n=/* @__PURE__ */new Date;else if(e.lib.is("Date",t))n=t;else if(e.lib.is("String",t))n=t.match(/^\d+$/)?/* @__PURE__ */new Date(1e3*t):/* @__PURE__ */new Date(1e3*e.lib.strtotime(t));else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);n=/* @__PURE__ */new Date(1e3*t)}return n},block(e){const t=this,n=t.getBlock(e);if(void 0!==n)return n.render(t,t.context)},parent(){const t=this;return t.getBlock(t.getNestingStackToken(e.logic.type.block).blockName,!0).render(t,t.context)},attribute:(t,n,r)=>e.lib.is("Object",t)&&Object.hasOwnProperty.call(t,n)?"function"==typeof t[n]?t[n].apply(void 0,r):t[n]:t&&t[n]||void 0,max:(t,...n)=>e.lib.is("Object",t)?(delete t._keys,e.lib.max(t)):Reflect.apply(e.lib.max,null,[t,...n]),min:(t,...n)=>e.lib.is("Object",t)?(delete t._keys,e.lib.min(t)):Reflect.apply(e.lib.min,null,[t,...n]),template_from_string(t){return void 0===t&&(t=""),e.Templates.parsers.twig({options:this.template.options,data:t})},random(t){const n=2147483648;function r(e){const t=Math.floor(Math.random()*n),r=Math.min.call(null,0,e),i=Math.max.call(null,0,e);return r+Math.floor((i-r+1)*t/n)}if(e.lib.is("Number",t))return r(t);if(e.lib.is("String",t))return t.charAt(r(t.length-1));if(e.lib.is("Array",t))return t[r(t.length-1)];if(e.lib.is("Object",t)){const e=Object.keys(t);return t[e[r(e.length-1)]]}return r(2147483647)},source(n,r){const{namespaces:i}=this.template.options;let a,o=!1;const s=void 0!==t&&void 0!==t.exports&&"undefined"==typeof window;let l,c=n;i&&"object"==typeof i&&(c=e.path.expandNamespace(i,c)),l=s?"fs":"ajax";const u={id:n,path:c,method:l,parser:"source",async:!1,fetchTemplateSource:!0};void 0===r&&(r=!1);try{a=e.Templates.loadRemote(n,u),null==a?a="":o=!0}catch(d){e.log.debug("Twig.functions.source: ","Problem loading template ",d)}return o||r?a:'Template "{name}" is not defined.'.replace("{name}",n)}},e._function=function(t,n,r){if(!e.functions[t])throw new e.Error("Unable to find function "+t);return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}}),lo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sprintf=function(e,...t){const n=/%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g,r=[e,...t];let i=1;const a=function(e,t,n,r){n||(n=" ");const i=e.length>=t?"":new Array(1+t-e.length>>>0).join(n);return r?e+i:i+e},o=function(e,t,n,r,i){const o=r-e.length;return o>0&&(e=n||"0"!==i?a(e,r,i,n):[e.slice(0,t.length),a("",o,"0",!0),e.slice(t.length)].join("")),e},s=function(e,t,n,r,i,s){return o(a((Number(e)>>>0).toString(t),i||0,"0",!1),"",n,r,s)},l=function(e,t,n,r,i){return null!=r&&(e=e.slice(0,r)),o(e,"",t,n,i)},c=function(e,t,n,c,u,d){let p,f=0,h="";if("%%"===e)return"%";let m=" ",g=!1,y="",b=0,v=0;for(b=0,v=n.length;b<v;b++)switch(n.charAt(b)){case" ":case"0":m=n.charAt(b);break;case"+":y="+";break;case"-":g=!0;break;case"'":b+1<v&&(m=n.charAt(b+1),b++)}let x,w=0;if(w=c?+c:0,!isFinite(w))throw new Error("Width must be finite");if(x=u?+u:"d"===d?0:"fFeE".includes(d)?6:void 0,t&&0===+t)throw new Error("Argument number must be greater than zero");if(t&&+t>=r.length)throw new Error("Too few arguments");switch(p=t?r[+t]:r[i++],d){case"%":return"%";case"s":return l(String(p),g,w,x,m);case"c":return l(String.fromCharCode(+String(p)),g,w,x,m);case"b":return s(p,2,g,w,x,m);case"o":return s(p,8,g,w,x,m);case"x":return s(p,16,g,w,x,m);case"X":return s(p,16,g,w,x,m).toUpperCase();case"u":return s(p,10,g,w,x,m);case"i":case"d":return f=+String(p)||0,f=Math.round(f-f%1),h=f<0?"-":y,p=h+a(String(Math.abs(f)),x??0,"0",!1),g&&"0"===m&&(m=" "),o(String(p),h,g,w,m);case"e":case"E":case"f":case"F":case"g":case"G":{f=+String(p),h=f<0?"-":y;const e="efg".indexOf(d.toLowerCase()),t=Math.abs(f);let n="";n=0===e?t.toExponential(x):1===e?t.toFixed(x):t.toPrecision(x);const r=o(h+n,h,g,w,m);return"eEfFgG".indexOf(d)%2==0?r:r.toUpperCase()}default:return""}};try{return e.replace(n,c)}catch(u){return!1}}}),co=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.vsprintf=function(e,n){return(0,t.sprintf)(e,...n)};var t=lo()}),uo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._phpCastString=function(e){if("boolean"==typeof e)return e?"1":"";if("string"==typeof e)return e;if("number"==typeof e)return isNaN(e)?"NAN":isFinite(e)?e+"":(e<0?"-":"")+"INF";if(void 0===e)return"";if("object"==typeof e)return Array.isArray(e)?"Array":null!==e?"Object":"";throw new Error("Unsupported value type")}}),po=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.strip_tags=function(e,n){n=(((n||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");const r=/<\/?([a-z0-9]*)\b[^>]*>?/gi,i=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;let a=(0,t._phpCastString)(e);for(a=a.endsWith("<")?a.slice(0,-1):a;;){const e=a;if(a=e.replace(i,"").replace(r,function(e,t){return n.includes("<"+t.toLowerCase()+">")?e:""}),e===a)return a}};var t=uo()}),fo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._php_cast_int=function(e){return"number"==typeof e?isNaN(e)||!isFinite(e)?0:e<0?Math.ceil(e):Math.floor(e):"string"==typeof e?parseInt(e,10)||0:+!!e}}),ho=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e._php_cast_float=function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e)||0:(0,t._php_cast_int)(e)};var t=fo()}),mo=/* @__PURE__ */$(e=>{function t(e,t){let n=Math.floor(Math.abs(e)+.5);return("PHP_ROUND_HALF_DOWN"===t&&e===n-.5||"PHP_ROUND_HALF_EVEN"===t&&e===.5+2*Math.floor(n/2)||"PHP_ROUND_HALF_ODD"===t&&e===.5+2*Math.floor(n/2)-1)&&(n-=1),e<0?-n:n}Object.defineProperty(e,"__esModule",{value:!0}),e.round=function(e,i=0,a="PHP_ROUND_HALF_UP"){let o;if(e=(0,n._php_cast_float)(e),i=(0,r._php_cast_int)(i),o=Math.pow(10,i),isNaN(e)||!isFinite(e))return e;if(Math.trunc(e)===e&&i>=0)return e;const s=14-Math.floor(Math.log10(Math.abs(e)));return s>i&&s-15<i?(e=t(e*Math.pow(10,s),a),e/=Math.pow(10,Math.abs(i-s))):e*=o,(e=t(e,a))/o};var n=ho(),r=fo()}),go=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.min=function(...e){if(0===e.length)throw new Error("At least one value should be passed to min()");let i;if(1===e.length){const r=e[0];if(void 0===r||!t(r))throw new Error("Wrong parameter count for min()");if(i=n(r),0===i.length)throw new Error("Array must contain at least one element for min()")}else i=e;const a=i[0];if(void 0===a)throw new Error("Array must contain at least one element for min()");let o=a;for(let t=1;t<i.length;t+=1){const e=i[t];void 0!==e&&-1===r(o,e)&&(o=e)}return o};var t=e=>"object"==typeof e&&null!==e,n=e=>Array.isArray(e)?e:Object.values(e).filter(e=>void 0!==e),r=(e,i)=>{const a=Number(e),o=Number(i);if(e===i)return 0;if(t(e)){if(t(i)){const t=n(e),a=n(i);if(a.length>t.length)return 1;if(a.length<t.length)return-1;for(let e=0;e<t.length;e+=1){const n=t[e],i=a[e];if(void 0===n||void 0===i)continue;const o=r(n,i);if(0!==o)return o}return 0}return-1}return t(i)?1:Number.isNaN(o)&&!Number.isNaN(a)?0===e?0:a<0?1:-1:Number.isNaN(a)&&!Number.isNaN(o)?0===i?0:o>0?1:-1:"string"==typeof e&&"string"==typeof i&&Number.isNaN(a)&&Number.isNaN(o)?i>e?1:-1:o>a?1:-1}}),yo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.max=function(...e){if(0===e.length)throw new Error("At least one value should be passed to max()");let i;if(1===e.length){const r=e[0];if(void 0===r||!t(r))throw new Error("Wrong parameter count for max()");if(i=n(r),0===i.length)throw new Error("Array must contain at least one element for max()")}else i=e;const a=i[0];if(void 0===a)throw new Error("Array must contain at least one element for max()");let o=a;for(let t=1;t<i.length;t+=1){const e=i[t];void 0!==e&&1===r(o,e)&&(o=e)}return o};var t=e=>"object"==typeof e&&null!==e,n=e=>Array.isArray(e)?e:Object.values(e).filter(e=>void 0!==e),r=(e,i)=>{const a=Number(e),o=Number(i);if(e===i)return 0;if(t(e)){if(t(i)){const t=n(e),a=n(i);if(a.length>t.length)return 1;if(a.length<t.length)return-1;for(let e=0;e<t.length;e+=1){const n=t[e],i=a[e];if(void 0===n||void 0===i)continue;const o=r(n,i);if(0!==o)return o}return 0}return-1}return t(i)?1:Number.isNaN(o)&&!Number.isNaN(a)?0===e?0:a<0?1:-1:Number.isNaN(a)&&!Number.isNaN(o)?0===i?0:o>0?1:-1:"string"==typeof e&&"string"==typeof i&&Number.isNaN(a)&&Number.isNaN(o)?i>e?1:-1:o>a?1:-1}}),bo=/* @__PURE__ */$(e=>{function t(e,t){switch(t?.toLowerCase()){case"a":e+=12===e?-12:0;break;case"p":e+=12!==e?12:0}return e}function n(e){let t=+e;return e.length<4&&t<100&&(t+=t<70?2e3:1900),t}function r(e){return{jan:0,january:0,i:0,feb:1,february:1,ii:1,mar:2,march:2,iii:2,apr:3,april:3,iv:3,may:4,v:4,jun:5,june:5,vi:5,jul:6,july:6,vii:6,aug:7,august:7,viii:7,sep:8,sept:8,september:8,ix:8,oct:9,october:9,x:9,nov:10,november:10,xi:10,dec:11,december:11,xii:11}[e.toLowerCase()]??NaN}function i(e,t=0){return{mon:1,monday:1,tue:2,tuesday:2,wed:3,wednesday:3,thu:4,thursday:4,fri:5,friday:5,sat:6,saturday:6,sun:0,sunday:0}[e.toLowerCase()]||t}function a(e,t=NaN){const n=e?.match(/(?:GMT)?([+-])(\d+)(:?)(\d{0,2})/i);if(!n)return t;const r="-"===n[1]?-1:1;let i=+(n[2]??0),a=+(n[4]??0);return n[4]||n[3]||(a=Math.floor(i%100),i=Math.floor(i/100)),r*(60*i+a)*60}Object.defineProperty(e,"__esModule",{value:!0}),e.strtotime=function(e,t){const n=null==t?Math.floor(Date.now()/1e3):t;e=String(e);const r=[s.yesterday,s.now,s.noon,s.midnightOrToday,s.tomorrow,s.timestamp,s.firstOrLastDay,s.backOrFrontOf,s.timeTiny12,s.timeShort12,s.timeLong12,s.mssqltime,s.oracledate,s.timeShort24,s.timeLong24,s.iso8601long,s.gnuNoColon,s.iso8601noColon,s.americanShort,s.american,s.iso8601date4,s.iso8601dateSlash,s.dateSlash,s.gnuDateShortOrIso8601date2,s.gnuDateShorter,s.dateFull,s.pointedDate4,s.pointedDate2,s.dateNoDay,s.dateNoDayRev,s.dateTextual,s.dateNoYear,s.dateNoYearRev,s.dateNoColon,s.xmlRpc,s.xmlRpcNoColon,s.soap,s.wddx,s.exif,s.pgydotd,s.isoWeekDay,s.pgTextShort,s.pgTextReverse,s.clf,s.year4,s.ago,s.dayText,s.relativeTextWeek,s.relativeText,s.monthFullOrMonthAbbr,s.tzCorrection,s.tzAbbr,s.dateShortWithTimeShort12,s.dateShortWithTimeLong12,s.dateShortWithTimeShort,s.dateShortWithTimeLong,s.relative,s.whitespace],i={...l};for(;e.length;){let t=null,n=null;for(const i of r){const r=e.match(i.regex);r&&(!t||r[0].length>t[0].length)&&(t=r,n=i)}if(!n||!t)return!1;if(n.callback&&!1===n.callback.apply(i,t))return!1;e=e.substr(t[0].length),n=null,t=null}return Math.floor(i.toDate(/* @__PURE__ */new Date(1e3*n)).getTime()/1e3)};var o={acdt:37800,acst:34200,addt:-7200,adt:-10800,aedt:39600,aest:36e3,ahdt:-32400,ahst:-36e3,akdt:-28800,akst:-32400,amt:-13840,apt:-10800,ast:-14400,awdt:32400,awst:28800,awt:-10800,bdst:7200,bdt:-36e3,bmt:-14309,bst:3600,cast:34200,cat:7200,cddt:-14400,cdt:-18e3,cemt:10800,cest:7200,cet:3600,cmt:-15408,cpt:-18e3,cst:-21600,cwt:-18e3,chst:36e3,dmt:-1521,eat:10800,eddt:-10800,edt:-14400,eest:10800,eet:7200,emt:-26248,ept:-14400,est:-18e3,ewt:-14400,ffmt:-14660,fmt:-4056,gdt:39600,gmt:0,gst:36e3,hdt:-34200,hkst:32400,hkt:28800,hmt:-19776,hpt:-34200,hst:-36e3,hwt:-34200,iddt:14400,idt:10800,imt:25025,ist:7200,jdt:36e3,jmt:8440,jst:32400,kdt:36e3,kmt:5736,kst:30600,lst:9394,mddt:-18e3,mdst:16279,mdt:-21600,mest:7200,met:3600,mmt:9017,mpt:-21600,msd:14400,msk:10800,mst:-25200,mwt:-21600,nddt:-5400,ndt:-9052,npt:-9e3,nst:-12600,nwt:-9e3,nzdt:46800,nzmt:41400,nzst:43200,pddt:-21600,pdt:-25200,pkst:21600,pkt:18e3,plmt:25590,pmt:-13236,ppmt:-17340,ppt:-25200,pst:-28800,pwt:-25200,qmt:-18840,rmt:5794,sast:7200,sdmt:-16800,sjmt:-20173,smt:-13884,sst:-39600,tbmt:10751,tmt:12344,uct:0,utc:0,wast:7200,wat:3600,wemt:7200,west:3600,wet:0,wib:25200,wita:28800,wit:32400,wmt:5040,yddt:-25200,ydt:-28800,ypt:-28800,yst:-32400,ywt:-28800,a:3600,b:7200,c:10800,d:14400,e:18e3,f:21600,g:25200,h:28800,i:32400,k:36e3,l:39600,m:43200,n:-3600,o:-7200,p:-10800,q:-14400,r:-18e3,s:-21600,t:-25200,u:-28800,v:-32400,w:-36e3,x:-39600,y:-43200,z:0},s={yesterday:{regex:/^yesterday/i,name:"yesterday",callback(){return this.rd-=1,this.resetTime()}},now:{regex:/^now/i,name:"now"},noon:{regex:/^noon/i,name:"noon",callback(){return this.resetTime()&&this.time(12,0,0,0)}},midnightOrToday:{regex:/^(midnight|today)/i,name:"midnight | today",callback(){return this.resetTime()}},tomorrow:{regex:/^tomorrow/i,name:"tomorrow",callback(){return this.rd+=1,this.resetTime()}},timestamp:{regex:/^@(-?\d+)/i,name:"timestamp",callback(e,t){return this.rs+=+t,this.y=1970,this.m=0,this.d=1,this.dates=0,this.resetTime()&&this.zone(0)}},firstOrLastDay:{regex:/^(first|last) day of/i,name:"firstdayof | lastdayof",callback(e,t){"first"===t.toLowerCase()?this.firstOrLastDayOfMonth=1:this.firstOrLastDayOfMonth=-1}},backOrFrontOf:{regex:new RegExp("^(back|front) of (2[0-4]|[01]?[0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))?","i"),name:"backof | frontof",callback(e,n,r,i){let a=+r,o=15;return"back"===n.toLowerCase()||(a-=1,o=45),a=t(a,i),this.resetTime()&&this.time(a,o,0,0)}},weekdayOf:{regex:new RegExp("^(first|second|third|fourth|fifth|sixth|seventh|eighth?|ninth|tenth|eleventh|twelfth|next|last|previous|this)[ \\t]+(sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat)[ \\t]+of","i"),name:"weekdayof"},mssqltime:{regex:new RegExp("^(0?[1-9]|1[0-2]):([0-5][0-9]):(60|[0-5][0-9])[:.]([0-9]+)(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"mssqltime",callback(e,n,r,i,a,o){return this.time(t(+n,o),+r,+i,+a.substr(0,3))}},oracledate:{regex:/^(\d{2})-([A-Z]{3})-(\d{2})$/i,name:"d-M-y",callback(e,t,n,r){const i={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[n.toUpperCase()]??NaN;return this.ymd(2e3+parseInt(r,10),i,parseInt(t,10))}},timeLong12:{regex:new RegExp("^(0?[1-9]|1[0-2])[:.]([0-5]?[0-9])[:.](60|[0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timelong12",callback(e,n,r,i,a){return this.time(t(+n,a),+r,+i,0)}},timeShort12:{regex:new RegExp("^(0?[1-9]|1[0-2])[:.]([0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timeshort12",callback(e,n,r,i){return this.time(t(+n,i),+r,0,0)}},timeTiny12:{regex:new RegExp("^(0?[1-9]|1[0-2])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"timetiny12",callback(e,n,r){return this.time(t(+n,r),0,0,0)}},soap:{regex:new RegExp("^([0-9]{4})-(0[0-9]|1[0-2])-(0[0-9]|[1-2][0-9]|3[01])T([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])(?:\\.([0-9]+))((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)?","i"),name:"soap",callback(e,t,n,r,i,o,s,l,c){return this.ymd(+t,+n-1,+r)&&this.time(+i,+o,+s,+l.substr(0,3))&&this.zone(a(c))}},wddx:{regex:new RegExp("^([0-9]{4})-(1[0-2]|0?[0-9])-(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)T(2[0-4]|[01]?[0-9]):([0-5]?[0-9]):(60|[0-5]?[0-9])"),name:"wddx",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},exif:{regex:new RegExp("^([0-9]{4}):(0[0-9]|1[0-2]):(0[0-9]|[1-2][0-9]|3[01]) ([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])","i"),name:"exif",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},xmlRpc:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])T(2[0-4]|[01]?[0-9]):([0-5][0-9]):(60|[0-5][0-9])"),name:"xmlrpc",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},xmlRpcNoColon:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])[Tt](2[0-4]|[01]?[0-9])([0-5][0-9])(60|[0-5][0-9])"),name:"xmlrpcnocolon",callback(e,t,n,r,i,a,o){return this.ymd(+t,+n-1,+r)&&this.time(+i,+a,+o,0)}},clf:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)/(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)/([0-9]{4}):([01][0-9]|2[0-4]):([0-5][0-9]):(60|[0-5][0-9])[ \\t]+((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)","i"),name:"clf",callback(e,t,n,i,o,s,l,c){return this.ymd(+i,r(n),+t)&&this.time(+o,+s,+l,0)&&this.zone(a(c))}},iso8601long:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])(?:\\.([0-9]+))","i"),name:"iso8601long",callback(e,t,n,r,i){return this.time(+t,+n,+r,+i.substr(0,3))}},dateTextual:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]+([0-9]{1,4})","i"),name:"datetextual",callback(e,t,i,a){return this.ymd(n(a),r(t),+i)}},pointedDate4:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[.\\t-](1[0-2]|0?[0-9])[.-]([0-9]{4})"),name:"pointeddate4",callback(e,t,n,r){return this.ymd(+r,+n-1,+t)}},pointedDate2:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[.\\t](1[0-2]|0?[0-9])\\.([0-9]{2})"),name:"pointeddate2",callback(e,t,r,i){return this.ymd(n(i),+r-1,+t)}},timeLong24:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])"),name:"timelong24",callback(e,t,n,r){return this.time(+t,+n,+r,0)}},dateNoColon:{regex:new RegExp("^([0-9]{4})(0[0-9]|1[0-2])(0[0-9]|[1-2][0-9]|3[01])"),name:"datenocolon",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},pgydotd:{regex:new RegExp("^([0-9]{4})\\.?(00[1-9]|0[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6])"),name:"pgydotd",callback(e,t,n){return this.ymd(+t,0,+n)}},timeShort24:{regex:new RegExp("^t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])","i"),name:"timeshort24",callback(e,t,n){return this.time(+t,+n,0,0)}},iso8601noColon:{regex:new RegExp("^t?([01][0-9]|2[0-4])([0-5][0-9])(60|[0-5][0-9])","i"),name:"iso8601nocolon",callback(e,t,n,r){return this.time(+t,+n,+r,0)}},iso8601dateSlash:{regex:new RegExp("^([0-9]{4})/(0[0-9]|1[0-2])/(0[0-9]|[1-2][0-9]|3[01])/"),name:"iso8601dateslash",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},dateSlash:{regex:new RegExp("^([0-9]{4})/(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"dateslash",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},american:{regex:new RegExp("^(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)/([0-9]{1,4})"),name:"american",callback(e,t,r,i){return this.ymd(n(i),+t-1,+r)}},americanShort:{regex:new RegExp("^(1[0-2]|0?[0-9])/(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"americanshort",callback(e,t,n){return this.ymd(this.y,+t-1,+n)}},gnuDateShortOrIso8601date2:{regex:new RegExp("^([0-9]{1,4})-(1[0-2]|0?[0-9])-(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)"),name:"gnudateshort | iso8601date2",callback(e,t,r,i){return this.ymd(n(t),+r-1,+i)}},iso8601date4:{regex:new RegExp("^([+-]?[0-9]{4})-(0[0-9]|1[0-2])-(0[0-9]|[1-2][0-9]|3[01])"),name:"iso8601date4",callback(e,t,n,r){return this.ymd(+t,+n-1,+r)}},gnuNoColon:{regex:new RegExp("^t?([01][0-9]|2[0-4])([0-5][0-9])","i"),name:"gnunocolon",callback(e,t,n){switch(this.times){case 0:return this.time(+t,+n,0,this.f);case 1:return this.y=100*+t+ +n,this.times++,!0;default:return!1}}},gnuDateShorter:{regex:new RegExp("^([0-9]{4})-(1[0-2]|0?[0-9])"),name:"gnudateshorter",callback(e,t,n){return this.ymd(+t,+n-1,1)}},pgTextReverse:{regex:new RegExp("^(\\d{3,4}|[4-9]\\d|3[2-9])-(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)-(0[0-9]|[1-2][0-9]|3[01])","i"),name:"pgtextreverse",callback(e,t,i,a){return this.ymd(n(t),r(i),+a)}},dateFull:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[ \\t.-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ \\t.-]*([0-9]{1,4})","i"),name:"datefull",callback(e,t,i,a){return this.ymd(n(a),r(i),+t)}},dateNoDay:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*([0-9]{4})","i"),name:"datenoday",callback(e,t,n){return this.ymd(+n,r(t),1)}},dateNoDayRev:{regex:new RegExp("^([0-9]{4})[ .\\t-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})","i"),name:"datenodayrev",callback(e,t,n){return this.ymd(+t,r(n),1)}},pgTextShort:{regex:new RegExp("^(jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)-(0[0-9]|[1-2][0-9]|3[01])-([0-9]{1,4})","i"),name:"pgtextshort",callback(e,t,i,a){return this.ymd(n(a),r(t),+i)}},dateNoYear:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*","i"),name:"datenoyear",callback(e,t,n){return this.ymd(this.y,r(t),+n)}},dateNoYearRev:{regex:new RegExp("^(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[ .\\t-]*(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})","i"),name:"datenoyearrev",callback(e,t,n){return this.ymd(this.y,r(n),+t)}},isoWeekDay:{regex:new RegExp("^([0-9]{4})-?W(0[1-9]|[1-4][0-9]|5[0-3])(?:-?([0-7]))?"),name:"isoweekday | isoweek",callback(e,t,n,r){const i=r?+r:1;if(!this.ymd(+t,0,1))return!1;let a=new Date(this.y,this.m,this.d).getDay();return a=0-(a>4?a-7:a),this.rd+=a+7*(+n-1)+i,!0}},relativeText:{regex:new RegExp("^(first|second|third|fourth|fifth|sixth|seventh|eighth?|ninth|tenth|eleventh|twelfth|next|last|previous|this)[ \\t]+((?:second|sec|minute|min|hour|day|fortnight|forthnight|month|year)s?|weeks|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?)","i"),name:"relativetext",callback(e,t,n){const{amount:r,behavior:a}=function(e){const t=e.toLowerCase();return{amount:{last:-1,previous:-1,this:0,first:1,next:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eight:8,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12}[t]??0,behavior:{this:1}[t]||0}}(t);switch(n.toLowerCase()){case"sec":case"secs":case"second":case"seconds":this.rs+=r;break;case"min":case"mins":case"minute":case"minutes":this.ri+=r;break;case"hour":case"hours":this.rh+=r;break;case"day":case"days":this.rd+=r;break;case"fortnight":case"fortnights":case"forthnight":case"forthnights":this.rd+=14*r;break;case"week":case"weeks":this.rd+=7*r;break;case"month":case"months":this.rm+=r;break;case"year":case"years":this.ry+=r;break;case"mon":case"monday":case"tue":case"tuesday":case"wed":case"wednesday":case"thu":case"thursday":case"fri":case"friday":case"sat":case"saturday":case"sun":case"sunday":this.resetTime(),this.weekday=i(n,7),this.weekdayBehavior=1,this.rd+=7*(r>0?r-1:r)}}},relative:{regex:new RegExp("^([+-]*)[ \\t]*(\\d+)[ \\t]*((?:second|sec|minute|min|hour|day|fortnight|forthnight|month|year)s?|weeks|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?|week)","i"),name:"relative",callback(e,t,n,r){const a=t.replace(/[^-]/g,"").length,o=+n*Math.pow(-1,a);switch(r.toLowerCase()){case"sec":case"secs":case"second":case"seconds":this.rs+=o;break;case"min":case"mins":case"minute":case"minutes":this.ri+=o;break;case"hour":case"hours":this.rh+=o;break;case"day":case"days":this.rd+=o;break;case"fortnight":case"fortnights":case"forthnight":case"forthnights":this.rd+=14*o;break;case"week":case"weeks":this.rd+=7*o;break;case"month":case"months":this.rm+=o;break;case"year":case"years":this.ry+=o;break;case"mon":case"monday":case"tue":case"tuesday":case"wed":case"wednesday":case"thu":case"thursday":case"fri":case"friday":case"sat":case"saturday":case"sun":case"sunday":this.resetTime(),this.weekday=i(r,7),this.weekdayBehavior=1,this.rd+=7*(o>0?o-1:o)}}},dayText:{regex:new RegExp("^(sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun|mon|tue|wed|thu|fri|sat|weekdays?)","i"),name:"daytext",callback(e,t){this.resetTime(),this.weekday=i(t,0),2!==this.weekdayBehavior&&(this.weekdayBehavior=1)}},relativeTextWeek:{regex:new RegExp("^(next|last|previous|this)[ \\t]+week","i"),name:"relativetextweek",callback(e,t){switch(this.weekdayBehavior=2,t.toLowerCase()){case"this":this.rd+=0;break;case"next":this.rd+=7;break;case"last":case"previous":this.rd-=7}isNaN(this.weekday)&&(this.weekday=1)}},monthFullOrMonthAbbr:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)","i"),name:"monthfull | monthabbr",callback(e,t){return this.ymd(this.y,r(t),this.d)}},tzCorrection:{regex:new RegExp("^((?:GMT)?([+-])(2[0-4]|[01]?[0-9]):?([0-5]?[0-9])?)","i"),name:"tzcorrection",callback(e){return this.zone(a(e))}},tzAbbr:{regex:new RegExp("^\\(?([a-zA-Z]{1,6})\\)?"),name:"tzabbr",callback(e,t){const n=o[t.toLowerCase()];return null!=n&&!Number.isNaN(n)&&this.zone(n)}},ago:{regex:/^ago/i,name:"ago",callback(){this.ry=-this.ry,this.rm=-this.rm,this.rd=-this.rd,this.rh=-this.rh,this.ri=-this.ri,this.rs=-this.rs,this.rf=-this.rf}},year4:{regex:new RegExp("^([0-9]{4})"),name:"year4",callback(e,t){return this.y=+t,!0}},whitespace:{regex:/^[ .,\t]+/,name:"whitespace"},dateShortWithTimeLong:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])[:.](60|[0-5]?[0-9])","i"),name:"dateshortwithtimelong",callback(e,t,n,i,a,o){return this.ymd(this.y,r(t),+n)&&this.time(+i,+a,+o,0)}},dateShortWithTimeLong12:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*(0?[1-9]|1[0-2])[:.]([0-5]?[0-9])[:.](60|[0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"dateshortwithtimelong12",callback(e,n,i,a,o,s,l){return this.ymd(this.y,r(n),+i)&&this.time(t(+a,l),+o,+s,0)}},dateShortWithTimeShort:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*t?(2[0-4]|[01]?[0-9])[:.]([0-5]?[0-9])","i"),name:"dateshortwithtimeshort",callback(e,t,n,i,a){return this.ymd(this.y,r(t),+n)&&this.time(+i,+a,0,0)}},dateShortWithTimeShort12:{regex:new RegExp("^(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec|i[vx]|vi{0,3}|xi{0,2}|i{1,3})[ .\\t-]*(?:(3[01]|[0-2]?[0-9])(?:st|nd|rd|th)?)[,.stndrh\\t ]*(0?[1-9]|1[0-2])[:.]([0-5][0-9])[ \\t]*(?:([ap])\\.?m\\.?([\\t ]|$))","i"),name:"dateshortwithtimeshort12",callback(e,n,i,a,o,s){return this.ymd(this.y,r(n),+i)&&this.time(t(+a,s),+o,0,0)}}},l={y:NaN,m:NaN,d:NaN,h:NaN,i:NaN,s:NaN,f:NaN,ry:0,rm:0,rd:0,rh:0,ri:0,rs:0,rf:0,weekday:NaN,weekdayBehavior:0,firstOrLastDayOfMonth:0,z:NaN,dates:0,times:0,zones:0,ymd(e,t,n){return!(this.dates>0||(this.dates++,this.y=e,this.m=t,this.d=n,0))},time(e,t,n,r){return!(this.times>0||(this.times++,this.h=e,this.i=t,this.s=n,this.f=r,0))},resetTime(){return this.h=0,this.i=0,this.s=0,this.f=0,this.times=0,!0},zone(e){return this.zones<=1&&(this.zones++,this.z=e,!0)},toDate(e){switch(this.dates&&!this.times&&(this.h=this.i=this.s=this.f=0),isNaN(this.y)&&(this.y=e.getFullYear()),isNaN(this.m)&&(this.m=e.getMonth()),isNaN(this.d)&&(this.d=e.getDate()),isNaN(this.h)&&(this.h=e.getHours()),isNaN(this.i)&&(this.i=e.getMinutes()),isNaN(this.s)&&(this.s=e.getSeconds()),isNaN(this.f)&&(this.f=e.getMilliseconds()),this.firstOrLastDayOfMonth){case 1:this.d=1;break;case-1:this.d=0,this.m+=1}if(!isNaN(this.weekday)){const t=new Date(e.getTime());t.setFullYear(this.y,this.m,this.d),t.setHours(this.h,this.i,this.s,this.f);const n=t.getDay();if(2===this.weekdayBehavior)0===n&&0!==this.weekday&&(this.weekday=-6),0===this.weekday&&0!==n&&(this.weekday=7),this.d-=n,this.d+=this.weekday;else{let e=this.weekday-n;(this.rd<0&&e<0||this.rd>=0&&e<=-this.weekdayBehavior)&&(e+=7),this.weekday>=0?this.d+=e:this.d-=7-(Math.abs(this.weekday)-n),this.weekday=NaN}}this.y+=this.ry,this.m+=this.rm,this.d+=this.rd,this.h+=this.rh,this.i+=this.ri,this.s+=this.rs,this.f+=this.rf,this.ry=this.rm=this.rd=0,this.rh=this.ri=this.rs=this.rf=0;const t=new Date(e.getTime());switch(t.setFullYear(this.y,this.m,this.d),t.setHours(this.h,this.i,this.s,this.f),this.firstOrLastDayOfMonth){case 1:t.setDate(1);break;case-1:t.setMonth(t.getMonth()+1,0)}return isNaN(this.z)||t.getTimezoneOffset()===this.z||(t.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),t.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds()-this.z,t.getMilliseconds())),t}}}),vo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.date=function(e,t){let n,r=/* @__PURE__ */new Date;const i=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],a=/\\?(.?)/gi,o=function(e,t){return r=e,Object.hasOwn(n,r)?String(n[e]()):t;var r},s=function(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n};return n={d:function(){return s(n.j(),2)},D:function(){return String(n.l()).slice(0,3)},j:function(){return r.getDate()},l:function(){return(i[Number(n.w())]??"")+"day"},N:function(){return Number(n.w())||7},S:function(){const e=Number(n.j());let t=e%10;return t<=3&&1===Number.parseInt(String(e%100/10),10)&&(t=0),["st","nd","rd"][t-1]||"th"},w:function(){return r.getDay()},z:function(){const e=new Date(Number(n.Y()),Number(n.n())-1,Number(n.j())),t=new Date(Number(n.Y()),0,1);return Math.round((e.getTime()-t.getTime())/864e5)},W:function(){const e=new Date(Number(n.Y()),Number(n.n())-1,Number(n.j())-Number(n.N())+3),t=new Date(e.getFullYear(),0,4);return s(1+Math.round((e.getTime()-t.getTime())/864e5/7),2)},F:function(){return i[6+Number(n.n())]??""},m:function(){return s(n.n(),2)},M:function(){return String(n.F()).slice(0,3)},n:function(){return r.getMonth()+1},t:function(){return new Date(Number(n.Y()),Number(n.n()),0).getDate()},L:function(){const e=Number(n.Y());return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){const e=Number(n.n()),t=Number(n.W());return Number(n.Y())+(12===e&&t<9?1:1===e&&t>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return String(n.Y()).slice(-2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return String(n.a()).toUpperCase()},B:function(){const e=3600*r.getUTCHours(),t=60*r.getUTCMinutes(),n=r.getUTCSeconds();return s(Math.floor((e+t+n+3600)/86.4)%1e3,3)},g:function(){return Number(n.G())%12||12},G:function(){return r.getHours()},h:function(){return s(n.g(),2)},H:function(){return s(n.G(),2)},i:function(){return s(r.getMinutes(),2)},s:function(){return s(r.getSeconds(),2)},u:function(){return s(1e3*r.getMilliseconds(),6)},e:function(){throw new Error("Not supported (see source code of date() for timezone on how to add support)")},I:function(){const e=new Date(Number(n.Y()),0),t=Date.UTC(Number(n.Y()),0),r=new Date(Number(n.Y()),6),i=Date.UTC(Number(n.Y()),6);return e.getTime()-t!==r.getTime()-i?1:0},O:function(){const e=r.getTimezoneOffset(),t=Math.abs(e);return(e>0?"-":"+")+s(100*Math.floor(t/60)+t%60,4)},P:function(){const e=String(n.O());return e.slice(0,3)+":"+e.slice(3,5)},T:function(){return"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(a,o)},r:function(){return"D, d M Y H:i:s O".replace(a,o)},U:function(){return r.getTime()/1e3|0}},l=e,r=void 0===(c=t)?/* @__PURE__ */new Date:c instanceof Date?new Date(c):/* @__PURE__ */new Date(1e3*Number(c)),l.replace(a,o);var l,c}}),xo=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolval=function(e){return!1!==e&&0!==e&&0!==e&&""!==e&&"0"!==e&&(!Array.isArray(e)||0!==e.length)&&null!=e}}),wo=/* @__PURE__ */$((e,t)=>{t.exports=function(e){const{sprintf:t}=lo(),{vsprintf:n}=co(),{strip_tags:r}=po(),{round:i}=mo(),{min:a}=go(),{max:o}=yo(),{strtotime:s}=bo(),{date:l}=vo(),{boolval:c}=xo();return e.lib={},e.lib.sprintf=t,e.lib.vsprintf=n,e.lib.round=i,e.lib.max=o,e.lib.min=a,e.lib.stripTags=r,e.lib.strtotime=s,e.lib.date=l,e.lib.boolval=c,e.lib.is=function(e,t){if(null==t)return!1;switch(e){case"Array":return Array.isArray(t);case"Date":return t instanceof Date;case"String":return"string"==typeof t||t instanceof String;case"Number":return"number"==typeof t||t instanceof Number;case"Function":return"function"==typeof t;case"Object":return t instanceof Object;default:return!1}},e.lib.replaceAll=function(e,t,n){const r="string"==typeof e?e:e.toString(),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return r.replace(new RegExp(i,"g"),n)},e.lib.chunkArray=function(e,t){const n=[];let r=0;const i=e.length;if(t<1||!Array.isArray(e))return[];for(;r<i;)n.push(e.slice(r,r+=t));return n},e}}),ko=/* @__PURE__ */$((e,t)=>{t.exports=function(e){e.Templates.registerLoader("ajax",function(t,n,r,i){let a;const{precompiled:o}=n,s=this.parsers[n.parser]||this.parser.twig;if("undefined"==typeof XMLHttpRequest)throw new e.Error('Unsupported platform: Unable to do ajax requests because there is no "XMLHTTPRequest" implementation');const l=new XMLHttpRequest;return l.onreadystatechange=function(){let c=null;4===l.readyState&&(200===l.status||window.cordova&&0===l.status?(e.log.debug("Got template ",l.responseText),c=!0===o?JSON.parse(l.responseText):l.responseText,n.url=t,n.data=c,a=s.call(this,n),"function"==typeof r&&r(a)):"function"==typeof i&&i(l))},l.open("GET",t,Boolean(n.async)),l.overrideMimeType("text/plain"),l.send(),!!n.async||a})}}),So=/* @__PURE__ */$((e,t)=>{t.exports={}}),To=/* @__PURE__ */$((e,t)=>{t.exports=function(e){let t,n;try{t=So(),n=So()}catch(r){}e.Templates.registerLoader("fs",function(i,a,o,s){let l,c=null;const{precompiled:u}=a,d=this.parsers[a.parser]||this.parser.twig;if(!t||!n)throw new e.Error('Unsupported platform: Unable to load from file because there is no "fs" or "path" implementation');const p=function(e,t){e?"function"==typeof s&&s(e):(!0===u&&(t=JSON.parse(t)),a.data=t,a.path=a.path||i,l=d.call(this,a),"function"==typeof o&&o(l))};if(a.path=a.path||i,a.async)return t.stat(a.path,(n,r)=>{!n&&r.isFile()?t.readFile(a.path,"utf8",p):"function"==typeof s&&s(new e.Error("Unable to find template file "+a.path))}),!0;try{if(!t.statSync(a.path).isFile())throw new e.Error("Unable to find template file "+a.path)}catch(r){throw new e.Error("Unable to find template file "+a.path+". "+r)}return c=t.readFileSync(a.path,"utf8"),p(void 0,c),l})}}),No=/* @__PURE__ */$((e,t)=>{t.exports=function(e){for(e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",apply:"Twig.logic.type.apply",endapply:"Twig.logic.type.endapply",do:"Twig.logic.type.do",shortblock:"Twig.logic.type.shortblock",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from",embed:"Twig.logic.type.embed",endembed:"Twig.logic.type.endembed",with:"Twig.logic.type.with",endwith:"Twig.logic.type.endwith",deprecated:"Twig.logic.type.deprecated"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s?([\s\S]+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile(t){const n=t.match[1];return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(a=>(r=!0,e.lib.boolval(a)?(r=!1,i.parseAsync(t.output,n)):"")).then(e=>({chain:r,output:e}))}},{type:e.logic.type.elseif,regex:/^elseif\s*([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile(t){const n=t.match[1];return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(a=>r&&e.lib.boolval(a)?(r=!1,i.parseAsync(t.output,n)):"").then(e=>({chain:r,output:e}))}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse(t,n,r){let i=e.Promise.resolve("");return r&&(i=this.parseAsync(t.output,n)),i.then(e=>({chain:r,output:e}))}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([\S\s]+?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile(t){const n=t.match[1],r=t.match[2],i=t.match[3];let a=null;if(t.keyVar=null,t.valueVar=null,n.includes(",")){if(a=n.split(","),2!==a.length)throw new e.Error("Invalid expression in for loop: "+n);t.keyVar=a[0].trim(),t.valueVar=a[1].trim()}else t.valueVar=n.trim();return t.expression=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,i&&(t.conditional=e.expression.compile.call(this,{type:e.expression.type.expression,value:i}).stack),delete t.match,t},parse(t,n,r){const i=[];let a,o,s=0;const l=this,{conditional:c}=t,u=function(r,o){const u={...n};return u[t.valueVar]=o,t.keyVar&&(u[t.keyVar]=r),u.loop=function(e,t){const r=void 0!==c;return{index:e+1,index0:e,revindex:r?void 0:t-e,revindex0:r?void 0:t-e-1,first:0===e,last:r?void 0:e===t-1,length:r?void 0:t,parent:n}}(s,a),(void 0===c?e.Promise.resolve(!0):e.expression.parseAsync.call(l,c,u)).then(e=>{if(e)return l.parseAsync(t.output,u).then(e=>{i.push(e),s+=1})}).then(()=>{delete u.loop,delete u[t.valueVar],delete u[t.keyVar],e.merge(n,u,!0)})};return e.expression.parseAsync.call(l,t.expression,n).then(t=>Array.isArray(t)?(a=t.length,e.async.forEach(t,e=>u(s,e))):e.lib.is("Object",t)?(o=void 0===t._keys?Object.keys(t):t._keys,a=o.length,e.async.forEach(o,e=>{if("_keys"!==e)return u(e,t[e])})):void 0).then(()=>({chain:0===i.length,context:n,output:e.output.call(l.template,i)}))}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack;return t.key=n,t.expression=i,delete t.match,t},parse(t,n,r){const{key:i}=t;return e.expression.parseAsync.call(this,t.expression,n).then(e=>(e===n&&(e={...e}),n[i]=e,{chain:r,context:n}))}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:e=>(e.key=e.match[1].trim(),delete e.match,e),parse(e,t,n){const r=this,{key:i}=e;return r.parseAsync(e.output,t).then(e=>(r.context[i]=e,t[i]=e,{chain:n,context:t}))}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile(t){const n="|"+t.match[1].trim();return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return i.parseAsync(t.output,n).then(r=>{const a=[{type:e.expression.type.string,value:r}].concat(t.stack);return e.expression.parseAsync.call(i,a,n)}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.apply,regex:/^apply\s+(.+)$/,next:[e.logic.type.endapply],open:!0,compile(t){const n="|"+t.match[1].trim();return t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){const i=this;return i.parseAsync(t.output,n).then(r=>{const a=[{type:e.expression.type.string,value:r}].concat(t.stack);return e.expression.parseAsync.call(i,a,n)}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endapply,regex:/^endapply$/,next:[],open:!1},{type:e.logic.type.do,regex:/^do\s+([\S\s]+)$/,next:[],open:!0,compile(t){const n=t.match[1];return t.expression=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,delete t.match,t},parse(t,n,r){return e.expression.parseAsync.call(this,t.expression,n).then(()=>({chain:r,context:n}))}},{type:e.logic.type.block,regex:/^block\s+(\w+)$/,next:[e.logic.type.endblock],open:!0,compile:e=>(e.blockName=e.match[1].trim(),delete e.match,e),parse(t,n,r){const i=this;let a=e.Promise.resolve();return i.template.blocks.defined[t.blockName]=new e.Block(i.template,t),(null===i.template.parentTemplate||i.template.parentTemplate instanceof e.Template)&&(a=i.getBlock(t.blockName).render(i,n)),a.then(e=>({chain:r,output:e}))}},{type:e.logic.type.shortblock,regex:/^block\s+(\w+)\s+(.+)$/,next:[],open:!0,compile(t){return t.expression=t.match[2].trim(),t.output=e.expression.compile({type:e.expression.type.expression,value:t.expression}).stack,e.logic.handler[e.logic.type.block].compile.apply(this,[t])},parse(...t){return e.logic.handler[e.logic.type.block].parse.apply(this,t)}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+(\w+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(e=>{if(Array.isArray(e)){const t=e.reverse().reduce((e,t)=>{try{return{render:i.template.importFile(t),fileName:t}}catch(n){return e}},{render:null,fileName:null});null!==t.fileName&&(i.template.parentTemplate=t.fileName)}else i.template.parentTemplate=e;return{chain:r,output:""}})}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;return e.expression.parseAsync.call(i,t.stack,n).then(t=>{const n=i.template.importFile(t),r=new e.ParseState(n);return r.parseAsync(n.tokens).then(()=>{i.template.blocks.imported={...i.template.blocks.imported,...r.getBlocks()}})}).then(()=>({chain:r,output:""}))}},{type:e.logic.type.include,regex:/^include\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,next:[],open:!0,compile(t){const{match:n}=t,r=n[1].trim(),i=void 0!==n[2],a=n[3],o=void 0!==n[4]&&n[4].length;return delete t.match,t.only=o,t.ignoreMissing=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,void 0!==a&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:a.trim()}).stack),t},parse(t,n,r){let i=t.only?{}:{...n};const{ignoreMissing:a}=t,o=this;let s=null;const l={chain:r,output:""};return s=void 0===t.withStack?e.Promise.resolve():e.expression.parseAsync.call(o,t.withStack,n).then(e=>{i={...i,...e}}),s.then(()=>e.expression.parseAsync.call(o,t.stack,n)).then(t=>{let n;n=Array.isArray(t)?t:[t];const r=n.reduce((t,n)=>{if(null===t.render){if(n instanceof e.Template)return{render:n.renderAsync(i,{isInclude:!0}),lastError:null};try{return{render:o.template.importFile(n).renderAsync(i,{isInclude:!0}),lastError:null}}catch(r){return{render:null,lastError:r}}}return t},{render:null,lastError:null});if(null!==r.render)return r.render;if(null===r.render&&a)return"";throw r.lastError}).then(e=>(""!==e&&(l.output=e),l))}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse(t,n,r){return this.parseAsync(t.output,n).then(t=>{let n=t.replace(/>\s+</g,"><").trim();return n=new e.Markup(n),{chain:r,output:n}})}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+(\w+)\s*\(\s*((?:\w+(?:\s*=\s*([\s\S]+))?(?:,\s*)?)*)\s*\)$/,next:[e.logic.type.endmacro],open:!0,compile(t){const n=t.match[1],r=t.match[2].split(/\s*,\s*/),i=r.map(e=>e.split(/\s*=\s*/)[0]),a=i.length;if(a>1){const t={};for(let n=0;n<a;n++){const r=i[n];if(t[r])throw new e.Error("Duplicate arguments for parameter: "+r);t[r]=1}}return t.macroName=n,t.parameters=i,t.defaults=r.reduce(function(t,n){const r=n.split(/\s*=\s*/),i=r[0],a=r[1];return t[i]=a?e.expression.compile.call(this,{type:e.expression.type.expression,value:a}).stack:void 0,t},{}),delete t.match,t},parse(t,n,r){const i=this;return i.macros[t.macroName]=function(...r){const a={...i.context,_self:i.macros};return e.async.forEach(t.parameters,function(i,o){return void 0!==r[o]?(a[i]=r[o],!0):void 0!==t.defaults[i]?e.expression.parseAsync.call(this,t.defaults[i],n).then(t=>(a[i]=t,e.Promise.resolve())):(a[i]=void 0,!0)}).then(()=>i.parseAsync(t.output,a))},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+(\w+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this,a={chain:r,output:""};return"_self"===t.expression?(n[t.contextName]=i.macros,a):e.expression.parseAsync.call(i,t.stack,n).then(e=>i.template.importFile(e||t.expression)).then(r=>{const i=new e.ParseState(r);return i.parseAsync(r.tokens).then(()=>(n[t.contextName]=i.macros,a))})}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile(t){const n=t.match[1].trim(),r=t.match[2].trim().split(/\s*,\s*/),i={};for(const e of r){const t=e.match(/^(\w+)\s+as\s+(\w+)$/);t?i[t[1].trim()]=t[2].trim():e.match(/^(\w+)$/)&&(i[e]=e)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:n}).stack,t},parse(t,n,r){const i=this;let a;return a="_self"===t.expression?e.Promise.resolve(i.macros):e.expression.parseAsync.call(i,t.stack,n).then(e=>i.template.importFile(e||t.expression)).then(t=>{const n=new e.ParseState(t);return n.parseAsync(t.tokens).then(()=>n.macros)}),a.then(e=>{for(const r in t.macroNames)void 0!==e[r]&&(n[t.macroNames[r]]=e[r]);return{chain:r,output:""}})}},{type:e.logic.type.embed,regex:/^embed\s+(.+?)(?:\s+(ignore missing))?(?:\s+with\s+([\S\s]+?))?(?:\s+(only))?$/,next:[e.logic.type.endembed],open:!0,compile(t){const{match:n}=t,r=n[1].trim(),i=void 0!==n[2],a=n[3],o=void 0!==n[4]&&n[4].length;return delete t.match,t.only=o,t.ignoreMissing=i,t.stack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r}).stack,void 0!==a&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:a.trim()}).stack),t},parse(t,n,r){let i={},a=e.Promise.resolve(),o=this;return t.only||(i={...n}),void 0!==t.withStack&&(a=e.expression.parseAsync.call(o,t.withStack,n).then(e=>{i={...i,...e}})),a.then(()=>e.expression.parseAsync.call(o,t.stack,i)).then(n=>{const r=new e.Template({data:t.output,base:o.template.base,path:o.template.path,url:o.template.url,name:o.template.name,method:o.template.method,options:o.template.options});try{r.importFile(n)}catch(a){if(t.ignoreMissing)return"";throw o=null,a}return r.parentTemplate=n,r.renderAsync(i,{isInclude:!0})}).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endembed,regex:/^endembed$/,next:[],open:!1},{type:e.logic.type.with,regex:/^(?:with(?:\s+([\S\s]+?))?)(?:\s|$)(only)?$/,next:[e.logic.type.endwith],open:!0,compile(t){const{match:n}=t,r=n[1],i=void 0!==n[2]&&n[2].length;return delete t.match,t.only=i,void 0!==r&&(t.withStack=e.expression.compile.call(this,{type:e.expression.type.expression,value:r.trim()}).stack),t},parse(t,n,r){let i,a={},o=e.Promise.resolve();t.only||(a={...n}),void 0!==t.withStack&&(o=e.expression.parseAsync.call(this,t.withStack,n).then(e=>{for(i in e)Object.hasOwnProperty.call(e,i)&&(a[i]=e[i])}));const s=new e.ParseState(this.template,void 0,a);return o.then(()=>s.parseAsync(t.output)).then(e=>({chain:r,output:e}))}},{type:e.logic.type.endwith,regex:/^endwith$/,next:[],open:!1},{type:e.logic.type.deprecated,regex:/^deprecated\s+(.+)$/,next:[],open:!0,compile:e=>e,parse:()=>({})}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.logic.extendType(t.type),e.logic.handler[t.type]=t};e.logic.definitions.length>0;)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){const n=t.value.trim();let r=e.logic.tokenize.call(this,n);const i=e.logic.handler[r.type];return i.compile&&(r=i.compile.call(this,r),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){let n=null,r=null,i=null,a=null,o=null,s=null,l=null;for(n in t=t.trim(),e.logic.handler)if(Object.hasOwnProperty.call(e.logic.handler,n))for(r=e.logic.handler[n].type,i=e.logic.handler[n].regex,a=i,Array.isArray(i)||(a=[i]),o=a.length,s=0;s<o;s++)if(l=a[s].exec(t),null!==l)return e.log.trace("Twig.logic.tokenize: ","Matched a ",r," regular expression of ",l),{type:r,match:l};throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r,i){return e.async.potentiallyAsync(this,i,function(){e.log.debug("Twig.logic.parse: ","Parsing logic token ",t);const i=e.logic.handler[t.type];let a;const o=this;return i.parse?(o.nestingStack.unshift(t),a=i.parse.call(o,t,n||{},r),e.isPromise(a)?a=a.then(e=>(o.nestingStack.shift(),e)):o.nestingStack.shift(),a):""})},e}}),Co=/* @__PURE__ */$((e,t)=>{t.exports=function(e){e.Templates.registerParser("source",e=>e.data||"")}}),Eo=/* @__PURE__ */$((e,t)=>{t.exports=function(e){e.Templates.registerParser("twig",t=>new e.Template(t))}}),_o=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.path={},e.path.expandNamespace=function(e,t){const n=Object.keys(e),r=new RegExp(`^(?:@(${n.join("|")})/|(${n.join("|")})::)`);return t.replace(r,(t,n,r)=>`${e[void 0===n?r:n]}/`)},e.path.parsePath=function(t,n){const{namespaces:r}=t.options,i=n||"";let a=r&&"object"==typeof r?e.path.expandNamespace(r,i):i;return a===i&&(a=e.path.relativePath(t,i)),a},e.path.relativePath=function(t,n){let r,i,a="/";const o=[];let s,l=n||"";if(t.url)r=void 0===t.base?t.url:t.base.replace(/([^/])$/,"$1/");else if(t.path){const e=So(),n=e.sep||a,i=new RegExp("^\\.{1,2}"+n.replace("\\","\\\\"));l=l.replace(/\//g,n),void 0!==t.base&&null===l.match(i)?(l=l.replace(t.base,""),r=t.base+n):r=e.normalize(t.path),r=r.replace(n+n,n),a=n}else{if(!t.name&&!t.id||!t.method||"fs"===t.method||"ajax"===t.method)throw new e.Error("Cannot extend an inline template.");r=t.base||t.name||t.id}for(i=r.split(a),i.pop(),i=i.concat(l.split(a));i.length>0;)s=i.shift(),"."===s||(".."===s&&o.length>0&&".."!==o[o.length-1]?o.pop():o.push(s));return o.join(a)},e}}),Oo=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.tests={empty(e){if(!0===e)return!1;if(null==e)return!0;if("number"==typeof e)return!1;if(e.length>0)return!1;for(const t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0},odd:e=>e%2==1,even:e=>e%2==0,"divisible by":(e,t)=>e%t[0]===0,divisibleby:(t,n)=>e.tests["divisible by"](t,n),defined:e=>void 0!==e,none:e=>null===e,null(e){return this.none(e)},"same as":(e,t)=>e===t[0],sameas:(t,n)=>e.tests["same as"](t,n),iterable:t=>t&&(e.lib.is("Array",t)||e.lib.is("Object",t))},e.test=function(t,n,r){if(!e.tests[t])throw e.Error("Test "+t+" is not defined.");return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}}),Ao=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.ParseState.prototype.parseAsync=function(e,t){return this.parse(e,t,!0)},e.expression.parseAsync=function(t,n,r){return e.expression.parse.call(this,t,n,r,!0)},e.logic.parseAsync=function(t,n,r){return e.logic.parse.call(this,t,n,r,!0)},e.Template.prototype.renderAsync=function(e,t){return this.render(e,t,!0)},e.async={},e.isPromise=function(e){return e&&e.then&&"function"==typeof e.then},e.async.potentiallyAsync=function(t,n,r){return n?e.Promise.resolve(r.call(t)):function(t,n,r){let i=r.call(t),a=null,o=!0;if(!e.isPromise(i))return i;if(i.then(e=>{i=e,o=!1}).catch(e=>{a=e}),null!==a)throw a;if(o)throw new e.Error("You are using Twig.js in sync mode in combination with async extensions.");return i}(t,0,r)},e.Thenable=function(e,t,n){this.then=e,this._value=n?t:null,this._state=n||0},e.Thenable.prototype.catch=function(e){return 1===this._state?this:this.then(null,e)},e.Thenable.resolvedThen=function(t){try{return e.Promise.resolve(t(this._value))}catch(n){return e.Promise.reject(n)}},e.Thenable.rejectedThen=function(t,n){if(!n||"function"!=typeof n)return this;const r=this._value;let i;try{i=n(r)}catch(a){i=e.Promise.reject(a)}return e.Promise.resolve(i)},e.Promise=function(t){let n=0,r=null,i=function(e,t){n=e,r=t};return function(e,t,n){try{e(function(e){i(1,e)},n)}catch(r){n(r)}}(t,0,function(e){i(2,e)}),1===n?e.Promise.resolve(r):2===n?e.Promise.reject(r):(i=new e.FullPromise,i.promise)},e.FullPromise=function(){let t=null;function n(e){e(o._value)}function r(e,t){t(o._value)}let i=function(e,n){t=function(e,t,n){const r=[t,n,-2];return e?-2===e[2]?e=[e,r]:e.push(r):e=r,e}(t,e,n)};function a(e,a){if(!o._state&&(o._value=a,o._state=e,i=1===e?n:r,t)){if(-2===t[2])return i(t[0],t[1]),void(t=null);t.forEach(e=>{i(e[0],e[1])}),t=null}}const o=new e.Thenable((t,n)=>{const r="function"==typeof t;if(1===o._state&&!r)return e.Promise.resolve(o._value);if(1===o._state)try{return e.Promise.resolve(t(o._value))}catch(s){return e.Promise.reject(s)}const a="function"==typeof n;return new e.Promise((e,o)=>{i(r?n=>{try{e(t(n))}catch(s){o(s)}}:e,a?t=>{try{e(n(t))}catch(s){o(s)}}:o)})});return a.promise=o,a},e.Promise.defaultResolved=new e.Thenable(e.Thenable.resolvedThen,void 0,1),e.Promise.emptyStringResolved=new e.Thenable(e.Thenable.resolvedThen,"",1),e.Promise.resolve=function(t){return 0===arguments.length||void 0===t?e.Promise.defaultResolved:e.isPromise(t)?t:""===t?e.Promise.emptyStringResolved:new e.Thenable(e.Thenable.resolvedThen,t,1)},e.Promise.reject=function(t){return new e.Thenable(e.Thenable.rejectedThen,t,2)},e.Promise.all=function(t){const n=new Array(t.length);return e.async.forEach(t,(t,r)=>{if(e.isPromise(t)){if(1!==t._state)return t.then(e=>{n[r]=e});n[r]=t._value}else n[r]=t}).then(()=>n)},e.async.forEach=function(t,n){const r=t?t.length:0;let i=0;return function a(){let o=null;do{if(i===r)return e.Promise.resolve();o=n(t[i],i),i++}while(!o||!e.isPromise(o)||1===o._state);return o.then(a)}()},e}}),Io=/* @__PURE__ */$((e,t)=>{t.exports=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(t){const{id:n}=t,r={strictVariables:t.strict_variables||!1,autoescape:null!==t.autoescape&&t.autoescape||!1,allowInlineIncludes:t.allowInlineIncludes||!1,rethrow:t.rethrow||!1,namespaces:t.namespaces};if(e.cache&&n&&e.validateId(n),void 0!==t.debug&&(e.debug=t.debug),void 0!==t.trace&&(e.trace=t.trace),void 0!==t.data)return e.Templates.parsers.twig({data:t.data,path:Object.hasOwnProperty.call(t,"path")?t.path:void 0,module:t.module,id:n,options:r});if(void 0!==t.ref){if(void 0!==t.id)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(t.ref)}if(void 0!==t.method){if(!e.Templates.isRegisteredLoader(t.method))throw new e.Error('Loader for "'+t.method+'" is not defined.');return e.Templates.loadRemote(t.name||t.href||t.path||n||void 0,{id:n,method:t.method,parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error)}return void 0!==t.href?e.Templates.loadRemote(t.href,{id:n,method:"ajax",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error):void 0!==t.path?e.Templates.loadRemote(t.path,{id:n,method:"fs",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:r},t.load,t.error):void 0},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){const r=n.filename,i=n.filename,a=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]});return function(e){return a.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={});const i=(n=n||{}).settings||{},a=i["twig options"],o={path:t,base:i.views,load(e){a&&a.allowAsync?e.renderAsync(n).then(e=>r(null,e),r):r(null,String(e.render(n)))},error(e){r(e)}};if(a)for(const e in a)Object.hasOwnProperty.call(a,e)&&(o[e]=a[e]);e.exports.twig(o)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e.exports.path=e.path,e.exports.filters=e.filters,e.exports.tests=e.tests,e.exports.functions=e.functions,e.exports.Promise=e.Promise,e}}),Do=/* @__PURE__ */$((e,t)=>{t.exports=function e(){const t={VERSION:"3.0.0"};return no()(t),ro()(t),ao()(t),oo()(t),so()(t),wo()(t),ko()(t),To()(t),No()(t),Co()(t),Eo()(t),_o()(t),Oo()(t),Ao()(t),Io()(t),t.exports.factory=e,t.exports}}),Po=/* @__PURE__ */B(/* @__PURE__ */$((e,t)=>{t.exports=Do()()})(),1);Po.default.extendFilter("object_as_json",e=>"object"==typeof e?JSON.stringify(e):e);var Mo="{{\\s*(?<token>[a-zA-Z_][a-zA-Z0-9_]*(?:\\??\\.[a-zA-Z_][a-zA-Z0-9_]*)*)[^}]*}}",Ro=new RegExp(Mo,"g"),jo=RegExp(`^${Mo}$`),zo=(e,t=!1)=>{if("string"!=typeof e)return!1;let n=t?jo:Ro;return n.lastIndex=0,n.test(e.trim())},Lo=(e,t={},n=!1,r=!1)=>{if("string"!=typeof e||!zo(e))return e;try{Ro.lastIndex=0;let i=e;n&&[...i.matchAll(Ro)].forEach(e=>{e.groups&&(i=i.replace(e[0],`{{ ${e.groups.token} | default('${e[0]}') }}`))}),r&&[...i.matchAll(Ro)].forEach(e=>{e.groups&&(i=i.replace(e[0],`{{ ${e.groups.token} | object_as_json }}`))}),"variables"in t&&(t={...t,...t.variables});let a=Po.default.twig({data:i}).render(t);if(!r)return a;try{return JSON.parse(a)||a}catch{return a}}catch{return e}};function Fo(e,t){if(!Boolean(e))throw new Error(t)}function $o(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var qo=/\r\n|[\n\r]/g;function Bo(e,t){let n=0,r=1;for(const i of e.body.matchAll(qo)){if("number"==typeof i.index||$o(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Vo(e){return Uo(e.source,Bo(e.source,e.start))}function Uo(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c=`${e.name}:${o}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+Ho([[`${o} |`,n[0]],...n.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+Ho([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,u[i+1]]])}function Ho(e){const t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}var Wo=class e extends Error{constructor(t,...n){var r,i,a;const{nodes:o,source:s,positions:l,path:c,originalError:u,extensions:d}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(n);super(t),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=u?u:void 0,this.nodes=Yo(Array.isArray(o)?o:o?[o]:void 0);const p=Yo(null===(r=this.nodes)||void 0===r?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==p||null===(i=p[0])||void 0===i?void 0:i.source,this.positions=null!=l?l:null==p?void 0:p.map(e=>e.start),this.locations=l&&s?l.map(e=>Bo(s,e)):null==p?void 0:p.map(e=>Bo(e.source,e.start));const f="object"==typeof(h=null==u?void 0:u.extensions)&&null!==h?null==u?void 0:u.extensions:void 0;var h;this.extensions=null!==(a=null!=d?d:f)&&void 0!==a?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+Vo(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Uo(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Yo(e){return void 0===e||0===e.length?void 0:e}function Go(e,t,n){return new Wo(`Syntax Error: ${n}`,{source:e,positions:[t]})}var Qo,Jo,Ko,Xo,Zo=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},es=class{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ts={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},ns=new Set(Object.keys(ts));function rs(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&ns.has(t)}function is(e){return 9===e||32===e}function as(e){return e>=48&&e<=57}function os(e){return e>=97&&e<=122||e>=65&&e<=90}function ss(e){return os(e)||95===e}function ls(e){return os(e)||as(e)||95===e}function cs(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var a;const t=e[o],s=us(t);s!==t.length&&(r=null!==(a=r)&&void 0!==a?a:o,i=o,0!==o&&s<n&&(n=s))}return e.map((e,t)=>0===t?e:e.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function us(e){let t=0;for(;t<e.length&&is(e.charCodeAt(t));)++t;return t}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Qo||(Qo={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION"}(Jo||(Jo={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"}(Ko||(Ko={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(Xo||(Xo={}));var ds=class{constructor(e){const t=new es(Xo.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Xo.EOF)do{if(e.next)e=e.next;else{const t=bs(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Xo.COMMENT);return e}};function ps(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function fs(e,t){return hs(e.charCodeAt(t))&&ms(e.charCodeAt(t+1))}function hs(e){return e>=55296&&e<=56319}function ms(e){return e>=56320&&e<=57343}function gs(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return Xo.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ys(e,t,n,r,i){const a=e.line;return new es(t,n,r,a,1+n-e.lineStart,i)}function bs(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return vs(e,i);case 33:return ys(e,Xo.BANG,i,i+1);case 36:return ys(e,Xo.DOLLAR,i,i+1);case 38:return ys(e,Xo.AMP,i,i+1);case 40:return ys(e,Xo.PAREN_L,i,i+1);case 41:return ys(e,Xo.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return ys(e,Xo.SPREAD,i,i+3);break;case 58:return ys(e,Xo.COLON,i,i+1);case 61:return ys(e,Xo.EQUALS,i,i+1);case 64:return ys(e,Xo.AT,i,i+1);case 91:return ys(e,Xo.BRACKET_L,i,i+1);case 93:return ys(e,Xo.BRACKET_R,i,i+1);case 123:return ys(e,Xo.BRACE_L,i,i+1);case 124:return ys(e,Xo.PIPE,i,i+1);case 125:return ys(e,Xo.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?_s(e,i):ks(e,i)}if(as(t)||45===t)return xs(e,i,t);if(ss(t))return Os(e,i);throw Go(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":ps(t)||fs(n,i)?`Unexpected character: ${gs(e,i)}.`:`Invalid character: ${gs(e,i)}.`)}return ys(e,Xo.EOF,r,r)}function vs(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(ps(e))++i;else{if(!fs(n,i))break;i+=2}}return ys(e,Xo.COMMENT,t,i,n.slice(t+1,i))}function xs(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(45===a&&(a=r.charCodeAt(++i)),48===a){if(a=r.charCodeAt(++i),as(a))throw Go(e.source,i,`Invalid number, unexpected digit after 0: ${gs(e,i)}.`)}else i=ws(e,i,a),a=r.charCodeAt(i);if(46===a&&(o=!0,a=r.charCodeAt(++i),i=ws(e,i,a),a=r.charCodeAt(i)),69!==a&&101!==a||(o=!0,a=r.charCodeAt(++i),43!==a&&45!==a||(a=r.charCodeAt(++i)),i=ws(e,i,a),a=r.charCodeAt(i)),46===a||ss(a))throw Go(e.source,i,`Invalid number, expected digit but got: ${gs(e,i)}.`);return ys(e,o?Xo.FLOAT:Xo.INT,t,i,r.slice(t,i))}function ws(e,t,n){if(!as(n))throw Go(e.source,t,`Invalid number, expected digit but got: ${gs(e,t)}.`);const r=e.source.body;let i=t+1;for(;as(r.charCodeAt(i));)++i;return i}function ks(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(a,i),ys(e,Xo.STRING,t,i+1,o);if(92===r){o+=n.slice(a,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Ss(e,i):Ts(e,i):Es(e,i);o+=t.value,i+=t.size,a=i;continue}if(10===r||13===r)break;if(ps(r))++i;else{if(!fs(n,i))throw Go(e.source,i,`Invalid character within String: ${gs(e,i)}.`);i+=2}}throw Go(e.source,i,"Unterminated string.")}function Ss(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!ps(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Cs(e),r<0)break}throw Go(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ts(e,t){const n=e.source.body,r=Ns(n,t+2);if(ps(r))return{value:String.fromCodePoint(r),size:6};if(hs(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=Ns(n,t+8);if(ms(e))return{value:String.fromCodePoint(r,e),size:12}}throw Go(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ns(e,t){return Cs(e.charCodeAt(t))<<12|Cs(e.charCodeAt(t+1))<<8|Cs(e.charCodeAt(t+2))<<4|Cs(e.charCodeAt(t+3))}function Cs(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Es(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Go(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function _s(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,o=a,s="";const l=[];for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);const r=ys(e,Xo.BLOCK_STRING,t,a+3,cs(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(ps(r))++a;else{if(!fs(n,a))throw Go(e.source,a,`Invalid character within String: ${gs(e,a)}.`);a+=2}else s+=n.slice(o,a),l.push(s),13===r&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,i=a;else s+=n.slice(o,a),o=a+1,a+=4}throw Go(e.source,a,"Unterminated string.")}function Os(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&ls(n.charCodeAt(i));)++i;return ys(e,Xo.NAME,t,i,n.slice(t,i))}function As(e){return Is(e,[])}function Is(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Is(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Is(e[a],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+n.map(([e,n])=>e+": "+Is(n,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var Ds=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;const r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){const t=As(e);throw new Error(`Cannot use ${r} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1},Ps=class{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Fo(!1,`Body must be a string. Received: ${As(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Fo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Fo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}},Ms=class{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const t=function(e){return Ds(e,Ps)}(e)?e:new Ps(e);this._lexer=new ds(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Xo.NAME);return this.node(e,{kind:Ko.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ko.DOCUMENT,definitions:this.many(Xo.SOF,this.parseDefinition,Xo.EOF)})}parseDefinition(){if(this.peek(Xo.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===Xo.BRACE_L)throw Go(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===Xo.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw Go(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Xo.BRACE_L))return this.node(e,{kind:Ko.OPERATION_DEFINITION,operation:Qo.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let r;return this.peek(Xo.NAME)&&(r=this.parseName()),this.node(e,{kind:Ko.OPERATION_DEFINITION,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Xo.NAME);switch(e.value){case"query":return Qo.QUERY;case"mutation":return Qo.MUTATION;case"subscription":return Qo.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Xo.PAREN_L,this.parseVariableDefinition,Xo.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ko.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(Xo.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Xo.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Xo.DOLLAR),this.node(e,{kind:Ko.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ko.SELECTION_SET,selections:this.many(Xo.BRACE_L,this.parseSelection,Xo.BRACE_R)})}parseSelection(){return this.peek(Xo.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Xo.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:Ko.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Xo.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Xo.PAREN_L,t,Xo.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Xo.COLON),this.node(t,{kind:Ko.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Xo.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Xo.NAME)?this.node(e,{kind:Ko.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ko.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:Ko.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Ko.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Xo.BRACKET_L:return this.parseList(e);case Xo.BRACE_L:return this.parseObject(e);case Xo.INT:return this.advanceLexer(),this.node(t,{kind:Ko.INT,value:t.value});case Xo.FLOAT:return this.advanceLexer(),this.node(t,{kind:Ko.FLOAT,value:t.value});case Xo.STRING:case Xo.BLOCK_STRING:return this.parseStringLiteral();case Xo.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:Ko.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Ko.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Ko.NULL});default:return this.node(t,{kind:Ko.ENUM,value:t.value})}case Xo.DOLLAR:if(e){if(this.expectToken(Xo.DOLLAR),this._lexer.token.kind===Xo.NAME){const e=this._lexer.token.value;throw Go(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Ko.STRING,value:e.value,block:e.kind===Xo.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Ko.LIST,values:this.any(Xo.BRACKET_L,()=>this.parseValueLiteral(e),Xo.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Ko.OBJECT,fields:this.any(Xo.BRACE_L,()=>this.parseObjectField(e),Xo.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Xo.COLON),this.node(t,{kind:Ko.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Xo.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Xo.AT),this.node(t,{kind:Ko.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Xo.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Xo.BRACKET_R),t=this.node(e,{kind:Ko.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Xo.BANG)?this.node(e,{kind:Ko.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Ko.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Xo.STRING)||this.peek(Xo.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(Xo.BRACE_L,this.parseOperationTypeDefinition,Xo.BRACE_R);return this.node(e,{kind:Ko.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Xo.COLON);const n=this.parseNamedType();return this.node(e,{kind:Ko.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ko.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:Ko.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Xo.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseFieldDefinition,Xo.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Xo.COLON);const i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:Ko.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(Xo.PAREN_L,this.parseInputValueDef,Xo.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Xo.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(Xo.EQUALS)&&(i=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:Ko.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:Ko.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Ko.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Xo.EQUALS)?this.delimitedMany(Xo.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Ko.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseEnumValueDefinition,Xo.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ko.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Go(this._lexer.source,this._lexer.token.start,`${Rs(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Ko.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Xo.BRACE_L,this.parseInputValueDef,Xo.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Xo.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Xo.BRACE_L,this.parseOperationTypeDefinition,Xo.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ko.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ko.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ko.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinitionExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(Xo.AT);const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ko.DIRECTIVE_EXTENSION,name:t,directives:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Xo.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ko.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,directives:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Xo.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Jo,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(Xo.AT),n=this.parseName();let r,i;return!t&&this.expectOptionalToken(Xo.DOT)&&(r=this.parseName()),(t||r)&&this.expectOptionalToken(Xo.PAREN_L)&&(i=this.parseName(),this.expectToken(Xo.COLON),this.expectToken(Xo.PAREN_R)),t?i?this.node(e,{kind:Ko.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:i}):this.node(e,{kind:Ko.DIRECTIVE_COORDINATE,name:n}):r?i?this.node(e,{kind:Ko.ARGUMENT_COORDINATE,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:Ko.MEMBER_COORDINATE,name:n,memberName:r}):this.node(e,{kind:Ko.TYPE_COORDINATE,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Zo(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Go(this._lexer.source,t.start,`Expected ${js(e)}, found ${Rs(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Xo.NAME||t.value!==e)throw Go(this._lexer.source,t.start,`Expected "${e}", found ${Rs(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Xo.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Go(this._lexer.source,t.start,`Unexpected ${Rs(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==Xo.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw Go(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function Rs(e){const t=e.value;return js(e.kind)+(null!=t?` "${t}"`:"")}function js(e){return function(e){return e===Xo.BANG||e===Xo.DOLLAR||e===Xo.AMP||e===Xo.PAREN_L||e===Xo.PAREN_R||e===Xo.DOT||e===Xo.SPREAD||e===Xo.COLON||e===Xo.EQUALS||e===Xo.AT||e===Xo.BRACKET_L||e===Xo.BRACKET_R||e===Xo.BRACE_L||e===Xo.PIPE||e===Xo.BRACE_R}(e)?`"${e}"`:e}var zs=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Ls(e){return Fs[e.charCodeAt(0)]}var Fs=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],$s=Object.freeze({});function qs(e,t,n=ts){const r=/* @__PURE__ */new Map;for(const y of Object.values(Ko))r.set(y,Bs(t,y));let i,a,o,s=Array.isArray(e),l=[e],c=-1,u=[],d=e;const p=[],f=[];do{c++;const e=c===l.length,y=e&&0!==u.length;if(e){if(a=0===f.length?void 0:p[p.length-1],d=o,o=f.pop(),y)if(s){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d={...d};for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(o){if(a=s?c:l[c],d=o[a],null==d)continue;p.push(a)}let b;if(!Array.isArray(d)){var h,m;rs(d)||Fo(!1,`Invalid AST Node: ${As(d)}.`);const n=e?null===(h=r.get(d.kind))||void 0===h?void 0:h.leave:null===(m=r.get(d.kind))||void 0===m?void 0:m.enter;if(b=null==n?void 0:n.call(t,d,a,o,p,f),b===$s)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(u.push([a,b]),!e)){if(!rs(b)){p.pop();continue}d=b}}var g;void 0===b&&y&&u.push([a,d]),e?p.pop():(i={inArray:s,index:c,keys:l,edits:u,prev:i},s=Array.isArray(d),l=s?d:null!==(g=n[d.kind])&&void 0!==g?g:[],c=-1,u=[],o&&f.push(o),o=d)}while(void 0!==i);return 0!==u.length?u[u.length-1][1]:e}function Bs(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var Vs={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Us(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=Gs(e.variableDefinitions)?Ws("(\n",Us(e.variableDefinitions,"\n"),"\n)"):Ws("(",Us(e.variableDefinitions,", "),")"),n=Ws("",e.description,"\n")+Us([e.operation,Us([e.name,t]),Us(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>Ws("",i,"\n")+e+": "+t+Ws(" = ",n)+Ws(" ",Us(r," "))},SelectionSet:{leave:({selections:e})=>Hs(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const a=Ws("",e,": ")+t;let o=a+Ws("(",Us(n,", "),")");return o.length>80&&(o=a+Ws("(\n",Ys(Us(n,"\n")),"\n)")),Us([o,Us(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ws(" ",Us(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Us(["...",Ws("on ",e),Us(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>Ws("",a,"\n")+`fragment ${e}${Ws("(",Us(n,", "),")")} on ${t} ${Ws("",Us(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e){const t=e.replace(/"""/g,'\\"""'),n=t.split(/\r\n|[\n\r]/g),r=1===n.length,i=n.length>1&&n.slice(1).every(e=>0===e.length||is(e.charCodeAt(0))),a=t.endsWith('\\"""'),o=e.endsWith('"')&&!a,s=e.endsWith("\\"),l=o||s,c=!r||e.length>70||l||i||a;let u="";const d=r&&is(e.charCodeAt(0));return(c&&!d||i)&&(u+="\n"),u+=t,(c||l)&&(u+="\n"),'"""'+u+'"""'}(e):`"${e.replace(zs,Ls)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Us(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Us(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ws("(",Us(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Ws("",e,"\n")+Us(["schema",Us(t," "),Hs(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Ws("",e,"\n")+Us(["scalar",t,Us(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ws("",e,"\n")+Us(["type",t,Ws("implements ",Us(n," & ")),Us(r," "),Hs(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Ws("",e,"\n")+t+(Gs(n)?Ws("(\n",Ys(Us(n,"\n")),"\n)"):Ws("(",Us(n,", "),")"))+": "+r+Ws(" ",Us(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Ws("",e,"\n")+Us([t+": "+n,Ws("= ",r),Us(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ws("",e,"\n")+Us(["interface",t,Ws("implements ",Us(n," & ")),Us(r," "),Hs(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Ws("",e,"\n")+Us(["union",t,Us(n," "),Ws("= ",Us(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Ws("",e,"\n")+Us(["enum",t,Us(n," "),Hs(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Ws("",e,"\n")+Us([t,Us(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Ws("",e,"\n")+Us(["input",t,Us(n," "),Hs(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:a})=>Ws("",e,"\n")+"directive @"+t+(Gs(n)?Ws("(\n",Ys(Us(n,"\n")),"\n)"):Ws("(",Us(n,", "),")"))+Ws(" ",Us(r," "))+(i?" repeatable":"")+" on "+Us(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Us(["extend schema",Us(e," "),Hs(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Us(["extend scalar",e,Us(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Us(["extend type",e,Ws("implements ",Us(t," & ")),Us(n," "),Hs(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Us(["extend interface",e,Ws("implements ",Us(t," & ")),Us(n," "),Hs(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Us(["extend union",e,Us(t," "),Ws("= ",Us(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Us(["extend enum",e,Us(t," "),Hs(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Us(["extend input",e,Us(t," "),Hs(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>Us(["extend directive @"+e,Us(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>Us([e,Ws(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>Us([e,Ws(".",t),Ws("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>Us(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>Us(["@",e,Ws("(",t,":)")])}};function Us(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function Hs(e){return Ws("{\n",Ys(Us(e,"\n")),"\n}")}function Ws(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Ys(e){return Ws(" ",e.replace(/\n/g,"\n "))}function Gs(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var Qs=function(e,t){return Qs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qs(e,t)};function Js(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Qs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ks=function(){return Ks=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ks.apply(this,arguments)};function Xs(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(jR){s=[6,jR],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Zs(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function el(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function tl(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function nl(e){return this instanceof nl?(this.v=e,this):new nl(e)}function rl(e){return"function"==typeof e}function il(e){var t=e(function(e){Error.call(e),e.stack=/* @__PURE__ */(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var al=il(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function ol(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sl=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Zs(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(f){e={error:f}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(rl(l))try{l()}catch(jR){i=jR instanceof al?jR.errors:[jR]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Zs(c),d=u.next();!d.done;d=u.next()){var p=d.value;try{ul(p)}catch(h){i=null!=i?i:[],h instanceof al?i=tl(tl([],el(i)),el(h.errors)):i.push(h)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new al(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ul(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ol(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ol(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ll=sl.EMPTY;function cl(e){return e instanceof sl||e&&"closed"in e&&rl(e.remove)&&rl(e.add)&&rl(e.unsubscribe)}function ul(e){rl(e)?e():e.unsubscribe()}var dl={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=dl.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,tl([e,t],el(n))):setTimeout.apply(void 0,tl([e,t],el(n)))},clearTimeout:function(e){var t=dl.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function pl(e){dl.setTimeout(function(){throw e})}function fl(){}var hl=ml("C",void 0,void 0);function ml(e,t,n){return{kind:e,value:t,error:n}}function gl(e){e()}var yl=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cl(t)&&t.add(n)):n.destination=kl,n}return Js(t,e),t.create=function(e,t,n){return new vl(e,t,n)},t.prototype.next=function(e){this.isStopped?wl(function(e){return ml("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?wl(ml("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?wl(hl,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(sl);Function.prototype.bind;var bl=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){xl(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){xl(n)}else xl(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){xl(t)}},e}(),vl=function(e){function t(t,n,r){var i,a=e.call(this)||this;return i=rl(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,a.destination=new bl(i),a}return Js(t,e),t}(yl);function xl(e){pl(e)}function wl(e,t){var n=null;n&&dl.setTimeout(function(){return n(e,t)})}var kl={closed:!0,next:fl,error:function(e){throw e},complete:fl},Sl="function"==typeof Symbol&&Symbol.observable||"@@observable";function Tl(e){return e}var Nl=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof yl||function(e){return e&&rl(e.next)&&rl(e.error)&&rl(e.complete)}(r)&&cl(r)?e:new vl(e,t,n);return gl(function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Cl(t))(function(t,r){var i=new vl({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Sl]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?Tl:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Cl(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Cl(e){var t;return null!==(t=null!=e?e:void 0)&&void 0!==t?t:Promise}function El(e){return function(t){if(function(e){return rl(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function _l(e,t,n,r,i){return new Ol(e,t,n,r,i)}var Ol=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return Js(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(yl),Al=il(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Il=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Js(t,e),t.prototype.lift=function(e){var t=new Dl(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Al},t.prototype.next=function(e){var t=this;gl(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=Zs(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;gl(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;gl(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?ll:(this.currentObservers=null,a.push(e),new sl(function(){t.currentObservers=null,ol(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Nl;return e.source=this,e},t.create=function(e,t){return new Dl(e,t)},t}(Nl),Dl=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Js(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:ll},t}(Il),Pl=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return Js(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Il),Ml={now:function(){return(Ml.delegate||Date).now()},delegate:void 0},Rl=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ml);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return Js(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,l=1;l<r.length&&r[l]<=o;l+=2)s=l;s&&r.splice(0,s+1)}},t}(Il),jl=function(e){function t(t,n){return e.call(this)||this}return Js(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(sl),zl={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=zl.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,tl([e,t],el(n))):setInterval.apply(void 0,tl([e,t],el(n)))},clearInterval:function(e){var t=zl.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Ll=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Js(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),zl.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&zl.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)/* @__PURE__ */return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(jR){r=!0,n=jR||/* @__PURE__ */new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ol(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(jl),Fl=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ml.now,e}(),$l=new(function(e){function t(t,n){void 0===n&&(n=Fl.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Js(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Fl))(Ll),ql=new Nl(function(e){return e.complete()});function Bl(e){return e&&rl(e.schedule)}function Vl(e){return Bl((t=e)[t.length-1])?e.pop():void 0;var t}var Ul=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Hl(e){return rl(null==e?void 0:e.then)}function Wl(e){return rl(e[Sl])}function Yl(e){return Symbol.asyncIterator&&rl(null==e?void 0:e[Symbol.asyncIterator])}function Gl(e){/* @__PURE__ */
8
8
  return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ql,Jl="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Kl(e){return rl(null==e?void 0:e[Jl])}function Xl(e){return function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{!function(e){e.value instanceof nl?Promise.resolve(e.value.v).then(l,c):u(a[0][2],e)}(i[e](t))}catch(jR){u(a[0][3],jR)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}(this,arguments,function(){var t,n,r;return Xs(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,nl(t.read())];case 3:return n=i.sent(),r=n.value,n.done?[4,nl(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,nl(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Zl(e){return rl(null==e?void 0:e.getReader)}function ec(e){if(e instanceof Nl)return e;if(null!=e){if(Wl(e))return i=e,new Nl(function(e){var t=i[Sl]();if(rl(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(Ul(e))return r=e,new Nl(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()});if(Hl(e))return n=e,new Nl(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,pl)});if(Yl(e))return tc(e);if(Kl(e))return t=e,new Nl(function(e){var n,r;try{for(var i=Zs(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()});if(Zl(e))return tc(Xl(e))}var t,n,r,i;throw Gl(e)}function tc(e){return new Nl(function(t){(function(e,t){var n,r,i,a;return function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(jR){a(jR)}}function s(e){try{l(r.throw(e))}catch(jR){a(jR)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}(this,void 0,void 0,function(){var o,s;return Xs(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Zs(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}(e),l.label=1;case 1:return[4,n.next()];case 2:if((r=l.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function nc(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function rc(e,t){return void 0===t&&(t=0),El(function(n,r){n.subscribe(_l(r,function(n){return nc(r,e,function(){return r.next(n)},t)},function(){return nc(r,e,function(){return r.complete()},t)},function(n){return nc(r,e,function(){return r.error(n)},t)}))})}function ic(e,t){return void 0===t&&(t=0),El(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function ac(e,t){if(!e)throw new Error("Iterable cannot be null");return new Nl(function(n){nc(n,t,function(){var r=e[Symbol.asyncIterator]();nc(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function oc(e,t){return t?function(e,t){if(null!=e){if(Wl(e))return function(e,t){return ec(e).pipe(ic(t),rc(t))}(e,t);if(Ul(e))return function(e,t){return new Nl(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}(e,t);if(Hl(e))return function(e,t){return ec(e).pipe(ic(t),rc(t))}(e,t);if(Yl(e))return ac(e,t);if(Kl(e))return function(e,t){return new Nl(function(n){var r;return nc(n,t,function(){r=e[Jl](),nc(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(a){return void n.error(a)}i?n.complete():n.next(t)},0,!0)}),function(){return rl(null==r?void 0:r.return)&&r.return()}})}(e,t);if(Zl(e))return function(e,t){return ac(Xl(e),t)}(e,t)}throw Gl(e)}(e,t):ec(e)}function sc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return oc(e,Vl(e))}function lc(e,t){var n=rl(e)?e:function(){return e},r=function(e){return e.error(n())};return new Nl(t?function(e){return t.schedule(r,0,e)}:r)}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(Ql||(Ql={}));var cc=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return function(e,t){var n,r,i,a=e,o=a.kind,s=a.value,l=a.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(n=t.next)||void 0===n||n.call(t,s):"E"===o?null===(r=t.error)||void 0===r||r.call(t,l):null===(i=t.complete)||void 0===i||i.call(t)}(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return"N"===i?null==e?void 0:e(a):"E"===i?null==t?void 0:t(o):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return rl(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i="N"===t?sc(n):"E"===t?lc(function(){return r}):"C"===t?ql:0;if(!i)throw new TypeError("Unexpected notification kind "+t);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();il(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function uc(e,t){return El(function(n,r){var i=0;n.subscribe(_l(r,function(n){r.next(e.call(t,n,i++))}))})}function dc(e,t,n){return void 0===n&&(n=1/0),rl(t)?dc(function(n,r){return uc(function(e,i){return t(n,e,r,i)})(ec(e(n,r)))},n):("number"==typeof t&&(n=t),El(function(t,r){return function(e,t,n,r){var i=[],a=0,o=0,s=!1,l=function(){!s||i.length||a||t.complete()},c=function(e){return a<r?u(e):i.push(e)},u=function(e){a++;var s=!1;ec(n(e,o++)).subscribe(_l(t,function(e){t.next(e)},function(){s=!0},void 0,function(){if(s)try{a--;for(var e=function(){var e=i.shift();u(e)};i.length&&a<r;)e();l()}catch(n){t.error(n)}}))};return e.subscribe(_l(t,c,function(){s=!0,l()})),function(){}}(t,r,e,n)}))}function pc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(void 0===(n=1)&&(n=1/0),dc(Tl,n))(oc(e,Vl(e)));var n}function fc(e,t){return El(function(n,r){var i=0;n.subscribe(_l(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function hc(e){return El(function(t,n){var r,i=null,a=!1;i=t.subscribe(_l(n,void 0,void 0,function(o){r=ec(e(o,hc(e)(t))),i?(i.unsubscribe(),i=null,r.subscribe(n)):a=!0})),a&&(i.unsubscribe(),i=null,r.subscribe(n))})}function mc(e,t){return e===t}function gc(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new Il}:t,r=e.resetOnError,i=void 0===r||r,a=e.resetOnComplete,o=void 0===a||a,s=e.resetOnRefCountZero,l=void 0===s||s;return function(e){var t,r,a,s=0,c=!1,u=!1,d=function(){null==r||r.unsubscribe(),r=void 0},p=function(){d(),t=a=void 0,c=u=!1},f=function(){var e=t;p(),null==e||e.unsubscribe()};return El(function(e,h){s++,u||c||d();var m=a=null!=a?a:n();h.add(function(){0!==--s||u||c||(r=yc(f,l))}),m.subscribe(h),!t&&s>0&&(t=new vl({next:function(e){return m.next(e)},error:function(e){u=!0,d(),r=yc(p,i,e),m.error(e)},complete:function(){c=!0,d(),r=yc(p,o),m.complete()}}),ec(e).subscribe(t))})(e)}}function yc(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0!==t){if(!1!==t){var i=new vl({next:function(){i.unsubscribe(),e()}});return ec(t.apply(void 0,tl([],el(n)))).subscribe(i)}}else e()}function bc(e,t,n){var r,i,a,o,s=!1;return e&&"object"==typeof e?(r=e.bufferSize,o=void 0===r?1/0:r,i=e.windowTime,t=void 0===i?1/0:i,s=void 0!==(a=e.refCount)&&a,n=e.scheduler):o=null!=e?e:1/0,gc({connector:function(){return new Rl(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function vc(e,t,n){var r=rl(e)||t||n?{next:e,error:t,complete:n}:e;return r?El(function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var i=!0;e.subscribe(_l(t,function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)},function(){var e;i=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()},function(e){var n;i=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)},function(){var e,t;i&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)}))}):Tl}function xc(e){try{return e()}catch{}}var wc=xc(()=>globalThis)||xc(()=>window)||xc(()=>self)||xc(()=>global)||xc(function(){return xc.constructor("return this")()}),kc="4.2.0",Sc=/* @__PURE__ */new Map;function Tc(e){const t=Sc.get(e)||1;return Sc.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}var Nc="Invariant Violation",Cc=class e extends Error{constructor(t=Nc){super(t),this.name=Nc,Object.setPrototypeOf(this,e.prototype)}},Ec=["debug","log","warn","error","silent"],_c=Ec.indexOf("silent");function Oc(e,...t){if(!e)throw Ic(...t)}function Ac(e){return function(t,...n){if(Ec.indexOf(e)>=_c){const r=console[e]||console.log;if("number"==typeof t){const e=t;(t=Mc(e))||(t=Rc(e,n),n=[])}r(t,...n)}}}function Ic(e,...t){return new Cc(Mc(e,t)||Rc(e,t))}Oc.debug=Ac("debug"),Oc.log=Ac("log"),Oc.warn=Ac("warn"),Oc.error=Ac("error");var Dc=Symbol.for("ApolloErrorMessageHandler_"+kc);function Pc(e){if("string"==typeof e)return e;try{return function(e,t=0){const n=Tc("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?n:t,t).split(JSON.stringify(n)).join("<undefined>")}(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Mc(e,t=[]){if(e)return wc[Dc]&&wc[Dc](e,t.map(Pc))}function Rc(e,t=[]){if(e)return"string"==typeof e?t.reduce((e,t)=>e.replace(/%[sdfo]/,Pc(t)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:kc,message:e,args:t.map(Pc)}))}`}function jc(e,t,n,r){if(n.kind===Ko.INT||n.kind===Ko.FLOAT)e[t.value]=Number(n.value);else if(n.kind===Ko.BOOLEAN||n.kind===Ko.STRING)e[t.value]=n.value;else if(n.kind===Ko.OBJECT){const i={};n.fields.map(e=>jc(i,e.name,e.value,r)),e[t.value]=i}else if(n.kind===Ko.VARIABLE){const i=(r||{})[n.name.value];e[t.value]=i}else if(n.kind===Ko.LIST)e[t.value]=n.values.map(e=>{const n={};return jc(n,t,e,r),n[t.value]});else if(n.kind===Ko.ENUM)e[t.value]=n.value;else{if(n.kind!==Ko.NULL)throw Ic(19,t.value,n.kind);e[t.value]=null}}function zc(e,t){if(e.arguments&&e.arguments.length){const n={};return e.arguments.forEach(({name:e,value:r})=>jc(n,e,r,t)),n}return null}var Lc=Symbol.for("apollo.cacheSize"),Fc={...wc[Lc]};function $c(e,t){return e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name)?.name.value??t}var qc=()=>Object.create(null),{forEach:Bc,slice:Vc}=Array.prototype,{hasOwnProperty:Uc}=Object.prototype,Hc=class e{constructor(e=!0,t=qc){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return Bc.call(e,e=>t=t.getChildTrie(e)),Uc.call(t,"data")?t.data:t.data=this.makeData(Vc.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){const r=t.mapFor(e[n],!1);t=r&&r.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],r=this.mapFor(n,!1),i=r&&r.get(n);i&&(t=i.removeArray(Vc.call(e,1)),i.data||i.weak||i.strong&&i.strong.size||r.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=/* @__PURE__ */new WeakMap:void 0):this.strong||(t?this.strong=/* @__PURE__ */new Map:void 0)}};function Wc(){}var Yc=class{constructor(e=1/0,t=Wc){this.max=e,this.dispose=t,this.map=/* @__PURE__ */new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}};function Gc(){}var Qc=Gc,Jc="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},Kc="undefined"!=typeof WeakMap?WeakMap:Map,Xc="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:Gc,unregister:Gc}},Zc=class{constructor(e=1/0,t=Qc){this.max=e,this.dispose=t,this.map=new Kc,this.newest=null,this.oldest=null,this.unfinalizedNodes=/* @__PURE__ */new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new Jc(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Xc(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}},eu=/* @__PURE__ */new WeakSet;function tu(e){e.size<=(e.max||-1)||eu.has(e)||(eu.add(e),setTimeout(()=>{e.clean(),eu.delete(e)},100))}var nu=function(e,t){const n=new Zc(e,t);return n.set=function(e,t){const n=Zc.prototype.set.call(this,e,t);return tu(this),n},n},ru=function(e,t){const n=new Yc(e,t);return n.set=function(e,t){const n=Yc.prototype.set.call(this,e,t);return tu(this),n},n};function iu(e,{max:t,makeCacheKey:n=e=>e}){const r=new Hc(!0),i=new nu(t);return(...t)=>{const a=r.lookupArray(n(t)),o=i.get(a);if(o){if(o.error)throw o.error;return o.result}const s=i.set(a,{});try{return s.result=e(...t)}catch(l){throw s.error=l,l}}}var au=iu((e,t)=>{Oc(e&&"Document"===e.kind,1);const n=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&Oc(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),qs(e,{Field(t,r,i,a){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let r=e,i=[];for(const e of a)r=r[e],r.kind===Ko.FIELD&&i.push(r.alias?.value||r.name.value);throw i.splice(-1,1,t.name.value),Ic(5,t.alias.value,i.join("."),n[0].operation,$c(e,"(anonymous)"))}}})},{max:Fc.checkDocument||2e3}),{toString:ou}=Object.prototype;function su(...e){const t={};return e.forEach(e=>{e&&Reflect.ownKeys(e).forEach(n=>{const r=e[n];void 0!==r&&(t[n]=r)})}),t}function lu(e=[]){const t={};return e.forEach(e=>{t[e.name.value]=e}),t}function cu(e){return null!==e&&"object"==typeof e}var{hasOwnProperty:uu}=Object.prototype,du=function(e,t,n){return this.merge(e[n],t[n])},pu=e=>isNaN(+e)?{}:[],fu=class{options;reconciler;constructor(e={}){this.options=e,this.reconciler=e.reconciler||du}merge(e,t,n={}){const r=n.atPath;if(r?.length){const[i,...a]=r;void 0===e&&(e=pu(i));let o=e[i];void 0===o&&a.length&&(o=pu(a[0]));const s=this.merge(o,t,{...n,atPath:a});return o!==s&&((e=this.shallowCopyForMerge(e))[i]=s),e}return Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),cu(t)&&cu(e)?(Object.keys(t).forEach(n=>{if(uu.call(e,n)){const r=e[n];if(t[n]!==r){const i=this.reconciler(e,t,n);i!==r&&((e=this.shallowCopyForMerge(e))[n]=i)}}else(e=this.shallowCopyForMerge(e))[n]=t[n]}),e):t}isObject=cu;pastCopies=/* @__PURE__ */new Set;shallowCopyForMerge(e){return cu(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):{__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}};function hu(e){const t={},n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(e=>{e.defaultValue&&jc(t,e.variable.name,e.defaultValue)}),t}function mu(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const n=e.name.value;if("function"==typeof t)return t(n);const r=t&&t[n];return Oc(r,9,n),r||null}default:return null}}function gu(e,t){let n=t;const r=[];return e.definitions.forEach(e=>{if("OperationDefinition"===e.kind)throw Ic(10,e.operation,e.name?` named '${e.name.value}'`:"");"FragmentDefinition"===e.kind&&r.push(e)}),void 0===n&&(Oc(1===r.length,11,r.length),n=r[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}},...e.definitions]}}function yu(e){return e.definitions.filter(e=>"FragmentDefinition"===e.kind)}function bu(e){let t;au(e);for(let n of e.definitions){if("OperationDefinition"===n.kind)return n;"FragmentDefinition"!==n.kind||t||(t=n)}if(t)return t;throw Ic(12)}function vu(e){return au(e),e.definitions.filter(e=>"OperationDefinition"===e.kind)[0]}function xu(e){const t=vu(e);return Oc(t&&"query"===t.operation,13),t}var wu,ku=Object.assign(function(e){return JSON.stringify(e,Su)},{reset(){wu=new ru(Fc.canonicalStringify||1e3)}});function Su(e,t){if(t&&"object"==typeof t){const e=Object.getPrototypeOf(t);if(e===Object.prototype||null===e){const n=Object.keys(t);if(n.every(Tu))return t;const r=JSON.stringify(n);let i=wu.get(r);if(!i){n.sort();const e=JSON.stringify(n);i=wu.get(e)||n,wu.set(r,i),wu.set(e,i)}const a=Object.create(e);return i.forEach(e=>{a[e]=t[e]}),a}}return t}function Tu(e,t,n){return 0===t||n[t-1]<=e}ku.reset();var Nu=["connection","include","skip","client","rest","export","nonreactive","stream"],Cu=ku,Eu=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){const e=n.connection.filter?n.connection.filter:[];e.sort();const r={};e.forEach(e=>{r[e]=t[e]});const i=Cu(r);if("{}"!==i)return`${n.connection.key}(${i})`}return n.connection.key}let r=e;if(t){const e=Cu(t);"{}"!==e&&(r+=`(${e})`)}return n&&Object.keys(n).forEach(e=>{-1===Nu.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?r+=`@${e}(${Cu(n[e])})`:r+=`@${e}`)}),r},{setStringify(e){const t=Cu;return Cu=e,t}});function _u(e){return!!e.errors?.length}function Ou(e,t,n){const r=new Set(e),i=r.size;return qs(t,{Directive(e){if(r.delete(e.name.value)&&(!n||!r.size))return $s}}),n?!r.size:r.size<i}function Au(e){let t=!1;return qs(e,{Directive:{enter(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(e=>"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value),t))return $s}}}),t}var Iu=Array.isArray;function Du(e){return"Field"===e.kind}function Pu(e){return Array.isArray(e)&&e.length>0}function Mu(e){return{__ref:String(e)}}function Ru(e){let t=e[0]||{};const n=e.length;if(n>1){const r=new fu;for(let i=1;i<n;++i)t=r.merge(t,e[i])}return t}function ju(e,t){return su(e,t,t.variables&&{variables:su({...e&&e.variables,...t.variables})})}function zu(e){return e.catch(()=>{}),e}function Lu(e,t){au(t);const n=Fu(""),r=Fu(""),i=e=>{for(let t,i=0;i<e.length&&(t=e[i]);++i)if(!Iu(t)){if(t.kind===Ko.OPERATION_DEFINITION)return n(t.name&&t.name.value);if(t.kind===Ko.FRAGMENT_DEFINITION)return r(t.name.value)}return Oc.error(14),null};let a=0;for(let m=t.definitions.length-1;m>=0;--m)t.definitions[m].kind===Ko.OPERATION_DEFINITION&&++a;const o=function(e){const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;return e.forEach(e=>{e&&(e.name?t.set(e.name,e):e.test&&n.set(e.test,e))}),e=>{let r=t.get(e.name.value);return!r&&n.size&&n.forEach((t,n)=>{n(e)&&(r=t)}),r}}(e),s=e=>Pu(e)&&e.map(o).some(e=>e&&e.remove),l=/* @__PURE__ */new Map;let c=!1;const u={enter(e){if(s(e.directives))return c=!0,null}},d=qs(t,{Field:u,InlineFragment:u,VariableDefinition:{enter:()=>!1},Variable:{enter(e,t,n,r,a){const o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter(e,t,n,r,a){if(s(e.directives))return c=!0,null;const o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter(e,t,n,r){l.set(JSON.stringify(r),e)},leave:(e,t,n,i)=>e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(e=>e.kind===Ko.FIELD&&"__typename"===e.name.value)?(r(e.name.value).removed=!0,c=!0,null):void 0},Directive:{leave(e){if(o(e))return c=!0,null}}});if(!c)return t;const p=e=>(e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(t=>{p(r(t)).transitiveVars.forEach(t=>{e.transitiveVars.add(t)})})),e),f=/* @__PURE__ */new Set;d.definitions.forEach(e=>{e.kind===Ko.OPERATION_DEFINITION?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(e=>{f.add(e)}):e.kind!==Ko.FRAGMENT_DEFINITION||0!==a||r(e.name.value).removed||f.add(e.name.value)}),f.forEach(e=>{p(r(e)).fragmentSpreads.forEach(e=>{f.add(e)})});const h={enter(e){if(t=e.name.value,!f.has(t)||r(t).removed)return null;var t}};return function(e){return $u(vu(e)||function(e){Oc("Document"===e.kind,6),Oc(e.definitions.length<=1,7);const t=e.definitions[0];return Oc("FragmentDefinition"===t.kind,8),t}(e),lu(yu(e)))?null:e}(qs(d,{FragmentSpread:h,FragmentDefinition:h,OperationDefinition:{leave(e){if(e.variableDefinitions){const t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return{...e,variableDefinitions:e.variableDefinitions.filter(e=>t.has(e.variable.name.value))}}}}}))}function Fu(e){const t=/* @__PURE__ */new Map;return function(n=e){let r=t.get(n);return r||t.set(n,r={variables:/* @__PURE__ */new Set,fragmentSpreads:/* @__PURE__ */new Set}),r}}function $u(e,t){return!e||e.selectionSet.selections.every(e=>e.kind===Ko.FRAGMENT_SPREAD&&$u(t[e.name.value],t))}function qu(e){return qs(e,{FragmentSpread(e){if(!e.directives?.some(({name:e})=>"unmask"===e.value))return null}})}function Bu(e){return e.alias?e.alias.value:e.name.value}function Vu({directives:e},t){return!e||!e.length||function(e){const t=[];return e&&e.length&&e.forEach(e=>{if(!function({name:{value:e}}){return"skip"===e||"include"===e}(e))return;const n=e.arguments,r=e.name.value;Oc(n&&1===n.length,16,r);const i=n[0];Oc(i.name&&"if"===i.name.value,17,r);const a=i.value;Oc(a&&("Variable"===a.kind||"BooleanValue"===a.kind),18,r),t.push({directive:e,ifArgument:i})}),t}(e).every(({directive:e,ifArgument:n})=>{let r=!1;return"Variable"===n.value.kind?(r=t&&t[n.value.name.value],Oc(void 0!==r,15,e.name.value)):r=n.value.value,"skip"===e.name.value?!r:r})}function Uu(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function Hu(e,t=()=>{}){return n=>new Nl(r=>{let i=t();return n.subscribe({next(t){let n;try{n=e(t,i)}catch(jR){r.error(jR)}void 0!==n&&r.next(n)},error(e){r.error(e)},complete(){r.complete()}})})}var{toString:Wu,hasOwnProperty:Yu}=Object.prototype,Gu=Function.prototype.toString,Qu=/* @__PURE__ */new Map;function Ju(e,t){try{return Ku(e,t)}finally{Qu.clear()}}function Ku(e,t){if(e===t)return!0;const n=Wu.call(e);if(n!==Wu.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(td(e,t))return!0;const n=Xu(e),r=Xu(t),i=n.length;if(i!==r.length)return!1;for(let e=0;e<i;++e)if(!Yu.call(t,n[e]))return!1;for(let a=0;a<i;++a){const r=n[a];if(!Ku(e[r],t[r]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(td(e,t))return!0;const r=e.entries(),i="[object Map]"===n;for(;;){const e=r.next();if(e.done)break;const[n,a]=e.value;if(!t.has(n))return!1;if(i&&!Ku(a,t.get(n)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=Gu.call(e);return n===Gu.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,ed)}}return!1}function Xu(e){return Object.keys(e).filter(Zu,e)}function Zu(e){return void 0!==this[e]}var ed="{ [native code] }";function td(e,t){let n=Qu.get(e);if(n){if(n.has(t))return!0}else Qu.set(e,n=/* @__PURE__ */new Set);return n.add(t),!1}function nd(e,{data:t,...n},{data:r,...i},a){return Ju(n,i)&&rd(bu(e).selectionSet,t,r,{fragmentMap:lu(yu(e)),variables:a})}function rd(e,t,n,r){if(t===n)return!0;const i=/* @__PURE__ */new Set;return e.selections.every(e=>{if(i.has(e))return!0;if(i.add(e),!Vu(e,r.variables))return!0;if(id(e))return!0;if(Du(e)){const i=Bu(e),a=t&&t[i],o=n&&n[i],s=e.selectionSet;if(!s)return Ju(a,o);const l=Array.isArray(a),c=Array.isArray(o);if(l!==c)return!1;if(l&&c){const e=a.length;if(o.length!==e)return!1;for(let t=0;t<e;++t)if(!rd(s,a[t],o[t],r))return!1;return!0}return rd(s,a,o,r)}{const i=mu(e,r.fragmentMap);if(i)return!!id(i)||rd(i.selectionSet,t,n,r)}})}function id(e){return!!e.directives&&e.directives.some(ad)}function ad(e){return"nonreactive"===e.name.value}var od=iu(function(e,t,n){return function(e,t){let n,r;function i(e){return e!==n&&(n=e,r=t(n)),r}return Object.assign(e.pipe(uc(i),bc({bufferSize:1,refCount:!0})),{getCurrentResult:()=>i(e.getCurrentResult())})}(e,n)},{max:1,makeCacheKey:e=>e.slice(0,2)}),sd=Symbol.for("apollo.result.extensions"),ld=Symbol.for("apollo.result.streamInfo"),cd=Symbol.for("apollo.observableQuery.variablesUnknown"),ud=null,dd={},pd=1;function fd(e){try{return e()}catch(t){}}var hd="@wry/context:Slot",md=fd(()=>globalThis)||fd(()=>global)||Object.create(null),gd=md[hd]||Array[hd]||function(e){try{Object.defineProperty(md,hd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",pd++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=ud;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===dd)break;return e!==ud&&(ud.slots[this.id]=t),!0}return ud&&(ud.slots[this.id]=dd),!1}getValue(){if(this.hasValue())return ud.slots[this.id]}withValue(e,t,n,r){const i={__proto__:null,[this.id]:e},a=ud;ud={parent:a,slots:i};try{return t.apply(r,n)}finally{ud=a}}static bind(e){const t=ud;return function(){const n=ud;try{return ud=t,e.apply(this,arguments)}finally{ud=n}}}static noContext(e,t,n){if(!ud)return e.apply(n,t);{const r=ud;try{return ud=null,e.apply(n,t)}finally{ud=r}}}}),{bind:yd,noContext:bd}=gd,vd=new gd,{hasOwnProperty:xd}=Object.prototype,wd=Array.from||function(e){const t=[];return e.forEach(e=>t.push(e)),t};function kd(e){const{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Sd=[];function Td(e,t){if(!e)throw new Error(t||"assertion failure")}function Nd(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function Cd(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Ed(e){return e.slice(0)}var _d=class e{constructor(t){this.fn=t,this.parents=/* @__PURE__ */new Set,this.childValues=/* @__PURE__ */new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}peek(){if(1===this.value.length&&!Id(this))return Od(this),this.value[0]}recompute(e){return Td(!this.recomputing,"already recomputing"),Od(this),Id(this)?function(e,t){return Ld(e),vd.withValue(e,Ad,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{kd(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(jR){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Id(e)||Pd(e)}(e),Cd(e.value)}(this,e):Cd(this.value)}setDirty(){this.dirty||(this.dirty=!0,Dd(this),kd(this))}dispose(){this.setDirty(),Ld(this),Md(this,(e,t)=>{e.setDirty(),Fd(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=Sd.pop()||/* @__PURE__ */new Set),this.deps.add(e)}forgetDeps(){this.deps&&(wd(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),Sd.push(this.deps),this.deps=null)}};function Od(e){const t=vd.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Id(e)?Rd(t,e):jd(t,e),t}function Ad(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&1===e.value.length&&(r=Ed(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!Nd(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(i){}}catch(jR){e.value[1]=jR}e.recomputing=!1}function Id(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Dd(e){Md(e,Rd)}function Pd(e){Md(e,jd)}function Md(e,t){const n=e.parents.size;if(n){const r=wd(e.parents);for(let i=0;i<n;++i)t(r[i],e)}}function Rd(e,t){Td(e.childValues.has(t)),Td(Id(t));const n=!Id(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Sd.pop()||/* @__PURE__ */new Set;e.dirtyChildren.add(t),n&&Dd(e)}function jd(e,t){Td(e.childValues.has(t)),Td(!Id(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,Ed(t.value)):Nd(n,t.value)||e.setDirty(),zd(e,t),Id(e)||Pd(e)}function zd(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(Sd.length<100&&Sd.push(n),e.dirtyChildren=null))}function Ld(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{Fd(e,n)}),e.forgetDeps(),Td(null===e.dirtyChildren)}function Fd(e,t){t.parents.delete(e),e.childValues.delete(t),zd(e,t)}_d.count=0;var $d,qd={setDirty:!0,dispose:!0,forget:!0};function Bd(e){const t=/* @__PURE__ */new Map,n=e&&e.subscribe;function r(e){const r=vd.getValue();if(r){let i=t.get(e);i||t.set(e,i=/* @__PURE__ */new Set),r.dependOn(i),"function"==typeof n&&(kd(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){const r=t.get(e);if(r){const i=n&&xd.call(qd,n)?n:"setDirty";wd(r).forEach(e=>e[i]()),t.delete(e),kd(r)}},r}function Vd(...e){return($d||($d=new Hc("function"==typeof WeakMap))).lookupArray(e)}var Ud=/* @__PURE__ */new Set;function Hd(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=Vd,normalizeResult:i,subscribe:a,cache:o=Yc}=Object.create(null)){const s="function"==typeof o?new o(t,e=>e.dispose()):o,l=function(){const t=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let o=s.get(t);o||(s.set(t,o=new _d(e)),o.normalizeResult=i,o.subscribe=a,o.forget=()=>s.delete(t));const l=o.recompute(Array.prototype.slice.call(arguments));return s.set(t,o),Ud.add(s),vd.hasValue()||(Ud.forEach(e=>e.clean()),Ud.clear()),l};function c(e){const t=e&&s.get(e);t&&t.setDirty()}function u(e){const t=e&&s.get(e);if(t)return t.peek()}function d(e){return!!e&&s.delete(e)}return Object.defineProperty(l,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:a,cache:s}),l.dirtyKey=c,l.dirty=function(){c(r.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(r.apply(null,arguments))},l.forgetKey=d,l.forget=function(){return d(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}function Wd(...e){return Vd.bind(null,...e)}var Yd=class{isIncrementalResult(e){return!1}prepareRequest(e){return Oc(!Ou(["defer","stream"],e.query),67),e}extractErrors(){}startRequest=void 0},Gd=class e{static empty(){return new e(()=>ql)}static from(t){if(0===t.length)return e.empty();const[n,...r]=t;return n.concat(...r)}static split(t,n,r=new e((e,t)=>t(e))){const i=new e((e,i)=>t(e)?n.request(e,i):r.request(e,i));return Object.assign(i,{left:n,right:r})}static execute(e,t,n){return e.request(function(e,{client:t}){const n={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:$c(e.query),operationType:vu(e.query).operation};let r={...e.context};const i=()=>Object.freeze({...r});return Object.defineProperty(n,"setContext",{enumerable:!1,value:e=>{r="function"==typeof e?{...r,...e(i())}:{...r,...e}}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:i}),Object.defineProperty(n,"client",{enumerable:!1,value:t}),n}(t,n),()=>ql)}static concat(...t){return e.from(t)}constructor(e){e&&(this.request=e)}split(t,n,r){return this.concat(e.split(t,n,r))}concat(...e){return 0===e.length?this:e.reduce(this.combine.bind(this),this)}combine(t,n){const r=new e((e,r)=>t.request(e,e=>n.request(e,r)));return Object.assign(r,{left:t,right:n})}request(e,t){throw Ic(65)}left;right},Qd=Gd.execute;function Jd(e){return e}var Kd,Xd=class e{transform;cached;resultCache=/* @__PURE__ */new WeakSet;getCacheKey(e){return[e]}static identity(){return new e(Jd,{cache:!1})}static split(t,n,r=e.identity()){return Object.assign(new e(e=>(t(e)?n:r).transformDocument(e),{cache:!1}),{left:n,right:r})}constructor(e,t={}){this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}resetCache(){if(this.cached){const t=new Hc;this.performWork=Hd(e.prototype.performWork.bind(this),{makeCacheKey:e=>{const n=this.getCacheKey(e);if(n)return Oc(Array.isArray(n),20),t.lookupArray(n)},max:Fc["documentTransform.cache"],cache:Zc})}}performWork(e){return au(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const t=this.performWork(e);return this.resultCache.add(t),t}concat(t){return Object.assign(new e(e=>t.transformDocument(this.transformDocument(e)),{cache:!1}),{left:this,right:t})}left;right},Zd=Object.assign(e=>{let t=Kd.get(e);return t||(t=function(e){return qs(e,Vs)}(e),Kd.set(e,t)),t},{reset(){Kd=new nu(Fc.print||2e3)}});function ep(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}Zd.reset();var tp={kind:Ko.FIELD,name:{kind:Ko.NAME,value:"__typename"}},np=Object.assign(function(e){return qs(e,{SelectionSet:{enter(e,t,n){if(n&&n.kind===Ko.OPERATION_DEFINITION)return;const{selections:r}=e;if(!r)return;if(r.some(e=>e.kind===Ko.FIELD&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))))return;const i=n;return i.kind===Ko.FIELD&&i.directives&&i.directives.some(e=>"export"===e.name.value)?void 0:{...e,selections:[...r,tp]}}}})},{added:e=>e===tp});function rp(e,t){return vu(e)?.operation===t}function ip(e){return 7===e||8===e}function ap(e){return!ip(e)}var op=class{assumeImmutableResults=!1;lookupFragment(e){return null}batch(e){const t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;let n;return this.performTransaction(()=>n=e.update(this),t),n}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,t=!!e.optimistic){return this.read({...e,rootId:e.id||"ROOT_QUERY",optimistic:t})}fragmentWatches=new Hc(!0);watchFragment(e){const{fragment:t,fragmentName:n,from:r}=e,i=this.getFragmentDoc(t,n),a=(Array.isArray(r)?r:[r]).map(e=>null==e?e:this.toCacheId(e));if(!Array.isArray(r)){const t=this.watchSingleFragment(a[0],i,e);return null===r?t:od(t,Symbol.for("apollo.transform.individualResult"),e=>({...e,data:e.data??{}}))}let o;function s(e){const t=e.reduce((e,t,n)=>(e.data.push(t.data),e.complete&&=t.complete,e.dataState=e.complete?"complete":"partial",t.missing&&(e.missing||={},e.missing[n]=t.missing),e),{data:[],dataState:"complete",complete:!0});return Ju(o,t)||(o=t),o}if(0===a.length)return up;let l=!1;const c=a.map(t=>this.watchSingleFragment(t,i,e)),u=function(e){return 0===e.length?ql:new Nl(t=>{const{length:n}=e,r=new Array(n),i=/* @__PURE__ */new Map;e.forEach((e,t)=>{i.has(e)||i.set(e,/* @__PURE__ */new Set),i.get(e).add(t)});let a,o=i.size,s=i.size;i.forEach((n,i)=>{let l=!1;const c=i.subscribe({next:o=>{n.forEach(e=>r[e]=o),l||(l=!0,s--),s||(a||=new Set(e.filter(e=>e.dirty)),a.delete(i),a.size||(t.next(r.slice()),a=void 0))},complete:()=>{o--,o||t.complete()},error:t.error.bind(t)});t.add(c)})})}(c).pipe(uc(s),vc({subscribe:()=>l=!0,unsubscribe:()=>l=!1}),bc({bufferSize:1,refCount:!0}));return Object.assign(u,{getCurrentResult:()=>l&&o?o:s(c.map(e=>e.getCurrentResult()))})}onAfterBroadcast=e=>e();watchSingleFragment(e,t,n){if(null===e)return lp;const{optimistic:r=!0,variables:i}=n,a=[t,ku({id:e,optimistic:r,variables:i})],o=this.fragmentWatches.lookupArray(a);if(!o.observable){let c,u=!1;function d(e){const r=e.result;return c&&nd(t,{data:c.data},{data:r},n.variables)||(c={data:r,dataState:e.complete?"complete":"partial",complete:e.complete},e.missing&&(c.missing=e.missing.missing)),c}const p=new Nl(n=>{u=!0;const o=this.watch({variables:i,returnPartialData:!0,id:e,query:t,optimistic:r,immediate:!0,callback:e=>{p.dirty=!0,this.onAfterBroadcast(()=>{n.next(d(e)),p.dirty=!1})}});return()=>{u=!1,o(),this.fragmentWatches.removeArray(a)}}).pipe((void 0===l&&(l=Tl),s=null!=s?s:mc,El(function(e,t){var n,r=!0;e.subscribe(_l(t,function(e){var i=l(e);!r&&s(n,i)||(r=!1,n=i,t.next(e))}))})),gc({connector:()=>new Rl(1),resetOnRefCountZero:()=>function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=$l);var r=-1;return null!=t&&(Bl(t)?n=t:r=t),new Nl(function(t){var i,a=(i=e)instanceof Date&&!isNaN(i)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule(function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())},a)})}(0)}));o.observable=Object.assign(p,{dirty:!1,getCurrentResult:()=>u&&c?c:d(this.diff({id:e,query:t,returnPartialData:!0,optimistic:r,variables:i}))})}var s,l;return o.observable}getFragmentDoc=Hd(gu,{max:Fc["cache.fragmentQueryDocuments"]||1e3,cache:Zc,makeCacheKey:Wd(this)});readFragment(e,t=!!e.optimistic){const n=void 0!==e.from?this.toCacheId(e.from):e.id;return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:n,optimistic:t})}writeQuery({id:e,data:t,...n}){return this.write(Object.assign(n,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment({data:e,fragment:t,fragmentName:n,...r}){const i=void 0!==r.from?this.toCacheId(r.from):r.id;return this.write(Object.assign(r,{query:this.getFragmentDoc(t,n),dataId:i,result:e}))}updateQuery(e,t){return this.batch({update(n){const r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery({...e,data:i}),i)}})}updateFragment(e,t){return this.batch({update(n){const r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment({...e,data:i}),i)}})}toCacheId(e){return"string"==typeof e?e:this.identify(e)}},sp=Object.freeze({data:null,dataState:"complete",complete:!0}),lp=Object.assign(new Nl(e=>{e.next(sp)}),{dirty:!1,getCurrentResult:()=>sp}),cp=Object.freeze({data:[],dataState:"complete",complete:!0}),up=Object.assign(new Nl(e=>{e.next(cp)}),{getCurrentResult:()=>cp}),dp=class e extends Error{message;path;query;variables;constructor(t,n,r,i){if(super(t),this.message=t,this.path=n,this.query=r,this.variables=i,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let e=this.path.length-1;e>=0;--e)this.missing={[this.path[e]]:this.missing}}else this.missing=this.path;this.__proto__=e.prototype}missing},{hasOwnProperty:pp}=Object.prototype;function fp({__typename:e,id:t,_id:n},r){if("string"==typeof e&&(r&&(r.keyObject=null!=t?{id:t}:null!=n?{_id:n}:void 0),null==t&&null!=n&&(t=n),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}var hp={dataIdFromObject:fp,resultCaching:!0},mp=/^[_a-z][_0-9a-z]*/i;function gp(e){const t=e.match(mp);return t?t[0]:e}function yp(e,t,n){return!!cu(t)&&(Iu(t)?t.every(t=>yp(e,t,n)):e.selections.every(e=>{if(Du(e)&&Vu(e,n)){const r=Bu(e);return pp.call(t,r)&&(!e.selectionSet||yp(e.selectionSet,t[r],n))}return!0}))}function bp(e){return cu(e)&&!ep(e)&&!Iu(e)}function vp(e,t){const n=lu(yu(e));return{fragmentMap:n,lookupFragment(e){let r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var xp={},wp=()=>xp,kp={},Sp=class{policies;group;data={};constructor(e,t){this.policies=e,this.group=t}toObject(){return{...this.data}}has(e){return void 0!==this.lookup(e,!0)}get(e,t){if(this.group.depend(e,t),pp.call(this.data,e)){const n=this.data[e];if(n&&pp.call(n,t))return n[t]}return"__typename"===t&&pp.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Ep?this.parent.get(e,t):void 0}lookup(e,t){return t&&this.group.depend(e,"__exists"),pp.call(this.data,e)?this.data[e]:this instanceof Ep?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?{}:void 0}merge(e,t){let n;ep(e)&&(e=e.__ref),ep(t)&&(t=t.__ref);const r="string"==typeof e?this.lookup(n=e):e,i="string"==typeof t?this.lookup(n=t):t;if(!i)return;Oc("string"==typeof n,104);const a=new fu({reconciler:Op}).merge(r,i);if(this.data[n]=a,a!==r&&(delete this.refs[n],this.group.caching)){const e={};r||(e.__exists=1),Object.keys(i).forEach(t=>{if(!r||r[t]!==a[t]){e[t]=1;const n=gp(t);n===t||this.policies.hasKeyArgs(a.__typename,n)||(e[n]=1),void 0!==a[t]||this instanceof Ep||delete a[t]}}),!e.__typename||r&&r.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete e.__typename,Object.keys(e).forEach(e=>this.group.dirty(n,e))}}modify(e,t,n){const r=this.lookup(e);if(r){const i={};let a=!1,o=!0;const s={DELETE:xp,INVALIDATE:kp,isReference:ep,toReference:this.toReference,canRead:this.canRead,readField:(t,n)=>this.policies.readField("string"==typeof t?{fieldName:t,from:n||Mu(e)}:t,{store:this})};if(Object.keys(r).forEach(l=>{const c=gp(l);let u=r[l];if(void 0===u)return;const d="function"==typeof t?t:t[l]||(n?void 0:t[c]);if(d){let t=d===wp?xp:d(u,{...s,fieldName:c,storeFieldName:l,storage:this.getStorage(e,l)});t===kp?this.group.dirty(e,l):(t===xp&&(t=void 0),t!==u&&(i[l]=t,a=!0,u=t))}void 0!==u&&(o=!1)}),a)return this.merge(e,i),o&&(this instanceof Ep?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,n){const r=this.lookup(e);if(r){const i=this.getFieldValue(r,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:i,fieldName:t,args:n}):t;return this.modify(e,a?{[a]:wp}:wp,!!n)}return!1}evict(e,t){let n=!1;return e.id&&(pp.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Ep&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n}clear(){this.replace(null)}extract(){const e=this.toObject(),t=[];return this.getRootIdSet().forEach(e=>{pp.call(this.policies.rootTypenamesById,e)||t.push(e)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&pp.call(e,t)||this.delete(t)}),e){const{__META:t,...n}=e;Object.keys(n).forEach(e=>{this.merge(e,n[e])}),t&&t.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(e=/* @__PURE__ */new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof Ep?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),t=this.toObject();e.forEach(n=>{pp.call(t,n)&&(Object.keys(this.findChildRefIds(n)).forEach(e.add,e),delete t[n])});const n=Object.keys(t);if(n.length){let e=this;for(;e instanceof Ep;)e=e.parent;n.forEach(t=>e.delete(t))}return n}refs={};findChildRefIds(e){if(!pp.call(this.refs,e)){const t=this.refs[e]={},n=this.data[e];if(!n)return t;const r=new Set([n]);r.forEach(e=>{ep(e)&&(t[e.__ref]=!0),cu(e)&&Object.keys(e).forEach(t=>{const n=e[t];cu(n)&&r.add(n)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,t)=>ep(e)?this.get(e.__ref,t):e&&e[t];canRead=e=>ep(e)?this.has(e.__ref):"object"==typeof e;toReference=(e,t)=>{if("string"==typeof e)return Mu(e);if(ep(e))return e;const[n]=this.policies.identify(e);if(n){const r=Mu(n);return t&&this.merge(n,e),r}};get supportsResultCaching(){return this.group.caching}},Tp=class{caching;parent;d=null;keyMaker;constructor(e,t=null){this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?Bd():null,this.keyMaker=new Hc}depend(e,t){if(this.d){this.d(Np(e,t));const n=gp(t);n!==t&&this.d(Np(e,n)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(Np(e,t),"__exists"===t?"forget":"setDirty")}};function Np(e,t){return t+"#"+e}function Cp(e,t){Ap(e)&&e.group.depend(t,"__exists")}Sp.Root=class extends Sp{constructor({policies:e,resultCaching:t=!0,seed:n}){super(e,new Tp(t)),n&&this.replace(n)}stump=new _p(this);addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}storageTrie=new Hc;getStorage(){return this.storageTrie.lookupArray(arguments)}};var Ep=class e extends Sp{id;parent;replay;group;constructor(e,t,n,r){super(t.policies,r),this.id=e,this.parent=t,this.replay=n,this.group=r,n(this)}addLayer(t,n){return new e(t,this,n,this.group)}removeLayer(e){const t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(e=>{const n=this.data[e],r=t.lookup(e);r?n?n!==r&&Object.keys(n).forEach(t=>{Ju(n[t],r[t])||this.group.dirty(e,t)}):(this.group.dirty(e,"__exists"),Object.keys(r).forEach(t=>{this.group.dirty(e,t)})):this.delete(e)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){const t=this.parent.findChildRefIds(e);return pp.call(this.data,e)?{...t,...super.findChildRefIds(e)}:t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}},_p=class extends Ep{constructor(e){super("EntityStore.Stump",e,()=>{},new Tp(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}};function Op(e,t,n){const r=e[n],i=t[n];return Ju(r,i)?r:i}function Ap(e){return!(!e||!e.supportsResultCaching)}var Ip=new gd;function Dp(e){const t=e.directives?.find(({name:e})=>"unmask"===e.value);if(!t)return"mask";const n=t.arguments?.find(({name:e})=>"mode"===e.value);return n&&"value"in n.value&&"migrate"===n.value.value?"migrate":"unmask"}function Pp(e,t,n){return Ip.withValue(!0,()=>{const r=Mp(e,t,n,!1);return Object.isFrozen(e),r})}function Mp(e,t,n,r,i){const{knownChanged:a}=n,o=function(e,t){if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};return t.set(e,n),n}(e,n.mutableTargets);if(Array.isArray(e)){for(const[i,s]of Array.from(e.entries())){if(null===s){o[i]=null;continue}const e=Mp(s,t,n,r,void 0);a.has(e)&&a.add(o),o[i]=e}return a.has(o)?o:e}for(const s of t.selections){let t;if(r&&a.add(o),s.kind===Ko.FIELD){const i=Bu(s),l=s.selectionSet;if(t=o[i]||e[i],void 0===t)continue;if(l&&null!==t){const o=Mp(e[i],l,n,r,void 0);a.has(o)&&(t=o)}o[i]=t}if(s.kind!==Ko.INLINE_FRAGMENT||s.typeCondition&&!n.cache.fragmentMatches(s,e.__typename)||(t=Mp(e,s.selectionSet,n,r,i)),s.kind===Ko.FRAGMENT_SPREAD){const r=s.name.value,a=n.fragmentMap[r]||(n.fragmentMap[r]=n.cache.lookupFragment(r));Oc(a,39,r);const o=Dp(s);"mask"!==o&&(t=Mp(e,a.selectionSet,n,"migrate"===o,i))}a.has(t)&&a.add(o)}return"__typename"in e&&!("__typename"in o)&&(o.__typename=e.__typename),Object.keys(o).length!==Object.keys(e).length&&a.add(o),a.has(o)?o:e}var Rp={};function jp(e){const t=JSON.stringify(e);return Rp[t]||(Rp[t]={})}function zp(e){const t=jp(e);return t.keyFieldsFn||(t.keyFieldsFn=(t,n)=>{const r=(e,t)=>n.readField(t,e),i=n.keyObject=Fp(e,e=>{let i=Bp(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&pp.call(t,e[0])&&(i=Bp(t,e,qp)),Oc(void 0!==i,107,e.join("."),t),i});return`${n.typename}:${JSON.stringify(i)}`})}function Lp(e){const t=jp(e);return t.keyArgsFn||(t.keyArgsFn=(t,{field:n,variables:r,fieldName:i})=>{const a=Fp(e,e=>{const i=e[0],a=i.charAt(0);if("@"!==a){if("$"===a){const t=i.slice(1);if(r&&pp.call(r,t)){const n=e.slice(0);return n[0]=t,Bp(r,n)}return}if(t)return Bp(t,e)}else if(n&&Pu(n.directives)){const t=i.slice(1),a=n.directives.find(e=>e.name.value===t),o=a&&zc(a,r);return o&&Bp(o,e.slice(1))}}),o=JSON.stringify(a);return(t||"{}"!==o)&&(i+=":"+o),i})}function Fp(e,t){const n=new fu;return $p(e).reduce((e,r)=>{let i=t(r);if(void 0!==i){for(let e=r.length-1;e>=0;--e)i={[r[e]]:i};e=n.merge(e,i)}return e},{})}function $p(e){const t=jp(e);if(!t.paths){const n=t.paths=[],r=[];e.forEach((t,i)=>{Iu(t)?($p(t).forEach(e=>n.push(r.concat(e))),r.length=0):(r.push(t),Iu(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function qp(e,t){return e[t]}function Bp(e,t,n){return n=n||qp,Vp(t.reduce(function e(t,r){return Iu(t)?t.map(t=>e(t,r)):t&&n(t,r)},e))}function Vp(e){return cu(e)?Iu(e)?e.map(Vp):Fp(Object.keys(e).sort(),t=>Bp(e,t)):e}var Up=new gd,Hp=/* @__PURE__ */new WeakMap;function Wp(e){let t=Hp.get(e);return t||Hp.set(e,t={vars:/* @__PURE__ */new Set,dep:Bd()}),t}function Yp(e){Wp(e).vars.forEach(t=>t.forgetCache(e))}function Gp(e){const t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(e=>{Wp(e).dep.dirty(r),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});const i=Array.from(n);n.clear(),i.forEach(t=>t(e))}}else{const e=Up.getValue();e&&(i(e),Wp(e).dep(r))}return e};r.onNextChange=e=>(n.add(e),()=>{n.delete(e)});const i=r.attachCache=e=>(t.add(e),Wp(e).vars.add(r),r);return r.forgetCache=e=>t.delete(e),r}function Qp(e){return void 0!==e.args?e.args:e.field?zc(e.field,e.variables):null}var Jp=()=>{},Kp=(e,t)=>t.fieldName,Xp=(e,t,{mergeObjects:n})=>n(e,t),Zp=(e,t)=>t,ef=(e,t,{streamFieldInfo:n,existingData:r})=>{if(!e&&!r)return t;const i=[],a=e??r,o=n?.isLastChunk?t.length:Math.max(a.length,t.length);for(let s=0;s<o;s++)i[s]=void 0===t[s]?a[s]:t[s];return i},tf=class{config;typePolicies={};toBeAdded={};supertypeMap=/* @__PURE__ */new Map;fuzzySubtypes=/* @__PURE__ */new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config={dataIdFromObject:fp,...e},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,t){const n=this,r=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const i=t&&t.storeObject||e,a={...t,typename:r,storeObject:i,readField:t&&t.readField||((...e)=>{const t=rf(e,i);return n.readField(t,{store:n.cache.data,variables:t.variables})})};let o;const s=r&&this.getTypePolicy(r);let l=s&&s.keyFn||this.config.dataIdFromObject;return Ip.withValue(!0,()=>{for(;l;){const t=l({...e,...i},a);if(!Iu(t)){o=t;break}l=zp(t)}}),o=o?String(o):void 0,a.keyObject?[o,a.keyObject]:[o]}addTypePolicies(e){Object.keys(e).forEach(t=>{const{queryType:n,mutationType:r,subscriptionType:i,...a}=e[t];n&&this.setRootTypename("Query",t),r&&this.setRootTypename("Mutation",t),i&&this.setRootTypename("Subscription",t),pp.call(this.toBeAdded,t)?this.toBeAdded[t].push(a):this.toBeAdded[t]=[a]})}updateTypePolicy(e,t,n){const r=this.getTypePolicy(e),{keyFields:i,fields:a}=t;function o(e,t){e.merge="function"==typeof t?t:!0===t?Xp:!1===t?Zp:e.merge}o(r,t.merge),r.keyFn=!1===i?Jp:Iu(i)?zp(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(t=>{let r=n[t];r&&r?.typename===e||(r=n[t]={typename:e});const i=a[t];if("function"==typeof i)r.read=i;else{const{keyArgs:e,read:t,merge:n}=i;r.keyFn=!1===e?Kp:Iu(e)?Lp(e):"function"==typeof e?e:r.keyFn,"function"==typeof t&&(r.read=t),o(r,n)}r.read&&r.merge&&(r.keyFn=r.keyFn||Kp)})}setRootTypename(e,t=e){const n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(Oc(!r||r===e,108,e),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(e=>{this.getSupertypeSet(e,!0).add(t);const n=e.match(mp);n&&n[0]===e||this.fuzzySubtypes.set(e,new RegExp(e))})})}getTypePolicy(e){if(!pp.call(this.typePolicies,e)){const t=this.typePolicies[e]={};t.fields={};let n=this.supertypeMap.get(e);!n&&this.fuzzySubtypes.size&&(n=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((t,r)=>{if(t.test(e)){const e=this.supertypeMap.get(r);e&&e.forEach(e=>n.add(e))}})),n&&n.size&&n.forEach(e=>{const{fields:n,...r}=this.getTypePolicy(e);Object.assign(t,r),Object.assign(t.fields,n)})}const t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(t=>{this.updateTypePolicy(e,t,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=/* @__PURE__ */new Set),n}fragmentMatches(e,t,n,r){if(!e.typeCondition)return!0;if(!t)return!1;const i=e.typeCondition.name.value;if(t===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i)){const a=this.getSupertypeSet(t,!0),o=[a],s=e=>{const t=this.getSupertypeSet(e,!1);t&&t.size&&o.indexOf(t)<0&&o.push(t)};let l=!(!n||!this.fuzzySubtypes.size),c=!1;for(let u=0;u<o.length;++u){const d=o[u];if(d.has(i))return a.has(i)||a.add(i),!0;d.forEach(s),l&&u===o.length-1&&yp(e.selectionSet,n,r)&&(l=!1,c=!0,this.fuzzySubtypes.forEach((e,n)=>{const r=t.match(e);r&&r[0]===t&&s(n)}))}}return!1}hasKeyArgs(e,t){const n=this.getFieldPolicy(e,t);return!(!n||!n.keyFn)}getStoreFieldName(e){const{typename:t,fieldName:n}=e,r=this.getFieldPolicy(t,n);let i,a=r&&r.keyFn;if(a&&t){const r={typename:t,fieldName:n,field:e.field||null,variables:e.variables},o=Qp(e);for(;a;){const e=a(o,r);if(!Iu(e)){i=e||n;break}a=Lp(e)}}return void 0===i&&(i=e.field?function(e,t){let n=null;e.directives&&(n={},e.directives.forEach(e=>{n[e.name.value]={},e.arguments&&e.arguments.forEach(({name:r,value:i})=>jc(n[e.name.value],r,i,t))}));let r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(({name:e,value:n})=>jc(r,e,n,t))),Eu(e.name.value,r,n)}(e.field,e.variables):Eu(n,Qp(e))),!1===i?n:n===gp(i)?i:n+":"+i}readField(e,t){const n=e.from;if(!n)return;if(!e.field&&!e.fieldName)return;if(void 0===e.typename){const r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}const r=this.getStoreFieldName(e),i=gp(r),a=t.store.getFieldValue(n,r),o=this.getFieldPolicy(e.typename,i),s=o&&o.read;if(s){const i=nf(this,n,e,t,t.store.getStorage(ep(n)?n.__ref:n,r));return Up.withValue(this.cache,s,[a,i])}return a}getReadFunction(e,t){const n=this.getFieldPolicy(e,t);return n&&n.read}getMergeFunction(e,t,n){let r=this.getFieldPolicy(e,t),i=r&&r.merge;return!i&&n&&(r=this.getTypePolicy(n),i=r&&r.merge),i}runMergeFunction(e,t,{field:n,typename:r,merge:i,path:a},o,s){const l=e;if(i===Xp)return af(o.store)(e,t);if(i===Zp)return t;o.overwrite&&(e=void 0);const c=o.extensions?.[ld]?.deref()?.peekArray(a);if(c){const{current:e,previous:n}=c;if(n&&Ju(n.incoming,t)&&Ju(n.streamFieldInfo,e))return n.result}const u=i(e,t,function(e,t,n,r,i,a){const o={...nf(e,void 0,n,r,i),extensions:r.extensions,existingData:a},s=r.extensions;if(s&&ld in s){const{[ld]:e,...t}=s,r=e?.deref()?.peekArray(n.path);r&&(o.streamFieldInfo=r.current),o.extensions=0===Object.keys(t).length?void 0:t}return o}(this,0,{typename:r,fieldName:n.name.value,field:n,variables:o.variables,path:a},o,s||{},l));return c&&(c.previous={incoming:t,streamFieldInfo:c.current,result:u}),u}};function nf(e,t,n,r,i){const a=e.getStoreFieldName(n),o=gp(a),s=n.variables||r.variables,{toReference:l,canRead:c}=r.store;return{args:Qp(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:ep,toReference:l,storage:i,cache:e.cache,canRead:c,readField:(...n)=>e.readField(rf(n,t,s),r),mergeObjects:af(r.store)}}function rf(e,t,n){const{0:r,1:i,length:a}=e;let o;return"string"==typeof r?o={fieldName:r,from:a>1?i:t}:(o={...r},pp.call(o,"from")||(o.from=t)),void 0===o.variables&&(o.variables=n),o}function af(e){return function(t,n){if(Iu(t)||Iu(n))throw Ic(111);if(cu(t)&&cu(n)){const r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(ep(t)&&bp(n))return e.merge(t.__ref,n),t;if(bp(t)&&ep(n))return e.merge(t,n.__ref),n;if(bp(t)&&bp(n))return{...t,...n}}return n}}function of(e){return[e.selectionSet,e.objectOrReference,e.context]}var sf=class{executeSelectionSet;executeSubSelectedArray;config;knownResults=/* @__PURE__ */new WeakMap;constructor(e){this.config=e,this.executeSelectionSet=Hd(e=>{const t=of(e);return this.executeSelectionSet.peek(...t)||(Cp(e.context.store,e.enclosingRef.__ref),this.execSelectionSetImpl(e))},{max:Fc["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:of,makeCacheKey(e,t,n){if(Ap(n.store))return n.store.makeCacheKey(e,ep(t)?t.__ref:t,n.varString)}}),this.executeSubSelectedArray=Hd(e=>(Cp(e.context.store,e.enclosingRef.__ref),this.execSubSelectedArrayImpl(e)),{max:Fc["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:e,array:t,context:n}){if(Ap(n.store))return n.store.makeCacheKey(e,t,n.varString)}})}diffQueryAgainstStore({store:e,query:t,rootId:n="ROOT_QUERY",variables:r,returnPartialData:i=!0}){const a=this.config.cache.policies;r={...hu(xu(t)),...r};const o=Mu(n),s=this.executeSelectionSet({selectionSet:bu(t).selectionSet,objectOrReference:o,enclosingRef:o,context:{store:e,query:t,policies:a,variables:r,varString:ku(r),...vp(t,this.config.fragments)}});let l;s.missing&&(l=new dp(function(e){try{JSON.stringify(e,(e,t)=>{if("string"==typeof t)throw t;return t})}catch(u){return u}}(s.missing),s.missing,t,r));const c=!l,{result:u}=s;return{result:c?u:i?0===Object.keys(u).length?null:u:null,complete:c,missing:l}}isFresh(e,t,n,r){if(Ap(r.store)&&this.knownResults.get(e)===n){const i=this.executeSelectionSet.peek(n,t,r);if(i&&e===i.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:n,context:r}){if(ep(t)&&!r.policies.rootTypenamesById[t.__ref]&&!r.store.has(t.__ref))return{result:{},missing:`Dangling reference to missing ${t.__ref} object`};const{variables:i,policies:a,store:o}=r,s=o.getFieldValue(t,"__typename"),l=[];let c;const u=new fu;function d(e,t){return e.missing&&(c=u.merge(c,{[t]:e.missing})),e.result}"string"!=typeof s||a.rootIdsByTypename[s]||l.push({__typename:s});const p=new Set(e.selections);p.forEach(e=>{if(Vu(e,i))if(Du(e)){let i=a.readField({fieldName:e.name.value,field:e,variables:r.variables,from:t},r);const o=Bu(e);void 0===i?np.added(e)||(c=u.merge(c,{[o]:`Can't find field '${e.name.value}' on ${ep(t)?t.__ref+" object":"object "+JSON.stringify(t,null,2)}`})):Iu(i)?i.length>0&&(i=d(this.executeSubSelectedArray({field:e,array:i,enclosingRef:n,context:r}),o)):e.selectionSet&&null!=i&&(i=d(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:i,enclosingRef:ep(i)?i:n,context:r}),o)),void 0!==i&&l.push({[o]:i})}else{const t=mu(e,r.lookupFragment);if(!t&&e.kind===Ko.FRAGMENT_SPREAD)throw Ic(112,e.name.value);t&&a.fragmentMatches(t,s)&&t.selectionSet.selections.forEach(p.add,p)}});const f={result:Ru(l),missing:c};return f.result&&this.knownResults.set(f.result,e),f}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:n,context:r}){let i,a=new fu;function o(e,t){return e.missing&&(i=a.merge(i,{[t]:e.missing})),e.result}return e.selectionSet&&(t=t.filter(e=>void 0===e||r.store.canRead(e))),t=t.map((t,i)=>null===t?null:Iu(t)?o(this.executeSubSelectedArray({field:e,array:t,enclosingRef:n,context:r}),i):e.selectionSet?o(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:t,enclosingRef:ep(t)?t:n,context:r}),i):t),{result:t,missing:i}}};function lf(e,t,n){const r=`${t}${n}`;let i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:{...e,clientOnly:t,deferred:n}),i}var cf=class{cache;reader;fragments;constructor(e,t,n){this.cache=e,this.reader=t,this.fragments=n}writeToStore(e,{query:t,result:n,dataId:r,variables:i,overwrite:a,extensions:o}){const s=vu(t),l=new fu;i={...hu(s),...i};const c={store:e,written:{},merge:(e,t)=>l.merge(e,t),variables:i,varString:ku(i),...vp(t,this.fragments),overwrite:!!a,incomingById:/* @__PURE__ */new Map,clientOnly:!1,deferred:!1,flavors:/* @__PURE__ */new Map,extensions:o},u=this.processSelectionSet({result:n||{},dataId:r,selectionSet:s.selectionSet,mergeTree:{map:/* @__PURE__ */new Map},context:c,path:[]});if(!ep(u))throw Ic(114,n);return c.incomingById.forEach(({storeObject:t,mergeTree:n,fieldNodeSet:r},i)=>{const a=Mu(i);if(n&&n.map.size){const e=this.applyMerges(n,a,t,c);if(ep(e))return;t=e}e.merge(i,t)}),e.retain(u.__ref),u}processSelectionSet({dataId:e,result:t,selectionSet:n,context:r,mergeTree:i,path:a}){const{policies:o}=this.cache;let s={};const l=e&&o.rootTypenamesById[e]||mf(t,n,r.fragmentMap)||e&&r.store.get(e,"__typename");"string"==typeof l&&(s.__typename=l);const c=(...e)=>{const t=rf(e,s,r.variables);if(ep(t.from)){const e=r.incomingById.get(t.from.__ref);if(e){const n=o.readField({...t,from:e.storeObject},r);if(void 0!==n)return n}}return o.readField(t,r)},u=/* @__PURE__ */new Set;this.flattenFields(n,t,r,l).forEach((e,n)=>{const r=t[Bu(n)],d=[...a,n.name.value];if(u.add(n),void 0!==r){const t=o.getStoreFieldName({typename:l,fieldName:n.name.value,field:n,variables:e.variables}),a=df(i,t);let u,p=this.processFieldValue(r,n,n.selectionSet?lf(e,!1,!1):e,a,d);n.selectionSet&&(ep(p)||bp(p))&&(u=c("__typename",p));const f=o.getMergeFunction(l,n.name.value,u);f?a.info={field:n,typename:l,merge:f,path:d}:Ou(["stream"],n)&&Array.isArray(p)&&e.extensions?.[ld]?a.info={field:n,typename:l,merge:ef,path:d}:hf(i,t),s=e.merge(s,{[t]:p})}});try{const[i,a]=o.identify(t,{typename:l,selectionSet:n,fragmentMap:r.fragmentMap,storeObject:s,readField:c});e=e||i,a&&(s=r.merge(s,a))}catch(jR){if(!e)throw jR}if("string"==typeof e){const a=Mu(e),o=r.written[e]||(r.written[e]=[]);if(o.indexOf(n)>=0)return a;if(o.push(n),this.reader&&this.reader.isFresh(t,a,n,r))return a;const l=r.incomingById.get(e);return l?(l.storeObject=r.merge(l.storeObject,s),l.mergeTree=pf(l.mergeTree,i),u.forEach(e=>l.fieldNodeSet.add(e))):r.incomingById.set(e,{storeObject:s,mergeTree:ff(i)?void 0:i,fieldNodeSet:u}),a}return s}processFieldValue(e,t,n,r,i){return t.selectionSet&&null!==e?Iu(e)?e.map((e,a)=>{const o=this.processFieldValue(e,t,n,df(r,a),[...i,a]);return hf(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r,path:i}):e}flattenFields(e,t,n,r=mf(t,e,n.fragmentMap)){const i=/* @__PURE__ */new Map,{policies:a}=this.cache,o=new Hc(!1);return function e(s,l){const c=o.lookup(s,l.clientOnly,l.deferred);c.visited||(c.visited=!0,s.selections.forEach(o=>{if(!Vu(o,n.variables))return;let{clientOnly:s,deferred:c}=l;if(s&&c||!Pu(o.directives)||o.directives.forEach(e=>{const t=e.name.value;if("client"===t&&(s=!0),"defer"===t){const t=zc(e,n.variables);t&&!1===t.if||(c=!0)}}),Du(o)){const e=i.get(o);e&&(s=s&&e.clientOnly,c=c&&e.deferred),i.set(o,lf(n,s,c))}else{const i=mu(o,n.lookupFragment);if(!i&&o.kind===Ko.FRAGMENT_SPREAD)throw Ic(116,o.name.value);i&&a.fragmentMatches(i,r,t,n.variables)&&e(i.selectionSet,lf(n,s,c))}}))}(e,n),i}applyMerges(e,t,n,r,i){if(e.map.size&&!ep(n)){const a=Iu(n)||!ep(t)&&!bp(t)?void 0:t,o=n;let s;a&&!i&&(i=[ep(a)?a.__ref:a]);const l=(e,t)=>Iu(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t));e.map.forEach((e,t)=>{const n=l(a,t),c=l(o,t);if(void 0===c)return;i&&i.push(t);const u=this.applyMerges(e,n,c,r,i);u!==c&&(s=s||/* @__PURE__ */new Map,s.set(t,u)),i&&Oc(i.pop()===t)}),s&&(n=Iu(o)?o.slice(0):{...o},s.forEach((e,t)=>{n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&r.store.getStorage(...i)):n}},uf=[];function df({map:e},t){return e.has(t)||e.set(t,uf.pop()||{map:/* @__PURE__ */new Map}),e.get(t)}function pf(e,t){if(e===t||!t||ff(t))return e;if(!e||ff(e))return t;const n=e.info&&t.info?{...e.info,...t.info}:e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?/* @__PURE__ */new Map:e.map.size?e.map:t.map};if(r){const n=new Set(t.map.keys());e.map.forEach((e,r)=>{i.map.set(r,pf(e,t.map.get(r))),n.delete(r)}),n.forEach(n=>{i.map.set(n,pf(t.map.get(n),e.map.get(n)))})}return i}function ff(e){return!e||!(e.info||e.map.size)}function hf({map:e},t){const n=e.get(t);n&&ff(n)&&(uf.push(n),e.delete(t))}function mf(e,t,n){let r;for(const i of t.selections)if(Du(i)){if("__typename"===i.name.value)return e[Bu(i)]}else r?r.push(i):r=[i];if("string"==typeof e.__typename)return e.__typename;if(r)for(const i of r){const t=mf(e,mu(i,n).selectionSet,n);if("string"==typeof t)return t}}var gf=class extends op{data;optimisticData;config;watches=/* @__PURE__ */new Set;storeReader;storeWriter;addTypenameTransform=new Xd(np);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=Gp;constructor(e={}){super(),this.config=function(e){return su(hp,e)}(e),this.policies=new tf({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new Sp.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new cf(this,this.storeReader=new sf({cache:this,fragments:e}),e),this.maybeBroadcastWatch=Hd((e,t)=>this.broadcastWatch(e,t),{max:Fc["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:e=>{const t=e.optimistic?this.optimisticData:this.data;if(Ap(t)){const{optimistic:n,id:r,variables:i}=e;return t.makeCacheKey(e.query,e.callback,ku({optimistic:n,id:r,variables:i}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(e=>e.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){const{returnPartialData:t=!1}=e;return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:t}).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}modify(e){if(pp.call(e,"id")&&!e.id)return!1;const t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){var t;return this.watches.size||Wp(t=this).vars.forEach(e=>e.attachCache(t)),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&Yp(this),this.maybeBroadcastWatch.forget(e)}}gc(e){ku.reset(),Zd.reset();const t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(ep(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(jR){}}evict(e){if(!e.id){if(pp.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}reset(e){return this.init(),ku.reset(),e&&e.discardWatches?(this.watches.forEach(e=>this.maybeBroadcastWatch.forget(e)),this.watches.clear(),Yp(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}txCount=0;batch(e){const{update:t,optimistic:n=!0,removeOptimistic:r,onWatchUpdated:i}=e;let a;const o=e=>{const{data:n,optimisticData:r}=this;++this.txCount,e&&(this.data=this.optimisticData=e);try{return a=t(this)}finally{--this.txCount,this.data=n,this.optimisticData=r}},s=/* @__PURE__ */new Set;return i&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated:e=>(s.add(e),!1)}),"string"==typeof n?this.optimisticData=this.optimisticData.addLayer(n,o):!1===n?o(this.data):o(),"string"==typeof r&&(this.optimisticData=this.optimisticData.removeLayer(r)),i&&s.size?(this.broadcastWatches({...e,onWatchUpdated(e,t){const n=i.call(this,e,t);return!1!==n&&s.delete(e),n}}),s.size&&s.forEach(e=>this.maybeBroadcastWatch.dirty(e))):this.broadcastWatches(e),a}performTransaction(e,t){return this.batch({update:e,optimistic:t||null!==t})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){const t=this.onAfterBroadcast,n=/* @__PURE__ */new Set;this.onAfterBroadcast=e=>{n.add(e)};try{this.watches.forEach(t=>this.maybeBroadcastWatch(t,e)),n.forEach(e=>e())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){const{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){const{lastDiff:n}=e,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Ju(n.result,r.result)||e.callback(e.lastDiff=r,n)}};function yf(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function bf(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function vf(e){return e.map(e=>e.message||"Error message not found.").join("\n")}var xf=class e extends Error{static is(e){return yf(e,"CombinedProtocolErrors")}static formatMessage=vf;errors;constructor(t){super(e.formatMessage(t,{defaultFormatMessage:vf})),this.name="CombinedProtocolErrors",this.errors=t,bf(this),Object.setPrototypeOf(this,e.prototype)}},wf=class e extends Error{static is(e){return yf(e,"UnconventionalError")}constructor(t){super("An error of unexpected shape occurred.",{cause:t}),this.name="UnconventionalError",bf(this),Object.setPrototypeOf(this,e.prototype)}};function kf(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}var Sf,Tf=class e extends Error{static is(e){return yf(e,"CombinedGraphQLErrors")}static formatMessage=kf;errors;data;extensions;constructor(t,n=t.errors||[]){super(e.formatMessage(n,{result:t,defaultFormatMessage:kf})),this.errors=n,this.data=t.data,this.extensions=t.extensions,this.name="CombinedGraphQLErrors",bf(this),Object.setPrototypeOf(this,e.prototype)}},Nf=/* @__PURE__ */new WeakSet,Cf=class e extends Error{static is(e){return yf(e,"ServerError")}response;statusCode;bodyText;constructor(t,n){super(t),this.name="ServerError",this.response=n.response,this.statusCode=n.response.status,this.bodyText=n.bodyText,bf(this),Object.setPrototypeOf(this,e.prototype)}},Ef=class e extends Error{static is(e){return yf(e,"ServerParseError")}response;statusCode;bodyText;constructor(t,n){super(t instanceof Error?t.message:"Could not parse server response",{cause:t}),this.name="ServerParseError",this.response=n.response,this.statusCode=n.response.status,this.bodyText=n.bodyText,bf(this),Object.setPrototypeOf(this,e.prototype)}},_f=Symbol();!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming"}(Sf||(Sf={}));var{assign:Of,hasOwnProperty:Af}=Object,If={loading:!0,networkStatus:Sf.loading,data:void 0,dataState:"empty",partial:!0},Df={loading:!1,networkStatus:Sf.ready,data:void 0,dataState:"empty",partial:!0},Pf=class{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=/* @__PURE__ */new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:e,options:t,transformedQuery:n=e.transform(t.query)}){this.queryManager=e,this.waitForNetworkResult="network-only"===t.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:r="cache-first"}={}}=e.defaultOptions,{fetchPolicy:i=r,initialFetchPolicy:a=("standby"===i?r:i)}=t;t[cd]&&(Oc("standby"===i,82),this.variablesUnknown=!0),this.lastQuery=n,this.options={...t,initialFetchPolicy:a,fetchPolicy:i,variables:this.getVariablesWithDefaults(t.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const o=vu(this.query);this.queryName=o&&o.name&&o.name.value}initializeObservablesQueue(){this.subject=new Pl({query:this.query,variables:this.variables,result:If,meta:{}});const e=this.subject.pipe(vc({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),Hu(({query:e,variables:t,result:n,meta:r},i)=>{const{shouldEmit:a}=r;if(n===If&&(i.previous=void 0,i.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===a)return;if(1===a)return l();const{previous:o,previousVariables:s}=i;if(o){const r=this.queryManager.getDocumentInfo(e),i=this.queryManager.dataMasking,a=i?r.nonReactiveQuery:e;if((i||r.hasNonreactiveDirective?nd(a,o,n,t):Ju(o,n))&&Ju(s,t))return}if(3!==a||this.options.notifyOnNetworkStatusChange&&!Ju(o,n))return l();function l(){return i.previous=n,i.previousVariables=t,n}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Il,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){let t=e||this.options.fetchPolicy;!this.queryManager.prioritizeCacheValues||"network-only"!==t&&"cache-and-network"!==t||(t="cache-first");const n=()=>{const e=this.getCacheDiff(),t=this.options.returnPartialData||e.complete?e.result??void 0:void 0;return this.maskResult({data:t,dataState:e.complete?"complete":void 0===t?"empty":"partial",loading:!e.complete,networkStatus:e.complete?Sf.ready:Sf.loading,partial:!e.complete})};switch(t){case"cache-only":return{...n(),loading:!1,networkStatus:Sf.ready};case"cache-first":return n();case"cache-and-network":return{...n(),loading:!0,networkStatus:Sf.loading};case"standby":return Df;default:return If}}resubscribeCache(){const{variables:e,fetchPolicy:t}=this.options,n=this.query,r="standby"===t||"no-cache"===t||this.waitForNetworkResult,i=!Mf({query:n,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((r||i)&&this.unsubscribeFromCache?.(),r||!i)return;const a={query:n,variables:e,optimistic:!0,watcher:this,callback:e=>{const t=this.queryManager.getDocumentInfo(n);if((t.hasClientExports||t.hasForcedResolvers)&&(a.lastDiff=void 0),a.lastOwnDiff===e)return;const{result:r}=this.subject.getValue();(e.complete||!r.error&&r!==If&&r!==Df)&&(Ju(r.data,e.result)||this.scheduleNotify())}},o=this.cache.watch(a);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,o()},{query:n,variables:e})}stableLastResult;getCurrentResult(){const{result:e}=this.subject.getValue();let t=e.networkStatus===Sf.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?e:this.getInitialResult();return t===If&&(t=this.getInitialResult()),Ju(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){const{fetchPolicy:t}=this.options,n={pollInterval:0};return n.fetchPolicy="no-cache"===t?"no-cache":"network-only",e&&!Ju(this.variables,e)&&(n.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._lastWrite=void 0,this._reobserve(n,{newNetworkStatus:Sf.refetch})}fetchMore({query:e,variables:t,context:n,errorPolicy:r,updateQuery:i}){Oc("cache-only"!==this.options.fetchPolicy,84,$c(this.query,"(anonymous)"));const a={...su(this.options,{errorPolicy:"none"},{query:e,context:n,errorPolicy:r}),variables:e?t:{...this.variables,...t},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};a.query=this.transformDocument(a.query),this.lastQuery=e?this.transformDocument(this.options.query):a.query;let o=!1;const s="no-cache"!==this.options.fetchPolicy;s||Oc(i,85);const{finalize:l,pushNotification:c}=this.pushOperation(Sf.fetchMore);c({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:u,operator:d}=Rf(),{observable:p}=this.queryManager.fetchObservableWithInfo(a,{networkStatus:Sf.fetchMore,exposeExtensions:!0}),f=p.pipe(d,fc(e=>"N"===e.kind&&"network"===e.source)).subscribe({next:e=>{o=!1;const t=e.value,n=t[sd];if(ip(e.value.networkStatus)&&l(),s){const e=this.getCacheDiff();this.cache.batch({update:e=>{i?e.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:n},e=>i(e,{fetchMoreResult:t.data,variables:a.variables})):e.writeQuery({query:a.query,variables:a.variables,data:t.data,extensions:n})},onWatchUpdated:(n,r)=>{if(n.watcher===this&&!Ju(r.result,e.result)){o=!0;const e=this.getCurrentResult();ap(t.networkStatus)&&c({kind:"N",source:"network",value:{...e,networkStatus:t.networkStatus===Sf.error?Sf.ready:t.networkStatus,loading:!1,data:r.result,dataState:"streaming"===t.dataState?"streaming":"complete"}})}}})}else{const e=this.getCurrentResult(),n=i(e.data,{fetchMoreResult:t.data,variables:a.variables});c({kind:"N",value:{...e,networkStatus:Sf.ready,loading:!1,data:n,dataState:"streaming"===e.dataState?"streaming":"complete"},source:"network"})}}});return zu(u.then(e=>Uu(this.maskResult(e))).finally(()=>{if(f.unsubscribe(),l(),s&&!o){const e=this.getCurrentResult();"streaming"===e.dataState?c({kind:"N",source:"network",value:{...e,dataState:"complete",networkStatus:Sf.ready}}):c({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){const t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:t=>{const{updateQuery:n,onError:r}=e,{error:i}=t;i?r?r(i):Oc.error(86,i):n&&this.updateQuery((e,r)=>n(e,{subscriptionData:t,...r}))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){const t=su(this.options,e||{});Of(this.options,t),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),Ju(this.variables,e)?Uu(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:Sf.setVariables}):Uu(this.getCurrentResult()))}updateQuery(e){const{queryManager:t}=this,{result:n,complete:r}=this.getCacheDiff({optimistic:!1}),i=e(n,{variables:this.variables,complete:!!r,previousData:n});i&&(this.cache.writeQuery({query:this.options.query,data:i,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){const{fetchPolicy:n="cache-first",initialFetchPolicy:r=n}=t;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy.call(t,n,{reason:e,options:t,observable:this,initialFetchPolicy:r}):t.fetchPolicy="variables-changed"===e?r:t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,n,r){const i=this.options.fetchPolicy;e.context??={};let a=!1,{observable:o,fromLink:s}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:n,onCacheHit:()=>{a=!0},fetchQueryOperator:e=>new Nl(n=>{try{return e.subscribe({next(e){a=!0,n.next(e)},error:e=>n.error(e),complete:()=>n.complete()})}finally{a||(u.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:l,variables:c,meta:{shouldEmit:3,fetchPolicy:i}}))}}),observableQuery:this});const{query:l,variables:c}=this,u={abort:()=>{p.unsubscribe()},query:l,variables:c};this.activeOperations.add(u);let d=t==Sf.refetch||t==Sf.setVariables;o=o.pipe(r,gc());const p=o.pipe(vc({next:e=>{"newNetworkStatus"===e.source||"N"===e.kind&&e.value.loading?u.override=t:delete u.override},finalize:()=>this.activeOperations.delete(u)})).subscribe({next:e=>{const t={};d&&"N"===e.kind&&"loading"in e.value&&!e.value.loading&&(d=!1,t.shouldEmit=1),this.input.next({...e,query:l,variables:c,meta:t})}});return{fromLink:s,subscription:p,observable:o}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:e,options:{fetchPolicy:t,pollInterval:n}}=this,r=()=>{const{options:e}=this;return!e.pollInterval||!this.hasObservers()||"cache-only"===e.fetchPolicy||"standby"===e.fetchPolicy};if(r())return void this.cancelPolling();if(e?.interval===n)return;(e||(this.pollingInfo={})).interval=n;const i=()=>{if(r())return this.cancelPolling();this.pollingInfo&&(ap(this.networkStatus)||this.options.skipPollAttempt?.()?a():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:Sf.poll}).then(a,a))},a=()=>{const e=this.pollingInfo;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(i,e.interval))};a()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:n}=t||{};this.queryManager.obsQueries.add(this);const r=n===Sf.refetch||n===Sf.poll,i=this.variables,a=this.options.fetchPolicy,o=su(this.options,e||{});this.variablesUnknown&&="standby"===o.fetchPolicy;const s=r?o:Of(this.options,o),l=this.transformDocument(s.query);this.lastQuery=l,e&&"variables"in e&&(s.variables=this.getVariablesWithDefaults(e.variables)),r||(this.updatePolling(),!e||!e.variables||Ju(e.variables,i)||"standby"===s.fetchPolicy||s.fetchPolicy!==a&&"function"!=typeof s.nextFetchPolicy||(this.applyNextFetchPolicy("variables-changed",s),void 0===n&&(n=Sf.setVariables)));const c=this.networkStatus;n||(n=Sf.loading,c!==Sf.loading&&e?.variables&&!Ju(e.variables,i)&&(n=Sf.setVariables),"standby"===s.fetchPolicy&&(n=Sf.ready)),"standby"===s.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const{promise:u,operator:d}=Rf("standby"===s.fetchPolicy?{data:void 0}:void 0),{subscription:p,observable:f,fromLink:h}=this.fetch(s,n,l,d);r||!h&&this.linkSubscription||(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=p);const m=Object.assign(zu(u.then(e=>Uu(this.maskResult(e))).finally(()=>{this.hasObservers()||0!==this.activeOperations.size||this.tearDownQuery()})),{retain:()=>{const e=f.subscribe({}),t=()=>e.unsubscribe();return u.then(t,t),m}});return m}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){const t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:{...e,data:t}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(e=!1){if(!e){const e=this.queryManager.getDocumentInfo(this.query);if(e.hasClientExports||e.hasForcedResolvers)return}const{dirty:t}=this;if(this.resetNotifications(),t&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){const e=this.getCacheDiff();Ju(e.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:e.result,dataState:e.complete?"complete":e.result?"partial":"empty",networkStatus:Sf.ready,loading:!1,error:void 0,partial:!e.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=/* @__PURE__ */new Set;pushOperation(e){let t=!1;const{query:n,variables:r}=this,i=()=>{this.activeOperations.delete(a)},a={override:e,abort:()=>{t=!0,i()},query:n,variables:r};return this.activeOperations.add(a),{finalize:i,pushNotification:(e,i)=>{t||this.input.next({...e,query:n,variables:r,meta:{...i}})}}}calculateNetworkStatus(e){return e===Sf.streaming?e:Array.from(this.activeOperations.values()).reverse().find(e=>Mf(e,this)&&void 0!==e.override)?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e="cache-only"===this.options.fetchPolicy;this.setResult(e?Df:If,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:{...t}})}operator=Hu(e=>{const{query:t,variables:n,meta:r}=e;if("setResult"===e.source)return{query:t,variables:n,result:e.value,meta:r};if("C"===e.kind||!Mf(e,this))return;let i;const a=this.subject.getValue();if("cache"===e.source){if(i=e.value,i.networkStatus===Sf.ready&&i.partial&&(!this.options.returnPartialData||a.result.networkStatus===Sf.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===e.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),i="E"===e.kind?{...Mf(a,e)?a.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:Sf.error,loading:!1}:e.value,"E"===e.kind&&"streaming"===i.dataState&&(i.dataState="complete"),i.error&&(r.shouldEmit=1);else if("newNetworkStatus"===e.source){const t=Mf(a,e)?a.result:this.getInitialResult(r.fetchPolicy),{resetError:n}=e.value,o=n?void 0:t.error,s=o?Sf.error:Sf.ready;i={...t,error:o,networkStatus:s}}return Oc(i),i.error||delete i.error,i.networkStatus=this.calculateNetworkStatus(i.networkStatus),i.loading=ap(i.networkStatus),i=this.maskResult(i),{query:t,variables:n,result:i,meta:r}});reobserveCacheFirst(){const{fetchPolicy:e,nextFetchPolicy:t}=this.options;"cache-and-network"===e||"network-only"===e?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(n,r){return this.nextFetchPolicy=t,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(n,r):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}};function Mf(e,t){return!!(e&&t&&e.query===t.query&&Ju(e.variables,t.variables))}function Rf(e){let t,n,r=e;return{promise:new Promise((e,r)=>{t=e,n=r}),operator:vc({next(e){if("E"===e.kind)return n(e.error);"N"!==e.kind||"newNetworkStatus"===e.source||e.value.loading||(r=e.value)},finalize:()=>{if(r)t(r);else{const e="The operation was aborted.",t="AbortError";n("undefined"!=typeof DOMException?new DOMException(e,t):Object.assign(new Error(e),{name:t}))}}})}}var jf={},zf=/* @__PURE__ */new WeakMap;function Lf(e,t){const n=e[t];"function"==typeof n&&(e[t]=function(){return zf.set(e,(zf.get(e)+1)%1e15),n.apply(this,arguments)})}var Ff=/* @__PURE__ */new WeakMap,$f=class{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(e,t){const n=this.cache=e.cache,r=(Ff.get(e)||0)+1;Ff.set(e,r),this.id=r+"",this.observableQuery=t,this.queryManager=e,zf.has(n)||(zf.set(n,0),Lf(n,"evict"),Lf(n,"modify"),Lf(n,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){const{lastWrite:n}=this;return!(n&&n.dmCount===zf.get(this.cache)&&Ju(t,n.variables)&&Ju(e.data,n.result.data)&&e.extensions?.[ld]===n.result.extensions?.[ld])}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(e,t,n){const{incrementalHandler:r}=this.queryManager;return r.isIncrementalResult(t)?(this.incremental||=r.startRequest({query:n}),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:n,errorPolicy:r,cacheWriteBehavior:i}){const a={query:t,variables:n,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const o=0===i,s=o?void 0:this.cache.diff(a);let l=this.maybeHandleIncrementalResult(s?.result,e,t);return o||(qf(l,r)?this.cache.batch({onWatchUpdated:(e,t)=>{e.watcher===this.observableQuery&&(e.lastOwnDiff=t)},update:e=>{if(this.shouldWrite(l,n))e.writeQuery({query:t,data:l.data,variables:n,overwrite:1===i,extensions:l.extensions}),this.lastWrite={result:l,variables:n,dmCount:zf.get(this.cache)};else if(s&&s.complete)return void(l={...l,data:s.result});const r=e.diff(a);r.complete&&(l={...l,data:r.result})}}):this.lastWrite=void 0),l}markMutationResult(e,t,n=this.cache){const r=[],i=0===t.cacheWriteBehavior;let a=this.maybeHandleIncrementalResult(i?void 0:n.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if("ignore"===t.errorPolicy&&(a={...a,errors:[]}),_u(a)&&"none"===t.errorPolicy)return Promise.resolve(a);const o=()=>({...a,dataState:this.hasNext?"streaming":"complete"});if(!i&&qf(a,t.errorPolicy)){r.push({result:a.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:a.extensions});const{updateQueries:e}=t;e&&this.queryManager.getObservableQueries("all").forEach(t=>{const n=t&&t.queryName;if(!n||!Object.hasOwnProperty.call(e,n))return;const i=e[n],{query:a,variables:s}=t,{result:l,complete:c}=t.getCacheDiff({optimistic:!1});if(c&&l){const e=i(l,{mutationResult:o(),queryName:a&&$c(a)||void 0,queryVariables:s});e&&r.push({result:e,dataId:"ROOT_QUERY",query:a,variables:s})}})}let s=t.refetchQueries;if("function"==typeof s&&(s=s(o())),r.length>0||(s||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){const e=[];if(this.queryManager.refetchQueries({updateCache:e=>{i||r.forEach(t=>e.write(t));const{update:n}=t;if(n){if(!i){const n=e.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});n.complete&&(a={...a,data:n.result})}this.hasNext||n(e,a,{context:t.context,variables:t.variables})}i||t.keepRootFields||this.hasNext||e.modify({id:"ROOT_MUTATION",fields:(e,{fieldName:t,DELETE:n})=>"__typename"===t?e:n})},include:s,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(t=>e.push(t)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(e).then(()=>a)}return Promise.resolve(a)}markMutationOptimistic(e,t){const n="function"==typeof e?e(t.variables,{IGNORE:jf}):e;return n!==jf&&(this.cache.recordOptimisticTransaction(e=>{try{this.markMutationResult({data:n},t,e)}catch(r){Oc.error(r)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:n,errorPolicy:r,cacheWriteBehavior:i}){0!==i&&(qf(e,r)&&this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:n,extensions:e.extensions}),this.queryManager.broadcastQueries())}};function qf(e,t="none"){const n="ignore"===t||"all"===t;let r=!_u(e);return!r&&n&&e.data&&(r=!0),r}var Bf=class{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=/* @__PURE__ */new Set;fetchCancelFns=/* @__PURE__ */new Map;constructor(e){const t=new Xd(e=>this.cache.transformDocument(e),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const n=e.documentTransform;this.documentTransform=n?t.concat(n).concat(t):t,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(Ic(89))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:t,optimisticResponse:n,updateQueries:r,refetchQueries:i=[],awaitRefetchQueries:a=!1,update:o,onQueryUpdated:s,fetchPolicy:l,errorPolicy:c,keepRootFields:u,context:d}){const p=new $f(this);e=this.cache.transformForLink(this.transform(e));const{hasClientExports:f}=this.getDocumentInfo(e);t=this.getVariables(e,t),f&&(t=await this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:d}));const h=this.mutationStore&&(this.mutationStore[p.id]={mutation:e,variables:t,loading:!0,error:null}),m=n&&p.markMutationOptimistic(n,{document:e,variables:t,cacheWriteBehavior:"no-cache"===l?0:2,errorPolicy:c,context:d,updateQueries:r,update:o,keepRootFields:u});return this.broadcastQueries(),new Promise((f,g)=>{const y={};return this.getObservableFromLink(e,{...d,optimisticResponse:m?n:void 0},t,l,{},!1).observable.pipe(Vf(),dc(n=>{const f={...n};return oc(p.markMutationResult(f,{document:e,variables:t,cacheWriteBehavior:"no-cache"===l?0:2,errorPolicy:c,context:d,update:o,updateQueries:r,awaitRefetchQueries:a,refetchQueries:i,removeOptimistic:m?p.id:void 0,onQueryUpdated:s,keepRootFields:u}))})).pipe(uc(e=>{if(_u(e)&&"none"===c)throw new Tf(Hf(e));return h&&(h.loading=!1,h.error=null),e})).subscribe({next:t=>{if(this.broadcastQueries(),!p.hasNext){const n={data:this.maskOperation({document:e,data:t.data,fetchPolicy:l,cause:y})};_u(t)&&(n.error=new Tf(t)),Object.keys(t.extensions||{}).length&&(n.extensions=t.extensions),f(n)}},error:e=>(h&&(h.loading=!1,h.error=e),m&&this.cache.removeOptimistic(p.id),this.broadcastQueries(),"ignore"===c?f({data:void 0}):"all"===c?f({data:void 0,error:e}):void g(e))})})}fetchQuery(e,t){return au(e.query,Qo.QUERY),(async()=>{return n=this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(Hu(e=>{switch(e.kind){case"E":throw e.error;case"N":if("newNetworkStatus"!==e.source)return Uu(e.value)}})),r={defaultValue:{data:void 0}},new Promise(function(e,t){var i,a=!1;n.subscribe({next:function(e){i=e,a=!0},error:t,complete:function(){e(a?i:r.defaultValue)}})});var n,r})()}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new nu(Fc["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){const{transformCache:t}=this;if(!t.has(e)){const n=vu(e),r={hasClientExports:Ou(["client","export"],e,!0),hasForcedResolvers:Au(e),hasNonreactiveDirective:Ou(["nonreactive"],e),hasIncrementalDirective:Ou(["defer"],e),nonReactiveQuery:Uf(e),clientQuery:Ou(["client"],e)?e:null,serverQuery:Lu([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:n?.operation,defaultVars:hu(n),asQuery:{...e,definitions:e.definitions.map(e=>"OperationDefinition"===e.kind&&"query"!==e.operation?{...e,operation:"query"}:e)}};t.set(e,r)}const n=t.get(e);if(n.violation)throw n.violation;return n}getVariables(e,t){const n=this.getDocumentInfo(e).defaultVars,r=Object.entries(t??{}).map(([e,t])=>[e,void 0===t?n[e]:t]);return{...n,...Object.fromEntries(r)}}watchQuery(e){au(e.query,Qo.QUERY);const t=this.transform(e.query);return void 0===(e={...e,variables:this.getVariables(t,e.variables)}).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!0),new Pf({queryManager:this,options:e,transformedQuery:t})}query(e){const t=this.transform(e.query);return this.fetchQuery({...e,query:t}).then(n=>({...n,data:this.maskOperation({document:t,data:n?.data,fetchPolicy:e.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(Ic(91)),this.obsQueries.forEach(e=>{e.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){const t=/* @__PURE__ */new Set,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Set;return Array.isArray(e)&&e.forEach(e=>{if("string"==typeof e)n.set(e,e),r.set(e,!1);else if(cu(t=e)&&"Document"===t.kind&&Array.isArray(t.definitions)){const t=Zd(this.transform(e));n.set(t,$c(e)),r.set(t,!1)}else cu(e)&&e.query&&i.add(e);var t}),this.obsQueries.forEach(n=>{const i=Zd(this.transform(n.options.query));if("all"===e)return void t.add(n);const{queryName:a,options:{fetchPolicy:o}}=n;"active"===e&&"standby"===o||("active"===e||a&&r.has(a)||i&&r.has(i))&&(t.add(n),a&&r.set(a,!0),i&&r.set(i,!0))}),i.size&&i.forEach(e=>{const n=new Pf({queryManager:this,options:{...ju(this.defaultOptions.watchQuery,e),fetchPolicy:"network-only"}});t.add(n)}),t}refetchObservableQueries(e=!1){const t=[];return this.getObservableQueries(e?"all":"active").forEach(n=>{const{fetchPolicy:r}=n.options;!e&&"standby"===r||"cache-only"===r||t.push(n.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let{query:t,variables:n}=e;const{fetchPolicy:r="cache-first",errorPolicy:i="none",context:a={},extensions:o={}}=e;let s;au(t,Qo.SUBSCRIPTION),t=this.transform(t),n=this.getVariables(t,n);const l=(this.getDocumentInfo(t).hasClientExports?oc(this.localState.getExportedVariables({client:this.client,document:t,variables:n,context:a})):sc(n)).pipe(dc(e=>{const{observable:n,restart:l}=this.getObservableFromLink(t,a,e,r,o),c=new $f(this);return s=l,n.pipe(uc(n=>{c.markSubscriptionResult(n,{document:t,variables:e,errorPolicy:i,cacheWriteBehavior:"no-cache"===r?0:2});const a={data:n.data??void 0};return _u(n)?a.error=new Tf(n):function(e){return"extensions"in e&&xf.is(e.extensions[_f])}(n)&&(a.error=n.extensions[_f],delete n.extensions[_f]),n.extensions&&Object.keys(n.extensions).length&&(a.extensions=n.extensions),a.error&&"none"===i&&(a.data=void 0),"ignore"===i&&delete a.error,a}),hc(e=>sc("ignore"===i?{data:void 0}:{data:void 0,error:e})),fc(e=>!(!e.data&&!e.error)))}));return Object.assign(l,{restart:()=>s?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new Hc(!1);getObservableFromLink(e,t,n,r,i,a=t?.queryDeduplication??this.queryDeduplication){let o={};const{serverQuery:s,clientQuery:l,operationType:c,hasIncrementalDirective:u}=this.getDocumentInfo(e),d=$c(e),p={client:this.client};if(s){const{inFlightLinkObservables:m,link:g}=this;try{const y=this.incrementalHandler.prepareRequest({query:s,variables:n,context:{...this.defaultContext,...t,queryDeduplication:a},extensions:i});function b(e){return new Nl(t=>{function n(){return e.subscribe({next:t.next.bind(t),complete:t.complete.bind(t),error:t.error.bind(t)})}let r=n();return o.restart||=()=>{r.unsubscribe(),r=n()},()=>{r.unsubscribe(),o.restart=void 0}})}if(t=y.context,a){const v=Zd(s),x=ku(n);o=m.lookup(v,x),o.observable||(o.observable=Qd(g,y,p).pipe(b,(f=()=>{m.peek(v,x)===o&&m.remove(v,x)},El(function(e,t){try{e.subscribe(t)}finally{t.add(f)}})),c===Qo.SUBSCRIPTION?gc():bc({refCount:!0})))}else o.observable=Qd(g,y,p).pipe(b)}catch(h){o.observable=lc(()=>h)}}else o.observable=sc({data:{}});var f;if(l){const{operation:w}=vu(e);Oc(!u,96,w[0].toUpperCase()+w.slice(1),d??"(anonymous)"),o.observable=o.observable.pipe(dc(e=>oc(this.localState.execute({client:this.client,document:l,remoteResult:e,context:t,variables:n,fetchPolicy:r}))))}return{restart:()=>o.restart?.(),observable:o.observable.pipe(hc(e=>{throw function(e){Nf.add(e)}(e=function(e){return function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||void 0===e.stack)}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new wf(e)}(e)),e}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:n,observableQuery:r,exposeExtensions:i}){const a=t.lastRequestId=this.generateRequestId(),{errorPolicy:o}=e,s=this.cache.transformForLink(e.query);return this.getObservableFromLink(s,e.context,e.variables,e.fetchPolicy).observable.pipe(uc(a=>{const l=t.markQueryResult(a,{...e,document:s,cacheWriteBehavior:n}),c=_u(l);if(c&&"none"===o)throw t.resetLastWrite(),r?.resetNotifications(),new Tf(Hf(l));const u={data:l.data,...t.hasNext?{loading:!0,networkStatus:Sf.streaming,dataState:"streaming",partial:!0}:{dataState:l.data?"complete":"empty",loading:!1,networkStatus:Sf.ready,partial:!l.data}};return i&&"extensions"in l&&(u[sd]=l.extensions),c&&("none"===o&&(u.data=void 0,u.dataState="empty"),"ignore"!==o&&(u.error=new Tf(Hf(l)),"streaming"!==u.dataState&&(u.networkStatus=Sf.error))),u}),hc(e=>{if(a>=t.lastRequestId&&"none"===o)throw t.resetLastWrite(),r?.resetNotifications(),e;const n={data:void 0,dataState:"empty",loading:!1,networkStatus:Sf.ready,partial:!0};return"ignore"!==o&&(n.error=e,n.networkStatus=Sf.error),sc(n)}))}fetchObservableWithInfo(e,{networkStatus:t=Sf.loading,query:n=e.query,fetchQueryOperator:r=e=>e,onCacheHit:i=()=>{},observableQuery:a,exposeExtensions:o}){const s=this.getVariables(n,e.variables);let{fetchPolicy:l="cache-first",errorPolicy:c="none",returnPartialData:u=!1,notifyOnNetworkStatusChange:d=!0,context:p={}}=e;!this.prioritizeCacheValues||"network-only"!==l&&"cache-and-network"!==l||(l="cache-first");const f=Object.assign({},e,{query:n,variables:s,fetchPolicy:l,errorPolicy:c,returnPartialData:u,notifyOnNetworkStatusChange:d,context:p}),h=new $f(this,a),m=n=>{f.variables=n;const s="no-cache"===l?0:t===Sf.refetch&&"merge"!==f.refetchWritePolicy?1:2,c=this.fetchQueryByPolicy(f,{queryInfo:h,cacheWriteBehavior:s,onCacheHit:i,observableQuery:a,exposeExtensions:o});return c.observable=c.observable.pipe(r),"standby"!==f.fetchPolicy&&a?.applyNextFetchPolicy("after-fetch",e),c},g=()=>{this.fetchCancelFns.delete(h.id)};this.fetchCancelFns.set(h.id,e=>{y.next({kind:"E",error:e,source:"network"})});const y=new Il;let b,v;if(this.getDocumentInfo(f.query).hasClientExports)b=oc(this.localState.getExportedVariables({client:this.client,document:f.query,variables:f.variables,context:f.context})).pipe(dc(e=>m(e).observable)),v=!0;else{const e=m(f.variables);v=e.fromLink,b=e.observable}return{observable:new Nl(e=>{e.add(g),b.subscribe(e),y.subscribe(e)}).pipe(gc()),fromLink:v}}refetchQueries({updateCache:e,include:t,optimistic:n=!1,removeOptimistic:r=(n?Tc("refetchQueries"):void 0),onQueryUpdated:i}){const a=/* @__PURE__ */new Map;t&&this.getObservableQueries(t).forEach(e=>{if("cache-only"===e.options.fetchPolicy||e.variablesUnknown)return;const t=e.getCurrentResult();a.set(e,{oq:e,lastDiff:{result:t?.data,complete:!t?.partial}})});const o=/* @__PURE__ */new Map;if(e){const t=/* @__PURE__ */new Set;this.cache.batch({update:e,optimistic:n&&r||!1,removeOptimistic:r,onWatchUpdated(e,n,r){const s=e.watcher;if(s instanceof Pf&&!t.has(s)){if(t.add(s),i){a.delete(s);let e=i(s,n,r);return!0===e&&(e=s.refetch().retain()),!1!==e&&o.set(s,e),e}null!==i&&"cache-only"!==s.options.fetchPolicy&&a.set(s,{oq:s,lastDiff:r,diff:n})}}})}return a.size&&a.forEach(({oq:e,lastDiff:t,diff:n})=>{let r;i&&(n||(n=e.getCacheDiff()),r=i(e,n,t)),i&&!0!==r||(r=e.refetch().retain()),!1!==r&&o.set(e,r)}),r&&this.cache.removeOptimistic(r),o}noCacheWarningsByCause=/* @__PURE__ */new WeakSet;maskOperation(e){const{document:t,data:n}=e;return this.dataMasking?function(e,t,n){const r=vu(t);return Oc(r,43),null==e?e:Pp(e,r.selectionSet,{operationType:r.operation,operationName:r.name?.value,fragmentMap:lu(yu(t)),cache:n,mutableTargets:/* @__PURE__ */new WeakMap,knownChanged:/* @__PURE__ */new WeakSet})}(n,t,this.cache):n}maskFragment(e){const{data:t,fragment:n,fragmentName:r}=e;return this.dataMasking?function(e,t,n,r){const i=t.definitions.filter(e=>e.kind===Ko.FRAGMENT_DEFINITION);void 0===r&&(Oc(1===i.length,41,i.length),r=i[0].name.value);const a=i.find(e=>e.name.value===r);return Oc(!!a,42,r),null==e||Ju(e,{})?e:Pp(e,a.selectionSet,{operationType:"fragment",operationName:a.name.value,fragmentMap:lu(yu(t)),cache:n,mutableTargets:/* @__PURE__ */new WeakMap,knownChanged:/* @__PURE__ */new WeakSet})}(t,n,this.cache,r):t}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:n,errorPolicy:r,returnPartialData:i,context:a},{cacheWriteBehavior:o,onCacheHit:s,queryInfo:l,observableQuery:c,exposeExtensions:u}){const d=()=>this.cache.diff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),p=(o,l)=>{const c=o.result,u=e=>(o.complete||i||(e=void 0),{data:e,dataState:o.complete?"complete":e?"partial":"empty",loading:ap(l),networkStatus:l,partial:!o.complete}),d=e=>sc({kind:"N",value:u(e),source:"cache"});return(o.complete||i)&&this.getDocumentInfo(e).hasForcedResolvers?(s(),oc(this.localState.execute({client:this.client,document:e,remoteResult:c?{data:c}:void 0,context:a,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:n}).then(e=>({kind:"N",value:u(e.data||void 0),source:"cache"})))):"none"===r&&l===Sf.refetch&&o.missing?d(void 0):d(c||void 0)},f=()=>this.getResultsFromLink({query:e,variables:t,context:a,fetchPolicy:n,errorPolicy:r},{cacheWriteBehavior:o,queryInfo:l,observableQuery:c,exposeExtensions:u}).pipe(Vf(),El(function(e,t){e.subscribe(_l(t,function(e){t.next(cc.createNext(e))},function(){t.next(cc.createComplete()),t.complete()},function(e){t.next(cc.createError(e)),t.complete()}))}),uc(e=>({...e,source:"network"})));switch(n){default:case"cache-first":{const e=d();return e.complete?{fromLink:!1,observable:p(e,Sf.ready)}:i?{fromLink:!0,observable:pc(p(e,Sf.loading),f())}:{fromLink:!0,observable:f()}}case"cache-and-network":{const e=d();return e.complete||i?{fromLink:!0,observable:pc(p(e,Sf.loading),f())}:{fromLink:!0,observable:f()}}case"cache-only":return{fromLink:!1,observable:pc(p(d(),Sf.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:f()};case"standby":return{fromLink:!1,observable:ql}}}};function Vf(){let e=!1;return vc({next(){e=!0},complete(){Oc(e,100)}})}function Uf(e){return qs(e,{FragmentSpread:e=>{if(!e.directives?.some(e=>"unmask"===e.name.value))return{...e,directives:[...e.directives||[],{kind:Ko.DIRECTIVE,name:{kind:Ko.NAME,value:"nonreactive"}}]}}})}function Hf(e){if(null==e.extensions?.[ld])return e;const{extensions:{[ld]:t,...n},...r}=e;return Object.keys(n).length>0&&(r.extensions=n),r}var Wf=class{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;refetchEventManager;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){const{cache:t,documentTransform:n,ssrMode:r=!1,ssrForceFetchDelay:i=0,queryDeduplication:a=!0,defaultOptions:o,defaultContext:s,assumeImmutableResults:l=t.assumeImmutableResults,localState:c,devtools:u,dataMasking:d,link:p,incrementalHandler:f=new Yd,experiments:h=[],refetchEventManager:m}=e;this.link=p,this.cache=t,this.queryDeduplication=a,this.defaultOptions=o||{},this.devtoolsConfig={...u,enabled:u?.enabled??!1},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=kc,this.queryManager=new Bf({client:this,defaultOptions:this.defaultOptions,defaultContext:s,documentTransform:n,queryDeduplication:a,ssrMode:r,dataMasking:!!d,clientOptions:e,incrementalHandler:f,assumeImmutableResults:l,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:c}),this.prioritizeCacheValues=r||i>0,i&&setTimeout(()=>{this.prioritizeCacheValues=!1},i),this.devtoolsConfig.enabled&&this.connectToDevTools(),h.forEach(t=>t.call(this,e)),this.refetchEventManager=m,this.refetchEventManager?.connect(this)}connectToDevTools(){if("undefined"==typeof window)return;const e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop(),this.refetchEventManager?.disconnect(this)}watchQuery(e){const{refetchOn:t}=e;if(this.defaultOptions.watchQuery){const n=this.defaultOptions.watchQuery.refetchOn;let r;t&&"object"==typeof t&&("object"==typeof n?r={...n,...t}:null!=n&&(r=e=>{const r=t[e.source]??n;return"function"==typeof r?r(e):r})),e=ju(this.defaultOptions.watchQuery,e),r&&(e.refetchOn=r)}return this.queryManager.watchQuery(e)}query=e=>(this.defaultOptions.query&&(e=ju(this.defaultOptions.query,e)),this.queryManager.query(e));mutate=e=>{const t=ju(su({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return au(t.mutation,Qo.MUTATION),this.queryManager.mutate(t)};subscribe(e){const t={},n=this.queryManager.startGraphQLSubscription(e),r=n.pipe(uc(n=>({...n,data:this.queryManager.maskOperation({document:e.query,data:n.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(r,{restart:n.restart})}readQuery(e,t=!1){return this.cache.readQuery({...e,query:this.transform(e.query)},t)}watchFragment(e){const t=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,t)})}readFragment(e,t=!1){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},t)}writeQuery(e){const t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}writeFragment(e){const t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return Qd(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((e,t)=>{n.push(t),r.push(e)});const i=Promise.all(r);return i.queries=n,i.results=r,i.catch(e=>{}),i}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new Xd(qu);transform(e,t=!1){const n=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(n):n}},{hasOwnProperty:Yf}=Object.prototype;function Gf(e){return cu(e)&&"payload"in e}function Qf(e){const t={};return e.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>-1){const r=e.slice(0,n).trim().toLowerCase();t[r]=e.slice(n+1).trim()}}),t}function Jf(e,t){if(e.status>=300)throw new Cf(`Response not successful: Received status code ${e.status}`,{response:e,bodyText:t});try{return JSON.parse(t)}catch(n){throw new Ef(n,{response:e,bodyText:t})}}var Kf={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},Xf=(e,t)=>t(e);function Zf(e,t,...n){let r={},i={};n.forEach(e=>{r={...r,...e.options,headers:{...r.headers,...e.headers}},e.credentials&&(r.credentials=e.credentials),r.headers.accept=(e.http?.accept||[]).concat(r.headers.accept).join(","),i={...i,...e.http}}),r.headers=function(e,t){if(!t){const t={};return Object.keys(Object(e)).forEach(n=>{t[n.toLowerCase()]=e[n]}),t}const n={};Object.keys(Object(e)).forEach(t=>{n[t.toLowerCase()]={originalName:t,value:e[t]}});const r={};return Object.keys(n).forEach(e=>{r[n[e].originalName]=n[e].value}),r}(r.headers,i.preserveHeaderCase);const{operationName:a,extensions:o,variables:s,query:l}=e,c={operationName:a,variables:s};return i.includeExtensions&&Object.keys(o||{}).length&&(c.extensions=o),i.includeQuery&&(c.query=t(l,Zd)),{options:r,body:c}}var eh=xc(()=>fetch);function th(){}var nh=class extends Gd{constructor(e={}){let{uri:t="/graphql",fetch:n,print:r=Xf,includeExtensions:i,preserveHeaderCase:a,useGETForQueries:o,includeUnusedVariables:s=!1,...l}=e;const c={http:su({includeExtensions:i,preserveHeaderCase:a}),options:l.fetchOptions,credentials:l.credentials,headers:l.headers};super(e=>{let i=((e,t)=>e.getContext().uri||("function"==typeof t?t(e):t||"/graphql"))(e,t);const a=e.getContext(),l={...a.http};(function(e){return rp(e,"subscription")})(e.query)&&(l.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...l.accept||[]]);const{options:u,body:d}=Zf(e,r,Kf,c,{http:l,options:a.fetchOptions,credentials:a.credentials,headers:a.headers});d.variables&&!s&&(d.variables=function(e,t){const n={...e},r=new Set(Object.keys(e));return qs(t,{Variable(e,t,n){n&&"VariableDefinition"!==n.kind&&r.delete(e.name.value)}}),r.forEach(e=>{delete n[e]}),n}(d.variables,e.query));let p=new AbortController,f=()=>{p=void 0};if(u.signal){const e=u.signal,t=()=>{p?.abort(e.reason)};e.addEventListener("abort",t,{once:!0}),f=()=>{p?.signal.removeEventListener("abort",f),p=void 0,e.removeEventListener("abort",t),f=th},p.signal.addEventListener("abort",f,{once:!0})}return u.signal=p.signal,o&&!function(e){return rp(e,"mutation")}(e.query)&&(u.method="GET"),new Nl(t=>{if("GET"===u.method){const{newURI:e,parseError:t}=function(e,n){const r=[],i=(e,t)=>{r.push(`${e}=${encodeURIComponent(t)}`)};if("query"in n&&i("query",n.query),n.operationName&&i("operationName",n.operationName),n.variables){let e;try{e=JSON.stringify(n.variables)}catch(t){return{parseError:t}}i("variables",e)}if(n.extensions){let e;try{e=JSON.stringify(n.extensions)}catch(t){return{parseError:t}}i("extensions",e)}let a="",o=e;const s=e.indexOf("#");-1!==s&&(a=e.substr(s),o=e.substr(0,s));const l=-1===o.indexOf("?")?"?":"&";return{newURI:o+l+r.join("&")+a}}(i,d);if(t)throw t;i=e}else u.body=JSON.stringify(d);const r=n||xc(()=>fetch)||eh,a=t.next.bind(t);return r(i,u).then(t=>{e.setContext({response:t});const n=t.headers?.get("content-type");return null!==n&&/^multipart\/mixed/i.test(n)?async function(e,t){for await(const n of async function*(e){const t=new TextDecoder("utf-8"),n=(e.headers?.get("content-type"))?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),r="\r\n--"+(n?n[1]??n[2]??n[3]??"-":"-");let i="";Oc(e.body&&"function"==typeof e.body.getReader,62);const a=e.body.getReader();let o,s=!1,l=!1;const c=()=>l&&"-"==i[0]&&"-"==i[1];try{for(;!s;){({value:o,done:s}=await a.read());const e="string"==typeof o?o:t.decode(o),n=i.length-r.length+1;i+=e;let u=i.indexOf(r,n);for(;u>-1&&!c();){let e;l=!0,[e,i]=[i.slice(0,u),i.slice(u+r.length)];const t=e.indexOf("\r\n\r\n"),n=Qf(e.slice(0,t))["content-type"];if(n&&-1===n.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");const a=e.slice(t);a&&(yield a),u=i.indexOf(r)}if(c())return}throw new Error("premature end of multipart body")}finally{a.cancel()}}(e)){const r=Jf(e,n);if(0!=Object.keys(r).length)if(Gf(r)){if(1===Object.keys(r).length&&null===r.payload)return;let e={...r.payload};"errors"in r&&(e.extensions={...e.extensions,[_f]:new xf(r.errors??[])}),t(e)}else t(r)}}(t,a):(r=e,e=>e.text().then(t=>{const n=function(e,t){return e.headers.get("content-type")?.includes("application/graphql-response+json")?function(e,t){try{return JSON.parse(t)}catch(n){throw new Ef(n,{response:e,bodyText:t})}}(e,t):Jf(e,t)}(e,t);if(!Array.isArray(n)&&!Yf.call(n,"data")&&!Yf.call(n,"errors"))throw new Cf(`Server response was malformed for query '${Array.isArray(r)?r.map(e=>e.operationName):r.operationName}'.`,{response:e,bodyText:t});return n}))(t).then(a);var r}).then(()=>{f(),t.complete()}).catch(e=>{f(),t.error(e)}),()=>{p&&p.abort()}})})}},rh=class extends Gd{constructor(e={}){super((t,n)=>{const r=t.client,i=r.queryManager.clientOptions,a=t.getContext();{const{name:n,version:r,transport:o="headers"}=su({},i.clientAwareness,e.clientAwareness,a.clientAwareness);"headers"===o&&t.setContext(({headers:e})=>({headers:su({"apollographql-client-name":n,"apollographql-client-version":r},e)}))}{const{transport:n="extensions"}=su({},i.enhancedClientAwareness,e.enhancedClientAwareness);"extensions"===n&&(t.extensions=su({clientLibrary:{name:"@apollo/client",version:r.version}},t.extensions)),"headers"===n&&t.setContext(({headers:e})=>({headers:su({"apollographql-library-name":"@apollo/client","apollographql-library-version":r.version},e)}))}return n(t)})}},ih=class extends Gd{constructor(e={}){const{left:t,right:n,request:r}=Gd.from([new rh(e),new nh(e)]);super(r),Object.assign(this,{left:t,right:n})}},ah=/* @__PURE__ */new Map,oh=/* @__PURE__ */new Map,sh=!1;function lh(e){return e.replace(/[\s,]+/g," ").trim()}function ch(e){var t,n,r,i=lh(e);if(!ah.has(i)){var a=function(e){const t=new Ms(e,{experimentalFragmentVariables:sh,allowLegacyFragmentVariables:sh}),n=t.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:t.tokenCount}),n}(e);if(!a||"Document"!==a.kind)throw new Error("Not a valid GraphQL document.");ah.set(i,function(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=a,n=/* @__PURE__ */new Set,r=[],t.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=lh((o=e.loc).source.body.substring(o.start,o.end)),a=oh.get(t);a&&!a.has(i)||a||oh.set(t,a=/* @__PURE__ */new Set),a.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var o}),Ks(Ks({},t),{definitions:r}))))}return ah.get(i)}function uh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]}),ch(r)}var dh,ph=uh;function fh(e){if(Array.isArray(e)){let t=!1,n=e.map(e=>{let n=fh(e);return n!==e&&(t=!0),n});return t?n:e}if("object"==typeof e&&e){let t={},n=!1;for(let r in e){if("__typename"===r){n=!0;continue}let i=e[r],a=fh(i);a!==i&&(n=!0),t[r]=a}return n?t:e}return e}(dh=uh||(uh={})).gql=ph,dh.resetCaches=function(){ah.clear(),oh.clear()},dh.disableFragmentWarnings=function(){},dh.enableExperimentalFragmentVariables=function(){sh=!0},dh.disableExperimentalFragmentVariables=function(){sh=!1},uh.default=uh;var hh=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=Gr(),a=i(),o=x(()=>`${e}_${((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})(8)}`,[e]);g(()=>(a(`sources.${o}`,{id:o,meta:{id:e,source:t,name:n,fields:r}}),()=>a("sources",e=>ee(e??{},o))),[o]),g(()=>{a(`sources.${o}.meta.fields`,r)},[r,o,a])},mh=s({logs:[],providers:{}});mh.displayName="DevToolsContext";var gh=()=>{let e=f(or);if(void 0===e)throw Error("ElementContext value is undefined. Make sure you use the ElementContext before using the hook.");return e},yh={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},cache:""},bh=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-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",ALIGN_SELF:"align-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",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",MASK_IMAGE:"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",OPACITY:"opacity",CURSOR:"cursor",TRANSITION:"transition",BOX_SHADOW:"box-shadow",FILTER:"filter",TRANSFORM:"transform",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",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",TEXT_DECORATION:"text-decoration",LETTER_SPACING:"letter-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow"}).map(e=>({path:e,label:e})),{definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[]}),vh=s({mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"});vh.displayName="NetworkContext";var xh=s({});xh.displayName="NetworkInternalContext";var wh={CollectionAddRecord:uh`
9
9
  mutation CollectionAddRecordMutation($collectionId: String!, $status: String!, $values: Json!) {
10
10
  CollectionAddRecord(collectionId: $collectionId, status: $status, values: $values) {
@@ -314,13 +314,13 @@ return O("div",{ref:c,className:t,children:f&&d&&D(/* @__PURE__ */A(qg,{value:P,
314
314
  return O("div",{className:e,onClick:o,children:t})},Gg=({className:e,items:t=[],tabSelected:n=0,size:r,onSelect:i})=>(e=gg("ContainerTabs",{className:e,componentKey:"tabs",variants:{size:r}}),/* @__PURE__ */O("div",{className:e,children:t.map((e,t)=>/* @__PURE__ */O(Yg,{label:e.label,active:n===t,index:t,size:r,onSelect:i},t))})),Qg={root:ue("flex flex-col"),content:ue("flex"),tabs:ue("flex bg-gray-100 dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg p-1 select-none gap-0.5"),tab:ue("flex items-center justify-center rounded basis-0 grow cursor-pointer py-1 px-3 text-sm font-medium transition-colors duration-150 select-none",{variants:{active:{true:"bg-white dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100 shadow-sm",false:"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{active:!1,size:"md"}})},Jg=({children:e,className:t,size:r})=>{t=gg("ContainerTabs",{className:t,componentKey:"root",variants:{size:r}});let[i,a]=S(0),s=h(e=>a(e),[]),{tabs:l,content:c}=x(()=>{let t={tabs:/* @__PURE__ */O(Gg,{tabSelected:i,size:r,onSelect:s}),content:/* @__PURE__ */O(Wg,{})},a=0;return n.forEach(e,e=>{if(u(e))if(e.type===Gg){let n=e.props;t.tabs=o(e,{...n,key:"tabs",tabSelected:i,size:r,onSelect:s})}else if(e.type===Wg&&a++===i){let n=e.props;t.content=o(e,{...n,key:`content-${i}`,size:r})}}),t},[i,s,e,r]);/* @__PURE__ */
315
315
  return A("div",{className:t,children:[l,c]})};Jg.Tabs=Gg,Jg.TabContent=Wg;var Kg=Jg,Xg={root:ue("",{variants:{size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{size:"md"}})},Zg=({className:e="focus-visible:px-1 focus-visible:m-px focus-visible:outline-dashed focus-visible:outline-1",myWindow:t,value:n="",exitOnEnter:r=!0,exitOnEscape:i=!0,updateMode:a="blur",openMode:o="click",size:s,onChange:l,onEditOpen:c,onEditClose:u})=>{e=gg("ContentEditable",{className:e,componentKey:"root",variants:{size:s}});let d=k(null),p=x(()=>t||(typeof window<"u"?window:void 0),[t]);g(()=>{d.current&&d.current.textContent!==n&&(d.current.textContent=n)},[n]);let f=h(e=>{"change"===a&&l?.(e.target.textContent)},[l,a]),m=h(e=>{if(!p)return;let t=p.document.createRange(),n=p.getSelection();t.setStart(e,e.childNodes.length),t.collapse(!0),n?.removeAllRanges(),n?.addRange(t)},[p]),y=h(()=>{let e=d.current;e&&(("inherit"===e.contentEditable||"false"===e.contentEditable)&&m(e),"click"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.()))},[o,m,c]),b=h(()=>{let e=d.current;e&&"doubleClick"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.())},[o,c]),v=h(()=>{let e=d.current;e&&(e.setAttribute("contenteditable","false"),"blur"===a&&e.textContent!==n&&l?.(e.textContent),u?.())},[l,a,n,u]),w=h(e=>{e.stopPropagation(),r&&13===e.keyCode?(e.preventDefault(),e.target.blur()):i&&27===e.keyCode&&(e.preventDefault(),e.target.textContent=n,e.target.blur())},[r,i,n]);/* @__PURE__ */
316
316
  return O("div",{className:e,ref:d,onClick:y,onDoubleClick:b,onBlur:v,onInput:f,onKeyDown:w})},ey=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__ */O("div",{children:"Something broke! Please refresh and try again."}):e}},ty={root:ue("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:ue("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:ue("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:ue("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:ue("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:ue("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:ue("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:ue("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:ue("text-zinc-400 dark:text-zinc-500")},ny=Object.assign(p(({ref:e,children:t,className:n="",id:r,label:i="",placeholder:a="",loading:o=!1,disabled:s=!1,clearable:l=!1,inline:c=!1,prefix:u="",type:d="text",size:p,intent:f="primary",value:m="",error:g=!1,containerProps:y,onChange:b,...v})=>{let x=gg("Input",{className:n&&"object"==typeof n?n.input:"",componentKey:"input",variants:{intent:f,size:p,disabled:s||o,error:!!g,inline:c}}),w=h(e=>b?.(e.target.value),[b]);/* @__PURE__ */
317
- return A(Sg,{className:n,id:r,label:i,loading:o,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:f,size:p,onClear:h(()=>b?.(""),[b]),...y,children:[t,/* @__PURE__ */O("input",{ref:e,id:r,type:d,placeholder:a,className:x,disabled:s||o,value:m,onChange:w,...v})]})}),{Icon:vg}),ry=ny,iy={root:ue("text-zinc-900 dark:text-zinc-100",{variants:{as:{h1:"text-5xl font-extrabold",h2:"text-4xl font-extrabold",h3:"text-3xl font-bold",h4:"text-2xl font-bold",h5:"text-xl font-bold",h6:"text-lg font-bold"}},compoundVariants:[],defaultVariants:{as:"h1"}})},ay={root:ue("")};function oy(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var sy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ly=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cy={};function uy(e,t){return((t||cy).jsx?ly:sy).test(e)}var dy=/[ \t\n\f\r]/g;function py(e){return""===e.replace(dy,"")}var fy=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function hy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new fy(n,r,t)}function my(e){return e.toLowerCase()}fy.prototype.normal={},fy.prototype.property={},fy.prototype.space=void 0;var gy=class{constructor(e,t){this.attribute=t,this.property=e}};gy.prototype.attribute="",gy.prototype.booleanish=!1,gy.prototype.boolean=!1,gy.prototype.commaOrSpaceSeparated=!1,gy.prototype.commaSeparated=!1,gy.prototype.defined=!1,gy.prototype.mustUseProperty=!1,gy.prototype.number=!1,gy.prototype.overloadedBoolean=!1,gy.prototype.property="",gy.prototype.spaceSeparated=!1,gy.prototype.space=void 0;var yy=/* @__PURE__ */$({boolean:()=>vy,booleanish:()=>xy,commaOrSpaceSeparated:()=>Ny,commaSeparated:()=>Ty,number:()=>ky,overloadedBoolean:()=>wy,spaceSeparated:()=>Sy}),by=0,vy=Cy(),xy=Cy(),wy=Cy(),ky=Cy(),Sy=Cy(),Ty=Cy(),Ny=Cy();function Cy(){return 2**++by}var Ey=Object.keys(yy),_y=class extends gy{constructor(e,t,n,r){let i=-1;if(super(e,t),Oy(this,"space",r),"number"==typeof n)for(;++i<Ey.length;){const e=Ey[i];Oy(this,Ey[i],(n&yy[e])===yy[e])}}};function Oy(e,t,n){n&&(e[t]=n)}function Ay(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new _y(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[my(r)]=r,n[my(a.attribute)]=r}return new fy(t,n,e.space)}_y.prototype.defined=!0;var Iy=Ay({properties:{ariaActiveDescendant:null,ariaAtomic:xy,ariaAutoComplete:null,ariaBusy:xy,ariaChecked:xy,ariaColCount:ky,ariaColIndex:ky,ariaColSpan:ky,ariaControls:Sy,ariaCurrent:null,ariaDescribedBy:Sy,ariaDetails:null,ariaDisabled:xy,ariaDropEffect:Sy,ariaErrorMessage:null,ariaExpanded:xy,ariaFlowTo:Sy,ariaGrabbed:xy,ariaHasPopup:null,ariaHidden:xy,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sy,ariaLevel:ky,ariaLive:null,ariaModal:xy,ariaMultiLine:xy,ariaMultiSelectable:xy,ariaOrientation:null,ariaOwns:Sy,ariaPlaceholder:null,ariaPosInSet:ky,ariaPressed:xy,ariaReadOnly:xy,ariaRelevant:null,ariaRequired:xy,ariaRoleDescription:Sy,ariaRowCount:ky,ariaRowIndex:ky,ariaRowSpan:ky,ariaSelected:xy,ariaSetSize:ky,ariaSort:null,ariaValueMax:ky,ariaValueMin:ky,ariaValueNow:ky,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Dy(e,t){return t in e?e[t]:t}function Py(e,t){return Dy(e,t.toLowerCase())}var My=Ay({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ty,acceptCharset:Sy,accessKey:Sy,action:null,allow:null,allowFullScreen:vy,allowPaymentRequest:vy,allowUserMedia:vy,alt:null,as:null,async:vy,autoCapitalize:null,autoComplete:Sy,autoFocus:vy,autoPlay:vy,blocking:Sy,capture:null,charSet:null,checked:vy,cite:null,className:Sy,cols:ky,colSpan:null,content:null,contentEditable:xy,controls:vy,controlsList:Sy,coords:ky|Ty,crossOrigin:null,data:null,dateTime:null,decoding:null,default:vy,defer:vy,dir:null,dirName:null,disabled:vy,download:wy,draggable:xy,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:vy,formTarget:null,headers:Sy,height:ky,hidden:wy,high:ky,href:null,hrefLang:null,htmlFor:Sy,httpEquiv:Sy,id:null,imageSizes:null,imageSrcSet:null,inert:vy,inputMode:null,integrity:null,is:null,isMap:vy,itemId:null,itemProp:Sy,itemRef:Sy,itemScope:vy,itemType:Sy,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:vy,low:ky,manifest:null,max:null,maxLength:ky,media:null,method:null,min:null,minLength:ky,multiple:vy,muted:vy,name:null,nonce:null,noModule:vy,noValidate:vy,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:vy,optimum:ky,pattern:null,ping:Sy,placeholder:null,playsInline:vy,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:vy,referrerPolicy:null,rel:Sy,required:vy,reversed:vy,rows:ky,rowSpan:ky,sandbox:Sy,scope:null,scoped:vy,seamless:vy,selected:vy,shadowRootClonable:vy,shadowRootDelegatesFocus:vy,shadowRootMode:null,shape:null,size:ky,sizes:null,slot:null,span:ky,spellCheck:xy,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ky,step:null,style:null,tabIndex:ky,target:null,title:null,translate:null,type:null,typeMustMatch:vy,useMap:null,value:xy,width:ky,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Sy,axis:null,background:null,bgColor:null,border:ky,borderColor:null,bottomMargin:ky,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:vy,declare:vy,event:null,face:null,frame:null,frameBorder:null,hSpace:ky,leftMargin:ky,link:null,longDesc:null,lowSrc:null,marginHeight:ky,marginWidth:ky,noResize:vy,noHref:vy,noShade:vy,noWrap:vy,object:null,profile:null,prompt:null,rev:null,rightMargin:ky,rules:null,scheme:null,scrolling:xy,standby:null,summary:null,text:null,topMargin:ky,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ky,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:vy,disableRemotePlayback:vy,prefix:null,property:null,results:ky,security:null,unselectable:null},space:"html",transform:Py}),Ry=Ay({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ny,accentHeight:ky,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ky,amplitude:ky,arabicForm:null,ascent:ky,attributeName:null,attributeType:null,azimuth:ky,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ky,by:null,calcMode:null,capHeight:ky,className:Sy,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ky,diffuseConstant:ky,direction:null,display:null,dur:null,divisor:ky,dominantBaseline:null,download:vy,dx:null,dy:null,edgeMode:null,editable:null,elevation:ky,enableBackground:null,end:null,event:null,exponent:ky,externalResourcesRequired:null,fill:null,fillOpacity:ky,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ty,g2:Ty,glyphName:Ty,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ky,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ky,horizOriginX:ky,horizOriginY:ky,id:null,ideographic:ky,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ky,k:ky,k1:ky,k2:ky,k3:ky,k4:ky,kernelMatrix:Ny,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ky,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ky,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ky,overlineThickness:ky,paintOrder:null,panose1:null,path:null,pathLength:ky,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Sy,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ky,pointsAtY:ky,pointsAtZ:ky,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ny,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ny,rev:Ny,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ny,requiredFeatures:Ny,requiredFonts:Ny,requiredFormats:Ny,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ky,specularExponent:ky,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ky,strikethroughThickness:ky,string:null,stroke:null,strokeDashArray:Ny,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ky,strokeOpacity:ky,strokeWidth:null,style:null,surfaceScale:ky,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ny,tabIndex:ky,tableValues:null,target:null,targetX:ky,targetY:ky,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ny,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ky,underlineThickness:ky,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ky,values:null,vAlphabetic:ky,vMathematical:ky,vectorEffect:null,vHanging:ky,vIdeographic:ky,version:null,vertAdvY:ky,vertOriginX:ky,vertOriginY:ky,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ky,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dy}),jy=Ay({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),zy=Ay({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Py}),Ly=Ay({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Fy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$y=/[A-Z]/g,qy=/-[a-z]/g,By=/^data[-\w.:]+$/i;function Vy(e,t){const n=my(t);let r=t,i=gy;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&By.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(qy,Hy);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!qy.test(e)){let n=e.replace($y,Uy);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=_y}return new i(r,t)}function Uy(e){return"-"+e.toLowerCase()}function Hy(e){return e.charAt(1).toUpperCase()}var Wy=hy([Iy,My,jy,zy,Ly],"html"),Yy=hy([Iy,Ry,jy,zy,Ly],"svg");function Gy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}var Qy=/* @__PURE__ */F((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function f(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function w(){var e=h(),t=y(a);if(t){if(x(),!y(o))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=w();)!1!==e&&(t.push(e),v(t));return t}()}}),Jy=/* @__PURE__ */F(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),a="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;a?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(Qy())}),Ky=/* @__PURE__ */F(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(a,s):e.replace(i,s)).replace(n,o))}}),Xy=/* @__PURE__ */F((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Jy()),r=Ky();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),Zy=tb("end"),eb=tb("start");function tb(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function nb(e){return e&&"object"==typeof e?"position"in e||"type"in e?ib(e.position):"start"in e||"end"in e?ib(e):"line"in e||"column"in e?rb(e):"":""}function rb(e){return ab(e&&e.line)+":"+ab(e&&e.column)}function ib(e){return rb(e&&e.start)+"-"+rb(e&&e.end)}function ab(e){return e&&"number"==typeof e?e:1}var ob=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=nb(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ob.prototype.file="",ob.prototype.name="",ob.prototype.reason="",ob.prototype.message="",ob.prototype.stack="",ob.prototype.column=void 0,ob.prototype.line=void 0,ob.prototype.ancestors=void 0,ob.prototype.cause=void 0,ob.prototype.fatal=void 0,ob.prototype.place=void 0,ob.prototype.ruleId=void 0,ob.prototype.source=void 0;var sb=/* @__PURE__ */q(Xy(),1),lb={}.hasOwnProperty,cb=/* @__PURE__ */new Map,ub=/[A-Z]/g,db=new Set(["table","tbody","thead","tfoot","tr"]),pb=new Set(["td","th"]);function fb(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Yy,e.schema=i),e.ancestors.push(t);const a=bb(e,t.tagName,!1),o=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&lb.call(t.properties,i)){const a=yb(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&pb.has(t.tagName)?r=o:n[i]=o}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=gb(e,t);return db.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&py(t.value):py(t));var t})),hb(e,o,a,t),mb(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
317
+ return A(Sg,{className:n,id:r,label:i,loading:o,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:f,size:p,onClear:h(()=>b?.(""),[b]),...y,children:[t,/* @__PURE__ */O("input",{ref:e,id:r,type:d,placeholder:a,className:x,disabled:s||o,value:m,onChange:w,...v})]})}),{Icon:vg}),ry=ny,iy={root:ue("text-zinc-900 dark:text-zinc-100",{variants:{as:{h1:"text-5xl font-extrabold",h2:"text-4xl font-extrabold",h3:"text-3xl font-bold",h4:"text-2xl font-bold",h5:"text-xl font-bold",h6:"text-lg font-bold"}},compoundVariants:[],defaultVariants:{as:"h1"}})},ay={root:ue("")};function oy(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var sy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ly=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cy={};function uy(e,t){return((t||cy).jsx?ly:sy).test(e)}var dy=/[ \t\n\f\r]/g;function py(e){return""===e.replace(dy,"")}var fy=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function hy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new fy(n,r,t)}function my(e){return e.toLowerCase()}fy.prototype.normal={},fy.prototype.property={},fy.prototype.space=void 0;var gy=class{constructor(e,t){this.attribute=t,this.property=e}};gy.prototype.attribute="",gy.prototype.booleanish=!1,gy.prototype.boolean=!1,gy.prototype.commaOrSpaceSeparated=!1,gy.prototype.commaSeparated=!1,gy.prototype.defined=!1,gy.prototype.mustUseProperty=!1,gy.prototype.number=!1,gy.prototype.overloadedBoolean=!1,gy.prototype.property="",gy.prototype.spaceSeparated=!1,gy.prototype.space=void 0;var yy=/* @__PURE__ */q({boolean:()=>vy,booleanish:()=>xy,commaOrSpaceSeparated:()=>Ny,commaSeparated:()=>Ty,number:()=>ky,overloadedBoolean:()=>wy,spaceSeparated:()=>Sy}),by=0,vy=Cy(),xy=Cy(),wy=Cy(),ky=Cy(),Sy=Cy(),Ty=Cy(),Ny=Cy();function Cy(){return 2**++by}var Ey=Object.keys(yy),_y=class extends gy{constructor(e,t,n,r){let i=-1;if(super(e,t),Oy(this,"space",r),"number"==typeof n)for(;++i<Ey.length;){const e=Ey[i];Oy(this,Ey[i],(n&yy[e])===yy[e])}}};function Oy(e,t,n){n&&(e[t]=n)}function Ay(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new _y(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[my(r)]=r,n[my(a.attribute)]=r}return new fy(t,n,e.space)}_y.prototype.defined=!0;var Iy=Ay({properties:{ariaActiveDescendant:null,ariaAtomic:xy,ariaAutoComplete:null,ariaBusy:xy,ariaChecked:xy,ariaColCount:ky,ariaColIndex:ky,ariaColSpan:ky,ariaControls:Sy,ariaCurrent:null,ariaDescribedBy:Sy,ariaDetails:null,ariaDisabled:xy,ariaDropEffect:Sy,ariaErrorMessage:null,ariaExpanded:xy,ariaFlowTo:Sy,ariaGrabbed:xy,ariaHasPopup:null,ariaHidden:xy,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sy,ariaLevel:ky,ariaLive:null,ariaModal:xy,ariaMultiLine:xy,ariaMultiSelectable:xy,ariaOrientation:null,ariaOwns:Sy,ariaPlaceholder:null,ariaPosInSet:ky,ariaPressed:xy,ariaReadOnly:xy,ariaRelevant:null,ariaRequired:xy,ariaRoleDescription:Sy,ariaRowCount:ky,ariaRowIndex:ky,ariaRowSpan:ky,ariaSelected:xy,ariaSetSize:ky,ariaSort:null,ariaValueMax:ky,ariaValueMin:ky,ariaValueNow:ky,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Dy(e,t){return t in e?e[t]:t}function Py(e,t){return Dy(e,t.toLowerCase())}var My=Ay({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ty,acceptCharset:Sy,accessKey:Sy,action:null,allow:null,allowFullScreen:vy,allowPaymentRequest:vy,allowUserMedia:vy,alt:null,as:null,async:vy,autoCapitalize:null,autoComplete:Sy,autoFocus:vy,autoPlay:vy,blocking:Sy,capture:null,charSet:null,checked:vy,cite:null,className:Sy,cols:ky,colSpan:null,content:null,contentEditable:xy,controls:vy,controlsList:Sy,coords:ky|Ty,crossOrigin:null,data:null,dateTime:null,decoding:null,default:vy,defer:vy,dir:null,dirName:null,disabled:vy,download:wy,draggable:xy,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:vy,formTarget:null,headers:Sy,height:ky,hidden:wy,high:ky,href:null,hrefLang:null,htmlFor:Sy,httpEquiv:Sy,id:null,imageSizes:null,imageSrcSet:null,inert:vy,inputMode:null,integrity:null,is:null,isMap:vy,itemId:null,itemProp:Sy,itemRef:Sy,itemScope:vy,itemType:Sy,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:vy,low:ky,manifest:null,max:null,maxLength:ky,media:null,method:null,min:null,minLength:ky,multiple:vy,muted:vy,name:null,nonce:null,noModule:vy,noValidate:vy,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:vy,optimum:ky,pattern:null,ping:Sy,placeholder:null,playsInline:vy,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:vy,referrerPolicy:null,rel:Sy,required:vy,reversed:vy,rows:ky,rowSpan:ky,sandbox:Sy,scope:null,scoped:vy,seamless:vy,selected:vy,shadowRootClonable:vy,shadowRootDelegatesFocus:vy,shadowRootMode:null,shape:null,size:ky,sizes:null,slot:null,span:ky,spellCheck:xy,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ky,step:null,style:null,tabIndex:ky,target:null,title:null,translate:null,type:null,typeMustMatch:vy,useMap:null,value:xy,width:ky,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Sy,axis:null,background:null,bgColor:null,border:ky,borderColor:null,bottomMargin:ky,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:vy,declare:vy,event:null,face:null,frame:null,frameBorder:null,hSpace:ky,leftMargin:ky,link:null,longDesc:null,lowSrc:null,marginHeight:ky,marginWidth:ky,noResize:vy,noHref:vy,noShade:vy,noWrap:vy,object:null,profile:null,prompt:null,rev:null,rightMargin:ky,rules:null,scheme:null,scrolling:xy,standby:null,summary:null,text:null,topMargin:ky,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ky,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:vy,disableRemotePlayback:vy,prefix:null,property:null,results:ky,security:null,unselectable:null},space:"html",transform:Py}),Ry=Ay({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ny,accentHeight:ky,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ky,amplitude:ky,arabicForm:null,ascent:ky,attributeName:null,attributeType:null,azimuth:ky,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ky,by:null,calcMode:null,capHeight:ky,className:Sy,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ky,diffuseConstant:ky,direction:null,display:null,dur:null,divisor:ky,dominantBaseline:null,download:vy,dx:null,dy:null,edgeMode:null,editable:null,elevation:ky,enableBackground:null,end:null,event:null,exponent:ky,externalResourcesRequired:null,fill:null,fillOpacity:ky,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ty,g2:Ty,glyphName:Ty,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ky,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ky,horizOriginX:ky,horizOriginY:ky,id:null,ideographic:ky,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ky,k:ky,k1:ky,k2:ky,k3:ky,k4:ky,kernelMatrix:Ny,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ky,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ky,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ky,overlineThickness:ky,paintOrder:null,panose1:null,path:null,pathLength:ky,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Sy,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ky,pointsAtY:ky,pointsAtZ:ky,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ny,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ny,rev:Ny,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ny,requiredFeatures:Ny,requiredFonts:Ny,requiredFormats:Ny,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ky,specularExponent:ky,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ky,strikethroughThickness:ky,string:null,stroke:null,strokeDashArray:Ny,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ky,strokeOpacity:ky,strokeWidth:null,style:null,surfaceScale:ky,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ny,tabIndex:ky,tableValues:null,target:null,targetX:ky,targetY:ky,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ny,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ky,underlineThickness:ky,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ky,values:null,vAlphabetic:ky,vMathematical:ky,vectorEffect:null,vHanging:ky,vIdeographic:ky,version:null,vertAdvY:ky,vertOriginX:ky,vertOriginY:ky,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ky,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dy}),jy=Ay({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),zy=Ay({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Py}),Ly=Ay({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Fy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$y=/[A-Z]/g,qy=/-[a-z]/g,By=/^data[-\w.:]+$/i;function Vy(e,t){const n=my(t);let r=t,i=gy;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&By.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(qy,Hy);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!qy.test(e)){let n=e.replace($y,Uy);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=_y}return new i(r,t)}function Uy(e){return"-"+e.toLowerCase()}function Hy(e){return e.charAt(1).toUpperCase()}var Wy=hy([Iy,My,jy,zy,Ly],"html"),Yy=hy([Iy,Ry,jy,zy,Ly],"svg");function Gy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}var Qy=/* @__PURE__ */$((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function f(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function w(){var e=h(),t=y(a);if(t){if(x(),!y(o))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=w();)!1!==e&&(t.push(e),v(t));return t}()}}),Jy=/* @__PURE__ */$(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),a="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;a?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(Qy())}),Ky=/* @__PURE__ */$(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(a,s):e.replace(i,s)).replace(n,o))}}),Xy=/* @__PURE__ */$((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Jy()),r=Ky();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),Zy=tb("end"),eb=tb("start");function tb(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function nb(e){return e&&"object"==typeof e?"position"in e||"type"in e?ib(e.position):"start"in e||"end"in e?ib(e):"line"in e||"column"in e?rb(e):"":""}function rb(e){return ab(e&&e.line)+":"+ab(e&&e.column)}function ib(e){return rb(e&&e.start)+"-"+rb(e&&e.end)}function ab(e){return e&&"number"==typeof e?e:1}var ob=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=nb(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ob.prototype.file="",ob.prototype.name="",ob.prototype.reason="",ob.prototype.message="",ob.prototype.stack="",ob.prototype.column=void 0,ob.prototype.line=void 0,ob.prototype.ancestors=void 0,ob.prototype.cause=void 0,ob.prototype.fatal=void 0,ob.prototype.place=void 0,ob.prototype.ruleId=void 0,ob.prototype.source=void 0;var sb=/* @__PURE__ */B(Xy(),1),lb={}.hasOwnProperty,cb=/* @__PURE__ */new Map,ub=/[A-Z]/g,db=new Set(["table","tbody","thead","tfoot","tr"]),pb=new Set(["td","th"]);function fb(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Yy,e.schema=i),e.ancestors.push(t);const a=bb(e,t.tagName,!1),o=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&lb.call(t.properties,i)){const a=yb(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&pb.has(t.tagName)?r=o:n[i]=o}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=gb(e,t);return db.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&py(t.value):py(t));var t})),hb(e,o,a,t),mb(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
318
318
  /* @__PURE__ */return n.type,e.evaluater.evaluateExpression(n.expression)}vb(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=Yy,e.schema=i),e.ancestors.push(t);const a=null===t.name?e.Fragment:bb(e,t.name,!0),o=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];
319
319
  /* @__PURE__ */t.type;const i=t.expression;
320
320
  /* @__PURE__ */i.type;const a=i.properties[0];
321
321
  /* @__PURE__ */a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else vb(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];
322
322
  /* @__PURE__ */t.type,a=e.evaluater.evaluateExpression(t.expression)}else vb(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),s=gb(e,t);return hb(e,o,a,t),mb(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vb(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return mb(r,gb(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function hb(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mb(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gb(e,t){const n=[];let r=-1;const i=e.passKeys?/* @__PURE__ */new Map:cb;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}const s=fb(e,a,o);void 0!==s&&n.push(s)}return n}function yb(e,t,n){const r=Vy(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,sb.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new ob("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url="https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)lb.call(e,n)&&(t[xb(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Fy[r.property]||r.property:r.attribute,n]}}function bb(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=uy(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}
323
- /* @__PURE__ */r=n}else r=uy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return lb.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);vb(e)}function vb(e,t){const n=new ob("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url="https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater",n}function xb(e){let t=e.replace(ub,wb);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function wb(e){return"-"+e.toLowerCase()}var kb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Sb={};function Tb(e,t){const n=t||Sb;return Nb(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function Nb(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cb(e.children,t,n)}return Array.isArray(e)?Cb(e,t,n):""}function Cb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nb(e[i],t,n);return r.join("")}var Eb={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},_b={}.hasOwnProperty;function Ob(e){return!!_b.call(Eb,e)&&Eb[e]}function Ab(e,t,n,r){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ib(e,t){return e.length>0?(Ab(e,e.length,0,t),e):t}var Db={}.hasOwnProperty;function Pb(e){const t={};let n=-1;for(;++n<e.length;)Mb(t,e[n]);return t}function Mb(e,t){let n;for(n in t){const r=(Db.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Db.call(r,a)||(r[a]=[]);const e=i[a];Rb(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Rb(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Ab(e,0,0,r)}function jb(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function zb(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Lb=Jb(/[A-Za-z]/),Fb=Jb(/[\dA-Za-z]/),$b=Jb(/[#-'*+\--9=?A-Z^-~]/);function qb(e){return null!==e&&(e<32||127===e)}var Bb=Jb(/\d/),Vb=Jb(/[\dA-Fa-f]/),Ub=Jb(/[!-/:-@[-`{-~]/);function Hb(e){return null!==e&&e<-2}function Wb(e){return null!==e&&(e<0||32===e)}function Yb(e){return-2===e||-1===e||32===e}var Gb=Jb(/\p{P}|\p{S}/u),Qb=Jb(/\s/);function Jb(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Kb(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(37===a&&Fb(e.charCodeAt(n+1))&&Fb(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xb(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){return Yb(r)?(e.enter(n),o(r)):t(r)};function o(r){return Yb(r)&&a++<i?(e.consume(r),o):(e.exit(n),t(r))}}var Zb={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xb(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Hb(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},ev={tokenize:function(e){const t=this,n=[];let r,i,a,o=0;return s;function s(r){if(o<n.length){const i=n[o];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}y(o);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;return Ab(t.events,a+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(i){if(o===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return h(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tv,u,d)(i)}function u(e){return r&&b(),y(o),p(e)}function d(e){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(tv,f,h)(n)}function f(e){return o++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Hb(n)?(e.consume(n),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(o),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Ab(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},tv={tokenize:function(e,t,n){return Xb(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function nv(e){return null===e||Wb(e)||Qb(e)?1:Gb(e)?2:void 0}function rv(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var iv={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};av(d,-s),av(p,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},i={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[u][1].start={...o.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ib(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ib(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Ib(l,rv(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ib(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ib(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Ab(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nv(r);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const l=e.exit("attentionSequence"),c=nv(s),u=!c||2===c&&i||n.includes(s),d=!i||2===i&&c||n.includes(r);return l._open=Boolean(42===a?u:u&&(i||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function av(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ov={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Lb(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||Fb(e)?(r=1,o(e)):l(e)}function o(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Fb(t))&&r++<32?(e.consume(t),o):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||qb(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):$b(t)?(e.consume(t),l):n(t)}function c(e){return Fb(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Fb(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},sv={partial:!0,tokenize:function(e,t,n){return function(t){return Yb(t)?Xb(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Hb(e)?t(e):n(e)}}},lv={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Yb(t)?Xb(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(lv,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Yb(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},cv={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ub(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},uv={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Fb,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Vb,c):(e.enter("characterReferenceValue"),i=7,a=Bb,c(t))}function c(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==Fb||Ob(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&o++<i?(e.consume(s),c):n(s)}}},dv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},pv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),Yb(t)?Xb(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Yb(t)?Xb(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Hb(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,o=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return o=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Yb(t)?Xb(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Hb(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(dv,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Hb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Yb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xb(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Hb(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Hb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(i,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return o>0&&Yb(t)?Xb(e,g,"linePrefix",o+1)(t):g(t)}function g(t){return null===t||Hb(t)?e.check(dv,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Hb(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},fv={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Xb(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):Hb(t)?e.attempt(hv,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Hb(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(n){return e.exit("codeIndented"),t(n)}}},hv={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Xb(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Hb(e)?i(e):n(e)}}},mv={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Hb(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},gv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yv(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yv(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yv(this.left,t.reverse())}}};function yv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function bv(e){const t={};let n,r,i,a,o,s,l,c=-1;const u=new gv(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,vv(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(a=u.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},o=u.slice(r,c),o.unshift(n),u.splice(r,c-r+1,o))}}return Ab(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function vv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}var xv={resolve:function(e){return bv(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Hb(t)?e.check(wv,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},wv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xb(e,i,"linePrefix")};function i(i){if(null===i||Hb(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function kv(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d):null===t||32===t||41===t||qb(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Hb(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return u||null!==i&&41!==i&&!Wb(i)?u<c&&40===i?(e.consume(i),u++,h):41===i?(e.consume(i),u--,h):null===i||32===i||40===i||qb(i)?n(i):(e.consume(i),92===i?m:h):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sv(e,t,n,r,i,a){const o=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Hb(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Hb(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Yb(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Tv(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xb(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||Hb(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function Nv(e,t){let n;return function r(i){return Hb(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Yb(i)?Xb(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Cv={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return Sv.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=zb(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return Wb(t)?Nv(e,s)(t):s(t)}function s(t){return kv(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ev,c,c)(t)}function c(t){return Yb(t)?Xb(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Hb(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},Ev={partial:!0,tokenize:function(e,t,n){return function(t){return Wb(t)?Nv(e,r)(t):n(t)};function r(t){return Tv(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Yb(t)?Xb(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Hb(e)?t(e):n(e)}}},_v={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Hb(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},Ov={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Ab(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Wb(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),o(n)):null===n||Hb(n)?(e.exit("atxHeading"),t(n)):Yb(n)?Xb(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||Wb(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}},Av=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Iv=["pre","script","style","textarea"],Dv={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,a,o,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),i=3,r.interrupt?t:M):Lb(s)?(e.consume(s),o=String.fromCharCode(s),h):n(s)}function u(a){return 45===a?(e.consume(a),i=2,d):91===a?(e.consume(a),i=5,s=0,p):Lb(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:M):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:C:p):n(i)}function f(t){return Lb(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Wb(s)){const l=47===s,c=o.toLowerCase();return l||a||!Iv.includes(c)?Av.includes(o.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):C(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?g(s):y(s)):(i=1,r.interrupt?t(s):C(s))}return 45===s||Fb(s)?(e.consume(s),o+=String.fromCharCode(s),h):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function g(t){return Yb(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||Lb(t)?(e.consume(t),b):Yb(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||Fb(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),x):Yb(t)?(e.consume(t),v):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Yb(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||Hb(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wb(t)?v(t):(e.consume(t),k)}function S(e){return 47===e||62===e||Yb(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return null===t||Hb(t)?C(t):Yb(t)?(e.consume(t),N):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),A):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),R):63===t&&3===i?(e.consume(t),M):93===t&&5===i?(e.consume(t),P):!Hb(t)||6!==i&&7!==i?null===t||Hb(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Pv,j,E)(t))}function E(t){return e.check(Mv,_,j)(t)}function _(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return null===t||Hb(t)?E(t):(e.enter("htmlFlowData"),C(t))}function A(t){return 45===t?(e.consume(t),M):C(t)}function I(t){return 47===t?(e.consume(t),o="",D):C(t)}function D(t){if(62===t){const n=o.toLowerCase();return Iv.includes(n)?(e.consume(t),R):C(t)}return Lb(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):C(t)}function P(t){return 93===t?(e.consume(t),M):C(t)}function M(t){return 62===t?(e.consume(t),R):45===t&&2===i?(e.consume(t),M):C(t)}function R(t){return null===t||Hb(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),R)}function j(n){return e.exit("htmlFlow"),t(n)}}},Pv={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(sv,t,n)}}},Mv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Rv={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),b):Lb(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Lb(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Hb(t)?(o=u,D(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?I(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(a++)?(e.consume(t),6===a?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Hb(t)?(o=h,D(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?I(t):Hb(t)?(o=y,D(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Hb(t)?(o=b,D(t)):(e.consume(t),b)}function v(e){return 62===e?I(e):b(e)}function x(t){return Lb(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Fb(t)?(e.consume(t),w):k(t)}function k(t){return Hb(t)?(o=k,D(t)):Yb(t)?(e.consume(t),k):I(t)}function S(t){return 45===t||Fb(t)?(e.consume(t),S):47===t||62===t||Wb(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),I):58===t||95===t||Lb(t)?(e.consume(t),N):Hb(t)?(o=T,D(t)):Yb(t)?(e.consume(t),T):I(t)}function N(t){return 45===t||46===t||58===t||95===t||Fb(t)?(e.consume(t),N):C(t)}function C(t){return 61===t?(e.consume(t),E):Hb(t)?(o=C,D(t)):Yb(t)?(e.consume(t),C):T(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,_):Hb(t)?(o=E,D(t)):Yb(t)?(e.consume(t),E):(e.consume(t),O)}function _(t){return t===i?(e.consume(t),i=void 0,A):null===t?n(t):Hb(t)?(o=_,D(t)):(e.consume(t),_)}function O(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wb(t)?T(t):(e.consume(t),O)}function A(e){return 47===e||62===e||Wb(e)?T(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Yb(t)?Xb(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),o(t)}}},jv={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&Ab(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a,o=e.length,s=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=o);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Ib(a,e.slice(r+1,r+s+3)),a=Ib(a,[["enter",u,t]]),a=Ib(a,rv(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),a=Ib(a,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),a=Ib(a,e.slice(i+1)),a=Ib(a,[["exit",l,t]]),Ab(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let i,a,o=r.events.length;for(;o--;)if(("labelImage"===r.events[o][1].type||"labelLink"===r.events[o][1].type)&&!r.events[o][1]._balanced){i=r.events[o][1];break}return function(t){return i?i._inactive?u(t):(a=r.parser.defined.includes(zb(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(zv,c,a?c:u)(t):91===t?e.attempt(Lv,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(Fv,c,u)(t)}function c(e){return t(e)}function u(e){return i._balanced=!0,n(e)}}},zv={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wb(t)?Nv(e,i)(t):i(t)}function i(t){return 41===t?c(t):kv(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Wb(t)?Nv(e,s)(t):c(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?Tv(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Wb(t)?Nv(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Lv={tokenize:function(e,t,n){const r=this;return function(t){return Sv.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(zb(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Fv={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},$v={name:"labelStartImage",resolveAll:jv.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},qv={name:"labelStartLink",resolveAll:jv.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},Bv={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xb(e,t,"linePrefix")}}},Vv={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Hb(a))?(e.exit("thematicBreak"),t(a)):n(a)}function o(t){return t===r?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),Yb(t)?Xb(e,a,"whitespace")(t):a(t))}}},Uv={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sv,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xb(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Yb(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wv,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xb(e,e.attempt(Uv,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Bb(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vv,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Bb(t)&&++o<10?(e.consume(t),s):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(sv,r.interrupt?n:c,e.attempt(Hv,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return Yb(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Hv={partial:!0,tokenize:function(e,t,n){const r=this;return Xb(e,function(e){const i=r.events[r.events.length-1];return!Yb(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Wv={partial:!0,tokenize:function(e,t,n){const r=this;return Xb(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},Yv={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let o,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){o="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!o?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t))};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Yb(t)?Xb(e,o,"lineSuffix")(t):o(t))}function o(r){return null===r||Hb(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Gv={tokenize:function(e){const t=this,n=e.attempt(sv,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,Xb(e,e.attempt(this.parser.constructs.flow,r,e.attempt(xv,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Qv={resolveAll:Zv()},Jv=Xv("string"),Kv=Xv("text");function Xv(e){return{resolveAll:Zv("text"===e?ex:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Zv(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function ex(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let a,o=i.length,s=-1,l=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)a=!0,l++;else if(-1!==e){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const i={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}var tx=/* @__PURE__ */$({attentionMarkers:()=>cx,contentInitial:()=>rx,disable:()=>ux,document:()=>nx,flow:()=>ax,flowInitial:()=>ix,insideSpan:()=>lx,string:()=>ox,text:()=>sx}),nx={42:Uv,43:Uv,45:Uv,48:Uv,49:Uv,50:Uv,51:Uv,52:Uv,53:Uv,54:Uv,55:Uv,56:Uv,57:Uv,62:lv},rx={91:Cv},ix={[-2]:fv,[-1]:fv,32:fv},ax={35:Ov,42:Vv,45:[Yv,Vv],60:Dv,61:Yv,95:Vv,96:pv,126:pv},ox={38:uv,92:cv},sx={[-5]:Bv,[-4]:Bv,[-3]:Bv,33:$v,38:uv,42:iv,60:[ov,Rv],91:qv,92:[_v,cv],93:jv,95:iv,96:mv},lx={null:[iv,Qv]},cx={null:[42,95]},ux={null:[]};function dx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(h),consume:function(e){Hb(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,r.push(o)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return o=Ib(o,e),function(){let e;for(;r._index<o.length;){const t=o[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==o[o.length-1]?[]:(g(t,0),c.events=rv(a,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function f(e){u=u(e)}function h(e,t){t.restore()}function m(e,t){return function(n,i,a){let o,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return o=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){return f=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=a,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,f),i}function b(e){return f.restore(),++u<o.length?m(o[u]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ab(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var px=/[\0\t\n\r]/g,fx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hx(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return jb(n.slice(t?2:1),t?16:10)}return Ob(n)||e}var mx={}.hasOwnProperty;function gx(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(b),autolinkProtocol:u,autolinkEmail:u,atxHeading:i(m),blockQuote:i(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:i(h),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(h,a),codeText:i(function(){return{type:"inlineCode",value:""}},a),codeTextData:u,data:u,codeFlowValue:u,definition:i(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:i(g),hardBreakTrailing:i(g),htmlFlow:i(y,a),htmlFlowData:u,htmlText:i(y,a),htmlTextData:u,image:i(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:i(b),listItem:i(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:i(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:i(v),paragraph:i(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(m),strong:i(function(){return{type:"strong",children:[]}}),thematicBreak:i(function(){return{type:"thematicBreak"}})},exit:{atxHeading:s(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:s(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=jb(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Ob(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=yx(e.end)},codeFenced:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:s(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zb(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(p),hardBreakTrailing:s(p),htmlFlow:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:s(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(fx,hx)}(t),n.identifier=zb(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=yx(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),d.call(this,e))},link:s(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zb(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:s(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:s(),thematicBreak:s()}};bx(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let i={type:"root",children:[]};const s={stack:[i],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:c,data:n},u=[];let d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?u.push(d):d=r(e,u.pop(),d));for(d=-1;++d<e.length;){const n=t[e[d][0]];mx.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},s),e[d][1])}if(s.tokenStack.length>0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||xx).call(s,void 0,e[0])}for(i.position={start:yx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:yx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)i=t.transforms[d](i)||i;return i};function r(e,t,n){let r,i,a,o,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,a=void 0,o=!0}}}return e[t][1]._spread=c,n}function i(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:yx(t.start),end:void 0}}function s(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+nb({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||xx).call(this,e,r[0])),n.position.end=yx(e.end)}function c(){return Tb(this.stack.pop())}function u(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:yx(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=yx(e.end)}function p(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function h(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function y(){return{type:"html",value:""}}function b(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!bv(e););return e}(function(e){const t={constructs:Pb([tx,...(e||{}).extensions||[]]),content:n(Zb),defined:[],document:n(ev),flow:n(Gv),lazy:{},string:n(Jv),text:n(Kv)};return t;function n(e){return function(n){return dx(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,o){const s=[];let l,c,u,d,p;for(i=n+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,n="",r&&(65279===i.charCodeAt(0)&&u++,r=void 0);u<i.length;){if(px.lastIndex=u,l=px.exec(i),d=l&&void 0!==l.index?l.index:i.length,p=i.charCodeAt(d),!l){n=i.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(i.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return o&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function yx(e){return{line:e.line,column:e.column,offset:e.offset}}function bx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bx(e,r):vx(e,r)}}function vx(e,t){let n;for(n in t)if(mx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+nb({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nb({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+nb({start:t.start,end:t.end})+") is still open")}function wx(e){const t=this;t.parser=function(n){return gx(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function kx(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function Sx(e){const t=e.spread;return null==t?e.children.length>1:t}function Tx(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Nx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Nx(t.slice(i),i>0,!1)),a.join("")}function Nx(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var Cx={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Kb(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kx(e,t);const i={src:Kb(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Kb(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kx(e,t);const i={href:Kb(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Kb(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Sx(n[r])}return t}(n):Sx(t),a={},o=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=eb(t.children[1]),o=Zy(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<o;){const n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Tx(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ex,yaml:Ex,definition:Ex,footnoteDefinition:Ex};function Ex(){}var _x="object"==typeof self?self:globalThis,Ox=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{const e=n([],i);for(const t of o)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{const{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of o)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of o)e.add(r(t));return e}case 7:{const{name:e,message:t}=o;return n(new _x[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new _x[a](o),i)};return r})(/* @__PURE__ */new Map,e)(0),Ax="",{toString:Ix}={},{keys:Dx}=Object,Px=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ix.call(e).slice(8,-1);switch(n){case"Array":return[1,Ax];case"Object":return[2,Ax];case"Date":return[3,Ax];case"RegExp":return[4,Ax];case"Map":return[5,Ax];case"Set":return[6,Ax];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Mx=([e,t])=>0===e&&("function"===t||"symbol"===t),Rx=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Px(r);switch(o){case 0:{let t=r;switch(s){case"bigint":o=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),i([s,[...e]],r)}const e=[],t=i([o,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(s)switch(s){case"BigInt":return i([s,r.toString()],r);case"Boolean":case"Number":case"String":return i([s,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],l=i([o,n],r);for(const t of Dx(r))!e&&Mx(Px(r[t]))||n.push([a(t),a(r[t])]);return l}case 3:return i([o,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{const t=[],n=i([o,t],r);for(const[i,o]of r)(e||!Mx(Px(i))&&!Mx(Px(o)))&&t.push([a(i),a(o)]);return n}case 6:{const t=[],n=i([o,t],r);for(const i of r)!e&&Mx(Px(i))||t.push(a(i));return n}}const{message:l}=r;return i([o,{name:s,message:l}],r)};return a})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},jx="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Ox(Rx(e,t)):structuredClone(e):(e,t)=>Ox(Rx(e,t));function zx(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Lx(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var Fx=function(e){if(null==e)return qx;if("function"==typeof e)return $x(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fx(e[n]);return $x(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return $x(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return function(e){return $x(function(t){return t&&t.type===e})}(e);throw new Error("Expected function, string, or object as test")};function $x(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function qx(){return!0}var Bx=[];function Vx(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const a=Fx(i),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Bx;if((!t||a(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Bx:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+o,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}}return p}}(e,void 0,[])()}function Ux(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Vx(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}var Hx={}.hasOwnProperty,Wx={};function Yx(e,t){const n=t||Wx,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Xx(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Xx(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Qx,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...Cx,...n.handlers},one:function(e,t){const n=e.type,r=a.handlers[n];if(Hx.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=jx(n);return r.children=a.all(e),r}return jx(e)}return(a.options.unknownHandler||Jx)(a,e,t)},options:n,patch:Gx,wrap:Kx};return Ux(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Gx(e,t){e.position&&(t.position=function(e){const t=eb(e),n=Zy(e);if(t&&n)return{start:t,end:n}}(e))}function Qx(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,jx(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Jx(e,t){const n=t.data||{},r=!("value"in t)||Hx.call(n,"hProperties")||Hx.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Kx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Xx(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zx(e,t){const n=Yx(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||zx,r=e.options.footnoteBackLabel||Lx,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),c=Kb(o.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...jx(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function ew(e,t){return e&&"run"in e?async function(n,r){const i=Zx(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Zx(n,{file:r,...e||t})}}function tw(e){if(e)throw e}var nw=/* @__PURE__ */F((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function rw(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var iw=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');cw(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},aw=function(e){if(cw(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},ow=function(e){cw(e);let t,n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=n+1;break}}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},sw=function(...e){let t,n=-1;for(;++n<e.length;)cw(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){cw(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},lw="/";function cw(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var uw=function(){return"/"};function dw(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var pw=["history","path","basename","stem","extname","dirname"],fw=class{constructor(e){let t;t=e?dw(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":uw(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pw.length;){const e=pw[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pw.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?iw(this.path):void 0}set basename(e){mw(e,"basename"),hw(e,"basename"),this.path=sw(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?aw(this.path):void 0}set dirname(e){gw(this.basename,"dirname"),this.path=sw(e||"",this.basename)}get extname(){return"string"==typeof this.path?ow(this.path):void 0}set extname(e){if(hw(e,"extname"),gw(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sw(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){dw(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!dw(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),mw(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?iw(this.path,this.extname):void 0}set stem(e){mw(e,"stem"),hw(e,"stem"),this.path=sw(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ob(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function hw(e,t){if(e&&e.includes(lw))throw new Error("`"+t+"` cannot be a path: did not expect `"+lw+"`")}function mw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var yw=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bw=/* @__PURE__ */q(nw(),1),vw={}.hasOwnProperty,xw=(new class e extends yw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(a,...o){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==o[l]&&void 0!==o[l]||(o[l]=t[l]);t=o,s?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(r);try{s=e.apply(this,t)}catch(a){if(o&&n)throw a;return r(a)}o||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...o):r(null,...o)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,bw.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(Sw("data",this.frozen),this.namespace[e]=t,this):vw.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Sw("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Cw(e),n=this.parser||this.Parser;return ww("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ww("process",this.parser||this.Parser),kw("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=Cw(e),o=n.parse(a);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);const i=t,a=n.stringify(i,r);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ww("processSync",this.parser||this.Parser),kw("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tw(e),t=r}),Nw("processSync","process",n),t}run(e,t,n){Tw(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const o=Cw(t);r.run(e,o,function(t,r,o){const s=r||e;t?a(t):i?i(s):n(void 0,s,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tw(e),n=t,r=!0}),Nw("runSync","run",r),n}stringify(e,t){this.freeze();const n=Cw(t),r=this.compiler||this.Compiler;return kw("stringify",r),Tw(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Sw("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,bw.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const o=n[i][1];rw(o)&&rw(r)&&(r=(0,bw.default)(!0,o,r)),n[i]=[e,r,...a]}}}}).freeze();function ww(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function kw(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sw(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tw(e){if(!rw(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Nw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cw(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fw(e)}var Ew=[],_w={allowDangerousHtml:!0},Ow=/^(https?|ircs?|mailto|xmpp)$/i,Aw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Iw(e){const t=function(e){const t=e.rehypePlugins||Ew,n=e.remarkPlugins||Ew,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._w}:_w;return xw().use(wx).use(n).use(ew,r).use(t)}(e),n=function(e){const t=e.children||"",n=new fw;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Dw;for(const c of Aw)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return Ux(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in kb)if(Object.hasOwn(kb,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=kb[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,a){const o=Array.isArray(i.children),s=eb(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,a){const o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Yy:Wy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=fb(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}(e,{Fragment:_,components:i,ignoreInvalidStyle:!0,jsx:O,jsxs:A,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function Dw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||Ow.test(e.slice(0,t))?e:""}function Pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mw(e){return function(e){if(Array.isArray(e))return Pw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pw(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rw(e){return Rw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rw(e)}function jw(e,t,n){return(t=function(e){var t=function(e){if("object"!=Rw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rw(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zw(Object(n),!0).forEach(function(t){jw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fw={};function $w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Fw[r]||(Fw[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Fw[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Lw(Lw({},e),n[t])},t)}function qw(e){return e.join(" ")}function Bw(e){var n=e.node,r=e.stylesheet,i=e.style,a=void 0===i?{}:i,o=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return Bw({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,o);if(o){var h=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&m.concat(l.className.filter(function(e){return!h.includes(e)}));p=Lw(Lw({},l),{},{className:qw(g)||void 0,style:$w(l.className,Object.assign({},l.style,a),r)})}else p=Lw(Lw({},l),{},{className:qw(l.className)});var y=f(n.children);/* @__PURE__ */
323
+ /* @__PURE__ */r=n}else r=uy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return lb.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);vb(e)}function vb(e,t){const n=new ob("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url="https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater",n}function xb(e){let t=e.replace(ub,wb);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function wb(e){return"-"+e.toLowerCase()}var kb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Sb={};function Tb(e,t){const n=t||Sb;return Nb(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function Nb(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cb(e.children,t,n)}return Array.isArray(e)?Cb(e,t,n):""}function Cb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nb(e[i],t,n);return r.join("")}var Eb={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},_b={}.hasOwnProperty;function Ob(e){return!!_b.call(Eb,e)&&Eb[e]}function Ab(e,t,n,r){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ib(e,t){return e.length>0?(Ab(e,e.length,0,t),e):t}var Db={}.hasOwnProperty;function Pb(e){const t={};let n=-1;for(;++n<e.length;)Mb(t,e[n]);return t}function Mb(e,t){let n;for(n in t){const r=(Db.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Db.call(r,a)||(r[a]=[]);const e=i[a];Rb(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Rb(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Ab(e,0,0,r)}function jb(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function zb(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Lb=Jb(/[A-Za-z]/),Fb=Jb(/[\dA-Za-z]/),$b=Jb(/[#-'*+\--9=?A-Z^-~]/);function qb(e){return null!==e&&(e<32||127===e)}var Bb=Jb(/\d/),Vb=Jb(/[\dA-Fa-f]/),Ub=Jb(/[!-/:-@[-`{-~]/);function Hb(e){return null!==e&&e<-2}function Wb(e){return null!==e&&(e<0||32===e)}function Yb(e){return-2===e||-1===e||32===e}var Gb=Jb(/\p{P}|\p{S}/u),Qb=Jb(/\s/);function Jb(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Kb(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(37===a&&Fb(e.charCodeAt(n+1))&&Fb(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xb(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){return Yb(r)?(e.enter(n),o(r)):t(r)};function o(r){return Yb(r)&&a++<i?(e.consume(r),o):(e.exit(n),t(r))}}var Zb={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xb(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Hb(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},ev={tokenize:function(e){const t=this,n=[];let r,i,a,o=0;return s;function s(r){if(o<n.length){const i=n[o];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}y(o);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;return Ab(t.events,a+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(i){if(o===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return h(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tv,u,d)(i)}function u(e){return r&&b(),y(o),p(e)}function d(e){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(tv,f,h)(n)}function f(e){return o++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Hb(n)?(e.consume(n),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(o),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Ab(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},tv={tokenize:function(e,t,n){return Xb(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function nv(e){return null===e||Wb(e)||Qb(e)?1:Gb(e)?2:void 0}function rv(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var iv={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};av(d,-s),av(p,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},i={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[u][1].start={...o.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ib(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ib(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Ib(l,rv(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ib(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ib(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Ab(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nv(r);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const l=e.exit("attentionSequence"),c=nv(s),u=!c||2===c&&i||n.includes(s),d=!i||2===i&&c||n.includes(r);return l._open=Boolean(42===a?u:u&&(i||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function av(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ov={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Lb(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||Fb(e)?(r=1,o(e)):l(e)}function o(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Fb(t))&&r++<32?(e.consume(t),o):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||qb(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):$b(t)?(e.consume(t),l):n(t)}function c(e){return Fb(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Fb(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},sv={partial:!0,tokenize:function(e,t,n){return function(t){return Yb(t)?Xb(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Hb(e)?t(e):n(e)}}},lv={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Yb(t)?Xb(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(lv,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Yb(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},cv={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ub(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},uv={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Fb,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Vb,c):(e.enter("characterReferenceValue"),i=7,a=Bb,c(t))}function c(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==Fb||Ob(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&o++<i?(e.consume(s),c):n(s)}}},dv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},pv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),Yb(t)?Xb(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Yb(t)?Xb(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Hb(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,o=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return o=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Yb(t)?Xb(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Hb(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(dv,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Hb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Yb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xb(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Hb(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Hb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(i,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return o>0&&Yb(t)?Xb(e,g,"linePrefix",o+1)(t):g(t)}function g(t){return null===t||Hb(t)?e.check(dv,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Hb(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},fv={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Xb(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):Hb(t)?e.attempt(hv,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Hb(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(n){return e.exit("codeIndented"),t(n)}}},hv={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Xb(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Hb(e)?i(e):n(e)}}},mv={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Hb(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},gv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yv(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yv(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yv(this.left,t.reverse())}}};function yv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function bv(e){const t={};let n,r,i,a,o,s,l,c=-1;const u=new gv(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,vv(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(a=u.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},o=u.slice(r,c),o.unshift(n),u.splice(r,c-r+1,o))}}return Ab(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function vv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}var xv={resolve:function(e){return bv(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Hb(t)?e.check(wv,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},wv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xb(e,i,"linePrefix")};function i(i){if(null===i||Hb(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function kv(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d):null===t||32===t||41===t||qb(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Hb(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return u||null!==i&&41!==i&&!Wb(i)?u<c&&40===i?(e.consume(i),u++,h):41===i?(e.consume(i),u--,h):null===i||32===i||40===i||qb(i)?n(i):(e.consume(i),92===i?m:h):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sv(e,t,n,r,i,a){const o=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Hb(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Hb(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Yb(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Tv(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xb(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||Hb(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function Nv(e,t){let n;return function r(i){return Hb(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Yb(i)?Xb(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Cv={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return Sv.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=zb(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return Wb(t)?Nv(e,s)(t):s(t)}function s(t){return kv(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ev,c,c)(t)}function c(t){return Yb(t)?Xb(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Hb(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},Ev={partial:!0,tokenize:function(e,t,n){return function(t){return Wb(t)?Nv(e,r)(t):n(t)};function r(t){return Tv(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Yb(t)?Xb(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Hb(e)?t(e):n(e)}}},_v={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Hb(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},Ov={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Ab(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Wb(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),o(n)):null===n||Hb(n)?(e.exit("atxHeading"),t(n)):Yb(n)?Xb(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||Wb(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}},Av=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Iv=["pre","script","style","textarea"],Dv={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,a,o,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),i=3,r.interrupt?t:M):Lb(s)?(e.consume(s),o=String.fromCharCode(s),h):n(s)}function u(a){return 45===a?(e.consume(a),i=2,d):91===a?(e.consume(a),i=5,s=0,p):Lb(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:M):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:C:p):n(i)}function f(t){return Lb(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Wb(s)){const l=47===s,c=o.toLowerCase();return l||a||!Iv.includes(c)?Av.includes(o.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):C(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?g(s):y(s)):(i=1,r.interrupt?t(s):C(s))}return 45===s||Fb(s)?(e.consume(s),o+=String.fromCharCode(s),h):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function g(t){return Yb(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||Lb(t)?(e.consume(t),b):Yb(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||Fb(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),x):Yb(t)?(e.consume(t),v):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Yb(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||Hb(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wb(t)?v(t):(e.consume(t),k)}function S(e){return 47===e||62===e||Yb(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return null===t||Hb(t)?C(t):Yb(t)?(e.consume(t),N):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),A):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),R):63===t&&3===i?(e.consume(t),M):93===t&&5===i?(e.consume(t),P):!Hb(t)||6!==i&&7!==i?null===t||Hb(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Pv,j,E)(t))}function E(t){return e.check(Mv,_,j)(t)}function _(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return null===t||Hb(t)?E(t):(e.enter("htmlFlowData"),C(t))}function A(t){return 45===t?(e.consume(t),M):C(t)}function I(t){return 47===t?(e.consume(t),o="",D):C(t)}function D(t){if(62===t){const n=o.toLowerCase();return Iv.includes(n)?(e.consume(t),R):C(t)}return Lb(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):C(t)}function P(t){return 93===t?(e.consume(t),M):C(t)}function M(t){return 62===t?(e.consume(t),R):45===t&&2===i?(e.consume(t),M):C(t)}function R(t){return null===t||Hb(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),R)}function j(n){return e.exit("htmlFlow"),t(n)}}},Pv={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(sv,t,n)}}},Mv={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Hb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Rv={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),b):Lb(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Lb(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Hb(t)?(o=u,D(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?I(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(a++)?(e.consume(t),6===a?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Hb(t)?(o=h,D(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?I(t):Hb(t)?(o=y,D(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Hb(t)?(o=b,D(t)):(e.consume(t),b)}function v(e){return 62===e?I(e):b(e)}function x(t){return Lb(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Fb(t)?(e.consume(t),w):k(t)}function k(t){return Hb(t)?(o=k,D(t)):Yb(t)?(e.consume(t),k):I(t)}function S(t){return 45===t||Fb(t)?(e.consume(t),S):47===t||62===t||Wb(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),I):58===t||95===t||Lb(t)?(e.consume(t),N):Hb(t)?(o=T,D(t)):Yb(t)?(e.consume(t),T):I(t)}function N(t){return 45===t||46===t||58===t||95===t||Fb(t)?(e.consume(t),N):C(t)}function C(t){return 61===t?(e.consume(t),E):Hb(t)?(o=C,D(t)):Yb(t)?(e.consume(t),C):T(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,_):Hb(t)?(o=E,D(t)):Yb(t)?(e.consume(t),E):(e.consume(t),O)}function _(t){return t===i?(e.consume(t),i=void 0,A):null===t?n(t):Hb(t)?(o=_,D(t)):(e.consume(t),_)}function O(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wb(t)?T(t):(e.consume(t),O)}function A(e){return 47===e||62===e||Wb(e)?T(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Yb(t)?Xb(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),o(t)}}},jv={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&Ab(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a,o=e.length,s=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=o);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Ib(a,e.slice(r+1,r+s+3)),a=Ib(a,[["enter",u,t]]),a=Ib(a,rv(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),a=Ib(a,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),a=Ib(a,e.slice(i+1)),a=Ib(a,[["exit",l,t]]),Ab(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let i,a,o=r.events.length;for(;o--;)if(("labelImage"===r.events[o][1].type||"labelLink"===r.events[o][1].type)&&!r.events[o][1]._balanced){i=r.events[o][1];break}return function(t){return i?i._inactive?u(t):(a=r.parser.defined.includes(zb(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(zv,c,a?c:u)(t):91===t?e.attempt(Lv,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(Fv,c,u)(t)}function c(e){return t(e)}function u(e){return i._balanced=!0,n(e)}}},zv={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wb(t)?Nv(e,i)(t):i(t)}function i(t){return 41===t?c(t):kv(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Wb(t)?Nv(e,s)(t):c(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?Tv(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Wb(t)?Nv(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Lv={tokenize:function(e,t,n){const r=this;return function(t){return Sv.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(zb(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Fv={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},$v={name:"labelStartImage",resolveAll:jv.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},qv={name:"labelStartLink",resolveAll:jv.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},Bv={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xb(e,t,"linePrefix")}}},Vv={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Hb(a))?(e.exit("thematicBreak"),t(a)):n(a)}function o(t){return t===r?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),Yb(t)?Xb(e,a,"whitespace")(t):a(t))}}},Uv={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sv,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xb(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Yb(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wv,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xb(e,e.attempt(Uv,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Bb(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vv,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Bb(t)&&++o<10?(e.consume(t),s):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(sv,r.interrupt?n:c,e.attempt(Hv,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return Yb(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Hv={partial:!0,tokenize:function(e,t,n){const r=this;return Xb(e,function(e){const i=r.events[r.events.length-1];return!Yb(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Wv={partial:!0,tokenize:function(e,t,n){const r=this;return Xb(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},Yv={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let o,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){o="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!o?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t))};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Yb(t)?Xb(e,o,"lineSuffix")(t):o(t))}function o(r){return null===r||Hb(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Gv={tokenize:function(e){const t=this,n=e.attempt(sv,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,Xb(e,e.attempt(this.parser.constructs.flow,r,e.attempt(xv,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Qv={resolveAll:Zv()},Jv=Xv("string"),Kv=Xv("text");function Xv(e){return{resolveAll:Zv("text"===e?ex:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Zv(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function ex(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let a,o=i.length,s=-1,l=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)a=!0,l++;else if(-1!==e){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const i={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}var tx=/* @__PURE__ */q({attentionMarkers:()=>cx,contentInitial:()=>rx,disable:()=>ux,document:()=>nx,flow:()=>ax,flowInitial:()=>ix,insideSpan:()=>lx,string:()=>ox,text:()=>sx}),nx={42:Uv,43:Uv,45:Uv,48:Uv,49:Uv,50:Uv,51:Uv,52:Uv,53:Uv,54:Uv,55:Uv,56:Uv,57:Uv,62:lv},rx={91:Cv},ix={[-2]:fv,[-1]:fv,32:fv},ax={35:Ov,42:Vv,45:[Yv,Vv],60:Dv,61:Yv,95:Vv,96:pv,126:pv},ox={38:uv,92:cv},sx={[-5]:Bv,[-4]:Bv,[-3]:Bv,33:$v,38:uv,42:iv,60:[ov,Rv],91:qv,92:[_v,cv],93:jv,95:iv,96:mv},lx={null:[iv,Qv]},cx={null:[42,95]},ux={null:[]};function dx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(h),consume:function(e){Hb(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,r.push(o)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return o=Ib(o,e),function(){let e;for(;r._index<o.length;){const t=o[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==o[o.length-1]?[]:(g(t,0),c.events=rv(a,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function f(e){u=u(e)}function h(e,t){t.restore()}function m(e,t){return function(n,i,a){let o,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return o=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){return f=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=a,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,f),i}function b(e){return f.restore(),++u<o.length?m(o[u]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ab(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var px=/[\0\t\n\r]/g,fx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hx(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return jb(n.slice(t?2:1),t?16:10)}return Ob(n)||e}var mx={}.hasOwnProperty;function gx(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(b),autolinkProtocol:u,autolinkEmail:u,atxHeading:i(m),blockQuote:i(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:i(h),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(h,a),codeText:i(function(){return{type:"inlineCode",value:""}},a),codeTextData:u,data:u,codeFlowValue:u,definition:i(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:i(g),hardBreakTrailing:i(g),htmlFlow:i(y,a),htmlFlowData:u,htmlText:i(y,a),htmlTextData:u,image:i(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:i(b),listItem:i(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:i(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:i(v),paragraph:i(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(m),strong:i(function(){return{type:"strong",children:[]}}),thematicBreak:i(function(){return{type:"thematicBreak"}})},exit:{atxHeading:s(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:s(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=jb(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Ob(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=yx(e.end)},codeFenced:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:s(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zb(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(p),hardBreakTrailing:s(p),htmlFlow:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:s(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:s(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(fx,hx)}(t),n.identifier=zb(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=yx(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),d.call(this,e))},link:s(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zb(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:s(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:s(),thematicBreak:s()}};bx(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let i={type:"root",children:[]};const s={stack:[i],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:c,data:n},u=[];let d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?u.push(d):d=r(e,u.pop(),d));for(d=-1;++d<e.length;){const n=t[e[d][0]];mx.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},s),e[d][1])}if(s.tokenStack.length>0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||xx).call(s,void 0,e[0])}for(i.position={start:yx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:yx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)i=t.transforms[d](i)||i;return i};function r(e,t,n){let r,i,a,o,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,a=void 0,o=!0}}}return e[t][1]._spread=c,n}function i(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:yx(t.start),end:void 0}}function s(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+nb({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||xx).call(this,e,r[0])),n.position.end=yx(e.end)}function c(){return Tb(this.stack.pop())}function u(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:yx(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=yx(e.end)}function p(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function h(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function y(){return{type:"html",value:""}}function b(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!bv(e););return e}(function(e){const t={constructs:Pb([tx,...(e||{}).extensions||[]]),content:n(Zb),defined:[],document:n(ev),flow:n(Gv),lazy:{},string:n(Jv),text:n(Kv)};return t;function n(e){return function(n){return dx(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,o){const s=[];let l,c,u,d,p;for(i=n+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,n="",r&&(65279===i.charCodeAt(0)&&u++,r=void 0);u<i.length;){if(px.lastIndex=u,l=px.exec(i),d=l&&void 0!==l.index?l.index:i.length,p=i.charCodeAt(d),!l){n=i.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(i.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return o&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function yx(e){return{line:e.line,column:e.column,offset:e.offset}}function bx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bx(e,r):vx(e,r)}}function vx(e,t){let n;for(n in t)if(mx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+nb({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nb({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+nb({start:t.start,end:t.end})+") is still open")}function wx(e){const t=this;t.parser=function(n){return gx(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function kx(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function Sx(e){const t=e.spread;return null==t?e.children.length>1:t}function Tx(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Nx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Nx(t.slice(i),i>0,!1)),a.join("")}function Nx(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var Cx={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Kb(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kx(e,t);const i={src:Kb(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Kb(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kx(e,t);const i={href:Kb(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Kb(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Sx(n[r])}return t}(n):Sx(t),a={},o=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=eb(t.children[1]),o=Zy(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<o;){const n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Tx(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ex,yaml:Ex,definition:Ex,footnoteDefinition:Ex};function Ex(){}var _x="object"==typeof self?self:globalThis,Ox=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{const e=n([],i);for(const t of o)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{const{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of o)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of o)e.add(r(t));return e}case 7:{const{name:e,message:t}=o;return n(new _x[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new _x[a](o),i)};return r})(/* @__PURE__ */new Map,e)(0),Ax="",{toString:Ix}={},{keys:Dx}=Object,Px=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ix.call(e).slice(8,-1);switch(n){case"Array":return[1,Ax];case"Object":return[2,Ax];case"Date":return[3,Ax];case"RegExp":return[4,Ax];case"Map":return[5,Ax];case"Set":return[6,Ax];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Mx=([e,t])=>0===e&&("function"===t||"symbol"===t),Rx=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Px(r);switch(o){case 0:{let t=r;switch(s){case"bigint":o=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),i([s,[...e]],r)}const e=[],t=i([o,e],r);for(const n of r)e.push(a(n));return t}case 2:{if(s)switch(s){case"BigInt":return i([s,r.toString()],r);case"Boolean":case"Number":case"String":return i([s,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],l=i([o,n],r);for(const t of Dx(r))!e&&Mx(Px(r[t]))||n.push([a(t),a(r[t])]);return l}case 3:return i([o,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{const t=[],n=i([o,t],r);for(const[i,o]of r)(e||!Mx(Px(i))&&!Mx(Px(o)))&&t.push([a(i),a(o)]);return n}case 6:{const t=[],n=i([o,t],r);for(const i of r)!e&&Mx(Px(i))||t.push(a(i));return n}}const{message:l}=r;return i([o,{name:s,message:l}],r)};return a})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},jx="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Ox(Rx(e,t)):structuredClone(e):(e,t)=>Ox(Rx(e,t));function zx(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Lx(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var Fx=function(e){if(null==e)return qx;if("function"==typeof e)return $x(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fx(e[n]);return $x(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return $x(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return function(e){return $x(function(t){return t&&t.type===e})}(e);throw new Error("Expected function, string, or object as test")};function $x(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function qx(){return!0}var Bx=[];function Vx(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const a=Fx(i),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Bx;if((!t||a(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Bx:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+o,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}}return p}}(e,void 0,[])()}function Ux(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Vx(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}var Hx={}.hasOwnProperty,Wx={};function Yx(e,t){const n=t||Wx,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Xx(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Xx(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Qx,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...Cx,...n.handlers},one:function(e,t){const n=e.type,r=a.handlers[n];if(Hx.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=jx(n);return r.children=a.all(e),r}return jx(e)}return(a.options.unknownHandler||Jx)(a,e,t)},options:n,patch:Gx,wrap:Kx};return Ux(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Gx(e,t){e.position&&(t.position=function(e){const t=eb(e),n=Zy(e);if(t&&n)return{start:t,end:n}}(e))}function Qx(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,jx(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Jx(e,t){const n=t.data||{},r=!("value"in t)||Hx.call(n,"hProperties")||Hx.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Kx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Xx(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zx(e,t){const n=Yx(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||zx,r=e.options.footnoteBackLabel||Lx,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),c=Kb(o.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...jx(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function ew(e,t){return e&&"run"in e?async function(n,r){const i=Zx(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Zx(n,{file:r,...e||t})}}function tw(e){if(e)throw e}var nw=/* @__PURE__ */$((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function rw(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var iw=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');cw(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},aw=function(e){if(cw(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},ow=function(e){cw(e);let t,n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=n+1;break}}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},sw=function(...e){let t,n=-1;for(;++n<e.length;)cw(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){cw(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},lw="/";function cw(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var uw=function(){return"/"};function dw(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var pw=["history","path","basename","stem","extname","dirname"],fw=class{constructor(e){let t;t=e?dw(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":uw(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pw.length;){const e=pw[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pw.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?iw(this.path):void 0}set basename(e){mw(e,"basename"),hw(e,"basename"),this.path=sw(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?aw(this.path):void 0}set dirname(e){gw(this.basename,"dirname"),this.path=sw(e||"",this.basename)}get extname(){return"string"==typeof this.path?ow(this.path):void 0}set extname(e){if(hw(e,"extname"),gw(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sw(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){dw(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!dw(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),mw(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?iw(this.path,this.extname):void 0}set stem(e){mw(e,"stem"),hw(e,"stem"),this.path=sw(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ob(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function hw(e,t){if(e&&e.includes(lw))throw new Error("`"+t+"` cannot be a path: did not expect `"+lw+"`")}function mw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var yw=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bw=/* @__PURE__ */B(nw(),1),vw={}.hasOwnProperty,xw=(new class e extends yw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(a,...o){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==o[l]&&void 0!==o[l]||(o[l]=t[l]);t=o,s?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(r);try{s=e.apply(this,t)}catch(a){if(o&&n)throw a;return r(a)}o||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...o):r(null,...o)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,bw.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(Sw("data",this.frozen),this.namespace[e]=t,this):vw.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Sw("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Cw(e),n=this.parser||this.Parser;return ww("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ww("process",this.parser||this.Parser),kw("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=Cw(e),o=n.parse(a);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);const i=t,a=n.stringify(i,r);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ww("processSync",this.parser||this.Parser),kw("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tw(e),t=r}),Nw("processSync","process",n),t}run(e,t,n){Tw(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const o=Cw(t);r.run(e,o,function(t,r,o){const s=r||e;t?a(t):i?i(s):n(void 0,s,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tw(e),n=t,r=!0}),Nw("runSync","run",r),n}stringify(e,t){this.freeze();const n=Cw(t),r=this.compiler||this.Compiler;return kw("stringify",r),Tw(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Sw("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,bw.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const o=n[i][1];rw(o)&&rw(r)&&(r=(0,bw.default)(!0,o,r)),n[i]=[e,r,...a]}}}}).freeze();function ww(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function kw(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sw(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tw(e){if(!rw(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Nw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cw(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fw(e)}var Ew=[],_w={allowDangerousHtml:!0},Ow=/^(https?|ircs?|mailto|xmpp)$/i,Aw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Iw(e){const t=function(e){const t=e.rehypePlugins||Ew,n=e.remarkPlugins||Ew,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._w}:_w;return xw().use(wx).use(n).use(ew,r).use(t)}(e),n=function(e){const t=e.children||"",n=new fw;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Dw;for(const c of Aw)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return Ux(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in kb)if(Object.hasOwn(kb,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=kb[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,a){const o=Array.isArray(i.children),s=eb(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,a){const o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Yy:Wy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=fb(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}(e,{Fragment:_,components:i,ignoreInvalidStyle:!0,jsx:O,jsxs:A,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function Dw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||Ow.test(e.slice(0,t))?e:""}function Pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mw(e){return function(e){if(Array.isArray(e))return Pw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pw(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rw(e){return Rw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rw(e)}function jw(e,t,n){return(t=function(e){var t=function(e){if("object"!=Rw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rw(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zw(Object(n),!0).forEach(function(t){jw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fw={};function $w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Fw[r]||(Fw[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Fw[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Lw(Lw({},e),n[t])},t)}function qw(e){return e.join(" ")}function Bw(e){var n=e.node,r=e.stylesheet,i=e.style,a=void 0===i?{}:i,o=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return Bw({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,o);if(o){var h=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&m.concat(l.className.filter(function(e){return!h.includes(e)}));p=Lw(Lw({},l),{},{className:qw(g)||void 0,style:$w(l.className,Object.assign({},l.style,a),r)})}else p=Lw(Lw({},l),{},{className:qw(l.className)});var y=f(n.children);/* @__PURE__ */
324
324
  return t.createElement(u,Tg({key:s},p),y)}}var Vw=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Uw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uw(Object(n),!0).forEach(function(t){jw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ww=/\n/g;function Yw(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,a=void 0===i?{float:"left",paddingRight:"10px"}:i,o=e.numberStyle,s=void 0===o?{}:o,l=e.startingLineNumber;/* @__PURE__ */
325
325
  return t.createElement("code",{style:Object.assign({},r,a)},function(e){var n=e.startingLineNumber,r=e.style;return e.lines.map(function(e,i){var a=i+n;/* @__PURE__ */
326
326
  return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(a):r},"".concat(a,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Gw(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Qw(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return Hw(Hw({},i),a)}function Jw(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?Hw({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(Mw(f.className.trim().split(/\s+/)),Mw(c)):c,n&&a){var h=Qw(r,n,i);t.unshift(Gw(n,h))}return d&u&&(f.style=Hw({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function Kw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(Jw({children:[i],className:Mw(new Set(t))}));else if(i.children){var a,o=t.concat((null===(a=i.properties)||void 0===a?void 0:a.className)||[]);Kw(i.children,o).forEach(function(e){return n.push(e)})}}return n}function Xw(e,t,n,r,i,a,o,s,l){var c,u=Kw(e.value),d=[],p=-1,f=0;function h(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,a){return Jw({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,a,c):function(e,t){if(r&&t&&i){var n=Qw(s,t,o);e.unshift(Gw(t,n))}return e}(e,a)}for(var m=function(){var e=u[f],t=e.children[0].value;if(t.match(Ww)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=h(u.slice(p+1,f).concat(Jw({children:[s],className:e.properties.className})),o);d.push(l)}else if(i===n.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var g=Jw({children:[m],className:e.properties.className});u.splice(f+1,0,g)}else{var y=h([m],o,e.properties.className);d.push(y)}}else{var b=h([s],o,e.properties.className);d.push(b)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var g=u.slice(p+1,u.length);if(g&&g.length){var y=h(g,r&&d.length+a);d.push(y)}}return t?d:(c=[]).concat.apply(c,d)}function Zw(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return Bw({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function ek(e){return e&&void 0!==e.highlightAuto}var tk=/[#.]/g;function nk(e,t,n){const r=n?function(e){const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...a){let o;if(null==n){o={type:"root",children:[]};const e=i;a.unshift(e)}else{o=function(e,t){const n=e||"",r={};let i,a,o=0;for(;o<n.length;){tk.lastIndex=o;const e=tk.exec(n),t=n.slice(o,e?e.index:n.length);t&&(i?"#"===i?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:a=t,o+=t.length),e&&(i=e[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}(n,t);const s=o.tagName.toLowerCase(),l=r?r.get(s):void 0;if(o.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!(!("children"in e)||!Array.isArray(e.children))}(i))a.unshift(i);else for(const[t,n]of Object.entries(i))rk(e,o.properties,t,n)}for(const e of a)ik(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function rk(e,t,n,r){const i=Vy(e,n);let a;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;a=r}else a="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?Gy(r):i.commaSeparated?oy(r):i.commaOrSpaceSeparated?Gy(oy(r).join(" ")):ak(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(a)){const e=[];for(const t of a)e.push(ak(i,i.property,t));a=e}"className"===i.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function ik(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ik(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?ik(e,t.children):e.push(t)}}function ak(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||my(n)===my(t)))return!0}return n}var ok=nk(Wy,"div"),sk=(nk(Yy,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]),lk={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function ck(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function uk(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function dk(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||ck(e)}var pk=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function fk(e,t){const n=t||{},r="string"==typeof n.additional?n.additional.charCodeAt(0):n.additional,i=[];let a,o,s=0,l=-1,c="";n.position&&("start"in n.position||"indent"in n.position?(o=n.position.indent,a=n.position.start):a=n.position);let u,d=(a?a.line:0)||1,p=(a?a.column:0)||1,f=h();for(s--;++s<=e.length;)if(10===u&&(p=(o?o[l]:0)||1),u=e.charCodeAt(s),38===u){const t=e.charCodeAt(s+1);if(9===t||10===t||12===t||32===t||38===t||60===t||Number.isNaN(t)||r&&t===r){c+=String.fromCharCode(u),p++;continue}const a=s+1;let o,l=a,d=a;if(35===t){d=++l;const t=e.charCodeAt(d);88===t||120===t?(o="hexadecimal",d=++l):o="decimal"}else o="named";let y="",b="",v="";const x="named"===o?dk:"decimal"===o?ck:uk;for(d--;++d<=e.length;){const t=e.charCodeAt(d);if(!x(t))break;v+=String.fromCharCode(t),"named"===o&&sk.includes(v)&&(y=v,b=Ob(v))}let w=59===e.charCodeAt(d);if(w){d++;const e="named"===o&&Ob(v);e&&(y=v,b=e)}let k=1+d-a,S="";if(w||!1!==n.nonTerminated)if(v)if("named"===o){if(w&&!b)m(5,1);else if(y!==v&&(d=l+y.length,k=1+d-l,w=!1),!w){const t=y?1:3;if(n.attribute){const n=e.charCodeAt(d);61===n?(m(t,k),b=""):dk(n)?b="":m(t,k)}else m(t,k)}S=b}else{w||m(2,k);let e=Number.parseInt(v,"hexadecimal"===o?16:10);if(hk(e))m(7,k),S=String.fromCharCode(65533);else if(e in lk)m(6,k),S=lk[e];else{let t="";mk(e)&&m(6,k),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==o&&m(4,k);if(S){g(),f=h(),s=d-1,p+=d-a+1,i.push(S);const t=h();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,S,{start:f,end:t},e.slice(a-1,d)),f=t}else v=e.slice(a-1,d),c+=v,p+=v.length,s=d-1}else 10===u&&(d++,l++,p=0),Number.isNaN(u)?g():(c+=String.fromCharCode(u),p++);return i.join("");function h(){return{line:d,column:p,offset:s+((a?a.offset:0)||0)}}function m(e,t){let r;n.warning&&(r=h(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,pk[e],r,e))}function g(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:f,end:h()}),c="")}}function hk(e){return e>=55296&&e<=57343||e>1114111}function mk(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var gk=0,yk={},bk={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++gk}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},bk.util.type(t)){case"Object":if(i=bk.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=bk.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:yk,plaintext:yk,text:yk,txt:yk,extend:function(e,t){var n=bk.util.clone(bk.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||bk.languages)[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var l=r[e];return r[e]=a,bk.languages.DFS(bk.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=bk.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],l=bk.util.type(s);"Object"!==l||i[a(s)]?"Array"!==l||i[a(s)]||(i[a(s)]=!0,e(s,n,o,i)):(i[a(s)]=!0,e(s,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(bk.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=bk.tokenize(r.code,r.grammar),bk.hooks.run("after-tokenize",r),vk.stringify(bk.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new kk;return Sk(i,i.head,e),wk(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=bk.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=bk.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:vk};function vk(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function xk(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function wk(e,t,n,r,i,a){for(var o in n)if(n.hasOwnProperty(o)&&n[o]){var s=n[o];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(a&&a.cause==o+","+l)return;var c=s[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,f=c.alias;if(p&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}for(var m=c.pattern||c,g=r.next,y=i;g!==t.tail&&!(a&&y>=a.reach);y+=g.value.length,g=g.next){var b=g.value;if(t.length>e.length)return;if(!(b instanceof vk)){var v,x=1;if(p){if(!(v=xk(m,y,e,d))||v.index>=e.length)break;var w=v.index,k=v.index+v[0].length,S=y;for(S+=g.value.length;w>=S;)S+=(g=g.next).value.length;if(y=S-=g.value.length,g.value instanceof vk)continue;for(var T=g;T!==t.tail&&(S<k||"string"==typeof T.value);T=T.next)x++,S+=T.value.length;x--,b=e.slice(y,S),v.index-=y}else if(!(v=xk(m,0,b,d)))continue;w=v.index;var N=v[0],C=b.slice(0,w),E=b.slice(w+N.length),_=y+b.length;a&&_>a.reach&&(a.reach=_);var O=g.prev;if(C&&(O=Sk(t,O,C),y+=C.length),Tk(t,O,x),g=Sk(t,O,new vk(o,u?bk.tokenize(N,u):N,f,N)),E&&Sk(t,g,E),x>1){var A={cause:o+","+l,reach:_};wk(e,t,n,g.prev,y,A),a&&A.reach>a.reach&&(a.reach=A.reach)}}}}}}function kk(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function Sk(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function Tk(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}var Nk=bk;function Ck(){}Ck.prototype=Nk;var Ek=new Ck;Ek.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Object.hasOwn(Ek.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=Ek.languages[r]}return{type:"root",children:Nk.highlight.call(Ek,e,n,r)}},Ek.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(Ek.languages,e.displayName)||e(Ek)},Ek.alias=function(e,t){const n=Ek.languages;let r,i={};for(r in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,r)){const e=i[r],t="string"==typeof e?[e]:e;let a=-1;for(;++a<t.length;)n[t[a]]=n[r]}},Ek.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(Ek.languages,e)},Ek.listLanguages=function(){const e=Ek.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&"object"==typeof e[n]&&t.push(n);return t},Ek.util.encode=function(e){return e},Ek.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}const r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),Ek.hooks.run("wrap",r),ok(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=fk(e[t]));return e}(r.attributes),r.content)};var _k,Ok,Ak=(_k=Ek,Ok={},function(e){var n,r,i=e.language,a=e.children,o=e.style,s=void 0===o?Ok:o,l=e.customStyle,c=void 0===l?{}:l,u=e.codeTagProps,d=void 0===u?{className:i?"language-".concat(i):void 0,style:Hw(Hw({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:u,p=e.useInlineStyles,f=void 0===p||p,h=e.showLineNumbers,m=void 0!==h&&h,g=e.showInlineLineNumbers,y=void 0===g||g,b=e.startingLineNumber,v=void 0===b?1:b,x=e.lineNumberContainerStyle,w=e.lineNumberStyle,k=void 0===w?{}:w,S=e.wrapLines,T=e.wrapLongLines,N=void 0!==T&&T,C=e.lineProps,E=void 0===C?{}:C,_=e.renderer,O=e.PreTag,A=void 0===O?"pre":O,I=e.CodeTag,D=void 0===I?"code":I,P=e.code,M=void 0===P?(Array.isArray(a)?a[0]:a)||"":P,R=e.astGenerator,j=function(e,t){if(null==e)return{};var n,r,i=Ng(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Vw);R=R||_k;var z=m?/* @__PURE__ */t.createElement(Yw,{containerStyle:x,codeStyle:d.style||{},numberStyle:k,startingLineNumber:v,codeString:M}):null,L=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},F=ek(R)?"hljs":"prismjs",$=f?Object.assign({},j,{style:Object.assign({},L,c)}):Object.assign({},j,{className:j.className?"".concat(F," ").concat(j.className):F,style:Object.assign({},c)});if(d.style=Hw(N?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},d.style),!R)/* @__PURE__ */return t.createElement(A,$,z,/* @__PURE__ */t.createElement(D,d,M));(void 0===S&&_||N)&&(S=!0),_=_||Zw;var q=[{type:"text",value:M}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(ek(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(jR){return{value:i}}}({astGenerator:R,language:i,code:M,defaultCodeValue:q});null===B.language&&(B.value=q);var V=Xw(B,S,E,m,y,v,v+(null!==(n=null===(r=M.match(/\n/g))||void 0===r?void 0:r.length)&&void 0!==n?n:0),k,N);/* @__PURE__ */
@@ -356,66 +356,66 @@ return A(kN,{value:x(()=>({addToast:o}),[o]),children:[/* @__PURE__ */O(iC,{cont
356
356
  /* webpackIgnore: true */
357
357
  e)}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&&(c(void 0),d("Component not found"))}},[l]);return g(()=>{m(r)},[r,m]),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__block-jsx",t,{"block-jsx--empty":""===r||!r||!l}),children:[!u&&f&&l&&/* @__PURE__ */O(l.default,{internalProps:p,...f}),u&&/* @__PURE__ */A("div",{children:["JSX Malformed ",u]}),!u&&!f&&/* @__PURE__ */O("div",{children:"Settings Malformed"})]})}),yC=Object.assign(gC,{type:"blockJsx",content:{attributes:{content:'import { useCallback } from "react";\nimport { JsxManager } from "@plitzi/plitzi-sdk";\n\nconst BlockJsx = ({ internalProps, content, content2 }) => {\n const handleClick = useCallback(() => {\n alert("Hello World");\n }, []);\n\n return (\n <div style={{ display: "flex", gap: "4px" }}>\n <JsxManager\n as="Heading"\n internalProps={internalProps}\n content={`${content} ${content2}`}\n />\n <button onClick={handleClick} style={{ border: "1px gray solid", cursor: "pointer" }}>\n Click Me\n </button>\n </div>\n );\n};\n\nexport default BlockJsx;',props:'{"content": "Hello", "content2": "World"}',contentCache:"aW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnOwppbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gInJlYWN0IjsKaW1wb3J0IHsgSnN4TWFuYWdlciB9IGZyb20gIkBwbGl0emkvcGxpdHppLXNkayI7CnZhciBCbG9ja0pzeCA9IGZ1bmN0aW9uIEJsb2NrSnN4KF9yZWYpIHsKICB2YXIgaW50ZXJuYWxQcm9wcyA9IF9yZWYuaW50ZXJuYWxQcm9wcywKICAgIGNvbnRlbnQgPSBfcmVmLmNvbnRlbnQsCiAgICBjb250ZW50MiA9IF9yZWYuY29udGVudDI7CiAgdmFyIGhhbmRsZUNsaWNrID0gdXNlQ2FsbGJhY2soZnVuY3Rpb24gKCkgewogICAgYWxlcnQoIkhlbGxvIFdvcmxkIik7CiAgfSwgW10pOwogIHJldHVybiAvKiNfX1BVUkVfXyovUmVhY3QuY3JlYXRlRWxlbWVudCgiZGl2IiwgewogICAgc3R5bGU6IHsKICAgICAgZGlzcGxheTogImZsZXgiLAogICAgICBnYXA6ICI0cHgiCiAgICB9CiAgfSwgLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoSnN4TWFuYWdlciwgewogICAgYXM6ICJIZWFkaW5nIiwKICAgIGludGVybmFsUHJvcHM6IGludGVybmFsUHJvcHMsCiAgICBjb250ZW50OiAiIi5jb25jYXQoY29udGVudCwgIiAiKS5jb25jYXQoY29udGVudDIpCiAgfSksIC8qI19fUFVSRV9fKi9SZWFjdC5jcmVhdGVFbGVtZW50KCJidXR0b24iLCB7CiAgICBvbkNsaWNrOiBoYW5kbGVDbGljaywKICAgIHN0eWxlOiB7CiAgICAgIGJvcmRlcjogIjFweCBncmF5IHNvbGlkIiwKICAgICAgY3Vyc29yOiAncG9pbnRlcicKICAgIH0KICB9LCAiQ2xpY2sgTWUiKSk7Cn07CmV4cG9ydCBkZWZhdWx0IEJsb2NrSnN4Ow==",allowEmptyRender:!1},definition:{label:"Block JSX",type:"blockJsx",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-code"},defaultStyle:{name:"Block JSX",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),bC=dC(({ref:e,className:t="",renderType:n="",settings:r="{}",isPlugin:i=!1,pluginScope:a="",assets:o="",scriptUrl:s=""})=>{let{id:l,rootId:c}=gh(),{contexts:{PluginsContext:u}}=lr(),{registerCustomAssets:d,unregisterCustomAssets:p}=f(u),{components:h}=f($a),m=x(()=>{if(!r)return{};try{return JSON.parse(r)}catch{}return!1},[r]),y=!1===m,b=x(()=>({id:l,rootId:c,...y?{}:m}),[l,c,y,m]),v=x(()=>o?o.split("\n").filter(e=>!!e&&""!==e.trim()).map(e=>e.endsWith(".js")?{id:e,type:"script",params:{src:e,type:"text/javascript"}}:{id:e,type:"link",params:{href:e,rel:"stylesheet",type:"text/css"}}):[],[o]);if(g(()=>{if(0!==v.length)return d(v),()=>{p(v.map(e=>"script"===e.type?e.params.url:e.params.href))}},[v,d,p]),i&&s&&a&&!y/* @__PURE__ */)return O(Ga,{url:s,scope:a,internalProps:b,autoRegister:!1});let w=h.current[n];return w&&!y?/* @__PURE__ */O(w,{internalProps:b,extraProps:w.extraProps}):/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__custom",t),children:[n&&!y&&/* @__PURE__ */A("span",{children:["Custom Component ",
358
358
  /* @__PURE__ */O("b",{children:n})," Not Found"]}),y&&/* @__PURE__ */O("span",{children:"Settings Malformed"}),!n&&/* @__PURE__ */O("span",{children:"Custom Component"})]})}),vC=Object.assign(bC,{type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,pluginScope:"",assets:"",scriptUrl:""},definition:{label:"Custom",type:"custom",description:"",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),xC=dC(({ref:e,className:t="",subType:n="span",children:r,...i})=>{let a=Qh(i),o=x(()=>Object.fromEntries(Object.entries(a).map(([e,t])=>[e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),t])),[a]);/* @__PURE__ */
359
- return O(Fa,{ref:e,tag:n,className:ae(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...o,children:r})}),wC=Object.assign(xC,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),kC=p(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=f($a),{contexts:{PluginsContext:i}}=lr(),{plugins:a}=f(i);return Qa({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:a})}),SC=s(void 0),TC=e=>!0===e.cascade,NC=({store:e,path:t,value:n,inherit:r,autoSync:i=!0,middlewares:a,children:o})=>{let s=m($r),l=m(SC),c=k(void 0),u="live"===r,d=x(()=>{let e="snapshot"===r&&s?s.getState():{};return"function"==typeof n?n(e):{...e,...n}},[r,s,n]),p=a??[],f=l?[...l,...p]:p,h=x(()=>[...l??[],...p.filter(TC)],[l,a]);c.current||=e??function(e,t){let n,r={},i=new zr,a=new zr,o=new Fr,s=[],l=[],c=t?.parent,u=(e,t,n)=>{if(0===l.length)throw e;let r={error:e,phase:t,path:n};for(let i=0,a=l.length;i<a;i++)l[i](r)},d=()=>r,p=()=>n??={...r},{getState:f,getMergeCount:h}=function(e,t){let n,r,i,a=0;return{getState:()=>{let o=e();if(!t)return o;let s=t.getState();return void 0!==n&&s===r&&o===i||(r=s,i=o,n=dr(s,o),a++),n},getMergeCount:()=>a}}(p,c),m=function(e,t,n){return r=>{if(!t)return mr(e(),r);let i=mr(e(),r);if(void 0===i)return t.getPath(r);let a=t.getPath(r);return void 0!==a&&ur(i)&&ur(a)?mr(n(),r):i}}(d,c,f),{setState:g,batch:y}=Mr({getOwnState:d,getOwnSnapshot:p,setOwnState:e=>{r=e,n=void 0},mutateOwnKey:(e,t)=>{r[e]=t,n=void 0},parent:c,listeners:i,pathListeners:o,changeListeners:a,interceptors:s,reportError:u}),b=e=>(v?.seedBaseline(),a.add(e));r="function"==typeof e?e(g,f):e;let v=c?Rr(c,i,o,a,f,u):void 0,x={getState:f,getPath:m,setState:g,batch:y,subscribe:e=>i.add(e),subscribePath:(e,t)=>o.add(e,t),subscribeChange:b,destroy:()=>{v?.unsubscribe(),v=void 0,i.clear(),o.clear(),a.clear()},reconnect:()=>{c&&!v&&(v=Rr(c,i,o,a,f,u),a.length>0&&v.seedBaseline())}};if(t?.middlewares)for(let w of t.middlewares){let e=w(x);e?.beforeChange&&s.push(e.beforeChange),e?.onChange&&b(e.onChange),e?.onError&&l.push(e.onError)}return x}(()=>d,{parent:u?s:void 0,middlewares:f.length>0?f:void 0}),g(()=>(u&&!e&&c.current?.reconnect?.(),()=>{u&&!e&&c.current?.destroy?.()}),[u,e]);let y=!!n&&i;return Yr(t,t?n:d,{enabled:y&&!!t,store:c.current}),Yr(void 0,d,{enabled:y&&!t,store:c.current}),/* @__PURE__ */O(SC,{value:h.length>0?h:void 0,children:/* @__PURE__ */O($r,{value:c.current,children:o})})},CC=dC(({ref:e,children:t,className:n="",referenceType:r="element",referenceId:i="",referenceContainer:a=""})=>{let{id:o,definition:{rootId:s,styleSelectors:l}}=gh(),{settings:{previewMode:c,environment:u},contexts:{SegmentsContext:d}}=lr(),{useStore:p}=Gr(),[[m,y]]=p(["schema","segments"]),{segmentGet:b}=f(d),v=k(m);v.current=m;let w=k(y);w.current=y;let T=h((e,t)=>{let n,r;switch(t){case"segment":{let t=Y(w.current,e);if(!t)return;let i=Y(t,"definition.baseElementId");r=Y(t,"schema"),n=Y(t,`schema.flat.${i}`);break}default:n=Y(v.current,`flat.${e}`),r=v.current}if(n)return{element:n,elementType:Y(n,"definition.type"),referenceContextData:{schema:r,prevSchema:v.current}}},[]),[N,C]=S(T(i,r)),E=h(async(e,t)=>{let n,r,i=T(e,t);if(i)C(i);else{switch(t){case"segment":{let t;if(e&&(t=await b(e)),!t)return;let i=Y(t,"definition.baseElementId");r=Y(t,"schema"),n=Y(t,`schema.flat.${i}`);break}default:n=Y(v.current,`flat.${e}`),r=v.current}C(n?{element:n,elementType:Y(n,"definition.type"),referenceContextData:{schema:r,prevSchema:v.current}}:void 0)}},[T,b]);g(()=>{E(i,r)},[E,i,r]);let _=x(()=>({bodyChildren:t,containerId:a,type:r,referenceId:o,rootId:o}),[a,t,r,o]),I=x(()=>({id:N?.element?.id??"",rootId:s,className:l.base}),[N?.element?.id,s,l.base]);if(!N)/* @__PURE__ */return O(Fa,{ref:e,className:ae("plitzi-component__reference",n,{"reference--build-mode":!c}),children:!c&&/* @__PURE__ */A("div",{className:"reference__label",children:["Element Reference ",/* @__PURE__ */O("b",{className:"capitalize",children:r})]})});let{element:D,elementType:P,referenceContextData:M}=N;return c&&D&&"element"===r?/* @__PURE__ */O(NC,{value:M,children:/* @__PURE__ */O(kC,{type:P,internalProps:I,plitziElementLayout:_},`${o}_${i}`)}):/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__reference",n,{"reference--build-mode":!c}),children:[
360
- /* @__PURE__ */O(NC,{value:M,children:D&&/* @__PURE__ */O(kC,{type:P,internalProps:I,plitziElementLayout:_},`${o}_${i}`)}),!c&&!D&&/* @__PURE__ */A("div",{className:"reference__label",children:["Element Reference ",r]}),c&&!D&&"segment"===r&&/* @__PURE__ */A("div",{children:["Segment ",
359
+ return O(Fa,{ref:e,tag:n,className:ae(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...o,children:r})}),wC=Object.assign(xC,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),kC=p(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=f($a),{contexts:{PluginsContext:i}}=lr(),{plugins:a}=f(i);return Qa({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:a})}),SC=Symbol("@plitzi/nexus/ssr-snapshot");function TC(e){return"object"==typeof e&&!!e&&SC in e}var NC=s(void 0),CC=e=>!0===e.cascade,EC=({store:e,id:t,path:n,value:r,inherit:i,autoSync:a=!0,middlewares:o,children:s})=>{let l=m(Fr),c=m(NC),u=m($r),d=k(void 0),p="live"===i,f=x(()=>{let e="snapshot"===i&&l?l.getState():{},t="function"==typeof r?r(e):{...e,...r};return TC(t)?function(e){return TC(e)?{...e}:e}(t):t},[i,l,r]),h=o??[],y=c?[...c,...h]:h,b=x(()=>[...c??[],...h.filter(CC)],[c,o]);d.current||=e??function(e,t){let n,r={},i=new jr,a=new jr,o=new Lr,s=new jr,l=()=>{s.forEach(e=>e())},c=[],u=[],d=[],p=t?.parent,f=(e,t,n)=>{if(0===u.length)throw e;let r={error:e,phase:t,path:n};for(let i=0,a=u.length;i<a;i++)u[i](r)},h=()=>r,m=()=>n??={...r},{getState:g,getPath:y,invalidate:b,setActive:v,getMergeCount:x}=function(e,t,n){if(!n)return{getState:t,getPath:t=>mr(e(),t),invalidate:()=>{},setActive:()=>{},getMergeCount:()=>0};let r,i=n,a=!0,o=!0,s=!1,l=0,c=/* @__PURE__ */new Map,u=()=>(l++,dr(i.getState(),t())),d=()=>a?((o||void 0===r)&&(r=u(),o=!1),r):u(),p=t=>{let n=mr(e(),t);if(void 0===n)return i.getPath(t);let r=i.getPath(t);return void 0!==r&&ur(n)&&ur(r)?mr(d(),t):n};return{getState:d,getPath:e=>{if(!a)return p(e);if(s)c.clear(),s=!1;else if(c.has(e))return c.get(e);let t=p(e);return c.set(e,t),t},invalidate:()=>{o=!0,s=!0},setActive:e=>{a=e,e||(c.clear(),r=void 0,o=!0,s=!1)},getMergeCount:()=>l}}(h,m,p);p&&v(!1);let w,k,{setState:S,batch:T}=Mr({getOwnState:h,getOwnSnapshot:m,setOwnState:e=>{r=e,n=void 0,b()},mutateOwnKey:(e,t)=>{r[e]=t,b(),n=void 0},parent:p,listeners:i,pathListeners:o,changeListeners:a,interceptors:c,reportError:f,invalidateDescendants:l,onDelegateToParent:void 0}),N=()=>{b(),l()},C=!1,E=()=>{w&&(w.unsubscribe(),w=void 0,k?.(),k=void 0,v(!1))},_=()=>{p&&(!C&&(i.length>0||o.size>0||a.length>0)?w||!p||(b(),v(!0),w=function(e,t,n,r,i,a,o){let s;return{unsubscribe:e.subscribe(e=>{o();let l=e;if(t.forEach(t=>t(e),e=>a(e,"notify",l)),n.size>0&&n.forEachAffected(e,t=>t(e),e=>a(e,"notify",l)),r.length>0){let e=i(),t={path:l,prev:s??e,next:e};s=e,r.forEach(e=>e(t),e=>a(e,"onChange",l))}}),seedBaseline:()=>{s??=i()}}}(p,i,o,a,g,f,b),k=p.subscribeInvalidate?.(N),a.length>0&&w.seedBaseline()):E())},O=e=>(_(),()=>{e(),_()}),A=e=>{let t=O(a.add(e));return w?.seedBaseline(),t};r="function"==typeof e?e(S,g):e;let I={id:t?.id,getState:g,getPath:y,setState:S,batch:T,subscribe:e=>O(i.add(e)),subscribePath:(e,t)=>O(o.add(e,t)),subscribeChange:A,destroy:()=>{C=!0,E(),i.clear(),o.clear(),a.clear(),s.clear()},reconnect:()=>{C=!1,_()},subscribeInvalidate:e=>s.add(e),hydrate:()=>{for(let e of d)e()}};if(t?.middlewares)for(let D of t.middlewares){let e=D(I);e?.beforeChange&&c.push(e.beforeChange),e?.onChange&&A(e.onChange),e?.onError&&u.push(e.onError);let n=e?.hydrate;n&&(t.deferHydrate?d.push(()=>n(I)):n(I))}return I}(()=>f,{id:t,parent:p?l:void 0,middlewares:y.length>0?y:void 0,deferHydrate:!0});let v=x(()=>t?{id:t,store:d.current,parent:u}:u,[t,u]);k(!1),g(()=>{},[t,u]),g(()=>(p&&!e&&d.current?.reconnect?.(),()=>{p&&!e&&d.current?.destroy?.()}),[p,e]);let w=k(!1);g(()=>{!w.current&&d.current?.hydrate&&(d.current.hydrate(),w.current=!0)},[]);let S=!!r&&a;return Yr(n,n?r:f,{enabled:S&&!!n,store:d.current}),Yr(void 0,f,{enabled:S&&!n,store:d.current}),/* @__PURE__ */O(NC,{value:b.length>0?b:void 0,children:/* @__PURE__ */O($r,{value:v,children:/* @__PURE__ */O(Fr,{value:d.current,children:s})})})},_C=dC(({ref:e,children:t,className:n="",referenceType:r="element",referenceId:i="",referenceContainer:a=""})=>{let{id:o,definition:{rootId:s,styleSelectors:l}}=gh(),{settings:{previewMode:c,environment:u},contexts:{SegmentsContext:d}}=lr(),{useStore:p}=Gr(),[[m,y]]=p(["schema","segments"]),{segmentGet:b}=f(d),v=k(m);v.current=m;let w=k(y);w.current=y;let T=h((e,t)=>{let n,r;switch(t){case"segment":{let t=Y(w.current,e);if(!t)return;let i=Y(t,"definition.baseElementId");r=Y(t,"schema"),n=Y(t,`schema.flat.${i}`);break}default:n=Y(v.current,`flat.${e}`),r=v.current}if(n)return{element:n,elementType:Y(n,"definition.type"),referenceContextData:{schema:r,prevSchema:v.current}}},[]),[N,C]=S(T(i,r)),E=h(async(e,t)=>{let n,r,i=T(e,t);if(i)C(i);else{switch(t){case"segment":{let t;if(e&&(t=await b(e)),!t)return;let i=Y(t,"definition.baseElementId");r=Y(t,"schema"),n=Y(t,`schema.flat.${i}`);break}default:n=Y(v.current,`flat.${e}`),r=v.current}C(n?{element:n,elementType:Y(n,"definition.type"),referenceContextData:{schema:r,prevSchema:v.current}}:void 0)}},[T,b]);g(()=>{E(i,r)},[E,i,r]);let _=x(()=>({bodyChildren:t,containerId:a,type:r,referenceId:o,rootId:o}),[a,t,r,o]),I=x(()=>({id:N?.element?.id??"",rootId:s,className:l.base}),[N?.element?.id,s,l.base]);if(!N)/* @__PURE__ */return O(Fa,{ref:e,className:ae("plitzi-component__reference",n,{"reference--build-mode":!c}),children:!c&&/* @__PURE__ */A("div",{className:"reference__label",children:["Element Reference ",/* @__PURE__ */O("b",{className:"capitalize",children:r})]})});let{element:D,elementType:P,referenceContextData:M}=N;return c&&D&&"element"===r?/* @__PURE__ */O(EC,{value:M,children:/* @__PURE__ */O(kC,{type:P,internalProps:I,plitziElementLayout:_},`${o}_${i}`)}):/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__reference",n,{"reference--build-mode":!c}),children:[
360
+ /* @__PURE__ */O(EC,{value:M,children:D&&/* @__PURE__ */O(kC,{type:P,internalProps:I,plitziElementLayout:_},`${o}_${i}`)}),!c&&!D&&/* @__PURE__ */A("div",{className:"reference__label",children:["Element Reference ",r]}),c&&!D&&"segment"===r&&/* @__PURE__ */A("div",{children:["Segment ",
361
361
  /* @__PURE__ */O("b",{children:i})," not found, publish to ",
362
- /* @__PURE__ */O("b",{children:u})," environment"]})]})}),EC=Object.assign(CC,{type:"reference",content:{attributes:{referenceType:"element",referenceId:"",referenceContainer:""},definition:{label:"Reference",type:"reference",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),_C=dC(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",subType:a="button",disabled:o=!1})=>{let{definition:{label:s}}=gh(),{settings:{previewMode:l}}=lr(),c=x(()=>"string"==typeof i?i:s,[i,s]);/* @__PURE__ */
363
- return A(Fa,{ref:e,tag:"button",type:l?a:"button",className:ae("plitzi-component__button",t,{"container--empty--skip":!l&&!n&&i}),disabled:o,"aria-label":c,children:["before"===r&&i,n,"after"===r&&i]})}),OC=Object.assign(_C,{type:"button",content:{attributes:{contentPlacement:"after",content:"Button",subType:"button",disabled:!1},definition:{label:"Button",type:"button",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),AC=s(void 0);AC.displayName="DropdownContext";var IC=dC(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=gh(),{settings:{previewMode:f},utils:{getWindow:m}}=lr(),y=k(null),b=k(null),v=x(()=>m(),[m]),w=h(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),T=h(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,N,C,,E]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,offsetX:s=0,offsetY:l=0,myWindow:c,onChange:u})=>{let[d,p]=S(n??!1),[f,m]=S(()=>e?.current?.getBoundingClientRect()),y=x(()=>c||(typeof window<"u"?window:null),[c]),b=h(e=>{if(!i&&!a){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[i,a,u,d,n]),v=h(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[o,i,a,u,d,n]);g(()=>{let t=e?.current;if(!t||typeof window>"u"||!d)return;let n,r=()=>m(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[d,e]);let w=h(e=>{"Escape"===e.key&&(u?.(!d,void 0!==n),p(e=>!e))},[u,d,n]);g(()=>{if(d&&!i)return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[d,w,i]);let k=h(e=>{if(!f||!y)return;let t=y.innerWidth,n=y.innerHeight,i=0,a=0;switch(r){case"top":i=f.top-e.height,a=f.left;break;case"bottom":default:i=f.bottom,a=f.left;break;case"left":i=f.top,a=f.left-e.width;break;case"right":i=f.top,a=f.right}return"bottom"===r?(i+=l,a+=s):"top"===r?(i-=l,a+=s):"left"===r?(i+=l,a-=s):"right"===r&&(i+=l,a+=s),"bottom"===r||"top"===r?(a+e.width>t?a=f.right-e.width:a<0&&(a=f.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=f.bottom-e.height:i<0&&(i=f.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[f,y,r,l,s]);return Th(()=>{p(n??!1)},[n]),[d,p,b,v,f,x(()=>d&&e?.current&&t?.current?k(t.current.getBoundingClientRect()):void 0,[d,e,t,k])]})({ref:e,popupRef:y,open:i,disabled:!f||u,closeOnClickPopup:s,placement:r,offsetX:c,offsetY:l,myWindow:v,onChange:T}),_=x(()=>({popupRef:y,openPopup:i,parameters:E,onClick:C}),[C,i,E]);/* @__PURE__ */
364
- return A(Fa,{ref:e,className:ae("plitzi-component__dropdown",n,{"container--empty--skip":!f&&!t}),onClick:N,children:[/* @__PURE__ */O(AC,{value:_,children:t}),i&&a&&f&&/* @__PURE__ */O("div",{ref:b,className:ae("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:w})]})}),DC=dC(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:a,onClick:o}=f(AC);return b(e,()=>r.current??null,[r]),/* @__PURE__ */O(Fa,{ref:r,className:ae("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!a}),style:a,onClick:o,children:n})}),PC=Object.assign(DC,{type:"dropdownPopup",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:""},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"white","min-height":"50px","min-width":"50px","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),MC=Object.assign(IC,{type:"dropdown",content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{"min-height":"50px","min-width":"50px",cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:PC}}),RC=dC(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=gh(),{settings:{previewMode:a},contexts:{BuilderContext:o}}=lr(),s=o?f(o):void 0,l=x(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||a?n:"Heading",[n,a]),c=h(e=>!a&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
365
- return A(Fa,{ref:e,tag:a?r:"div",className:ae("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[a&&l,!a&&/* @__PURE__ */O(Zg,{value:l,onChange:c,openMode:"doubleClick"})]})}),jC=Object.assign(RC,{type:"heading",content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"44px"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"36px"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"30px"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"24px"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"20px"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"18px"}}}}}},settings:{}}}),zC="popstate";function LC(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function FC(e,t){if(!1===e||null==e)throw new Error(t)}function $C(e,t){if(!e)try{throw new Error(t)}catch(jR){}}function qC(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function BC(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?UC(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function VC({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function UC(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function HC(e,t,n="/"){return WC(e,t,n,!1)}function WC(e,t,n,r,i){let a=aE(("string"==typeof t?UC(t):t).pathname||"/",n);if(null==a)return null;let o=i??function(e){let t=YC(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return $C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let c=0;null==s&&c<o.length;++c)s=rE(o[c],l,r);return s}function YC(e,t=[],n=[],r="",i=!1){let a=(e,a,o=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&o)return;FC(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=pE([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(FC(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),YC(e.children,t,u,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:nE(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of GC(e.path))a(e,t,!0,n);else a(e,t)}),t}function GC(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=GC(r.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var QC=/^:[\w-]+$/,JC=3,KC=2,XC=1,ZC=10,eE=-2,tE=e=>"*"===e;function nE(e,t){let n=e.split("/"),r=n.length;return n.some(tE)&&(r+=eE),t&&(r+=KC),n.filter(e=>!tE(e)).reduce((e,t)=>e+(QC.test(t)?JC:""===t?XC:ZC),r)}function rE(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===a?t:t.slice(a.length)||"/",u=iE({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=iE({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:pE([a,u.pathname]),pathnameBase:hE(pE([a,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(a=pE([a,u.pathnameBase]))}return o}function iE(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){$C("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function aE(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var oE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function sE(e,t){let n=fE(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function lE(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function cE(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function uE(e,t,n,r=!1){let i;"string"==typeof e?i=UC(e):(i={...e},FC(!i.pathname||!i.pathname.includes("?"),lE("?","pathname","search",i)),FC(!i.pathname||!i.pathname.includes("#"),lE("#","pathname","hash",i)),FC(!i.search||!i.search.includes("#"),lE("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:a=""}="string"==typeof e?UC(e):e;return r?(r=dE(r),n=r.startsWith("/")?sE(r.substring(1),"/"):sE(r,t)):n=t,{pathname:n,search:mE(i),hash:gE(a)}}(i,a),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var dE=e=>e.replace(/\/\/+/g,"/"),pE=e=>dE(e.join("/")),fE=e=>e.replace(/\/+$/,""),hE=e=>fE(e).replace(/^\/*/,"/"),mE=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",gE=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",yE=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function bE(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function vE(e){return pE(e.map(e=>e.route.path).filter(Boolean))||"/"}var xE="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function wE(e,t){let n=e;if("string"!=typeof n||!oE.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(xE)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),a=aE(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(jR){$C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kE=["POST","PUT","PATCH","DELETE"],SE=(new Set(kE),["GET",...kE]);new Set(SE);var TE=e.createContext(null);TE.displayName="DataRouter";var NE=e.createContext(null);NE.displayName="DataRouterState";var CE=e.createContext(!1);function EE(){return e.useContext(CE)}var _E=e.createContext({isTransitioning:!1});_E.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var OE=e.createContext(null);OE.displayName="Navigation";var AE=e.createContext(null);AE.displayName="Location";var IE=e.createContext({outlet:null,matches:[],isDataRoute:!1});IE.displayName="Route";var DE=e.createContext(null);DE.displayName="RouteError";var PE="REACT_ROUTER_ERROR";function ME(){return null!=e.useContext(AE)}function RE(){return FC(ME(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(AE).location}var jE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zE(t){e.useContext(OE).static||e.useLayoutEffect(t)}function LE(){let{isDataRoute:t}=e.useContext(IE);return t?function(){let{router:t}=function(){let t=e.useContext(TE);return FC(t,WE("useNavigate")),t}(),n=YE("useNavigate"),r=e.useRef(!1);return zE(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{$C(r.current,jE),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){FC(ME(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(TE),{basename:n,navigator:r}=e.useContext(OE),{matches:i}=e.useContext(IE),{pathname:a}=RE(),o=JSON.stringify(cE(i)),s=e.useRef(!1);return zE(()=>{s.current=!0}),e.useCallback((e,i={})=>{if($C(s.current,jE),!s.current)return;if("number"==typeof e)return void r.go(e);let l=uE(e,JSON.parse(o),a,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:pE([n,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,o,a,t])}()}function FE(t,{relative:n}={}){let{matches:r}=e.useContext(IE),{pathname:i}=RE(),a=JSON.stringify(cE(r));return e.useMemo(()=>uE(t,JSON.parse(a),i,"path"===n),[t,a,i,n])}function $E(){let t=function(){let t=e.useContext(DE),n=function(t){let n=e.useContext(NE);return FC(n,WE(t)),n}("useRouteError"),r=YE("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=bE(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},s=null;return s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:o},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:o},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:a},r):null,s)}e.createContext(null);var qE=/* @__PURE__ */e.createElement($E,null),BE=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${PE}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new yE(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(IE.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(DE.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(UE,{error:t},n):n}};BE.contextType=CE;var VE=/* @__PURE__ */new WeakMap;function UE({children:t,error:n}){let{basename:r}=e.useContext(OE);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${PE}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let i=VE.get(n);if(i)throw i;let a=wE(t.location,r);if(xE&&!VE.get(n)){if(!a.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:t.replace}));throw VE.set(n,e),e}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
366
- return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function HE({routeContext:t,match:n,children:r}){let i=e.useContext(TE);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(IE.Provider,{value:t},r)}function WE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YE(t){let n=function(t){let n=e.useContext(IE);return FC(n,WE(t)),n}(t),r=n.matches[n.matches.length-1];return FC(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var GE={};function QE(e,t,n){t||GE[e]||(GE[e]=!0,$C(!1,n))}function JE({to:t,replace:n,state:r,relative:i}){FC(ME(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=e.useContext(OE);$C(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=e.useContext(IE),{pathname:s}=RE(),l=LE(),c=uE(t,cE(o),s,"path"===i),u=JSON.stringify(c);return e.useEffect(()=>{l(JSON.parse(u),{replace:n,state:r,relative:i})},[l,u,i,n,r]),null}function KE({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:a,static:o=!1,useTransitions:s}){FC(!ME(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:s,future:{}}),[l,a,o,s]);"string"==typeof r&&(r=UC(r));let{pathname:u="/",search:d="",hash:p="",state:f=null,key:h="default",mask:m}=r,g=e.useMemo(()=>{let e=aE(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:f,key:h,mask:m},navigationType:i}},[l,u,d,p,f,h,i,m]);return $C(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(OE.Provider,{value:c},/* @__PURE__ */e.createElement(AE.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:a,onError:o}){return function(t,n,r){FC(ME(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(OE),{matches:a}=e.useContext(IE),o=a[a.length-1],s=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";QE(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=RE();if(n){let e="string"==typeof n?UC(n):n;FC("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let f=d.pathname||"/",h=f;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):HC(t,{pathname:h});$C(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),$C(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let a=t,o=i?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);FC(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){r.isStatic&&(s=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:vE(i.matches),errorInfo:t})}:void 0;return a.reduceRight((t,r,c)=>{let d,p=!1,f=null,h=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||qE,s&&(l<0&&0===c?(QE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,c+1)),g=()=>{let n;return n=d?f:p?h:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(HE,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(BE,{location:i.location,revalidation:i.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:pE([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:pE([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,r);return n&&g?/* @__PURE__ */e.createElement(AE.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:a,onError:o,future:r})}),e.Component;var XE="get",ZE="application/x-www-form-urlencoded";function e_(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var t_=null,n_=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function r_(e){return null==e||n_.has(e)?e:($C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ZE}"`),null)}function i_(e,t){if(!1===e||null==e)throw new Error(t)}function a_(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===aE(i.pathname,t)?i.pathname=`${fE(t)}/_root.${r}`:i.pathname=`${fE(i.pathname)}.${r}`,i}function o_(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function s_(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function l_(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function c_(){let t=e.useContext(TE);return i_(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function u_(){let t=e.useContext(NE);return i_(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var d_=e.createContext(void 0);function p_(){let t=e.useContext(d_);return i_(t,"You must render this element inside a <HydratedRouter> element"),t}function f_(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function h_({page:t,...n}){let r=EE(),{router:i}=c_(),a=e.useMemo(()=>HC(i.routes,t,i.basename),[i.routes,t,i.basename]);return a?r?/* @__PURE__ */e.createElement(m_,{page:t,matches:a,...n}):/* @__PURE__ */e.createElement(g_,{page:t,matches:a,...n}):null}function m_({page:t,matches:n,...r}){let i=RE(),{future:a}=p_(),{basename:o}=c_(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=a_(t,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[o,a.unstable_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
367
- return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function g_({page:t,matches:n,...r}){let i=RE(),{future:a,manifest:o,routeModules:s}=p_(),{basename:l}=c_(),{loaderData:c,matches:u}=u_(),d=e.useMemo(()=>s_(t,n,u,o,i,"data"),[t,n,u,o,i]),p=e.useMemo(()=>s_(t,n,u,o,i,"assets"),[t,n,u,o,i]),f=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=/* @__PURE__ */new Set,r=!1;if(n.forEach(t=>{let n=o.routes[t.route.id];n&&n.hasLoader&&(!d.some(e=>e.route.id===t.route.id)&&t.route.id in c&&s[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let u=a_(t,l,a.unstable_trailingSlashAwareDataRequests,"data");return r&&e.size>0&&u.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,i,o,d,n,t,s]),h=e.useMemo(()=>l_(p,o),[p,o]),m=function(t){let{manifest:n,routeModules:r}=p_(),[i,a]=e.useState([]);return e.useEffect(()=>{let e=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(
362
+ /* @__PURE__ */O("b",{children:u})," environment"]})]})}),OC=Object.assign(_C,{type:"reference",content:{attributes:{referenceType:"element",referenceId:"",referenceContainer:""},definition:{label:"Reference",type:"reference",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),AC=dC(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",subType:a="button",disabled:o=!1})=>{let{definition:{label:s}}=gh(),{settings:{previewMode:l}}=lr(),c=x(()=>"string"==typeof i?i:s,[i,s]);/* @__PURE__ */
363
+ return A(Fa,{ref:e,tag:"button",type:l?a:"button",className:ae("plitzi-component__button",t,{"container--empty--skip":!l&&!n&&i}),disabled:o,"aria-label":c,children:["before"===r&&i,n,"after"===r&&i]})}),IC=Object.assign(AC,{type:"button",content:{attributes:{contentPlacement:"after",content:"Button",subType:"button",disabled:!1},definition:{label:"Button",type:"button",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"min-height":"30px","min-width":"30px","padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"24px","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),DC=s(void 0);DC.displayName="DropdownContext";var PC=dC(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=gh(),{settings:{previewMode:f},utils:{getWindow:m}}=lr(),y=k(null),b=k(null),v=x(()=>m(),[m]),w=h(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),T=h(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,N,C,,E]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,offsetX:s=0,offsetY:l=0,myWindow:c,onChange:u})=>{let[d,p]=S(n??!1),[f,m]=S(()=>e?.current?.getBoundingClientRect()),y=x(()=>c||(typeof window<"u"?window:null),[c]),b=h(e=>{if(!i&&!a){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[i,a,u,d,n]),v=h(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void u?.(!d,!1);u?.(!d,!0),p(e=>!e)}},[o,i,a,u,d,n]);g(()=>{let t=e?.current;if(!t||typeof window>"u"||!d)return;let n,r=()=>m(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[d,e]);let w=h(e=>{"Escape"===e.key&&(u?.(!d,void 0!==n),p(e=>!e))},[u,d,n]);g(()=>{if(d&&!i)return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[d,w,i]);let k=h(e=>{if(!f||!y)return;let t=y.innerWidth,n=y.innerHeight,i=0,a=0;switch(r){case"top":i=f.top-e.height,a=f.left;break;case"bottom":default:i=f.bottom,a=f.left;break;case"left":i=f.top,a=f.left-e.width;break;case"right":i=f.top,a=f.right}return"bottom"===r?(i+=l,a+=s):"top"===r?(i-=l,a+=s):"left"===r?(i+=l,a-=s):"right"===r&&(i+=l,a+=s),"bottom"===r||"top"===r?(a+e.width>t?a=f.right-e.width:a<0&&(a=f.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=f.bottom-e.height:i<0&&(i=f.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[f,y,r,l,s]);return Th(()=>{p(n??!1)},[n]),[d,p,b,v,f,x(()=>d&&e?.current&&t?.current?k(t.current.getBoundingClientRect()):void 0,[d,e,t,k])]})({ref:e,popupRef:y,open:i,disabled:!f||u,closeOnClickPopup:s,placement:r,offsetX:c,offsetY:l,myWindow:v,onChange:T}),_=x(()=>({popupRef:y,openPopup:i,parameters:E,onClick:C}),[C,i,E]);/* @__PURE__ */
364
+ return A(Fa,{ref:e,className:ae("plitzi-component__dropdown",n,{"container--empty--skip":!f&&!t}),onClick:N,children:[/* @__PURE__ */O(DC,{value:_,children:t}),i&&a&&f&&/* @__PURE__ */O("div",{ref:b,className:ae("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:w})]})}),MC=dC(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:a,onClick:o}=f(DC);return b(e,()=>r.current??null,[r]),/* @__PURE__ */O(Fa,{ref:r,className:ae("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!a}),style:a,onClick:o,children:n})}),RC=Object.assign(MC,{type:"dropdownPopup",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:""},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"white","min-height":"50px","min-width":"50px","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),jC=Object.assign(PC,{type:"dropdown",content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{"min-height":"50px","min-width":"50px",cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:RC}}),zC=dC(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=gh(),{settings:{previewMode:a},contexts:{BuilderContext:o}}=lr(),s=o?f(o):void 0,l=x(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||a?n:"Heading",[n,a]),c=h(e=>!a&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
365
+ return A(Fa,{ref:e,tag:a?r:"div",className:ae("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[a&&l,!a&&/* @__PURE__ */O(Zg,{value:l,onChange:c,openMode:"doubleClick"})]})}),LC=Object.assign(zC,{type:"heading",content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"44px"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"36px"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"30px"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"24px"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"20px"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"18px"}}}}}},settings:{}}}),FC="popstate";function $C(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function qC(e,t){if(!1===e||null==e)throw new Error(t)}function BC(e,t){if(!e)try{throw new Error(t)}catch(jR){}}function VC(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function UC(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?WC(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function HC({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function WC(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function YC(e,t,n="/"){return GC(e,t,n,!1)}function GC(e,t,n,r,i){let a=sE(("string"==typeof t?WC(t):t).pathname||"/",n);if(null==a)return null;let o=i??function(e){let t=QC(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return BC(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let c=0;null==s&&c<o.length;++c)s=aE(o[c],l,r);return s}function QC(e,t=[],n=[],r="",i=!1){let a=(e,a,o=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&o)return;qC(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=hE([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(qC(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),QC(e.children,t,u,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:iE(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of JC(e.path))a(e,t,!0,n);else a(e,t)}),t}function JC(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=JC(r.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var KC=/^:[\w-]+$/,XC=3,ZC=2,eE=1,tE=10,nE=-2,rE=e=>"*"===e;function iE(e,t){let n=e.split("/"),r=n.length;return n.some(rE)&&(r+=nE),t&&(r+=ZC),n.filter(e=>!rE(e)).reduce((e,t)=>e+(KC.test(t)?XC:""===t?eE:tE),r)}function aE(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===a?t:t.slice(a.length)||"/",u=oE({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=oE({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:hE([a,u.pathname]),pathnameBase:gE(hE([a,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(a=hE([a,u.pathnameBase]))}return o}function oE(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){BC("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function sE(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var lE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function cE(e,t){let n=mE(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function uE(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function dE(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function pE(e,t,n,r=!1){let i;"string"==typeof e?i=WC(e):(i={...e},qC(!i.pathname||!i.pathname.includes("?"),uE("?","pathname","search",i)),qC(!i.pathname||!i.pathname.includes("#"),uE("#","pathname","hash",i)),qC(!i.search||!i.search.includes("#"),uE("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:a=""}="string"==typeof e?WC(e):e;return r?(r=fE(r),n=r.startsWith("/")?cE(r.substring(1),"/"):cE(r,t)):n=t,{pathname:n,search:yE(i),hash:bE(a)}}(i,a),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var fE=e=>e.replace(/\/\/+/g,"/"),hE=e=>fE(e.join("/")),mE=e=>e.replace(/\/+$/,""),gE=e=>mE(e).replace(/^\/*/,"/"),yE=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",bE=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",vE=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function xE(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function wE(e){return hE(e.map(e=>e.route.path).filter(Boolean))||"/"}var kE="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function SE(e,t){let n=e;if("string"!=typeof n||!lE.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(kE)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),a=sE(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(jR){BC(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var TE=["POST","PUT","PATCH","DELETE"],NE=(new Set(TE),["GET",...TE]);new Set(NE);var CE=e.createContext(null);CE.displayName="DataRouter";var EE=e.createContext(null);EE.displayName="DataRouterState";var _E=e.createContext(!1);function OE(){return e.useContext(_E)}var AE=e.createContext({isTransitioning:!1});AE.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var IE=e.createContext(null);IE.displayName="Navigation";var DE=e.createContext(null);DE.displayName="Location";var PE=e.createContext({outlet:null,matches:[],isDataRoute:!1});PE.displayName="Route";var ME=e.createContext(null);ME.displayName="RouteError";var RE="REACT_ROUTER_ERROR";function jE(){return null!=e.useContext(DE)}function zE(){return qC(jE(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(DE).location}var LE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function FE(t){e.useContext(IE).static||e.useLayoutEffect(t)}function $E(){let{isDataRoute:t}=e.useContext(PE);return t?function(){let{router:t}=function(){let t=e.useContext(CE);return qC(t,GE("useNavigate")),t}(),n=QE("useNavigate"),r=e.useRef(!1);return FE(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{BC(r.current,LE),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){qC(jE(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(CE),{basename:n,navigator:r}=e.useContext(IE),{matches:i}=e.useContext(PE),{pathname:a}=zE(),o=JSON.stringify(dE(i)),s=e.useRef(!1);return FE(()=>{s.current=!0}),e.useCallback((e,i={})=>{if(BC(s.current,LE),!s.current)return;if("number"==typeof e)return void r.go(e);let l=pE(e,JSON.parse(o),a,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:hE([n,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,o,a,t])}()}function qE(t,{relative:n}={}){let{matches:r}=e.useContext(PE),{pathname:i}=zE(),a=JSON.stringify(dE(r));return e.useMemo(()=>pE(t,JSON.parse(a),i,"path"===n),[t,a,i,n])}function BE(){let t=function(){let t=e.useContext(ME),n=function(t){let n=e.useContext(EE);return qC(n,GE(t)),n}("useRouteError"),r=QE("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=xE(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},s=null;return s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:o},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:o},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:a},r):null,s)}e.createContext(null);var VE=/* @__PURE__ */e.createElement(BE,null),UE=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${RE}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new vE(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(PE.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(ME.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(WE,{error:t},n):n}};UE.contextType=_E;var HE=/* @__PURE__ */new WeakMap;function WE({children:t,error:n}){let{basename:r}=e.useContext(IE);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${RE}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let i=HE.get(n);if(i)throw i;let a=SE(t.location,r);if(kE&&!HE.get(n)){if(!a.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:t.replace}));throw HE.set(n,e),e}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
366
+ return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function YE({routeContext:t,match:n,children:r}){let i=e.useContext(CE);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(PE.Provider,{value:t},r)}function GE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QE(t){let n=function(t){let n=e.useContext(PE);return qC(n,GE(t)),n}(t),r=n.matches[n.matches.length-1];return qC(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var JE={};function KE(e,t,n){t||JE[e]||(JE[e]=!0,BC(!1,n))}function XE({to:t,replace:n,state:r,relative:i}){qC(jE(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=e.useContext(IE);BC(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=e.useContext(PE),{pathname:s}=zE(),l=$E(),c=pE(t,dE(o),s,"path"===i),u=JSON.stringify(c);return e.useEffect(()=>{l(JSON.parse(u),{replace:n,state:r,relative:i})},[l,u,i,n,r]),null}function ZE({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:a,static:o=!1,useTransitions:s}){qC(!jE(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:s,future:{}}),[l,a,o,s]);"string"==typeof r&&(r=WC(r));let{pathname:u="/",search:d="",hash:p="",state:f=null,key:h="default",mask:m}=r,g=e.useMemo(()=>{let e=sE(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:f,key:h,mask:m},navigationType:i}},[l,u,d,p,f,h,i,m]);return BC(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(IE.Provider,{value:c},/* @__PURE__ */e.createElement(DE.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:a,onError:o}){return function(t,n,r){qC(jE(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(IE),{matches:a}=e.useContext(PE),o=a[a.length-1],s=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";KE(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=zE();if(n){let e="string"==typeof n?WC(n):n;qC("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let f=d.pathname||"/",h=f;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):YC(t,{pathname:h});BC(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),BC(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let a=t,o=i?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);qC(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){r.isStatic&&(s=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:wE(i.matches),errorInfo:t})}:void 0;return a.reduceRight((t,r,c)=>{let d,p=!1,f=null,h=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||VE,s&&(l<0&&0===c?(KE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,c+1)),g=()=>{let n;return n=d?f:p?h:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(YE,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(UE,{location:i.location,revalidation:i.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:hE([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:hE([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,r);return n&&g?/* @__PURE__ */e.createElement(DE.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:a,onError:o,future:r})}),e.Component;var e_="get",t_="application/x-www-form-urlencoded";function n_(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var r_=null,i_=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function a_(e){return null==e||i_.has(e)?e:(BC(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${t_}"`),null)}function o_(e,t){if(!1===e||null==e)throw new Error(t)}function s_(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===sE(i.pathname,t)?i.pathname=`${mE(t)}/_root.${r}`:i.pathname=`${mE(i.pathname)}.${r}`,i}function l_(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function c_(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function u_(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function d_(){let t=e.useContext(CE);return o_(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function p_(){let t=e.useContext(EE);return o_(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var f_=e.createContext(void 0);function h_(){let t=e.useContext(f_);return o_(t,"You must render this element inside a <HydratedRouter> element"),t}function m_(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function g_({page:t,...n}){let r=OE(),{router:i}=d_(),a=e.useMemo(()=>YC(i.routes,t,i.basename),[i.routes,t,i.basename]);return a?r?/* @__PURE__ */e.createElement(y_,{page:t,matches:a,...n}):/* @__PURE__ */e.createElement(b_,{page:t,matches:a,...n}):null}function y_({page:t,matches:n,...r}){let i=zE(),{future:a}=h_(),{basename:o}=d_(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=s_(t,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[o,a.unstable_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
367
+ return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function b_({page:t,matches:n,...r}){let i=zE(),{future:a,manifest:o,routeModules:s}=h_(),{basename:l}=d_(),{loaderData:c,matches:u}=p_(),d=e.useMemo(()=>c_(t,n,u,o,i,"data"),[t,n,u,o,i]),p=e.useMemo(()=>c_(t,n,u,o,i,"assets"),[t,n,u,o,i]),f=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=/* @__PURE__ */new Set,r=!1;if(n.forEach(t=>{let n=o.routes[t.route.id];n&&n.hasLoader&&(!d.some(e=>e.route.id===t.route.id)&&t.route.id in c&&s[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let u=s_(t,l,a.unstable_trailingSlashAwareDataRequests,"data");return r&&e.size>0&&u.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,i,o,d,n,t,s]),h=e.useMemo(()=>u_(p,o),[p,o]),m=function(t){let{manifest:n,routeModules:r}=h_(),[i,a]=e.useState([]);return e.useEffect(()=>{let e=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(
368
368
  /* @vite-ignore */
369
369
  /* webpackIgnore: true */
370
- e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(o_).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(t,n,r).then(t=>{e||a(t)}),()=>{e=!0}},[t,n,r]),i}(p);/* @__PURE__ */
371
- return e.createElement(e.Fragment,null,f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}d_.displayName="FrameworkContext";function y_(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}e.Component;var b_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{b_&&(window.__reactRouterVersion="7.15.1")}catch(jR){}function v_({basename:t,children:n,useTransitions:r,window:i}){let a=e.useRef();null==a.current&&(a.current=function(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=u();function u(){return(o.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),FC(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:VC(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==c&&(c=0,o.replaceState({...o.state,idx:c},""));let f={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(zC,d),l=e,()=>{i.removeEventListener(zC,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=LC(e)?e:BC(f.location,e,t);n&&n(r,e),c=u()+1;let d=qC(r,c),p=f.createHref(r.mask||r);try{o.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}a&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=LC(e)?e:BC(f.location,e,t);n&&n(r,e),c=u();let i=qC(r,c),d=f.createHref(r.mask||r);o.replaceState(i,"",d),a&&l&&l({action:s,location:f.location,delta:0})},go:e=>o.go(e)};return f}(function(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return BC("",{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:VC(t)},null,e)}({window:i,v5Compat:!0}));let o=a.current,[s,l]=e.useState({action:o.action,location:o.location}),c=e.useCallback(t=>{!1===r?l(t):e.startTransition(()=>l(t))},[r]);return e.useLayoutEffect(()=>o.listen(c),[o,c]),/* @__PURE__ */e.createElement(KE,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,useTransitions:r})}var x_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,w_=e.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:c,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m){let{basename:g,navigator:y,useTransitions:b}=e.useContext(OE),v="string"==typeof u&&x_.test(u),x=wE(u,g),w=function(t,{relative:n}={}){FC(ME(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=e.useContext(OE),{hash:a,pathname:o,search:s}=FE(t,{relative:n}),l=o;return"/"!==r&&(l="/"===o?r:pE([r,o])),i.createHref({pathname:l,search:s,hash:a})}(u=x.to,{relative:i}),k=RE(),S=null;if(s){let e=uE(s,[],k.mask?k.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:pE([g,e.pathname])),S=y.createHref(e)}let[T,N,C]=function(t,n){let r=e.useContext(d_),[i,a]=e.useState(!1),[o,s]=e.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=e.useRef(null);e.useEffect(()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let h=()=>{a(!0)},m=()=>{a(!1),s(!1)};return r?"intent"!==t?[o,f,{}]:[o,f,{onFocus:f_(l,h),onBlur:f_(c,m),onMouseEnter:f_(u,h),onMouseLeave:f_(d,m),onTouchStart:f_(p,h)}]:[!1,f,{}]}(r,h),E=function(t,{target:n,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=LE(),p=RE(),f=FE(t,{relative:s});return e.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,n)){h.preventDefault();let n=void 0!==r?r:VC(p)===VC(f),m=()=>d(t,{replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?e.startTransition(()=>m()):m()}},[p,d,f,r,i,a,n,t,o,s,l,c,u])}(u,{replace:o,mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,defaultShouldRevalidate:f,useTransitions:b}),_=!(x.isExternal||a),O=/* @__PURE__ */e.createElement("a",{...h,...C,href:(_?S:void 0)||x.absoluteURL||w,onClick:_?function(e){t&&t(e),e.defaultPrevented||E(e)}:t,ref:y_(m,N),target:c,"data-discover":v||"render"!==n?void 0:"true"});return T&&!v?/* @__PURE__ */e.createElement(e.Fragment,null,O,/* @__PURE__ */e.createElement(h_,{page:w})):O});w_.displayName="Link";var k_=e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:s,children:l,...c},u){let d=FE(o,{relative:c.relative}),p=RE(),f=e.useContext(NE),{navigator:h,basename:m}=e.useContext(OE),g=null!=f&&function(t,{relative:n}={}){let r=e.useContext(_E);FC(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=T_("useViewTransitionState"),a=FE(t,{relative:n});if(!r.isTransitioning)return!1;let o=aE(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=aE(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=iE(a.pathname,s)||null!=iE(a.pathname,o)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,b=p.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(b=b.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&m&&(v=aE(v,m)||v);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,k=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(x),S=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),T={isActive:k,isPending:S,isTransitioning:g},N=k?t:void 0;w="function"==typeof r?r(T):[r,k?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof a?a(T):a;/* @__PURE__ */
372
- return e.createElement(w_,{...c,"aria-current":N,className:w,ref:u,style:C,to:o,viewTransition:s},"function"==typeof l?l(T):l)});k_.displayName="NavLink";var S_=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=XE,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m)=>{let{useTransitions:g}=e.useContext(OE),y=function(){let{router:t}=T_("useSubmit"),{basename:n}=e.useContext(OE),r=YE("useRouteId"),i=t.fetch,a=t.navigate;return e.useCallback(async(e,t={})=>{let{action:o,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,a,o;if(e_(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?aE(o,t):null,n=e.getAttribute("method")||XE,i=r_(e.getAttribute("enctype"))||ZE,a=new FormData(e)}else if(function(e){return e_(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return e_(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(r=s?aE(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||XE,i=r_(e.getAttribute("formenctype"))||r_(o.getAttribute("enctype"))||ZE,a=new FormData(o,e),!function(){if(null===t_)try{new FormData(document.createElement("form"),0),t_=!1}catch(jR){t_=!0}return t_}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(e_(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=XE,r=null,i=ZE,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}(e,n);!1===t.navigate?await i(t.fetcherKey||C_(),r,t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync}):await a(t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,a,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(OE),i=e.useContext(IE);FC(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),o={...FE(t||".",{relative:n})},s=RE();if(null==t){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return t&&"."!==t||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(o.pathname="/"===o.pathname?r:pE([r,o.pathname])),VC(o)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",x="string"==typeof l&&x_.test(l);/* @__PURE__ */
373
- return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,h=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f});g&&!1!==r?e.startTransition(()=>h()):h()},...h,"data-discover":x||"render"!==t?void 0:"true"})});function T_(t){let n=e.useContext(TE);return FC(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}S_.displayName="Form";var N_=0,C_=()=>`__${String(++N_)}__`;function E_({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=UC(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},a={createHref:__,encodeLocation:O_,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
374
- return e.createElement(KE,{basename:t,children:n,location:i,navigationType:"POP",navigator:a,static:!0,useTransitions:!1})}function __(e){return"string"==typeof e?e:VC(e)}function O_(e){let t="string"==typeof e?e:VC(e);t=t.replace(/ $/,"%20");let n=A_.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var A_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,I_=e=>e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/i,":$1").replaceAll(/[/]+/gim,"/"),D_=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${D_(e,r)}/${n}`:n};function P_(e,t,n,r=!1){let{slug:i="",folder:a,default:o}=Y(e,`${n}.attributes`,{slug:n,folder:"",default:!1});if(o&&!r)return{"/":n,[`/${n}`]:n};if(o&&r)return"/";if(!a&&!r)return{[I_(`/${i}`)]:n,[`/${n}`]:n};if(!a&&r)return`/${i}`;if(!t.find(e=>e.id===a))return r?`/${i}`:{[I_(`/${i}`)]:n,[`/${n}`]:n};let s=[D_(t.reduce((e,t)=>({...e,[t.id]:t}),{}),a),i||n].filter(Boolean).join("/");return r?`/${s}`:{[`/${s}`]:n,[`/${n}`]:n}}var M_=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),R_=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],j_=dC(({ref:e,children:t,className:n="",href:r="#",target:i="self",mode:a="page"})=>{let{style:o}=gh(),{settings:{previewMode:s},contexts:{NavigationContext:l}}=lr(),{navigate:c,routeParams:u,queryParams:d}=f(l),{useStore:p}=Gr(),[[h,m]]=p(["pageDefinitions","schema.pageFolders"]),g=x(()=>{if("external"===a)return r;let e=`/${r}`.replaceAll(/[/]+/gim,"/");if("internal"===a){try{let t=Lo(e,{...d,...u},!0);return"string"==typeof t?t:e}catch{}return e}return P_(h,m,r,!0)},[a,r,h,m,d,u]);/* @__PURE__ */
375
- return O(Fa,{tag:"a",...x(()=>{let t={ref:e,style:o,target:`_${i}`,className:ae("plitzi-component__link",n)};return s?{...t,href:g}:{...t,"href-disabled":g}},[e,o,i,n,s,g]),onClick:e=>{s&&(e.stopPropagation(),("page"===a||"internal"===a)&&(e.preventDefault(),c(g)))},children:t})}),z_=Object.assign(j_,{type:"link",content:{attributes:{href:"#",target:"self",mode:"page",linkContext:void 0},definition:{label:"Link",type:"link",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["link"]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-link"},defaultStyle:{name:"Link",displayMode:"desktop",style:{base:{default:{display:"inline-block","min-height":"30px","min-width":"30px",color:"#333",cursor:"pointer"}}}},settings:{}}}),L_=dC(({ref:e,content:t="Markdown",className:n=""})=>{let{settings:{previewMode:r}}=lr();/* @__PURE__ */
376
- return O(Fa,{ref:e,className:ae("plitzi-component__markdown",{"plitzi-component__markdown--edit-mode":!r},n),children:/* @__PURE__ */O(BT,{children:t})})}),F_=Object.assign(L_,{type:"markdown",content:{attributes:{content:"Markdown"},definition:{label:"Markdown",type:"markdown",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-markdown"},defaultStyle:{name:"Markdown",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"24px"}}}},settings:{}}}),$_=dC(({ref:e,content:t="Paragraph",className:n=""})=>{let{id:r}=gh(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=lr(),o=a?f(a):void 0,s=x(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Paragraph",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
377
- return A(Fa,{ref:e,tag:i?"p":"div",className:ae("plitzi-component__paragraph",n),children:[i&&s,!i&&/* @__PURE__ */O(Zg,{className:"",value:s,onChange:l,openMode:"doubleClick"})]})}),q_=Object.assign($_,{type:"paragraph",content:{attributes:{content:"Paragraph"},definition:{label:"Paragraph",type:"paragraph",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paragraph"},defaultStyle:{name:"Paragraph",displayMode:"desktop",style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}},settings:{}}}),B_=dC(({ref:e,content:t="Text",className:n=""})=>{let{id:r}=gh(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=lr(),o=a?f(a):void 0,s=x(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Text",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
378
- return A(Fa,{ref:e,className:ae("plitzi-component__text",n),children:[i&&s,!i&&/* @__PURE__ */O(Zg,{className:"focus-visible:outline-hidden",value:s,onChange:l,openMode:"doubleClick"})]})}),V_=Object.assign(B_,{type:"text",content:{attributes:{content:"Text"},definition:{label:"Text",type:"text",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Text",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"24px",display:"inline"}}}},settings:{}}}),U_=dC(({ref:e,className:t="",children:n,method:r="get",actionUrl:i="",managedByInteractions:a=!1,errors:o=Qr,values:s=Qr})=>{let[l,c]=S({}),{id:u,definition:{label:d="Form"},setElementState:p}=gh(),{settings:{previewMode:m},contexts:{InteractionsContext:g}}=lr(),{interactionsManager:y}=f(g),b=h(e=>c(t=>({...t,[e.name]:e})),[c]),v=h(e=>e&&l[e]?Y(l,e):l,[l]),w=h(e=>{c(t=>ar(t,t=>{t[e]&&delete t[e]})),e&&p(t=>({...t,values:ee(t,`values.${e}`),errors:ee(t,`errors.${e}`)}))},[p]),k=h((e,t="")=>{e&&(null===t&&(t=""),p(n=>n.errors&&n.errors[e]?{...n,values:{...n.values,[e]:t},errors:ee(n.errors,[e])}:{...n,values:{...n.values,[e]:t}}))},[p]),T=h((e,t)=>{e&&p(n=>t||Y(n,`errors.${e}`)?!t&&n.errors&&n.errors[e]?{...n,errors:ee(n,[`errors.${e}`])}:{...n,errors:{...n.errors,[e]:t}}:n)},[p]),N=h(()=>Object.values(l).filter(e=>!!e.name).reduce((e,t)=>[...e,{path:`fields.${t.name}.id`,name:`${t.name} ID`},{path:`values.${t.name}`,name:`${t.name} Value`},{path:`errors.${t.name}`,name:`${t.name} Error Message`}],[]),[l]),C=x(()=>({fields:l,errors:o,values:s,registerField:b,unregisterField:w,getField:v,setFieldValue:k,setFieldError:T}),[l,o,s,b,w,v,k,T]);hh({id:u,source:"form",name:d||`Form - ${u}`,fields:N});let E=x(()=>({onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:Object.values(l).reduce((e,t)=>({...e,[t.name]:""}),{}),actionUrl:"",method:""}}}),[l]),_=h(e=>{if(p(e=>({...e,errors:{}})),!a||(e.stopPropagation(),e.preventDefault(),!m))return;let t=Object.values(l).reduce((e,{name:t})=>({...e,[t]:s[t]}),{});y.interactionTrigger(u,"onSubmit",{values:t,actionUrl:i,method:r})},[p,a,m,l,y,u,i,r,s]),A=h(e=>{a&&(e instanceof Event&&(e.stopPropagation(),e.preventDefault()),p(e=>({...e,values:{},errors:{}})))},[p,a]),I=h(e=>{let{name:t,value:n}=e;k(t,n)},[k]),D=h(e=>{let{name:t,error:n}=e;T(t,n)},[T]),P=x(()=>({performReset:{action:"performReset",title:`Reset ${d}`,type:"callback",callback:A,params:{}},setFieldValue:{action:"setFieldValue",title:`Set Field Value ${d}`,type:"callback",callback:I,preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:Object.values(l).map(e=>({value:e.name,label:e.name}))},value:{type:"text",defaultValue:""}}},setFieldError:{action:"setFieldError",title:`Set Field Error ${d}`,type:"callback",callback:D,preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:Object.values(l).map(e=>({value:e.name,label:e.name}))},error:{type:"text",defaultValue:""}}}}),[d,A,I,l,D]);/* @__PURE__ */
379
- return O(Fa,{tag:"form",ref:e,method:r,className:ae("plitzi-component__form",t),interactionTriggers:E,interactionCallbacks:P,onSubmit:_,onReset:A,action:i,children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{form:C}}},children:n})})}),H_=Object.assign(U_,{type:"form",content:{attributes:{method:"get",actionUrl:"",managedByInteractions:!1,errors:{},values:{}},definition:{label:"Form",type:"form",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */O(oC,{})},defaultStyle:{name:"Form",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),W_=({ref:e,children:t,targetInput:n="",type:r="text",previewMode:i=!0,required:a=!0,className:o=""})=>{let s=h(e=>{i||e.preventDefault()},[i]);/* @__PURE__ */
380
- return A("label",i?{ref:e,className:ae(`form-control__label-${r}`,o),htmlFor:n,children:[t,a&&t&&/* @__PURE__ */O("span",{className:"form-control__label--required",children:"*"})]}:{ref:e,className:ae(`form-control__label-${r}`,o),onClick:s,children:[t,a&&t&&/* @__PURE__ */O("span",{className:"form-control__label--required",children:"*"})]})},Y_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,onChange:s,onValidate:l})=>{let c=h(()=>l?.(),[l]);/* @__PURE__ */
381
- return O("input",{className:ae("form-control__checkbox-container",e),id:t,name:n,type:"checkbox",placeholder:r,value:i,required:a,disabled:o,onChange:s,onBlur:c})},G_=({className:e="",id:t="",name:n="",value:r="",required:i=!0,disabled:a=!1,previewMode:o=!0})=>/* @__PURE__ */A("div",{className:ae("form-control__input-hidden-container",e),children:[o&&/* @__PURE__ */O("input",{className:"input-container__input-hidden",id:t,name:n,type:"hidden",value:r,required:i,disabled:a}),!o&&/* @__PURE__ */O("div",{className:"input-container__input-hidden--no-preview",children:"hidden input"})]}),Q_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",type:a="text",autoComplete:o=!1,required:s=!0,disabled:l=!1,readOnly:c=!1,onChange:u,onValidate:d})=>{let[p,f]=S(!1),m=k(null),g=h(()=>f(e=>!e),[f]),y=h(()=>{m.current?.focus()},[m]),b=h(()=>d?.(),[d]);/* @__PURE__ */
370
+ e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(l_).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(t,n,r).then(t=>{e||a(t)}),()=>{e=!0}},[t,n,r]),i}(p);/* @__PURE__ */
371
+ return e.createElement(e.Fragment,null,f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}f_.displayName="FrameworkContext";function v_(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}e.Component;var x_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{x_&&(window.__reactRouterVersion="7.15.1")}catch(jR){}function w_({basename:t,children:n,useTransitions:r,window:i}){let a=e.useRef();null==a.current&&(a.current=function(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=u();function u(){return(o.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),qC(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:HC(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==c&&(c=0,o.replaceState({...o.state,idx:c},""));let f={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(FC,d),l=e,()=>{i.removeEventListener(FC,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=$C(e)?e:UC(f.location,e,t);n&&n(r,e),c=u()+1;let d=VC(r,c),p=f.createHref(r.mask||r);try{o.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}a&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=$C(e)?e:UC(f.location,e,t);n&&n(r,e),c=u();let i=VC(r,c),d=f.createHref(r.mask||r);o.replaceState(i,"",d),a&&l&&l({action:s,location:f.location,delta:0})},go:e=>o.go(e)};return f}(function(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return UC("",{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:HC(t)},null,e)}({window:i,v5Compat:!0}));let o=a.current,[s,l]=e.useState({action:o.action,location:o.location}),c=e.useCallback(t=>{!1===r?l(t):e.startTransition(()=>l(t))},[r]);return e.useLayoutEffect(()=>o.listen(c),[o,c]),/* @__PURE__ */e.createElement(ZE,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,useTransitions:r})}var k_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,S_=e.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:c,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m){let{basename:g,navigator:y,useTransitions:b}=e.useContext(IE),v="string"==typeof u&&k_.test(u),x=SE(u,g),w=function(t,{relative:n}={}){qC(jE(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=e.useContext(IE),{hash:a,pathname:o,search:s}=qE(t,{relative:n}),l=o;return"/"!==r&&(l="/"===o?r:hE([r,o])),i.createHref({pathname:l,search:s,hash:a})}(u=x.to,{relative:i}),k=zE(),S=null;if(s){let e=pE(s,[],k.mask?k.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:hE([g,e.pathname])),S=y.createHref(e)}let[T,N,C]=function(t,n){let r=e.useContext(f_),[i,a]=e.useState(!1),[o,s]=e.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=e.useRef(null);e.useEffect(()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let h=()=>{a(!0)},m=()=>{a(!1),s(!1)};return r?"intent"!==t?[o,f,{}]:[o,f,{onFocus:m_(l,h),onBlur:m_(c,m),onMouseEnter:m_(u,h),onMouseLeave:m_(d,m),onTouchStart:m_(p,h)}]:[!1,f,{}]}(r,h),E=function(t,{target:n,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=$E(),p=zE(),f=qE(t,{relative:s});return e.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,n)){h.preventDefault();let n=void 0!==r?r:HC(p)===HC(f),m=()=>d(t,{replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?e.startTransition(()=>m()):m()}},[p,d,f,r,i,a,n,t,o,s,l,c,u])}(u,{replace:o,mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,defaultShouldRevalidate:f,useTransitions:b}),_=!(x.isExternal||a),O=/* @__PURE__ */e.createElement("a",{...h,...C,href:(_?S:void 0)||x.absoluteURL||w,onClick:_?function(e){t&&t(e),e.defaultPrevented||E(e)}:t,ref:v_(m,N),target:c,"data-discover":v||"render"!==n?void 0:"true"});return T&&!v?/* @__PURE__ */e.createElement(e.Fragment,null,O,/* @__PURE__ */e.createElement(g_,{page:w})):O});S_.displayName="Link";var T_=e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:s,children:l,...c},u){let d=qE(o,{relative:c.relative}),p=zE(),f=e.useContext(EE),{navigator:h,basename:m}=e.useContext(IE),g=null!=f&&function(t,{relative:n}={}){let r=e.useContext(AE);qC(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=C_("useViewTransitionState"),a=qE(t,{relative:n});if(!r.isTransitioning)return!1;let o=sE(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=sE(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=oE(a.pathname,s)||null!=oE(a.pathname,o)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,b=p.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(b=b.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&m&&(v=sE(v,m)||v);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,k=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(x),S=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),T={isActive:k,isPending:S,isTransitioning:g},N=k?t:void 0;w="function"==typeof r?r(T):[r,k?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof a?a(T):a;/* @__PURE__ */
372
+ return e.createElement(S_,{...c,"aria-current":N,className:w,ref:u,style:C,to:o,viewTransition:s},"function"==typeof l?l(T):l)});T_.displayName="NavLink";var N_=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=e_,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m)=>{let{useTransitions:g}=e.useContext(IE),y=function(){let{router:t}=C_("useSubmit"),{basename:n}=e.useContext(IE),r=QE("useRouteId"),i=t.fetch,a=t.navigate;return e.useCallback(async(e,t={})=>{let{action:o,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,a,o;if(n_(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?sE(o,t):null,n=e.getAttribute("method")||e_,i=a_(e.getAttribute("enctype"))||t_,a=new FormData(e)}else if(function(e){return n_(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return n_(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(r=s?sE(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||e_,i=a_(e.getAttribute("formenctype"))||a_(o.getAttribute("enctype"))||t_,a=new FormData(o,e),!function(){if(null===r_)try{new FormData(document.createElement("form"),0),r_=!1}catch(jR){r_=!0}return r_}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(n_(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=e_,r=null,i=t_,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}(e,n);!1===t.navigate?await i(t.fetcherKey||__(),r,t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync}):await a(t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,a,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(IE),i=e.useContext(PE);qC(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),o={...qE(t||".",{relative:n})},s=zE();if(null==t){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return t&&"."!==t||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(o.pathname="/"===o.pathname?r:hE([r,o.pathname])),HC(o)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",x="string"==typeof l&&k_.test(l);/* @__PURE__ */
373
+ return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,h=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f});g&&!1!==r?e.startTransition(()=>h()):h()},...h,"data-discover":x||"render"!==t?void 0:"true"})});function C_(t){let n=e.useContext(CE);return qC(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}N_.displayName="Form";var E_=0,__=()=>`__${String(++E_)}__`;function O_({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=WC(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},a={createHref:A_,encodeLocation:I_,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
374
+ return e.createElement(ZE,{basename:t,children:n,location:i,navigationType:"POP",navigator:a,static:!0,useTransitions:!1})}function A_(e){return"string"==typeof e?e:HC(e)}function I_(e){let t="string"==typeof e?e:HC(e);t=t.replace(/ $/,"%20");let n=D_.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var D_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P_=e=>e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/i,":$1").replaceAll(/[/]+/gim,"/"),M_=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${M_(e,r)}/${n}`:n};function R_(e,t,n,r=!1){let{slug:i="",folder:a,default:o}=Y(e,`${n}.attributes`,{slug:n,folder:"",default:!1});if(o&&!r)return{"/":n,[`/${n}`]:n};if(o&&r)return"/";if(!a&&!r)return{[P_(`/${i}`)]:n,[`/${n}`]:n};if(!a&&r)return`/${i}`;if(!t.find(e=>e.id===a))return r?`/${i}`:{[P_(`/${i}`)]:n,[`/${n}`]:n};let s=[M_(t.reduce((e,t)=>({...e,[t.id]:t}),{}),a),i||n].filter(Boolean).join("/");return r?`/${s}`:{[`/${s}`]:n,[`/${n}`]:n}}var j_=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),z_=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],L_=dC(({ref:e,children:t,className:n="",href:r="#",target:i="self",mode:a="page"})=>{let{style:o}=gh(),{settings:{previewMode:s},contexts:{NavigationContext:l}}=lr(),{navigate:c,routeParams:u,queryParams:d}=f(l),{useStore:p}=Gr(),[[h,m]]=p(["pageDefinitions","schema.pageFolders"]),g=x(()=>{if("external"===a)return r;let e=`/${r}`.replaceAll(/[/]+/gim,"/");if("internal"===a){try{let t=Lo(e,{...d,...u},!0);return"string"==typeof t?t:e}catch{}return e}return R_(h,m,r,!0)},[a,r,h,m,d,u]);/* @__PURE__ */
375
+ return O(Fa,{tag:"a",...x(()=>{let t={ref:e,style:o,target:`_${i}`,className:ae("plitzi-component__link",n)};return s?{...t,href:g}:{...t,"href-disabled":g}},[e,o,i,n,s,g]),onClick:e=>{s&&(e.stopPropagation(),("page"===a||"internal"===a)&&(e.preventDefault(),c(g)))},children:t})}),F_=Object.assign(L_,{type:"link",content:{attributes:{href:"#",target:"self",mode:"page",linkContext:void 0},definition:{label:"Link",type:"link",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["link"]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-link"},defaultStyle:{name:"Link",displayMode:"desktop",style:{base:{default:{display:"inline-block","min-height":"30px","min-width":"30px",color:"#333",cursor:"pointer"}}}},settings:{}}}),$_=dC(({ref:e,content:t="Markdown",className:n=""})=>{let{settings:{previewMode:r}}=lr();/* @__PURE__ */
376
+ return O(Fa,{ref:e,className:ae("plitzi-component__markdown",{"plitzi-component__markdown--edit-mode":!r},n),children:/* @__PURE__ */O(BT,{children:t})})}),q_=Object.assign($_,{type:"markdown",content:{attributes:{content:"Markdown"},definition:{label:"Markdown",type:"markdown",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-markdown"},defaultStyle:{name:"Markdown",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"24px"}}}},settings:{}}}),B_=dC(({ref:e,content:t="Paragraph",className:n=""})=>{let{id:r}=gh(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=lr(),o=a?f(a):void 0,s=x(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Paragraph",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
377
+ return A(Fa,{ref:e,tag:i?"p":"div",className:ae("plitzi-component__paragraph",n),children:[i&&s,!i&&/* @__PURE__ */O(Zg,{className:"",value:s,onChange:l,openMode:"doubleClick"})]})}),V_=Object.assign(B_,{type:"paragraph",content:{attributes:{content:"Paragraph"},definition:{label:"Paragraph",type:"paragraph",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paragraph"},defaultStyle:{name:"Paragraph",displayMode:"desktop",style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}},settings:{}}}),U_=dC(({ref:e,content:t="Text",className:n=""})=>{let{id:r}=gh(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=lr(),o=a?f(a):void 0,s=x(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Text",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
378
+ return A(Fa,{ref:e,className:ae("plitzi-component__text",n),children:[i&&s,!i&&/* @__PURE__ */O(Zg,{className:"focus-visible:outline-hidden",value:s,onChange:l,openMode:"doubleClick"})]})}),H_=Object.assign(U_,{type:"text",content:{attributes:{content:"Text"},definition:{label:"Text",type:"text",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Text",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"24px",display:"inline"}}}},settings:{}}}),W_=dC(({ref:e,className:t="",children:n,method:r="get",actionUrl:i="",managedByInteractions:a=!1,errors:o=Qr,values:s=Qr})=>{let[l,c]=S({}),{id:u,definition:{label:d="Form"},setElementState:p}=gh(),{settings:{previewMode:m},contexts:{InteractionsContext:g}}=lr(),{interactionsManager:y}=f(g),b=h(e=>c(t=>({...t,[e.name]:e})),[c]),v=h(e=>e&&l[e]?Y(l,e):l,[l]),w=h(e=>{c(t=>ar(t,t=>{t[e]&&delete t[e]})),e&&p(t=>({...t,values:ee(t,`values.${e}`),errors:ee(t,`errors.${e}`)}))},[p]),k=h((e,t="")=>{e&&(null===t&&(t=""),p(n=>n.errors&&n.errors[e]?{...n,values:{...n.values,[e]:t},errors:ee(n.errors,[e])}:{...n,values:{...n.values,[e]:t}}))},[p]),T=h((e,t)=>{e&&p(n=>t||Y(n,`errors.${e}`)?!t&&n.errors&&n.errors[e]?{...n,errors:ee(n,[`errors.${e}`])}:{...n,errors:{...n.errors,[e]:t}}:n)},[p]),N=h(()=>Object.values(l).filter(e=>!!e.name).reduce((e,t)=>[...e,{path:`fields.${t.name}.id`,name:`${t.name} ID`},{path:`values.${t.name}`,name:`${t.name} Value`},{path:`errors.${t.name}`,name:`${t.name} Error Message`}],[]),[l]),C=x(()=>({fields:l,errors:o,values:s,registerField:b,unregisterField:w,getField:v,setFieldValue:k,setFieldError:T}),[l,o,s,b,w,v,k,T]);hh({id:u,source:"form",name:d||`Form - ${u}`,fields:N});let E=x(()=>({onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:Object.values(l).reduce((e,t)=>({...e,[t.name]:""}),{}),actionUrl:"",method:""}}}),[l]),_=h(e=>{if(p(e=>({...e,errors:{}})),!a||(e.stopPropagation(),e.preventDefault(),!m))return;let t=Object.values(l).reduce((e,{name:t})=>({...e,[t]:s[t]}),{});y.interactionTrigger(u,"onSubmit",{values:t,actionUrl:i,method:r})},[p,a,m,l,y,u,i,r,s]),A=h(e=>{a&&(e instanceof Event&&(e.stopPropagation(),e.preventDefault()),p(e=>({...e,values:{},errors:{}})))},[p,a]),I=h(e=>{let{name:t,value:n}=e;k(t,n)},[k]),D=h(e=>{let{name:t,error:n}=e;T(t,n)},[T]),P=x(()=>({performReset:{action:"performReset",title:`Reset ${d}`,type:"callback",callback:A,params:{}},setFieldValue:{action:"setFieldValue",title:`Set Field Value ${d}`,type:"callback",callback:I,preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:Object.values(l).map(e=>({value:e.name,label:e.name}))},value:{type:"text",defaultValue:""}}},setFieldError:{action:"setFieldError",title:`Set Field Error ${d}`,type:"callback",callback:D,preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:Object.values(l).map(e=>({value:e.name,label:e.name}))},error:{type:"text",defaultValue:""}}}}),[d,A,I,l,D]);/* @__PURE__ */
379
+ return O(Fa,{tag:"form",ref:e,method:r,className:ae("plitzi-component__form",t),interactionTriggers:E,interactionCallbacks:P,onSubmit:_,onReset:A,action:i,children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{form:C}}},children:n})})}),Y_=Object.assign(W_,{type:"form",content:{attributes:{method:"get",actionUrl:"",managedByInteractions:!1,errors:{},values:{}},definition:{label:"Form",type:"form",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */O(oC,{})},defaultStyle:{name:"Form",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),G_=({ref:e,children:t,targetInput:n="",type:r="text",previewMode:i=!0,required:a=!0,className:o=""})=>{let s=h(e=>{i||e.preventDefault()},[i]);/* @__PURE__ */
380
+ return A("label",i?{ref:e,className:ae(`form-control__label-${r}`,o),htmlFor:n,children:[t,a&&t&&/* @__PURE__ */O("span",{className:"form-control__label--required",children:"*"})]}:{ref:e,className:ae(`form-control__label-${r}`,o),onClick:s,children:[t,a&&t&&/* @__PURE__ */O("span",{className:"form-control__label--required",children:"*"})]})},Q_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,onChange:s,onValidate:l})=>{let c=h(()=>l?.(),[l]);/* @__PURE__ */
381
+ return O("input",{className:ae("form-control__checkbox-container",e),id:t,name:n,type:"checkbox",placeholder:r,value:i,required:a,disabled:o,onChange:s,onBlur:c})},J_=({className:e="",id:t="",name:n="",value:r="",required:i=!0,disabled:a=!1,previewMode:o=!0})=>/* @__PURE__ */A("div",{className:ae("form-control__input-hidden-container",e),children:[o&&/* @__PURE__ */O("input",{className:"input-container__input-hidden",id:t,name:n,type:"hidden",value:r,required:i,disabled:a}),!o&&/* @__PURE__ */O("div",{className:"input-container__input-hidden--no-preview",children:"hidden input"})]}),K_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",type:a="text",autoComplete:o=!1,required:s=!0,disabled:l=!1,readOnly:c=!1,onChange:u,onValidate:d})=>{let[p,f]=S(!1),m=k(null),g=h(()=>f(e=>!e),[f]),y=h(()=>{m.current?.focus()},[m]),b=h(()=>d?.(),[d]);/* @__PURE__ */
382
382
  return A("div",{className:ae("form-control__input-container",e),onClick:y,children:[
383
- /* @__PURE__ */O("input",{ref:m,className:"input-container__input",id:t,name:n,type:"password"===a&&p?"text":a,placeholder:r,value:i,required:s,autoComplete:o?"on":"off",disabled:l,readOnly:c,onChange:u,onBlur:b}),"password"===a&&!p&&/* @__PURE__ */O("div",{className:"form-input__icon",onClick:g,children:/* @__PURE__ */O("i",{className:"fa-solid fa-eye"})}),"password"===a&&p&&/* @__PURE__ */O("div",{className:"form-input__icon",onClick:g,children:/* @__PURE__ */O("i",{className:"fa-solid fa-eye-slash"})})]})},J_=({id:e="",name:t,options:n=[],placeholder:r="",value:i="",className:a="",disabled:o=!1,onChange:s,onValidate:l})=>{let c=k(null),u=h(()=>{c.current?.click()},[c]),d=h(e=>{e.stopPropagation()},[]),p=h(()=>l?.(),[l]),f=x(()=>Array.isArray(n)?n.map(e=>"string"==typeof e?{value:e,label:e}:"object"!=typeof e||e.value&&e.label?{value:e.value??"",label:e.label??""}:{value:e=e.value??e.label??"",label:e}):[],[n]);/* @__PURE__ */
384
- return O("div",{className:ae("form-control__select-container",a),onClick:u,children:/* @__PURE__ */A("select",{ref:c,id:e,name:t,onChange:s,value:i,className:"select-container__select",disabled:o,onClick:d,onBlur:p,children:[r&&/* @__PURE__ */O("option",{value:"",children:r}),f.map((e,t)=>/* @__PURE__ */O("option",{value:e.value,children:e.label},t))]})})},K_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,readOnly:s=!1,onChange:l,onValidate:c})=>{let u=k(null),d=h(e=>{e.stopPropagation()},[]),p=h(()=>c?.(),[c]);/* @__PURE__ */
385
- return O("textarea",{ref:u,className:ae("form-control__textarea-container",e),id:t,name:n,placeholder:r,value:i,readOnly:s,required:a,disabled:o,onChange:l,onBlur:p,onClick:d})},X_=dC((e=>{let t=t=>{let{ref:n,name:r="",subType:i="text",defaultValue:a="",required:o=!0,previewError:s=!1}=t,{settings:{previewMode:l}}=lr(),{useStore:c}=Gr(),[u]=c("runtime.sources.form");if(!u)/* @__PURE__ */return O(e,{...t});let{setFieldValue:d,setFieldError:p,errors:f,values:m}=u,y=x(()=>Y(m,r,a),[m,r,a]),b=x(()=>!l&&s?"This is an error message":f[r],[l,s,f,r]);g(()=>{a&&y&&r&&d(r,y)},[a,r,d,y]);let v=h(e=>{"radio"===e.target.type||"checkbox"===e.target.type||"switch"===i?d(r,e.target.checked):d(r,e.target.value)},[d,r,i]),w=h(()=>{!y&&o?p(r,"This field is required"):"This field is required"===b&&p(r,"")},[y,b,r,o,p]);return x(()=>/* @__PURE__ */O(e,{...t,ref:n,value:y,error:b,handleChange:v,handleValidate:w}),[t,n,b,y,v,w])};return t.displayName=`withFieldValue(${function(e){return e&&(e.displayName||e.name)||"Component"}(e)})`,t})(({ref:e,className:t="",subType:n="text",name:r="",label:i="Label",placeholder:a="",autoComplete:o=!0,disabled:s=!1,options:l=[],required:c=!0,readOnly:u=!1,value:d="",error:p="",handleChange:f,handleValidate:h})=>{let{id:m,rootId:y,definition:{styleSelectors:b}}=gh(),{settings:{previewMode:v}}=lr(),{useStore:x}=Gr(),[w]=x("runtime.sources.form");if(!w&&!v)/* @__PURE__ */return O(Fa,{ref:e,className:ae("plitzi-component__form-input",{"form-input--out-of-context":!v},t),children:/* @__PURE__ */O("div",{children:"Form Input Only Works inside Form element"})});if(!w&&v)return null;let{registerField:k,unregisterField:S}=w,T=["checkbox","switch"].includes(n);return g(()=>(k&&k({name:r,path:r}),()=>{S&&S(r)}),[r,k,S]),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__form-control",{"form-control--invalid":p&&v,[`plitzi-component__form-control-${n}`]:n},t),children:[!T&&i&&/* @__PURE__ */O(W_,{targetInput:`${y}_${m}`,previewMode:v,className:b.label,type:n,required:c,children:i}),T&&i&&/* @__PURE__ */A(W_,{targetInput:`${y}_${m}`,previewMode:v,className:b.label,type:n,required:c,children:["checkbox"===n&&/* @__PURE__ */O(Y_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,onChange:f,onValidate:h}),i]}),"checkbox"===n&&!i&&/* @__PURE__ */O(Y_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,onChange:f,onValidate:h}),["text","number","email","password","time"].includes(n)&&/* @__PURE__ */O(Q_,{id:`${y}_${m}`,name:r,value:d,type:n,className:b.input,placeholder:a,autoComplete:"password"!==n&&o,required:c,disabled:s,readOnly:u||!v,onChange:f,onValidate:h}),"hidden"===n&&/* @__PURE__ */O(G_,{id:`${y}_${m}`,name:r,value:d,required:c,disabled:s,previewMode:v}),"select"===n&&/* @__PURE__ */O(J_,{id:`${y}_${m}`,name:r,onChange:f,onValidate:h,value:d,className:b.input,placeholder:a,disabled:s,options:l}),"textarea"===n&&/* @__PURE__ */O(K_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,readOnly:u,onChange:f,onValidate:h}),p&&/* @__PURE__ */O("div",{className:ae("form-control__error-message",b.error),children:p})]})})),Z_={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","line-height":"20px",outline:"none",position:"relative"},eO={display:"flex",cursor:"pointer","margin-bottom":"4px","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},tO={display:"block",color:"red","margin-top":"4px"},nO=Object.assign(X_,{type:"formControl",content:{attributes:{subType:"text",name:"",label:"Label",placeholder:"",defaultValue:"",autoComplete:!0,disabled:!1,options:[],required:!0,readOnly:!1},definition:{label:"Form Control",type:"formControl",description:"",bindings:{},styleSelectors:{base:"",label:"",input:"",error:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */O(oC,{})},defaultStyle:{name:"Form Control",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hidden:{name:"Form Control Hidden",displayMode:"desktop",style:{base:{},input:{default:{}},label:{default:eO},error:{default:tO}}},text:{name:"Form Control Text",displayMode:"desktop",style:{base:{default:{}},input:{default:Z_},label:{default:eO},error:{default:tO}}},password:{name:"Form Control Password",displayMode:"desktop",style:{base:{default:{}},input:{default:Z_},label:{default:eO},error:{default:tO}}},number:{name:"Form Control Number",displayMode:"desktop",style:{base:{default:{}},input:{default:Z_},label:{default:eO},error:{default:tO}}},email:{name:"Form Control Email",displayMode:"desktop",style:{base:{default:{}},input:{default:Z_},label:{default:eO},error:{default:tO}}},textarea:{name:"Form Control Textarea",displayMode:"desktop",style:{base:{default:{}},input:{default:Z_},label:{default:eO},error:{default:tO}}},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:ee(eO,["margin-bottom"])},error:{default:tO}}},select:{name:"Form Control Select",displayMode:"desktop",style:{base:{default:{}},input:{default:{...Z_,cursor:"pointer"}},label:eO,error:{default:tO}}}}},settings:{}}}),rO=dC(({ref:e,className:t="",children:n,subType:r="div"})=>{let{plitziElementLayout:i}=gh(),{settings:{previewMode:a}}=lr(),o=h((e,t)=>{if(!e||!t)return;let n=t.getBoundingClientRect(),r=n.top-0,i=n.left-0,a=i+n.width+0,o=r+n.height+0,s=`\n polygon(\n evenodd,\n /* outer rect */\n 0 0, 100% 0, 100% 100%, 0% 100%, 0 0,\n /* inner rect */ \n ${i}px ${r}px, ${a}px ${r}px, ${a}px ${o}px, ${i}px ${o}px, ${i}px ${r}px\n )`;e.style.setProperty("--child-clip",s)},[]);return g(()=>{if(!i||!e?.current||a)return;let t=ne(()=>{let t=e.current;o(t,t.querySelector(".plitzi-component--layout-body"))},150),n=new ResizeObserver(t);n.observe(e.current);let r=e.current.querySelector(".plitzi-component--layout-body");return r&&n.observe(r),()=>{t.cancel(),n.disconnect()}},[i,a,e,o]),/* @__PURE__ */O(Fa,{ref:e,tag:r,className:ae("plitzi-component__layout-container",t),children:n})}),iO=Object.assign(rO,{type:"layoutContainer",content:{attributes:{subType:"div"},definition:{label:"Layout Container",type:"layoutContainer",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-border-all"},defaultStyle:{name:"Layout Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),aO=dC(({ref:e,className:t=""})=>{let{definition:{label:n}}=gh();/* @__PURE__ */
386
- return O(Fa,{ref:e,className:ae("plitzi-component__loading",t),children:/* @__PURE__ */A("span",{children:[/* @__PURE__ */O("b",{children:n})," Loading..."]})})}),oO=Object.assign(aO,{type:"loading",content:{attributes:{},definition:{label:"Loading",type:"loading",description:"",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Loading",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),sO=Object.assign(pC,{type:"notFound",content:{attributes:{},definition:{label:"Not Found",type:"notFound",description:"",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Not Found",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),lO=dC(({ref:e,seoEnabled:t=!1,seoPageTitle:n="Title",seoPageDescription:r="Description",className:i="",layout:a="",layoutContainer:o="",children:s})=>{let{id:l}=gh(),{settings:{previewMode:c},contexts:{NavigationContext:u,InteractionsContext:d}}=lr(),{interactionsManager:p}=f(d),{Helmet:h,routeParams:m,queryParams:y}=f(u),b=x(()=>({id:a,rootId:l,plitziElementLayout:{bodyChildren:s,containerId:o||a,referenceId:l,rootId:o||a,type:"layout"}}),[o,a,l,s]),v=x(()=>({onPageLoad:{action:"onPageLoad",title:"On Page Load",type:"trigger",params:{},preview:{pageId:"",routeParams:"",queryParams:""}}}),[]);return g(()=>{p.interactionTrigger(l,"onPageLoad",{pageId:l,routeParams:m,queryParams:y})},[l,p,y,m]),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__page",i),interactionTriggers:v,children:[t&&c&&h&&/* @__PURE__ */A(h,{children:[!!n&&/* @__PURE__ */O("title",{children:n}),!!r&&/* @__PURE__ */O("meta",{name:"description",content:r})]}),a&&/* @__PURE__ */O(iO,{internalProps:b}),!a&&s]})}),cO=Object.assign(lO,{type:"page",content:{attributes:{enabled:!0,name:"Page",slug:"",folder:"",layout:"",layoutContainer:"",seoEnabled:!1,seoPageTitle:"Title",seoPageDescription:"Description"},definition:{label:"Page",type:"page",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fas fa-file"},defaultStyle:{name:"Page",displayMode:"desktop",style:{base:{default:{display:"flex","flex-direction":"column","min-height":"100%","min-width":"100%","font-family":"Arial",color:"#333","font-size":"14px","font-weight":400,"line-height":"16px","text-align":"left","background-color":"#ffffff"}}}},settings:{}}}),uO=dC(({ref:e,className:t="",icon:n="fas fa-flag",size:r="fa-1x",iconAnimation:i=""})=>{let{settings:{previewMode:a}}=lr();/* @__PURE__ */
387
- return O(Fa,a?{ref:e,tag:"i",className:ae("plitzi-component__fontawesome",t,n,r,i)}:{ref:e,className:ae("plitzi-component__fontawesome fontawesome--edit-mode",t),children:/* @__PURE__ */O("i",{className:ae(n,r,i)})})}),dO=Object.assign(uO,{type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",type:"fontAwesome",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-font-awesome"},defaultStyle:{name:"Font Awesome",displayMode:"desktop",style:{base:{default:{display:"inline-block","font-size":"16px"}}}},settings:{}}}),pO="data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" fill="none">\n <rect width="1200" height="1200" fill="#EAEAEA" rx="3"/>\n <path fill="#FAFAFA" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="#C9C9C9" stroke-width="2.418" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/>\n <path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/>\n <path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/>\n <path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/>\n <path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/>\n <path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <defs>\n <linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath>\n </defs>\n</svg>'),fO=dC(({ref:e,className:t="",src:n="https://cdn.plitzi.com/resources/img/placeholder-img.svg",alt:r="",fetchPriority:i="auto",loadMode:a})=>{let{settings:{previewMode:o}}=lr(),s=h(e=>{e.currentTarget.onerror=null,e.currentTarget.src=pO},[]);/* @__PURE__ */
388
- return O(Fa,o?{tag:"img",draggable:!1,ref:e,className:ae("plitzi-component__image",t),src:n,alt:r,loading:a,fetchPriority:i,onError:s}:{ref:e,className:ae("plitzi-component__image image--edit-mode",t),children:/* @__PURE__ */O("img",{draggable:!1,src:n,alt:r,loading:a,fetchPriority:i,onError:s})})}),hO=Object.assign(fO,{type:"image",content:{attributes:{src:"https://cdn.plitzi.com/resources/img/placeholder-img.svg",alt:"",fetchPriority:"auto",loadMode:"auto"},definition:{label:"Image",type:"image",description:"Use an URL to display an image.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-image"},defaultStyle:{name:"Image",displayMode:"desktop",style:{base:{default:{display:"block",width:"140px",height:"140px"}}}},settings:{}}}),mO=dC(({ref:e,src:t,autoPlay:n=!1,playsInline:r=!1,loop:i=!1,muted:a=!0,className:o=""})=>{let{settings:{previewMode:s}}=lr();/* @__PURE__ */
389
- return O(Fa,s?{tag:"video",draggable:!1,ref:e,className:ae("plitzi-component__video",o),src:t,autoPlay:n,playsInline:r,loop:i,muted:a}:{ref:e,className:ae("plitzi-component__video video--edit-mode",o),children:/* @__PURE__ */O("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:a,children:/* @__PURE__ */O("track",{kind:"captions"})})})}),gO=Object.assign(mO,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Use an URL to display a video.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),yO=dC(({ref:e,className:t="",children:n,query:r="",method:i="get",accessToken:a="",when:o=Qr,headers:s=Qr,mockData:l="{}",subType:c="div",credentials:u="same-origin"})=>{let{id:d,definition:{label:p="Api Container"}}=gh(),{settings:{previewMode:m,debugMode:y},contexts:{NavigationContext:b,InteractionsContext:v}}=lr(),{interactionsManager:w}=f(v),{routeParams:k,queryParams:T}=f(b),N=x(()=>{if(!r)return"";try{let e={...T,...k};y&&[...r.matchAll(/{{([ ]+|)(?<token>[a-zA-Z0-9-_:*/]+)([ ]+|)}}/gim)].forEach(({groups:t})=>{let n=t?.token.trim();!n||Y(e,n)});let t=Lo(r,e,!0);return"string"==typeof t?t:r}catch(jR){}return""},[r,T,k,y]),C=x(()=>a?{...s,Authorization:`Bearer ${a}`}:s,[s,a]),E=x(()=>!!(m&&N&&(o===Qr||bN(o,{...k,...T}))||!m&&(N||l&&"{}"!==l&&l!==Qr)),[m,N,o,k,T,l]),{isLoading:_,data:A,refetch:I,isSuccess:D,isError:P}=(({url:e="",method:t="get",mock:n=Qr,params:r=Qr,customHeaders:i=Qr,enabled:a=!0,credentials:o="same-origin"})=>{let[s,l]=S(a),[c,u]=S(),d=h(()=>{a&&(l(!0),(async({url:e="",method:t="get",credentials:n="same-origin",params:r=Qr,customHeaders:i=Qr,mock:a=Qr}={})=>{if(a&&"{}"!==a&&a!==Qr)try{return"string"==typeof a?{status:200,data:JSON.parse(a)}:{status:200,data:a}}catch(e){return{status:500,data:e.message}}let o=new Headers;if(o.append("Content-Type","application/json"),Object.keys(i).length>0&&Object.keys(i).forEach(e=>{o.append(e,i[e])}),!e)return{status:400,data:"URL is required"};Object.values(r).forEach(e=>{e instanceof Blob&&"multipart/form-data"!==o.get("Content-Type")&&o.set("Content-Type","multipart/form-data")});let s=new FormData;Object.entries(r).forEach(([e,t])=>{s.append(e,t)});let l={method:t,credentials:n,headers:o,body:s};"application/json"===o.get("Content-Type")&&(l.body=JSON.stringify(r)),"get"===t&&delete l.body;try{let t=await fetch(e,l);return{status:t.status,data:await t.json()}}catch(e){return{status:500,data:e.message}}})({url:e,method:t,credentials:o,mock:n,customHeaders:i,params:r}).then(e=>u(e)).catch(e=>u({status:500,data:e.message})).finally(()=>l(!1)))},[a,e,t,o,n,i,r]);return g(()=>{d()},[a,r,n,e,d]),{isLoading:s,data:c,refetch:d,isSuccess:!s&&c&&c.status<400,isError:!s&&c&&c.status>=400}})({url:N,method:i,credentials:u,mock:m?void 0:l,customHeaders:C,enabled:E});g(()=>{_||(D?w.interactionTrigger(d,"onApiSuccess",{url:N,method:i,...A}):P&&w.interactionTrigger(d,"onApiError",{url:N,method:i,...A}))},[A,d,w,P,_,D,i,N]);let M=h(()=>Jr(A).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]),[A]);hh({id:d,source:`apiContainer_${d}`,name:p||`API - ${d}`,fields:M});let R=x(()=>({performQuery:{action:"performQuery",title:`Perform Query ${p}`,type:"callback",callback:I,preview:{},params:{}}}),[p,I]),j=x(()=>({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:""}}}),[]);/* @__PURE__ */
390
- return O(Fa,{ref:e,tag:c,className:ae("plitzi-component__api-container",t),interactionTriggers:j,interactionCallbacks:R,children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[`apiContainer_${d}`]:A}}},children:!_&&n})})}),bO=Object.assign(yO,{type:"apiContainer",content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"div",credentials:"same-origin"},definition:{label:"Api Container",type:"apiContainer",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),vO=dC(({ref:e,className:t="",source:n="",children:r,limit:i="10",query:a,singleRecord:o=!1})=>{let{id:s,definition:{label:l="Collection Container"}}=gh(),{settings:{previewMode:c}}=lr(),{loading:u,collection:d,fetch:p}=(({source:e,query:t,limit:n="1",appendResults:r=!1,singleRecord:i=!1,previewMode:a=!0}={})=>{let o=lr(),[s,l]=S(void 0),[c,u]=S(!0),[d,p]=S(void 0),[m,y]=S(!1),{contexts:{CollectionContext:b,NavigationContext:v}}=o,{routeParams:w,queryParams:k}=f(v),{fetchRecords:T,fetchCollection:N}=f(b),C=x(()=>{if(!a||!t)return"";try{return xN(t,"mongodb",!1,{queryParams:k,routeParams:w})}catch{}return""},[a,t,k,w]),E=h((e,t)=>{let{pageInfo:n,edges:r}=t;p(n.nextCursor),y(n.hasNextPage),l({...e,records:i?[]:r,record:i&&r.length>0?r[0]:void 0})},[i]),_=h(async()=>{u(!0);let t=await N(e,C);u(!1),t?.records&&t.records.edges.length>0&&E(t,t.records)},[N,E,C,e]),O=h(async()=>{if(!s||!e)return;u(!0);let t=await T(e,C,!r&&d?void 0:d,parseInt(n,10));u(!1),t&&E(s,t)},[s,e,T,C,r,d,n,E]),A=h(async()=>{m&&await O()},[m,O]);return g(()=>{re(e)?(p(void 0),y(!1),l(void 0),u(!1)):_()},[e,_]),x(()=>({loading:c,collection:s,hasNextPage:m,handleNextPage:A,fetch:_}),[c,s,m,A,_])})({source:n,limit:i,query:a,singleRecord:o,previewMode:c}),m=h(()=>{let e=[];return d?(o||e.push({path:"records",name:"Records"}),e.push({path:"record.id",name:"Record ID"}),e.push({path:"record.status",name:"Record Status"}),Object.values(d.fields).forEach(t=>{e.push({path:`record.values.${t.machineName}`,name:`Record Field - ${t.name}`})}),e):[]},[d,o]);hh({id:s,source:`collectionContainer_${s}`,name:l||`Collection - ${d?.name||s}`,fields:m});let y=x(()=>({performQuery:{action:"performQuery",title:`Refresh ${l}`,type:"callback",callback:p,preview:{},params:{}}}),[p,l]);if(d||!c)/* @__PURE__ */return A(Fa,{ref:e,interactionCallbacks:y,className:ae("plitzi-component__collection-container",t,{"collection-container--context-empty":!d}),children:[!d&&/* @__PURE__ */O("div",{className:"collection-container__message",children:"Source Not Selected"}),d&&!u&&/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[`collectionContainer_${s}`]:d}}},children:r})]})}),xO=Object.assign(vO,{type:"collectionContainer",content:{attributes:{limit:"10",query:"",source:void 0,singleRecord:!1},definition:{label:"Collection Container",type:"collectionContainer",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-database"},defaultStyle:{name:"Collection Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),wO=dC(({ref:e,className:t="",subType:n="div",children:r})=>/* @__PURE__ */O(Fa,{ref:e,tag:n,className:ae(`plitzi-component__container plitzi-component__container-${n}`,t),children:r})),kO=Object.assign(wO,{type:"container",content:{attributes:{subType:"div"},definition:{label:"Container",type:"container",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-square"},defaultStyle:{name:"Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),SO=dC(({ref:e,className:t="",children:n,headerLabel:r="Dialog Header",acceptButtonLabel:i="Accept",acceptButtonLabelLoading:a="Loading...",rejectButtonLabel:o="Cancel",autoHideAfterClick:s=!0})=>{let{id:l,setElementState:c,definition:{styleSelectors:u,label:d="Dialog"},elementState:p}=gh(),{contexts:{InteractionsContext:m}}=lr(),{interactionsManager:y}=f(m),[b,v]=S({}),[w,k]=S(!1),T=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)v(t);else if("string"==typeof t)try{v(JSON.parse(t))}catch{v({content:t})}else v("boolean"==typeof t||"number"==typeof t?{content:t}:{});c(e=>({...e,visibility:!0}))},[c,v]),N=h(()=>{y.interactionTrigger(l,"onDialogClose",{metadata:b}),v({}),c(e=>({...e,visibility:!1}))},[y,c,v,b,l]),C=h(()=>{s&&(y.interactionTrigger(l,"onDialogClose",{metadata:b}),v({}),c(e=>({...e,visibility:!1})))},[y,s,c,v,b,l]);h(async()=>{k(!0),await y.interactionTrigger(l,"onDialogAccept",{metadata:b}),k(!1),c(e=>({...e,visibility:!1}))},[y,l,b,c]),h(async()=>{k(!0),await y.interactionTrigger(l,"onDialogReject",{metadata:b}),k(!1),c(e=>({...e,visibility:!1}))},[y,l,b,c]);let E=x(()=>({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:""}}}),[]),_=x(()=>({openDialog:{action:"openDialog",title:`Open ${d}`,type:"callback",callback:T,params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeDialog:{action:"closeDialog",title:`Close ${d}`,type:"callback",callback:N,preview:{},params:{}}}),[N,T,d]);g(()=>{!1!==p.visibility&&y.interactionTrigger(l,"onDialogOpen",{metadata:b})},[l,y,b,p.visibility]);let I=h(()=>"object"==typeof b?Jr(b).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]):[],[b]);return hh({id:l,source:`dialogContainer_${l}`,name:d||`Dialog - ${l}`,fields:I}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__dialog-container",t),interactionTriggers:E,interactionCallbacks:_,children:[/* @__PURE__ */O("div",{className:ae("dialog-container__background",u.backgroundContainer),onClick:C}),/* @__PURE__ */A("div",{className:ae("dialog-container__root",u.rootContainer),children:[
383
+ /* @__PURE__ */O("input",{ref:m,className:"input-container__input",id:t,name:n,type:"password"===a&&p?"text":a,placeholder:r,value:i,required:s,autoComplete:o?"on":"off",disabled:l,readOnly:c,onChange:u,onBlur:b}),"password"===a&&!p&&/* @__PURE__ */O("div",{className:"form-input__icon",onClick:g,children:/* @__PURE__ */O("i",{className:"fa-solid fa-eye"})}),"password"===a&&p&&/* @__PURE__ */O("div",{className:"form-input__icon",onClick:g,children:/* @__PURE__ */O("i",{className:"fa-solid fa-eye-slash"})})]})},X_=({id:e="",name:t,options:n=[],placeholder:r="",value:i="",className:a="",disabled:o=!1,onChange:s,onValidate:l})=>{let c=k(null),u=h(()=>{c.current?.click()},[c]),d=h(e=>{e.stopPropagation()},[]),p=h(()=>l?.(),[l]),f=x(()=>Array.isArray(n)?n.map(e=>"string"==typeof e?{value:e,label:e}:"object"!=typeof e||e.value&&e.label?{value:e.value??"",label:e.label??""}:{value:e=e.value??e.label??"",label:e}):[],[n]);/* @__PURE__ */
384
+ return O("div",{className:ae("form-control__select-container",a),onClick:u,children:/* @__PURE__ */A("select",{ref:c,id:e,name:t,onChange:s,value:i,className:"select-container__select",disabled:o,onClick:d,onBlur:p,children:[r&&/* @__PURE__ */O("option",{value:"",children:r}),f.map((e,t)=>/* @__PURE__ */O("option",{value:e.value,children:e.label},t))]})})},Z_=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,readOnly:s=!1,onChange:l,onValidate:c})=>{let u=k(null),d=h(e=>{e.stopPropagation()},[]),p=h(()=>c?.(),[c]);/* @__PURE__ */
385
+ return O("textarea",{ref:u,className:ae("form-control__textarea-container",e),id:t,name:n,placeholder:r,value:i,readOnly:s,required:a,disabled:o,onChange:l,onBlur:p,onClick:d})},eO=dC((e=>{let t=t=>{let{ref:n,name:r="",subType:i="text",defaultValue:a="",required:o=!0,previewError:s=!1}=t,{settings:{previewMode:l}}=lr(),{useStore:c}=Gr(),[u]=c("runtime.sources.form");if(!u)/* @__PURE__ */return O(e,{...t});let{setFieldValue:d,setFieldError:p,errors:f,values:m}=u,y=x(()=>Y(m,r,a),[m,r,a]),b=x(()=>!l&&s?"This is an error message":f[r],[l,s,f,r]);g(()=>{a&&y&&r&&d(r,y)},[a,r,d,y]);let v=h(e=>{"radio"===e.target.type||"checkbox"===e.target.type||"switch"===i?d(r,e.target.checked):d(r,e.target.value)},[d,r,i]),w=h(()=>{!y&&o?p(r,"This field is required"):"This field is required"===b&&p(r,"")},[y,b,r,o,p]);return x(()=>/* @__PURE__ */O(e,{...t,ref:n,value:y,error:b,handleChange:v,handleValidate:w}),[t,n,b,y,v,w])};return t.displayName=`withFieldValue(${function(e){return e&&(e.displayName||e.name)||"Component"}(e)})`,t})(({ref:e,className:t="",subType:n="text",name:r="",label:i="Label",placeholder:a="",autoComplete:o=!0,disabled:s=!1,options:l=[],required:c=!0,readOnly:u=!1,value:d="",error:p="",handleChange:f,handleValidate:h})=>{let{id:m,rootId:y,definition:{styleSelectors:b}}=gh(),{settings:{previewMode:v}}=lr(),{useStore:x}=Gr(),[w]=x("runtime.sources.form");if(!w&&!v)/* @__PURE__ */return O(Fa,{ref:e,className:ae("plitzi-component__form-input",{"form-input--out-of-context":!v},t),children:/* @__PURE__ */O("div",{children:"Form Input Only Works inside Form element"})});if(!w&&v)return null;let{registerField:k,unregisterField:S}=w,T=["checkbox","switch"].includes(n);return g(()=>(k&&k({name:r,path:r}),()=>{S&&S(r)}),[r,k,S]),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__form-control",{"form-control--invalid":p&&v,[`plitzi-component__form-control-${n}`]:n},t),children:[!T&&i&&/* @__PURE__ */O(G_,{targetInput:`${y}_${m}`,previewMode:v,className:b.label,type:n,required:c,children:i}),T&&i&&/* @__PURE__ */A(G_,{targetInput:`${y}_${m}`,previewMode:v,className:b.label,type:n,required:c,children:["checkbox"===n&&/* @__PURE__ */O(Q_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,onChange:f,onValidate:h}),i]}),"checkbox"===n&&!i&&/* @__PURE__ */O(Q_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,onChange:f,onValidate:h}),["text","number","email","password","time"].includes(n)&&/* @__PURE__ */O(K_,{id:`${y}_${m}`,name:r,value:d,type:n,className:b.input,placeholder:a,autoComplete:"password"!==n&&o,required:c,disabled:s,readOnly:u||!v,onChange:f,onValidate:h}),"hidden"===n&&/* @__PURE__ */O(J_,{id:`${y}_${m}`,name:r,value:d,required:c,disabled:s,previewMode:v}),"select"===n&&/* @__PURE__ */O(X_,{id:`${y}_${m}`,name:r,onChange:f,onValidate:h,value:d,className:b.input,placeholder:a,disabled:s,options:l}),"textarea"===n&&/* @__PURE__ */O(Z_,{id:`${y}_${m}`,name:r,value:d,className:b.input,placeholder:a,required:c,disabled:s,readOnly:u,onChange:f,onValidate:h}),p&&/* @__PURE__ */O("div",{className:ae("form-control__error-message",b.error),children:p})]})})),tO={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","line-height":"20px",outline:"none",position:"relative"},nO={display:"flex",cursor:"pointer","margin-bottom":"4px","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},rO={display:"block",color:"red","margin-top":"4px"},iO=Object.assign(eO,{type:"formControl",content:{attributes:{subType:"text",name:"",label:"Label",placeholder:"",defaultValue:"",autoComplete:!0,disabled:!1,options:[],required:!0,readOnly:!1},definition:{label:"Form Control",type:"formControl",description:"",bindings:{},styleSelectors:{base:"",label:"",input:"",error:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */O(oC,{})},defaultStyle:{name:"Form Control",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hidden:{name:"Form Control Hidden",displayMode:"desktop",style:{base:{},input:{default:{}},label:{default:nO},error:{default:rO}}},text:{name:"Form Control Text",displayMode:"desktop",style:{base:{default:{}},input:{default:tO},label:{default:nO},error:{default:rO}}},password:{name:"Form Control Password",displayMode:"desktop",style:{base:{default:{}},input:{default:tO},label:{default:nO},error:{default:rO}}},number:{name:"Form Control Number",displayMode:"desktop",style:{base:{default:{}},input:{default:tO},label:{default:nO},error:{default:rO}}},email:{name:"Form Control Email",displayMode:"desktop",style:{base:{default:{}},input:{default:tO},label:{default:nO},error:{default:rO}}},textarea:{name:"Form Control Textarea",displayMode:"desktop",style:{base:{default:{}},input:{default:tO},label:{default:nO},error:{default:rO}}},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:ee(nO,["margin-bottom"])},error:{default:rO}}},select:{name:"Form Control Select",displayMode:"desktop",style:{base:{default:{}},input:{default:{...tO,cursor:"pointer"}},label:nO,error:{default:rO}}}}},settings:{}}}),aO=dC(({ref:e,className:t="",children:n,subType:r="div"})=>{let{plitziElementLayout:i}=gh(),{settings:{previewMode:a}}=lr(),o=h((e,t)=>{if(!e||!t)return;let n=t.getBoundingClientRect(),r=n.top-0,i=n.left-0,a=i+n.width+0,o=r+n.height+0,s=`\n polygon(\n evenodd,\n /* outer rect */\n 0 0, 100% 0, 100% 100%, 0% 100%, 0 0,\n /* inner rect */ \n ${i}px ${r}px, ${a}px ${r}px, ${a}px ${o}px, ${i}px ${o}px, ${i}px ${r}px\n )`;e.style.setProperty("--child-clip",s)},[]);return g(()=>{if(!i||!e?.current||a)return;let t=ne(()=>{let t=e.current;o(t,t.querySelector(".plitzi-component--layout-body"))},150),n=new ResizeObserver(t);n.observe(e.current);let r=e.current.querySelector(".plitzi-component--layout-body");return r&&n.observe(r),()=>{t.cancel(),n.disconnect()}},[i,a,e,o]),/* @__PURE__ */O(Fa,{ref:e,tag:r,className:ae("plitzi-component__layout-container",t),children:n})}),oO=Object.assign(aO,{type:"layoutContainer",content:{attributes:{subType:"div"},definition:{label:"Layout Container",type:"layoutContainer",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-border-all"},defaultStyle:{name:"Layout Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),sO=dC(({ref:e,className:t=""})=>{let{definition:{label:n}}=gh();/* @__PURE__ */
386
+ return O(Fa,{ref:e,className:ae("plitzi-component__loading",t),children:/* @__PURE__ */A("span",{children:[/* @__PURE__ */O("b",{children:n})," Loading..."]})})}),lO=Object.assign(sO,{type:"loading",content:{attributes:{},definition:{label:"Loading",type:"loading",description:"",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Loading",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),cO=Object.assign(pC,{type:"notFound",content:{attributes:{},definition:{label:"Not Found",type:"notFound",description:"",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Not Found",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),uO=dC(({ref:e,seoEnabled:t=!1,seoPageTitle:n="Title",seoPageDescription:r="Description",className:i="",layout:a="",layoutContainer:o="",children:s})=>{let{id:l}=gh(),{settings:{previewMode:c},contexts:{NavigationContext:u,InteractionsContext:d}}=lr(),{interactionsManager:p}=f(d),{Helmet:h,routeParams:m,queryParams:y}=f(u),b=x(()=>({id:a,rootId:l,plitziElementLayout:{bodyChildren:s,containerId:o||a,referenceId:l,rootId:o||a,type:"layout"}}),[o,a,l,s]),v=x(()=>({onPageLoad:{action:"onPageLoad",title:"On Page Load",type:"trigger",params:{},preview:{pageId:"",routeParams:"",queryParams:""}}}),[]);return g(()=>{p.interactionTrigger(l,"onPageLoad",{pageId:l,routeParams:m,queryParams:y})},[l,p,y,m]),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__page",i),interactionTriggers:v,children:[t&&c&&h&&/* @__PURE__ */A(h,{children:[!!n&&/* @__PURE__ */O("title",{children:n}),!!r&&/* @__PURE__ */O("meta",{name:"description",content:r})]}),a&&/* @__PURE__ */O(oO,{internalProps:b}),!a&&s]})}),dO=Object.assign(uO,{type:"page",content:{attributes:{enabled:!0,name:"Page",slug:"",folder:"",layout:"",layoutContainer:"",seoEnabled:!1,seoPageTitle:"Title",seoPageDescription:"Description"},definition:{label:"Page",type:"page",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fas fa-file"},defaultStyle:{name:"Page",displayMode:"desktop",style:{base:{default:{display:"flex","flex-direction":"column","min-height":"100%","min-width":"100%","font-family":"Arial",color:"#333","font-size":"14px","font-weight":400,"line-height":"16px","text-align":"left","background-color":"#ffffff"}}}},settings:{}}}),pO=dC(({ref:e,className:t="",icon:n="fas fa-flag",size:r="fa-1x",iconAnimation:i=""})=>{let{settings:{previewMode:a}}=lr();/* @__PURE__ */
387
+ return O(Fa,a?{ref:e,tag:"i",className:ae("plitzi-component__fontawesome",t,n,r,i)}:{ref:e,className:ae("plitzi-component__fontawesome fontawesome--edit-mode",t),children:/* @__PURE__ */O("i",{className:ae(n,r,i)})})}),fO=Object.assign(pO,{type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",type:"fontAwesome",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-font-awesome"},defaultStyle:{name:"Font Awesome",displayMode:"desktop",style:{base:{default:{display:"inline-block","font-size":"16px"}}}},settings:{}}}),hO="data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" fill="none">\n <rect width="1200" height="1200" fill="#EAEAEA" rx="3"/>\n <path fill="#FAFAFA" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="#C9C9C9" stroke-width="2.418" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/>\n <path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/>\n <path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/>\n <path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/>\n <path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/>\n <path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <defs>\n <linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath>\n </defs>\n</svg>'),mO=dC(({ref:e,className:t="",src:n="https://cdn.plitzi.com/resources/img/placeholder-img.svg",alt:r="",fetchPriority:i="auto",loadMode:a})=>{let{settings:{previewMode:o}}=lr(),s=h(e=>{e.currentTarget.onerror=null,e.currentTarget.src=hO},[]);/* @__PURE__ */
388
+ return O(Fa,o?{tag:"img",draggable:!1,ref:e,className:ae("plitzi-component__image",t),src:n,alt:r,loading:a,fetchPriority:i,onError:s}:{ref:e,className:ae("plitzi-component__image image--edit-mode",t),children:/* @__PURE__ */O("img",{draggable:!1,src:n,alt:r,loading:a,fetchPriority:i,onError:s})})}),gO=Object.assign(mO,{type:"image",content:{attributes:{src:"https://cdn.plitzi.com/resources/img/placeholder-img.svg",alt:"",fetchPriority:"auto",loadMode:"auto"},definition:{label:"Image",type:"image",description:"Use an URL to display an image.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-image"},defaultStyle:{name:"Image",displayMode:"desktop",style:{base:{default:{display:"block",width:"140px",height:"140px"}}}},settings:{}}}),yO=dC(({ref:e,src:t,autoPlay:n=!1,playsInline:r=!1,loop:i=!1,muted:a=!0,className:o=""})=>{let{settings:{previewMode:s}}=lr();/* @__PURE__ */
389
+ return O(Fa,s?{tag:"video",draggable:!1,ref:e,className:ae("plitzi-component__video",o),src:t,autoPlay:n,playsInline:r,loop:i,muted:a}:{ref:e,className:ae("plitzi-component__video video--edit-mode",o),children:/* @__PURE__ */O("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:a,children:/* @__PURE__ */O("track",{kind:"captions"})})})}),bO=Object.assign(yO,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Use an URL to display a video.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),vO=dC(({ref:e,className:t="",children:n,query:r="",method:i="get",accessToken:a="",when:o=Qr,headers:s=Qr,mockData:l="{}",subType:c="div",credentials:u="same-origin"})=>{let{id:d,definition:{label:p="Api Container"}}=gh(),{settings:{previewMode:m,debugMode:y},contexts:{NavigationContext:b,InteractionsContext:v}}=lr(),{interactionsManager:w}=f(v),{routeParams:k,queryParams:T}=f(b),N=x(()=>{if(!r)return"";try{let e={...T,...k};y&&[...r.matchAll(/{{([ ]+|)(?<token>[a-zA-Z0-9-_:*/]+)([ ]+|)}}/gim)].forEach(({groups:t})=>{let n=t?.token.trim();!n||Y(e,n)});let t=Lo(r,e,!0);return"string"==typeof t?t:r}catch(jR){}return""},[r,T,k,y]),C=x(()=>a?{...s,Authorization:`Bearer ${a}`}:s,[s,a]),E=x(()=>!!(m&&N&&(o===Qr||bN(o,{...k,...T}))||!m&&(N||l&&"{}"!==l&&l!==Qr)),[m,N,o,k,T,l]),{isLoading:_,data:A,refetch:I,isSuccess:D,isError:P}=(({url:e="",method:t="get",mock:n=Qr,params:r=Qr,customHeaders:i=Qr,enabled:a=!0,credentials:o="same-origin"})=>{let[s,l]=S(a),[c,u]=S(),d=h(()=>{a&&(l(!0),(async({url:e="",method:t="get",credentials:n="same-origin",params:r=Qr,customHeaders:i=Qr,mock:a=Qr}={})=>{if(a&&"{}"!==a&&a!==Qr)try{return"string"==typeof a?{status:200,data:JSON.parse(a)}:{status:200,data:a}}catch(e){return{status:500,data:e.message}}let o=new Headers;if(o.append("Content-Type","application/json"),Object.keys(i).length>0&&Object.keys(i).forEach(e=>{o.append(e,i[e])}),!e)return{status:400,data:"URL is required"};Object.values(r).forEach(e=>{e instanceof Blob&&"multipart/form-data"!==o.get("Content-Type")&&o.set("Content-Type","multipart/form-data")});let s=new FormData;Object.entries(r).forEach(([e,t])=>{s.append(e,t)});let l={method:t,credentials:n,headers:o,body:s};"application/json"===o.get("Content-Type")&&(l.body=JSON.stringify(r)),"get"===t&&delete l.body;try{let t=await fetch(e,l);return{status:t.status,data:await t.json()}}catch(e){return{status:500,data:e.message}}})({url:e,method:t,credentials:o,mock:n,customHeaders:i,params:r}).then(e=>u(e)).catch(e=>u({status:500,data:e.message})).finally(()=>l(!1)))},[a,e,t,o,n,i,r]);return g(()=>{d()},[a,r,n,e,d]),{isLoading:s,data:c,refetch:d,isSuccess:!s&&c&&c.status<400,isError:!s&&c&&c.status>=400}})({url:N,method:i,credentials:u,mock:m?void 0:l,customHeaders:C,enabled:E});g(()=>{_||(D?w.interactionTrigger(d,"onApiSuccess",{url:N,method:i,...A}):P&&w.interactionTrigger(d,"onApiError",{url:N,method:i,...A}))},[A,d,w,P,_,D,i,N]);let M=h(()=>Jr(A).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]),[A]);hh({id:d,source:`apiContainer_${d}`,name:p||`API - ${d}`,fields:M});let R=x(()=>({performQuery:{action:"performQuery",title:`Perform Query ${p}`,type:"callback",callback:I,preview:{},params:{}}}),[p,I]),j=x(()=>({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:""}}}),[]);/* @__PURE__ */
390
+ return O(Fa,{ref:e,tag:c,className:ae("plitzi-component__api-container",t),interactionTriggers:j,interactionCallbacks:R,children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[`apiContainer_${d}`]:A}}},children:!_&&n})})}),xO=Object.assign(vO,{type:"apiContainer",content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"div",credentials:"same-origin"},definition:{label:"Api Container",type:"apiContainer",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),wO=dC(({ref:e,className:t="",source:n="",children:r,limit:i="10",query:a,singleRecord:o=!1})=>{let{id:s,definition:{label:l="Collection Container"}}=gh(),{settings:{previewMode:c}}=lr(),{loading:u,collection:d,fetch:p}=(({source:e,query:t,limit:n="1",appendResults:r=!1,singleRecord:i=!1,previewMode:a=!0}={})=>{let o=lr(),[s,l]=S(void 0),[c,u]=S(!0),[d,p]=S(void 0),[m,y]=S(!1),{contexts:{CollectionContext:b,NavigationContext:v}}=o,{routeParams:w,queryParams:k}=f(v),{fetchRecords:T,fetchCollection:N}=f(b),C=x(()=>{if(!a||!t)return"";try{return xN(t,"mongodb",!1,{queryParams:k,routeParams:w})}catch{}return""},[a,t,k,w]),E=h((e,t)=>{let{pageInfo:n,edges:r}=t;p(n.nextCursor),y(n.hasNextPage),l({...e,records:i?[]:r,record:i&&r.length>0?r[0]:void 0})},[i]),_=h(async()=>{u(!0);let t=await N(e,C);u(!1),t?.records&&t.records.edges.length>0&&E(t,t.records)},[N,E,C,e]),O=h(async()=>{if(!s||!e)return;u(!0);let t=await T(e,C,!r&&d?void 0:d,parseInt(n,10));u(!1),t&&E(s,t)},[s,e,T,C,r,d,n,E]),A=h(async()=>{m&&await O()},[m,O]);return g(()=>{re(e)?(p(void 0),y(!1),l(void 0),u(!1)):_()},[e,_]),x(()=>({loading:c,collection:s,hasNextPage:m,handleNextPage:A,fetch:_}),[c,s,m,A,_])})({source:n,limit:i,query:a,singleRecord:o,previewMode:c}),m=h(()=>{let e=[];return d?(o||e.push({path:"records",name:"Records"}),e.push({path:"record.id",name:"Record ID"}),e.push({path:"record.status",name:"Record Status"}),Object.values(d.fields).forEach(t=>{e.push({path:`record.values.${t.machineName}`,name:`Record Field - ${t.name}`})}),e):[]},[d,o]);hh({id:s,source:`collectionContainer_${s}`,name:l||`Collection - ${d?.name||s}`,fields:m});let y=x(()=>({performQuery:{action:"performQuery",title:`Refresh ${l}`,type:"callback",callback:p,preview:{},params:{}}}),[p,l]);if(d||!c)/* @__PURE__ */return A(Fa,{ref:e,interactionCallbacks:y,className:ae("plitzi-component__collection-container",t,{"collection-container--context-empty":!d}),children:[!d&&/* @__PURE__ */O("div",{className:"collection-container__message",children:"Source Not Selected"}),d&&!u&&/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[`collectionContainer_${s}`]:d}}},children:r})]})}),kO=Object.assign(wO,{type:"collectionContainer",content:{attributes:{limit:"10",query:"",source:void 0,singleRecord:!1},definition:{label:"Collection Container",type:"collectionContainer",description:"",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-database"},defaultStyle:{name:"Collection Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),SO=dC(({ref:e,className:t="",subType:n="div",children:r})=>/* @__PURE__ */O(Fa,{ref:e,tag:n,className:ae(`plitzi-component__container plitzi-component__container-${n}`,t),children:r})),TO=Object.assign(SO,{type:"container",content:{attributes:{subType:"div"},definition:{label:"Container",type:"container",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-square"},defaultStyle:{name:"Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),NO=dC(({ref:e,className:t="",children:n,headerLabel:r="Dialog Header",acceptButtonLabel:i="Accept",acceptButtonLabelLoading:a="Loading...",rejectButtonLabel:o="Cancel",autoHideAfterClick:s=!0})=>{let{id:l,setElementState:c,definition:{styleSelectors:u,label:d="Dialog"},elementState:p}=gh(),{contexts:{InteractionsContext:m}}=lr(),{interactionsManager:y}=f(m),[b,v]=S({}),[w,k]=S(!1),T=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)v(t);else if("string"==typeof t)try{v(JSON.parse(t))}catch{v({content:t})}else v("boolean"==typeof t||"number"==typeof t?{content:t}:{});c(e=>({...e,visibility:!0}))},[c,v]),N=h(()=>{y.interactionTrigger(l,"onDialogClose",{metadata:b}),v({}),c(e=>({...e,visibility:!1}))},[y,c,v,b,l]),C=h(()=>{s&&(y.interactionTrigger(l,"onDialogClose",{metadata:b}),v({}),c(e=>({...e,visibility:!1})))},[y,s,c,v,b,l]);h(async()=>{k(!0),await y.interactionTrigger(l,"onDialogAccept",{metadata:b}),k(!1),c(e=>({...e,visibility:!1}))},[y,l,b,c]),h(async()=>{k(!0),await y.interactionTrigger(l,"onDialogReject",{metadata:b}),k(!1),c(e=>({...e,visibility:!1}))},[y,l,b,c]);let E=x(()=>({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:""}}}),[]),_=x(()=>({openDialog:{action:"openDialog",title:`Open ${d}`,type:"callback",callback:T,params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeDialog:{action:"closeDialog",title:`Close ${d}`,type:"callback",callback:N,preview:{},params:{}}}),[N,T,d]);g(()=>{!1!==p.visibility&&y.interactionTrigger(l,"onDialogOpen",{metadata:b})},[l,y,b,p.visibility]);let I=h(()=>"object"==typeof b?Jr(b).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]):[],[b]);return hh({id:l,source:`dialogContainer_${l}`,name:d||`Dialog - ${l}`,fields:I}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__dialog-container",t),interactionTriggers:E,interactionCallbacks:_,children:[/* @__PURE__ */O("div",{className:ae("dialog-container__background",u.backgroundContainer),onClick:C}),/* @__PURE__ */A("div",{className:ae("dialog-container__root",u.rootContainer),children:[
391
391
  /* @__PURE__ */A("div",{className:ae("dialog-container__header",u.headerContainer),children:[/* @__PURE__ */O("div",{className:ae("dialog-container__header__title",u.headerTitle),children:r||"Dialog Header"}),/* @__PURE__ */O("i",{className:"fa-solid fa-xmark",title:"Close",onClick:void 0})]}),
392
- /* @__PURE__ */O("div",{className:ae("dialog-container__body",u.body),children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[`dialogContainer_${l}`]:b}}},children:n})}),
393
- /* @__PURE__ */A("div",{className:ae("dialog-container__footer",u.footerContainer),children:[/* @__PURE__ */A("button",{className:ae("footer__button button--accept",u.acceptButton),onClick:void 0,disabled:w,children:[w&&/* @__PURE__ */A("div",{className:"button--accept__container",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-rotate fa-spin"}),a]}),!w&&i]}),/* @__PURE__ */O("button",{className:ae("footer__button button--cancel",u.cancelButton),onClick:void 0,disabled:w,children:o})]})]})]})}),TO=Object.assign(SO,{type:"dialogContainer",content:{attributes:{headerLabel:"Dialog Header",acceptButtonLabel:"Accept",rejectButtonLabel:"Cancel",autoHideAfterClick:!0},definition:{label:"Dialog Container",type:"dialogContainer",description:"",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Dialog Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"white",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",color:"#333"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0"}},footerContainer:{default:{display:"flex","justify-content":"flex-end","margin-top":"8px"}}},subTypes:{}},settings:{}},initialItems:["container"]}),NO=({ref:e,className:t="",subType:n="ul",children:r})=>/* @__PURE__ */O(Fa,{ref:e,tag:n,className:ae("plitzi-component__list",t),children:r}),CO=({children:e})=>{let{contexts:{InteractionsContext:t}}=lr(),n=f(t),r=x(()=>n.interactionsManager.createChildManager(),[n]),i=x(()=>({...n,interactionsManager:r}),[n,r]);return g(()=>()=>{n.interactionsManager.removeChildManager(r)},[n,r]),/* @__PURE__ */O(t,{value:i,children:e})},EO=({children:e,className:t="",isTemplate:n=!1,itemCount:r=0,record:i,source:a=""})=>{let o=x(()=>({item:i,index:`${r}`}),[i,r]);return n?/* @__PURE__ */A("div",{className:ae("plitzi-component__controlled-list-item",t),children:[/* @__PURE__ */O("div",{className:"controlled-list-item__counter",children:`List Item - ${r}`}),/* @__PURE__ */O(CO,{children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[a]:o}}},children:e})})]}):/* @__PURE__ */O(CO,{children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[a]:o}}},children:e})})},_O=({ref:e,className:t="",children:n,items:r=[]})=>{let{id:i,definition:{label:a}}=gh(),{settings:{previewMode:o}}=lr(),s=x(()=>Array.isArray(r)?r:[],[r]),l=h(()=>Jr({item:Y(s,"0",{}),index:"0"}).reduce((e,t)=>[...e,{path:t,name:t}],[]),[s]),c=x(()=>({items:s}),[s]);return hh({id:i,source:`list_${i}`,name:a||`List - ${i}`,fields:l}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__controlled-list",t,{"controlled-list--build-mode":!o}),children:[/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[`list_${i}`]:c}}},children:s.map((e,t)=>!n||Array.isArray(n)&&0===n.length?/* @__PURE__ */O("div",{className:"plitzi-component__controlled-list-item controlled-list--empty",children:/* @__PURE__ */O("div",{className:"controlled-list-item__counter",children:`List Item - ${t+1}`})},t):/* @__PURE__ */O(EO,{itemCount:t+1,isTemplate:0!==t&&!o,record:e,source:`list_${i}`,children:n},t))}),!o&&0===s.length&&/* @__PURE__ */O("div",{className:"controlled-list controlled-list--empty",children:"This list does not contain any items"})]})},OO=dC(({ref:e,className:t="",subType:n="ul",children:r,items:i=[],source:a="none"})=>"controlled"===a?/* @__PURE__ */O(_O,{ref:e,className:t,items:i,children:r}):/* @__PURE__ */O(NO,{ref:e,className:t,subType:n,children:r})),AO=dC(({ref:e,className:t="",children:n})=>/* @__PURE__ */O(Fa,{tag:"li",ref:e,className:ae("plitzi-component__list-item",t),children:n})),IO=Object.assign(AO,{type:"listItem",content:{attributes:{},definition:{label:"List Item",type:"listItem",description:"The List Item element lets you add more items to existing List elements. You can then add any content you would like to them, including links, images, etc.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["listItem"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List Item",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),DO=Object.assign(OO,{type:"list",content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"List",type:"list",description:"A List gives you the ability to group elements or content (like links in a navigation menu, or steps in a recipe), to add helpful structure to your site.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List",displayMode:"desktop",style:{base:{default:{}}},subTypes:{ul:{name:"List UL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px","min-width":"50px","min-height":"50px"}}}},ol:{name:"List OL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px","min-width":"50px","min-height":"50px"}}}}}},settings:{}},initialItems:["listItem","listItem","listItem"],plugins:{listItem:IO}}),PO=dC(({ref:e,className:t="",children:n,title:r="Modal Header",autoHideAfterClick:i=!0})=>{let{id:a,definition:{styleSelectors:o,label:s="Modal"},elementState:l,setElementState:c}=gh(),{contexts:{InteractionsContext:u}}=lr(),{interactionsManager:d}=f(u),[p,m]=S({}),y=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)m(t);else if("string"==typeof t)try{m(JSON.parse(t))}catch{m({content:t})}else m("boolean"==typeof t||"number"==typeof t?{content:t}:{});c(e=>({...e,visibility:!0}))},[c,m]),b=h(()=>{d.interactionTrigger(a,"onModalClose",{metadata:p}),m({}),c(e=>({...e,visibility:!1}))},[d,c,m,p,a]),v=h(()=>{i&&(d.interactionTrigger(a,"onModalClose",{metadata:p}),m({}),c(e=>({...e,visibility:!1})))},[d,i,c,m,p,a]),w=x(()=>({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:{}}}),[]),k=x(()=>({openModal:{action:"openModal",title:`Open ${s}`,type:"callback",callback:y,params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeModal:{action:"closeModal",title:`Close ${s}`,type:"callback",callback:b,params:{},preview:{}}}),[b,y,s]);g(()=>{!1!==l.visibility&&d.interactionTrigger(a,"onModalOpen",{metadata:p})},[a,d,p,l.visibility]);let T=h(()=>Jr(p).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]),[p]);return hh({id:a,source:`modalContainer_${a}`,name:s||`Modal - ${a}`,fields:T}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__modal-container",t),interactionTriggers:w,interactionCallbacks:k,children:[/* @__PURE__ */O("div",{className:ae("modal-container__background",o.backgroundContainer),onClick:v}),/* @__PURE__ */A("div",{className:ae("modal-container__root",o.rootContainer),children:[/* @__PURE__ */A("div",{className:ae("modal-container__header",o.headerContainer),children:[/* @__PURE__ */O("div",{className:ae("modal-container__header__title",o.headerTitle),children:r||"Modal Header"}),/* @__PURE__ */O("i",{className:ae("fa-solid fa-xmark",o.headerCloseButton),title:"Close",onClick:b})]}),/* @__PURE__ */O("div",{className:ae("modal-container__body",o.bodyContainer),children:/* @__PURE__ */O(NC,{inherit:"live",value:{runtime:{sources:{[`modalContainer_${a}`]:p}}},children:n})})]})]})}),MO=Object.assign(PO,{type:"modalContainer",content:{attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",type:"modalContainer",description:"",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Modal Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"white",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":"#d1d5db","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:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}}},subTypes:{}},settings:{}},initialItems:["container"]}),RO=s(void 0);RO.displayName="TabContainerContext";var jO=dC(({ref:e,className:t="",children:n})=>{let[r,i]=S(0),a=x(()=>({tabSelected:r,onSelect:i}),[r]);/* @__PURE__ */
394
- return O(Fa,{ref:e,className:ae("plitzi-component__tab-container",t),children:/* @__PURE__ */O(RO,{value:a,children:n})})}),zO=dC(({ref:e,className:t="",children:r})=>{let{tabSelected:i,onSelect:a}=f(RO),{childrenParsed:s}=x(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(o(t,{...r,internalProps:{...r.internalProps,onSelect:a,tabSelected:i,tabIndex:n}}))}),e},[r,a,i]);/* @__PURE__ */
395
- return O(Fa,{ref:e,className:ae("plitzi-component__tab-container-body",t),children:s})}),LO=Object.assign(zO,{type:"tabContainerBody",content:{attributes:{},definition:{label:"Tab Container Body",type:"tabContainerBody",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Body",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),FO=dC(({ref:e,className:t="",children:r})=>{let{tabSelected:i,onSelect:a}=f(RO),{childrenParsed:s}=x(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(o(t,{...r,internalProps:{...r.internalProps,isHeader:!0,onSelect:a,tabSelected:i,tabIndex:n}}))}),e},[r,a,i]);/* @__PURE__ */
396
- return O(Fa,{ref:e,className:ae("plitzi-component__tab-container-header",t),children:s})}),$O=Object.assign(FO,{type:"tabContainerHeader",content:{attributes:{},definition:{label:"Tab Container Header",type:"tabContainerHeader",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Header",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),qO=dC(({className:e="",children:t,ref:n,tabSelected:r,tabIndex:i=0,isHeader:a,onSelect:o})=>/* @__PURE__ */O(Fa,{ref:n,onClick:h(()=>{!a||r===i||o?.(i)},[a,r,i,o]),className:ae("plitzi-component__tab-container-item",e,{active:r===i}),children:t})),BO=Object.assign(qO,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),VO=Object.assign(jO,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:$O,tabContainerBody:LO,tabContainerItem:BO}}),UO=s({});UO.displayName="NavigationContext";var HO={dropdown:MC,notFound:sO,loading:oO,custom:vC,reference:EC,blockHtml:mC,nodeHtml:wC,blockJsx:yC,page:cO,container:kO,layoutContainer:iO,dialogContainer:TO,modalContainer:MO,tabContainer:VO,heading:jC,image:hO,video:gO,fontAwesome:dO,button:OC,paragraph:q_,text:V_,list:DO,link:z_,markdown:F_,form:H_,formControl:nO,apiContainer:bO,collectionContainer:xO},WO=({localComponents:e,localCustomComponents:t,children:n})=>{let r=x(()=>({...Va(HO),...Va(e),...Ha(t)}),[e,t]),i=k({}),a=k({...i.current,...r}),o=h((e=[],t=!1)=>{if("string"==typeof e&&!t)return a.current[e];if("string"==typeof e&&t){let t=a.current[e];return t?{[e]:t,...ee(Ba(t),[e])}:{}}let n={};return e.forEach(e=>{let r=a.current[e];r&&(t?n={...n,...ee(Ba(r),[e])}:n[e]=r)}),n},[]),s=h((e=[])=>{let t={};return Array.isArray(e)||(e=[e]),e.forEach(e=>{e.type&&!a.current[e.type]&&(t={...t,[e.type]:e,...Ba(e)})}),0===Object.keys(t).length||(a.current={...i.current,...t,...r},i.current={...i.current,...t}),t},[r]),l=h(e=>{if(!e)return[];Array.isArray(e)||(e=[e]);let t=e;return e.forEach(e=>{let n=o([e],!0);Object.keys(n).length>0&&(t=[...t,...Object.keys(ee(n,e))])}),a.current={...ee(i.current,t),...r},i.current=ee(i.current,t),t},[o,r]),c=k(Object.keys(a.current).reduce((e,t)=>{let n=Y(a.current,t,void 0);return n&&n.content?{...e,[t]:{...n.content,initialItems:n.initialItems}}:e},{})),u=h(e=>{c.current={...c.current,...e}},[]),d=h(e=>{let t=Y(c.current,`${e}.builder.pluginChildren`,[]);c.current=ee(c.current,[e,...t])},[]);/* @__PURE__ */
397
- return O($a,{value:x(()=>({components:a,componentDefinitions:c,getComponent:o,register:s,unregister:l,unregisterDefinition:d,registerDefinition:u}),[s,l,u,d,o]),children:n})},YO=Symbol.for("__APOLLO_CONTEXT__");function GO(){Oc("createContext"in e,37);let t=e.createContext[YO];return t||(Object.defineProperty(e.createContext,YO,{value:t=e.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t}var QO=({client:t,children:n})=>{const r=GO(),i=e.useContext(r),a=e.useMemo(()=>({...i,client:t||i.client}),[i,t]);return Oc(a.client,38),e.createElement(r.Provider,{value:a},n)},JO=/* @__PURE__ */F(e=>{var t=B("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}}),KO=/* @__PURE__ */F((e,t)=>{t.exports=JO()})(),XO=/* @__PURE__ */function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),ZO=/* @__PURE__ */function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),eA={rel:["amphtml","canonical","alternate"]},tA={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},nA={type:["application/ld+json"]},rA=Object.values(ZO),iA={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},aA=(()=>{const e={};for(const[t,n]of Object.entries(iA))e[n]=t;return e})(),oA="data-rh",sA=!("undefined"==typeof window||!window.document.createElement);function lA(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function cA(e){let t=lA(e,ZO.TITLE);const n=lA(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=lA(e,"defaultTitle");return(t||r)??void 0}function uA(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function dA(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function pA(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(t[e],!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===XO.REL&&"canonical"===e[n].toLowerCase()||i===XO.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==XO.INNER_HTML&&i!==XO.CSS_TEXT&&i!==XO.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const a=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][a]&&(i[n][a]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const a=Object.keys(i);for(const t of a)r[t]={...r[t],...i[t]};return e},[]).reverse()}function fA(e){return Array.isArray(e)?e.join(""):e}function hA(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function mA(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)hA(r,t)?n.priority.push(r):n.default.push(r);return n}function gA(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function yA(e){let t=pA(ZO.LINK,[XO.REL,XO.HREF],e),n=pA("meta",[XO.NAME,"charSet","httpEquiv",XO.PROPERTY,"itemProp"],e),r=pA("script",[XO.SRC,XO.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let a;if(i){const e=mA(t,eA);t=e.default;const i=mA(n,tA);n=i.default;const o=mA(r,nA);r=o.default,a={links:e.priority,meta:i.priority,script:o.priority}}return{base:dA(e),bodyAttributes:uA("bodyAttributes",e),defer:lA(e,"defer"),encodeSpecialCharacters:lA(e,"encodeSpecialCharacters")??!0,htmlAttributes:uA("htmlAttributes",e),links:t,meta:n,noscript:pA("noscript",[XO.INNER_HTML],e),onChangeClientState:lA(e,"onChangeClientState"),priority:a,script:r,style:pA("style",[XO.CSS_TEXT],e),title:cA(e),titleAttributes:uA("titleAttributes",e)}}function bA(e){return aA[e]??e}function vA(e,t){const n=document.head||document.querySelector(ZO.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${oA}]`)],a=[];for(const o of t){const t=document.createElement(e);for(const[e,r]of Object.entries(o))if(Object.prototype.hasOwnProperty.call(o,e)){const n=aA[e]??e;n===XO.INNER_HTML?t.innerHTML=r:n===XO.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=o.cssText:t.appendChild(document.createTextNode(o.cssText)):t.setAttribute(n,r??"")}t.setAttribute(oA,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){a.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),a.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:a,oldTags:i}}function xA(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(oA),i=r?r.split(","):[],a=[...i],o=[];for(const s of Object.keys(t))o.push(aA[s]??s);for(const[s,l]of Object.entries(t)){const e=aA[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=a.indexOf(e);-1!==t&&a.splice(t,1)}for(let s=a.length-1;s>=0;s-=1)n.removeAttribute(a[s]);i.length===a.length?n.removeAttribute(oA):n.getAttribute("data-rh")!==o.join(",")&&n.setAttribute(oA,o.join(","))}function wA(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:a,links:o,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:f,titleAttributes:h}=e;xA(ZO.BODY,r??{}),xA(ZO.HTML,a??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=fA(e)),xA(ZO.TITLE,t)}(f,h);const m={baseTag:vA(ZO.BASE,n?[n]:[]),linkTags:vA(ZO.LINK,[...u?.links??[],...o??[]]),metaTags:vA(ZO.META,[...u?.meta??[],...s??[]]),noscriptTags:vA(ZO.NOSCRIPT,l??[]),scriptTags:vA(ZO.SCRIPT,[...u?.script??[],...d??[]]),styleTags:vA(ZO.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:f??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var kA=[ZO.NOSCRIPT,ZO.SCRIPT,ZO.STYLE],SA=(e,t=!0)=>t?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e;function TA(e){let t="";for(const[n,r]of Object.entries(e)){const e=bA(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function NA(e,t,n){let r="";for(const i of t){let t="";const a=Object.entries(i);for(const[e,r]of a)if(e!==XO.INNER_HTML&&e!==XO.CSS_TEXT){const i=aA[e]??e;let a;a=void 0===r?i:`${i}="${SA("string"==typeof r?r:String(r),n)}"`,t?t+=` ${a}`:t=a}const o=i.innerHTML??i.cssText??"",s=!kA.includes(e);r+=`<${e} ${oA}="true" ${t}${s?"/>":`>${o}</${e}>`}`}return r}function CA(e,t={}){const n={};t.addHelmetDataAttr&&(n[oA]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=iA[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function EA(e,t,n){/* @__PURE__ */
392
+ /* @__PURE__ */O("div",{className:ae("dialog-container__body",u.body),children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[`dialogContainer_${l}`]:b}}},children:n})}),
393
+ /* @__PURE__ */A("div",{className:ae("dialog-container__footer",u.footerContainer),children:[/* @__PURE__ */A("button",{className:ae("footer__button button--accept",u.acceptButton),onClick:void 0,disabled:w,children:[w&&/* @__PURE__ */A("div",{className:"button--accept__container",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-rotate fa-spin"}),a]}),!w&&i]}),/* @__PURE__ */O("button",{className:ae("footer__button button--cancel",u.cancelButton),onClick:void 0,disabled:w,children:o})]})]})]})}),CO=Object.assign(NO,{type:"dialogContainer",content:{attributes:{headerLabel:"Dialog Header",acceptButtonLabel:"Accept",rejectButtonLabel:"Cancel",autoHideAfterClick:!0},definition:{label:"Dialog Container",type:"dialogContainer",description:"",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Dialog Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"white",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",color:"#333"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0"}},footerContainer:{default:{display:"flex","justify-content":"flex-end","margin-top":"8px"}}},subTypes:{}},settings:{}},initialItems:["container"]}),EO=({ref:e,className:t="",subType:n="ul",children:r})=>/* @__PURE__ */O(Fa,{ref:e,tag:n,className:ae("plitzi-component__list",t),children:r}),_O=({children:e})=>{let{contexts:{InteractionsContext:t}}=lr(),n=f(t),r=x(()=>n.interactionsManager.createChildManager(),[n]),i=x(()=>({...n,interactionsManager:r}),[n,r]);return g(()=>()=>{n.interactionsManager.removeChildManager(r)},[n,r]),/* @__PURE__ */O(t,{value:i,children:e})},OO=({children:e,className:t="",isTemplate:n=!1,itemCount:r=0,record:i,source:a=""})=>{let o=x(()=>({item:i,index:`${r}`}),[i,r]);return n?/* @__PURE__ */A("div",{className:ae("plitzi-component__controlled-list-item",t),children:[/* @__PURE__ */O("div",{className:"controlled-list-item__counter",children:`List Item - ${r}`}),/* @__PURE__ */O(_O,{children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[a]:o}}},children:e})})]}):/* @__PURE__ */O(_O,{children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[a]:o}}},children:e})})},AO=({ref:e,className:t="",children:n,items:r=[]})=>{let{id:i,definition:{label:a}}=gh(),{settings:{previewMode:o}}=lr(),s=x(()=>Array.isArray(r)?r:[],[r]),l=h(()=>Jr({item:Y(s,"0",{}),index:"0"}).reduce((e,t)=>[...e,{path:t,name:t}],[]),[s]),c=x(()=>({items:s}),[s]);return hh({id:i,source:`list_${i}`,name:a||`List - ${i}`,fields:l}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__controlled-list",t,{"controlled-list--build-mode":!o}),children:[/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[`list_${i}`]:c}}},children:s.map((e,t)=>!n||Array.isArray(n)&&0===n.length?/* @__PURE__ */O("div",{className:"plitzi-component__controlled-list-item controlled-list--empty",children:/* @__PURE__ */O("div",{className:"controlled-list-item__counter",children:`List Item - ${t+1}`})},t):/* @__PURE__ */O(OO,{itemCount:t+1,isTemplate:0!==t&&!o,record:e,source:`list_${i}`,children:n},t))}),!o&&0===s.length&&/* @__PURE__ */O("div",{className:"controlled-list controlled-list--empty",children:"This list does not contain any items"})]})},IO=dC(({ref:e,className:t="",subType:n="ul",children:r,items:i=[],source:a="none"})=>"controlled"===a?/* @__PURE__ */O(AO,{ref:e,className:t,items:i,children:r}):/* @__PURE__ */O(EO,{ref:e,className:t,subType:n,children:r})),DO=dC(({ref:e,className:t="",children:n})=>/* @__PURE__ */O(Fa,{tag:"li",ref:e,className:ae("plitzi-component__list-item",t),children:n})),PO=Object.assign(DO,{type:"listItem",content:{attributes:{},definition:{label:"List Item",type:"listItem",description:"The List Item element lets you add more items to existing List elements. You can then add any content you would like to them, including links, images, etc.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["listItem"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List Item",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}}),MO=Object.assign(IO,{type:"list",content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"List",type:"list",description:"A List gives you the ability to group elements or content (like links in a navigation menu, or steps in a recipe), to add helpful structure to your site.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List",displayMode:"desktop",style:{base:{default:{}}},subTypes:{ul:{name:"List UL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px","min-width":"50px","min-height":"50px"}}}},ol:{name:"List OL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px","min-width":"50px","min-height":"50px"}}}}}},settings:{}},initialItems:["listItem","listItem","listItem"],plugins:{listItem:PO}}),RO=dC(({ref:e,className:t="",children:n,title:r="Modal Header",autoHideAfterClick:i=!0})=>{let{id:a,definition:{styleSelectors:o,label:s="Modal"},elementState:l,setElementState:c}=gh(),{contexts:{InteractionsContext:u}}=lr(),{interactionsManager:d}=f(u),[p,m]=S({}),y=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)m(t);else if("string"==typeof t)try{m(JSON.parse(t))}catch{m({content:t})}else m("boolean"==typeof t||"number"==typeof t?{content:t}:{});c(e=>({...e,visibility:!0}))},[c,m]),b=h(()=>{d.interactionTrigger(a,"onModalClose",{metadata:p}),m({}),c(e=>({...e,visibility:!1}))},[d,c,m,p,a]),v=h(()=>{i&&(d.interactionTrigger(a,"onModalClose",{metadata:p}),m({}),c(e=>({...e,visibility:!1})))},[d,i,c,m,p,a]),w=x(()=>({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:{}}}),[]),k=x(()=>({openModal:{action:"openModal",title:`Open ${s}`,type:"callback",callback:y,params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeModal:{action:"closeModal",title:`Close ${s}`,type:"callback",callback:b,params:{},preview:{}}}),[b,y,s]);g(()=>{!1!==l.visibility&&d.interactionTrigger(a,"onModalOpen",{metadata:p})},[a,d,p,l.visibility]);let T=h(()=>Jr(p).reduce((e,t)=>{let n=t.split(".");return n.length>1?[...e,{path:t,name:n.slice(n.length-2).join(" ")}]:[...e,{path:t,name:n[n.length-1]}]},[]),[p]);return hh({id:a,source:`modalContainer_${a}`,name:s||`Modal - ${a}`,fields:T}),/* @__PURE__ */A(Fa,{ref:e,className:ae("plitzi-component__modal-container",t),interactionTriggers:w,interactionCallbacks:k,children:[/* @__PURE__ */O("div",{className:ae("modal-container__background",o.backgroundContainer),onClick:v}),/* @__PURE__ */A("div",{className:ae("modal-container__root",o.rootContainer),children:[/* @__PURE__ */A("div",{className:ae("modal-container__header",o.headerContainer),children:[/* @__PURE__ */O("div",{className:ae("modal-container__header__title",o.headerTitle),children:r||"Modal Header"}),/* @__PURE__ */O("i",{className:ae("fa-solid fa-xmark",o.headerCloseButton),title:"Close",onClick:b})]}),/* @__PURE__ */O("div",{className:ae("modal-container__body",o.bodyContainer),children:/* @__PURE__ */O(EC,{inherit:"live",value:{runtime:{sources:{[`modalContainer_${a}`]:p}}},children:n})})]})]})}),jO=Object.assign(RO,{type:"modalContainer",content:{attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",type:"modalContainer",description:"",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Modal Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"white",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":"#d1d5db","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:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}}},subTypes:{}},settings:{}},initialItems:["container"]}),zO=s(void 0);zO.displayName="TabContainerContext";var LO=dC(({ref:e,className:t="",children:n})=>{let[r,i]=S(0),a=x(()=>({tabSelected:r,onSelect:i}),[r]);/* @__PURE__ */
394
+ return O(Fa,{ref:e,className:ae("plitzi-component__tab-container",t),children:/* @__PURE__ */O(zO,{value:a,children:n})})}),FO=dC(({ref:e,className:t="",children:r})=>{let{tabSelected:i,onSelect:a}=f(zO),{childrenParsed:s}=x(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(o(t,{...r,internalProps:{...r.internalProps,onSelect:a,tabSelected:i,tabIndex:n}}))}),e},[r,a,i]);/* @__PURE__ */
395
+ return O(Fa,{ref:e,className:ae("plitzi-component__tab-container-body",t),children:s})}),$O=Object.assign(FO,{type:"tabContainerBody",content:{attributes:{},definition:{label:"Tab Container Body",type:"tabContainerBody",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Body",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),qO=dC(({ref:e,className:t="",children:r})=>{let{tabSelected:i,onSelect:a}=f(zO),{childrenParsed:s}=x(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(o(t,{...r,internalProps:{...r.internalProps,isHeader:!0,onSelect:a,tabSelected:i,tabIndex:n}}))}),e},[r,a,i]);/* @__PURE__ */
396
+ return O(Fa,{ref:e,className:ae("plitzi-component__tab-container-header",t),children:s})}),BO=Object.assign(qO,{type:"tabContainerHeader",content:{attributes:{},definition:{label:"Tab Container Header",type:"tabContainerHeader",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canTemplate:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Header",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),VO=dC(({className:e="",children:t,ref:n,tabSelected:r,tabIndex:i=0,isHeader:a,onSelect:o})=>/* @__PURE__ */O(Fa,{ref:n,onClick:h(()=>{!a||r===i||o?.(i)},[a,r,i,o]),className:ae("plitzi-component__tab-container-item",e,{active:r===i}),children:t})),UO=Object.assign(VO,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}}}),HO=Object.assign(LO,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"Group things together into groups, also nestable.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:BO,tabContainerBody:$O,tabContainerItem:UO}}),WO=s({});WO.displayName="NavigationContext";var YO={dropdown:jC,notFound:cO,loading:lO,custom:vC,reference:OC,blockHtml:mC,nodeHtml:wC,blockJsx:yC,page:dO,container:TO,layoutContainer:oO,dialogContainer:CO,modalContainer:jO,tabContainer:HO,heading:LC,image:gO,video:bO,fontAwesome:fO,button:IC,paragraph:V_,text:H_,list:MO,link:F_,markdown:q_,form:Y_,formControl:iO,apiContainer:xO,collectionContainer:kO},GO=({localComponents:e,localCustomComponents:t,children:n})=>{let r=x(()=>({...Va(YO),...Va(e),...Ha(t)}),[e,t]),i=k({}),a=k({...i.current,...r}),o=h((e=[],t=!1)=>{if("string"==typeof e&&!t)return a.current[e];if("string"==typeof e&&t){let t=a.current[e];return t?{[e]:t,...ee(Ba(t),[e])}:{}}let n={};return e.forEach(e=>{let r=a.current[e];r&&(t?n={...n,...ee(Ba(r),[e])}:n[e]=r)}),n},[]),s=h((e=[])=>{let t={};return Array.isArray(e)||(e=[e]),e.forEach(e=>{e.type&&!a.current[e.type]&&(t={...t,[e.type]:e,...Ba(e)})}),0===Object.keys(t).length||(a.current={...i.current,...t,...r},i.current={...i.current,...t}),t},[r]),l=h(e=>{if(!e)return[];Array.isArray(e)||(e=[e]);let t=e;return e.forEach(e=>{let n=o([e],!0);Object.keys(n).length>0&&(t=[...t,...Object.keys(ee(n,e))])}),a.current={...ee(i.current,t),...r},i.current=ee(i.current,t),t},[o,r]),c=k(Object.keys(a.current).reduce((e,t)=>{let n=Y(a.current,t,void 0);return n&&n.content?{...e,[t]:{...n.content,initialItems:n.initialItems}}:e},{})),u=h(e=>{c.current={...c.current,...e}},[]),d=h(e=>{let t=Y(c.current,`${e}.builder.pluginChildren`,[]);c.current=ee(c.current,[e,...t])},[]);/* @__PURE__ */
397
+ return O($a,{value:x(()=>({components:a,componentDefinitions:c,getComponent:o,register:s,unregister:l,unregisterDefinition:d,registerDefinition:u}),[s,l,u,d,o]),children:n})},QO=Symbol.for("__APOLLO_CONTEXT__");function JO(){Oc("createContext"in e,37);let t=e.createContext[QO];return t||(Object.defineProperty(e.createContext,QO,{value:t=e.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t}var KO=({client:t,children:n})=>{const r=JO(),i=e.useContext(r),a=e.useMemo(()=>({...i,client:t||i.client}),[i,t]);return Oc(a.client,38),e.createElement(r.Provider,{value:a},n)},XO=/* @__PURE__ */function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),ZO=/* @__PURE__ */function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),eA={rel:["amphtml","canonical","alternate"]},tA={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},nA={type:["application/ld+json"]},rA=Object.values(ZO),iA={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},aA=(()=>{const e={};for(const[t,n]of Object.entries(iA))e[n]=t;return e})(),oA="data-rh",sA=!("undefined"==typeof window||!window.document.createElement);function lA(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function cA(e){let t=lA(e,ZO.TITLE);const n=lA(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=lA(e,"defaultTitle");return(t||r)??void 0}function uA(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function dA(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function pA(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(t[e],!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===XO.REL&&"canonical"===e[n].toLowerCase()||i===XO.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==XO.INNER_HTML&&i!==XO.CSS_TEXT&&i!==XO.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const a=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][a]&&(i[n][a]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const a=Object.keys(i);for(const t of a)r[t]={...r[t],...i[t]};return e},[]).reverse()}function fA(e){return Array.isArray(e)?e.join(""):e}function hA(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function mA(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)hA(r,t)?n.priority.push(r):n.default.push(r);return n}function gA(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function yA(e){let t=pA(ZO.LINK,[XO.REL,XO.HREF],e),n=pA("meta",[XO.NAME,"charSet","httpEquiv",XO.PROPERTY,"itemProp"],e),r=pA("script",[XO.SRC,XO.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let a;if(i){const e=mA(t,eA);t=e.default;const i=mA(n,tA);n=i.default;const o=mA(r,nA);r=o.default,a={links:e.priority,meta:i.priority,script:o.priority}}return{base:dA(e),bodyAttributes:uA("bodyAttributes",e),defer:lA(e,"defer"),encodeSpecialCharacters:lA(e,"encodeSpecialCharacters")??!0,htmlAttributes:uA("htmlAttributes",e),links:t,meta:n,noscript:pA("noscript",[XO.INNER_HTML],e),onChangeClientState:lA(e,"onChangeClientState"),priority:a,script:r,style:pA("style",[XO.CSS_TEXT],e),title:cA(e),titleAttributes:uA("titleAttributes",e)}}function bA(e){return aA[e]??e}function vA(e,t){const n=document.head||document.querySelector(ZO.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${oA}]`)],a=[];for(const o of t){const t=document.createElement(e);for(const[e,r]of Object.entries(o))if(Object.prototype.hasOwnProperty.call(o,e)){const n=aA[e]??e;n===XO.INNER_HTML?t.innerHTML=r:n===XO.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=o.cssText:t.appendChild(document.createTextNode(o.cssText)):t.setAttribute(n,r??"")}t.setAttribute(oA,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){a.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),a.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:a,oldTags:i}}function xA(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(oA),i=r?r.split(","):[],a=[...i],o=[];for(const s of Object.keys(t))o.push(aA[s]??s);for(const[s,l]of Object.entries(t)){const e=aA[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=a.indexOf(e);-1!==t&&a.splice(t,1)}for(let s=a.length-1;s>=0;s-=1)n.removeAttribute(a[s]);i.length===a.length?n.removeAttribute(oA):n.getAttribute("data-rh")!==o.join(",")&&n.setAttribute(oA,o.join(","))}function wA(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:a,links:o,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:f,titleAttributes:h}=e;xA(ZO.BODY,r??{}),xA(ZO.HTML,a??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=fA(e)),xA(ZO.TITLE,t)}(f,h);const m={baseTag:vA(ZO.BASE,n?[n]:[]),linkTags:vA(ZO.LINK,[...u?.links??[],...o??[]]),metaTags:vA(ZO.META,[...u?.meta??[],...s??[]]),noscriptTags:vA(ZO.NOSCRIPT,l??[]),scriptTags:vA(ZO.SCRIPT,[...u?.script??[],...d??[]]),styleTags:vA(ZO.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:f??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var kA=[ZO.NOSCRIPT,ZO.SCRIPT,ZO.STYLE],SA=(e,t=!0)=>t?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e;function TA(e){let t="";for(const[n,r]of Object.entries(e)){const e=bA(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function NA(e,t,n){let r="";for(const i of t){let t="";const a=Object.entries(i);for(const[e,r]of a)if(e!==XO.INNER_HTML&&e!==XO.CSS_TEXT){const i=aA[e]??e;let a;a=void 0===r?i:`${i}="${SA("string"==typeof r?r:String(r),n)}"`,t?t+=` ${a}`:t=a}const o=i.innerHTML??i.cssText??"",s=!kA.includes(e);r+=`<${e} ${oA}="true" ${t}${s?"/>":`>${o}</${e}>`}`}return r}function CA(e,t={}){const n={};t.addHelmetDataAttr&&(n[oA]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=iA[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function EA(e,t,n){/* @__PURE__ */
398
398
  return l(e,CA(t,{addHelmetDataAttr:!0,addKey:n}))}function _A(e,t){const n=[];for(let r=0;r<t.length;++r)n.push(EA(e,t[r],r));return n}var OA=/* @__PURE__ */s(void 0),AA=({children:e,onServerState:t})=>{const n=k(null);if(null===n.current){const e={firstRender:!0,helmets:[],state:void 0};t&&(e.serverState??=function(e){const t=()=>(e.state??=yA(e.helmets),e.state);return{base:{toComponent(){const e=t().base;return e?_A("base",[e]):[]},toString(){const e=t();return e.base?NA("base",[e.base],e.encodeSpecialCharacters):""}},bodyAttributes:{toComponent:()=>CA(t().bodyAttributes??{}),toString:()=>TA(t().bodyAttributes??{})},htmlAttributes:{toComponent:()=>CA(t().htmlAttributes??{}),toString:()=>TA(t().htmlAttributes??{})},link:{toComponent:()=>_A("link",t().links??[]),toString(){const e=t();return NA("link",e.links??[],e.encodeSpecialCharacters)}},meta:{toComponent:()=>_A("meta",t().meta??[]),toString(){const e=t();return NA("meta",e.meta??[],e.encodeSpecialCharacters)}},noscript:{toComponent:()=>_A("noscript",t().noscript??[]),toString(){const e=t();return NA("noscript",e.noscript??[],e.encodeSpecialCharacters)}},priority:{toComponent(){const e=t();return[..._A("meta",e.priority?.meta??[]),..._A("link",e.priority?.links??[]),..._A("script",e.priority?.script??[])]},toString(){const e=t(),n=NA("meta",e.priority?.meta??[],e.encodeSpecialCharacters),r=NA("link",e.priority?.links??[],e.encodeSpecialCharacters),i=NA("script",e.priority?.script??[],e.encodeSpecialCharacters);let a=n;return r&&(a&&(a+=" "),a+=r),i&&(a&&(a+=" "),a+=i),a}},script:{toComponent:()=>_A("script",t().script??[]),toString(){const e=t();return NA("script",e.script??[],e.encodeSpecialCharacters)}},style:{toComponent:()=>_A("style",t().style??[]),toString(){const e=t();return NA("style",e.style??[],e.encodeSpecialCharacters)}},title:{toComponent(){const e=t();return n=e.title??"",r=e.titleAttributes??{},[/* @__PURE__ */O("title",{...CA(r,{addHelmetDataAttr:!0}),children:n},n)];var n,r},toString(){const e=t();return((e,t,n)=>{let r=TA(t);r&&(r=` ${r}`);const i=fA(e);return`<title ${oA}="true"${r}>${SA(i,n)}</title>`})(e.title??"",e.titleAttributes??{},e.encodeSpecialCharacters)}}}}(e),t(e.serverState)),n.current=e}const r=n.current,[i]=S(()=>({clientApply(){sA&&!r.state&&(r.state=yA(r.helmets),r.state.defer?r.nextAnimFrameId??=requestAnimationFrame(()=>{r.state??=yA(r.helmets),wA(r.state,r.firstRender),r.firstRender=!1,delete r.nextAnimFrameId}):(void 0!==r.nextAnimFrameId&&(cancelAnimationFrame(r.nextAnimFrameId),delete r.nextAnimFrameId),wA(r.state,r.firstRender),r.firstRender=!1))},update(e,t){const n=r.helmets.findIndex(t=>t[0]===e);n>=0?(delete r.state,t?r.helmets[n][1]=t:r.helmets.splice(n,1)):t&&(delete r.state,r.helmets.push([e,t]))}}));/* @__PURE__ */
399
- return O(OA,{value:i,children:e})};function IA(e){return iA[e]??e}function DA(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.slice():r;return t}(e);for(const n of Object.values(e))if(Array.isArray(n)){for(const e of n)if(e)for(const t of Object.keys(e)){const n=IA(t);n!==t&&(e[n]=e[t],delete e[t])}}else if(n&&"object"==typeof n){const e=n;for(const t of Object.keys(e)){const n=IA(t);n!==t&&(e[n]=e[t],delete e[t])}}return n.forEach(e.children,e=>{if(null==e)return;if("object"!=typeof e||!("props"in e))throw Error(`"${typeof e}" is not a valid <Helmet> descendant`);let n;const r={};if(e.props)for(const[t,a]of Object.entries(e.props))"children"===t?n=a:r[IA(t)]=a;let{type:i}=e;switch("symbol"==typeof i&&(i=i.toString()),function(e,t){if("string"!=typeof e)throw Error("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");if(!rA.includes(e))throw Error(`Only elements types ${rA.join(", ")} are allowed. Helmet does not support rendering <${e}> elements. Refer to our API for more information.`);if(t&&"string"!=typeof t&&!Array.isArray(t))throw Error(`Helmet expects a string as a child of <${e}>. Did you forget to wrap your children in braces? ( <${e}>{\`\`}</${e}> ) Refer to our API for more information.`)}(i,n),i){case ZO.BASE:t.base=r;break;case ZO.BODY:t.bodyAttributes=r;break;case ZO.FRAGMENT:!function(e,t){const n=e;for(const[r,i]of Object.entries(t))if(Array.isArray(i)){const e=n[r];n[r]=e?e.concat(i):i}else n[r]=i}(t,DA({children:n}));break;case ZO.HTML:t.htmlAttributes=r;break;case ZO.LINK:case ZO.META:if(n)throw Error(`<${i} /> elements are self-closing and can not contain children. Refer to our API for more information.`);gA(t,i,r);break;case ZO.NOSCRIPT:case ZO.SCRIPT:void 0!==n&&(r.innerHTML=n),gA(t,i,r);break;case ZO.STYLE:r.cssText=n,gA(t,i,r);break;case ZO.TITLE:t.titleAttributes=r,"string"==typeof n?t.title=n:Array.isArray(n)&&(t.title=n.join(""));case ZO.HEAD:}}),delete t.children,t}var PA=e=>{const t=(0,KO.c)(8),n=f(OA);if(!n)throw Error("<Helmet> component must be within a <HelmetProvider> children tree");const r=y();let i,a,o;return n.update(r,DA(e)),t[0]!==n||t[1]!==r||t[2]!==e?(i=()=>{n.update(r,DA(e)),n.clientApply()},t[0]=n,t[1]=r,t[2]=e,t[3]=i):i=t[3],g(i),t[4]!==n||t[5]!==r?(a=()=>()=>{n.update(r,void 0),n.clientApply()},o=[n,r],t[4]=n,t[5]=r,t[6]=a,t[7]=o):(a=t[6],o=t[7]),g(a,o),null},MA=class extends Gd{constructor(e){super((t,n)=>{const{...r}=t;return Object.defineProperty(r,"client",{enumerable:!1,value:t.client}),new Nl(i=>{let a=!1;return Promise.resolve(r).then(n=>e(t.getContext(),n)).then(t.setContext).then(()=>{a||n(t).subscribe(i)}).catch(i.error.bind(i)),()=>{a=!0}})})}},RA="COLLECTION_RECORDS_ADD",jA="COLLECTION_RECORDS_UPDATE",zA="COLLECTION_RECORDS_REMOVE",LA=(e,t)=>{switch(t.type){case"COLLECTIONS_INIT":case"COLLECTIONS_ADD":case"COLLECTIONS_ADD_MANY":case"COLLECTIONS_UPDATE":case"COLLECTIONS_REMOVE":return{...t.collections};case RA:return ar(e,e=>{let n=Y(e,`${t.collectionId}.records`,[]);G(e,`${t.collectionId}.records`,[...n,t.record])});case"COLLECTION_RECORDS_ADD_MANY":return ar(e,e=>{G(e,`${t.collectionId}.records`,t.records)});case jA:return ar(e,e=>{let n=Y(e,`${t.collectionId}.records`,[]).findIndex(e=>e.id===t.record.id);G(e,`${t.collectionId}.records.${n}`,t.record)});case zA:{let{collectionId:n,recordId:r}=t;return ar(e,i=>{let a=e[n];if(!a)return;let{records:o}=a;G(i,`${t.collectionId}.records`,o.filter(e=>e.id!==r))})}default:return e}},FA=({children:e,collections:t})=>{const{query:n,mutate:r}=f(vh),i=f(xh),a=x(()=>t||i.collections,[t,i.collections]),[o,s]=w(LA,a),l=k(o);l.current=o;const c=h((e,t)=>{l.current[e]&&s({type:RA,collectionId:e,record:t})},[s]),u=h((e,t)=>{l.current[e]&&s({type:jA,collectionId:e,record:t})},[s]),d=h((e,t)=>{l.current[e]&&s({type:zA,collectionId:e,recordId:t})},[s]),p=h(async(e,t,r)=>(await n("Collections",{filter:e,cursor:t,limit:r},"network-only")).result?.Collections,[n]),m=h(async(e,t)=>(await n("Collection",{id:e,recordsFilter:t},"network-only")).result?.Collection,[n]),g=h(async(e,t,r,i)=>(await n("CollectionRecords",{collectionId:e,filter:t,cursor:r,limit:i},"network-only")).result?.CollectionRecords,[n]),y=h(async(e,t)=>(await n("CollectionRecord",{collectionId:e,id:t},"network-only")).result?.CollectionRecord,[n]),b=h(async(e,t,n,i=!0)=>{const a=await r("CollectionAddRecord",{collectionId:e,status:t,values:n});if(a.result&&i)return c(e,a.result),a.result},[r,c]),v=h(async(e,t,n,i,a=!0)=>{const o=await r("CollectionUpdateRecord",{id:t,status:n,values:i});if(o.result&&a)return u(e,o.result),o.result},[r,u]),S=h(async(e,t,n=!0)=>!(!(await r("CollectionRemoveRecord",{id:t}))||!n||(d(e,t),0)),[r,d]);/* @__PURE__ */
399
+ return O(OA,{value:i,children:e})};function IA(e){return iA[e]??e}function DA(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.slice():r;return t}(e);for(const n of Object.values(e))if(Array.isArray(n)){for(const e of n)if(e)for(const t of Object.keys(e)){const n=IA(t);n!==t&&(e[n]=e[t],delete e[t])}}else if(n&&"object"==typeof n){const e=n;for(const t of Object.keys(e)){const n=IA(t);n!==t&&(e[n]=e[t],delete e[t])}}return n.forEach(e.children,e=>{if(null==e)return;if("object"!=typeof e||!("props"in e))throw Error(`"${typeof e}" is not a valid <Helmet> descendant`);let n;const r={};if(e.props)for(const[t,a]of Object.entries(e.props))"children"===t?n=a:r[IA(t)]=a;let{type:i}=e;switch("symbol"==typeof i&&(i=i.toString()),function(e,t){if("string"!=typeof e)throw Error("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");if(!rA.includes(e))throw Error(`Only elements types ${rA.join(", ")} are allowed. Helmet does not support rendering <${e}> elements. Refer to our API for more information.`);if(t&&"string"!=typeof t&&!Array.isArray(t))throw Error(`Helmet expects a string as a child of <${e}>. Did you forget to wrap your children in braces? ( <${e}>{\`\`}</${e}> ) Refer to our API for more information.`)}(i,n),i){case ZO.BASE:t.base=r;break;case ZO.BODY:t.bodyAttributes=r;break;case ZO.FRAGMENT:!function(e,t){const n=e;for(const[r,i]of Object.entries(t))if(Array.isArray(i)){const e=n[r];n[r]=e?e.concat(i):i}else n[r]=i}(t,DA({children:n}));break;case ZO.HTML:t.htmlAttributes=r;break;case ZO.LINK:case ZO.META:if(n)throw Error(`<${i} /> elements are self-closing and can not contain children. Refer to our API for more information.`);gA(t,i,r);break;case ZO.NOSCRIPT:case ZO.SCRIPT:void 0!==n&&(r.innerHTML=n),gA(t,i,r);break;case ZO.STYLE:r.cssText=n,gA(t,i,r);break;case ZO.TITLE:t.titleAttributes=r,"string"==typeof n?t.title=n:Array.isArray(n)&&(t.title=n.join(""));case ZO.HEAD:}}),delete t.children,t}var PA=e=>{const t=P(8),n=f(OA);if(!n)throw Error("<Helmet> component must be within a <HelmetProvider> children tree");const r=y();let i,a,o;return n.update(r,DA(e)),t[0]!==n||t[1]!==r||t[2]!==e?(i=()=>{n.update(r,DA(e)),n.clientApply()},t[0]=n,t[1]=r,t[2]=e,t[3]=i):i=t[3],g(i),t[4]!==n||t[5]!==r?(a=()=>()=>{n.update(r,void 0),n.clientApply()},o=[n,r],t[4]=n,t[5]=r,t[6]=a,t[7]=o):(a=t[6],o=t[7]),g(a,o),null},MA=class extends Gd{constructor(e){super((t,n)=>{const{...r}=t;return Object.defineProperty(r,"client",{enumerable:!1,value:t.client}),new Nl(i=>{let a=!1;return Promise.resolve(r).then(n=>e(t.getContext(),n)).then(t.setContext).then(()=>{a||n(t).subscribe(i)}).catch(i.error.bind(i)),()=>{a=!0}})})}},RA="COLLECTION_RECORDS_ADD",jA="COLLECTION_RECORDS_UPDATE",zA="COLLECTION_RECORDS_REMOVE",LA=(e,t)=>{switch(t.type){case"COLLECTIONS_INIT":case"COLLECTIONS_ADD":case"COLLECTIONS_ADD_MANY":case"COLLECTIONS_UPDATE":case"COLLECTIONS_REMOVE":return{...t.collections};case RA:return ar(e,e=>{let n=Y(e,`${t.collectionId}.records`,[]);G(e,`${t.collectionId}.records`,[...n,t.record])});case"COLLECTION_RECORDS_ADD_MANY":return ar(e,e=>{G(e,`${t.collectionId}.records`,t.records)});case jA:return ar(e,e=>{let n=Y(e,`${t.collectionId}.records`,[]).findIndex(e=>e.id===t.record.id);G(e,`${t.collectionId}.records.${n}`,t.record)});case zA:{let{collectionId:n,recordId:r}=t;return ar(e,i=>{let a=e[n];if(!a)return;let{records:o}=a;G(i,`${t.collectionId}.records`,o.filter(e=>e.id!==r))})}default:return e}},FA=({children:e,collections:t})=>{const{query:n,mutate:r}=f(vh),i=f(xh),a=x(()=>t||i.collections,[t,i.collections]),[o,s]=w(LA,a),l=k(o);l.current=o;const c=h((e,t)=>{l.current[e]&&s({type:RA,collectionId:e,record:t})},[s]),u=h((e,t)=>{l.current[e]&&s({type:jA,collectionId:e,record:t})},[s]),d=h((e,t)=>{l.current[e]&&s({type:zA,collectionId:e,recordId:t})},[s]),p=h(async(e,t,r)=>(await n("Collections",{filter:e,cursor:t,limit:r},"network-only")).result?.Collections,[n]),m=h(async(e,t)=>(await n("Collection",{id:e,recordsFilter:t},"network-only")).result?.Collection,[n]),g=h(async(e,t,r,i)=>(await n("CollectionRecords",{collectionId:e,filter:t,cursor:r,limit:i},"network-only")).result?.CollectionRecords,[n]),y=h(async(e,t)=>(await n("CollectionRecord",{collectionId:e,id:t},"network-only")).result?.CollectionRecord,[n]),b=h(async(e,t,n,i=!0)=>{const a=await r("CollectionAddRecord",{collectionId:e,status:t,values:n});if(a.result&&i)return c(e,a.result),a.result},[r,c]),v=h(async(e,t,n,i,a=!0)=>{const o=await r("CollectionUpdateRecord",{id:t,status:n,values:i});if(o.result&&a)return u(e,o.result),o.result},[r,u]),S=h(async(e,t,n=!0)=>!(!(await r("CollectionRemoveRecord",{id:t}))||!n||(d(e,t),0)),[r,d]);/* @__PURE__ */
400
400
  return O(Xa,{value:x(()=>({collections:a,fetchCollections:p,fetchCollection:m,fetchRecords:g,fetchRecord:y,addRecord:b,updateRecord:v,removeRecord:S}),[a,p,m,g,y,b,v,S]),children:e})},$A=s({});$A.displayName="InteractionsContext";var qA=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:a}=f($A);g(()=>(a.subscribe(e,t,n,r,i),()=>{a.unsubscribe(e)}),[e,t,n,r,i,a])},BA={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"text"}},preview:{},callback:({time:e})=>new Promise(t=>{setTimeout(t,e)})},VA={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(Lo(t,e));if(n&&"object"==typeof n)return{template:"",content:Jr(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Lo(t,e)}catch(jR){}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(jR){}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},UA={action:"webHook",title:"Webhook",type:"utility",params:{url:{canBind:!0,defaultValue:"",type:"text",label:"Url"},method:{label:"Method",type:"select",defaultValue:"get",options:[{label:"Get",value:"get"},{label:"Post",value:"post"},{label:"Put",value:"put"},{label:"Delete",value:"delete"},{label:"Patch",value:"patch"},{label:"Head",value:"head"}]},body:{canBind:!0,defaultValue:"",type:"textarea",label:"Body"},authorizationToken:{canBind:!0,defaultValue:"",type:"text",label:"Authorization Token"},credentials:{canBind:!0,defaultValue:"same-origin",type:"select",options:[{label:"Include",value:"include"},{label:"Omit",value:"omit"},{label:"Same Origin",value:"same-origin"}],label:"Credentials"}},preview:{response:{status:"",data:""}},callback:async e=>{let{url:t,authorizationToken:n,body:r,credentials:i}=e,{method:a}=e,o={};try{a=a.toUpperCase();let e={};n&&(e.Authorization=`Bearer ${n}`),Object.values(r).forEach(t=>{t instanceof Blob&&"multipart/form-data"!==e["Content-Type"]&&(e["Content-Type"]="multipart/form-data")});let s=new FormData;Object.entries(r).forEach(([e,t])=>{s?.append(e,t)});let l={method:a,headers:e,credentials:i};(!a||"get"!==a.toLowerCase())&&(l.body=s);let c=await fetch(t,l),u="";try{u=await c.json()}catch{}o={status:c.status,data:u}}catch(e){}return{response:o}}},HA={delayTime:BA,twigTemplate:VA,webHook:UA},WA=(e,t,n,r,i)=>"utility"===e&&"twigTemplate"===i?t:Object.keys(t).reduce((i,a)=>{let o=t[a];if("trigger"!==e){let e=5;for(;"string"==typeof o&&zo(o)&&e>0;)o=Lo(o,{...n,...r},!1,!0),e--;"string"==typeof o&&zo(o)&&za.warning("interactions",/* @__PURE__ */A("span",{children:["Twig token resolution exceeded ",5," passes for ",
401
401
  /* @__PURE__ */O("b",{children:a}),", leaving unresolved tokens"]}),{param:a,value:o})}return{...i,[a]:o}},{}),YA=async(e,t={},n={},r={},i={},a=[],o={})=>{if(!e)return o;let s=Y(t,e.afterNode);if(!s&&a.length>0&&await(async(e=[])=>{let t={};return await Promise.all(e.reverse().map(async({id:e,callback:n,params:r})=>{t[e]=await(n?.(ee(r,[e]),r[e]))})),t})(a),!s)return o;let l=za.getTime().valueOf(),{status:c,result:u,postCallbacks:d,whenParams:p}=await(async(t,n={},r={},i={})=>{let a={},o=[],{id:s,action:l,enabled:c,params:u,elementId:d,type:p,when:f}=t;if(!l||!c)return{status:"disabled",result:a,postCallbacks:o};let h={...i,...r,[s]:u};if(f&&!bN(f,h))return{status:"skipped",result:a,postCallbacks:o,whenParams:h};let m={...r,...i,...WA(p,u,r,i,l)};try{switch(p){case"callback":case"globalCallback":{if(!d)return{status:"failed",result:a,postCallbacks:o,whenParams:h};let e=Y(n,`${d}.${l}`);if(!e)return{status:"failed",result:a,postCallbacks:o,whenParams:h};let{callback:t,postCallback:r}=e;t&&(a=await t(m)),r&&o.push({id:s,callback:r,params:{...m,[s]:a}});break}case"utility":{let{callback:e,postCallback:t}=Y(HA,l,{});e&&(a=await e(m)),t&&o.push({id:s,callback:t,params:{...m,[s]:a}});break}}}catch(e){return za.danger("interactions",/* @__PURE__ */A("span",{children:["Interaction node failed ",/* @__PURE__ */O("b",{children:l})]}),{error:e instanceof Error?e.message:String(e),node:t}),{status:"failed",result:a,postCallbacks:o,whenParams:h}}return{status:"success",result:a,postCallbacks:o,whenParams:h}})(s,n,r,i);return o[s.id]={node:s,status:c,result:u,postCallbacks:d,whenParams:p,startTime:l,endTime:za.getTime().valueOf()},a.push(...d),YA(s,t,n,{...r,[s.id]:u},i,a,o)},GA=(e,t,n={},r)=>{let i=za.getTime().valueOf(),a="skipped";"completed"===r&&(a="success"),za.info("interactions",/* @__PURE__ */A("span",{children:["Interaction triggered ",/* @__PURE__ */O("b",{children:`${e.title} [${e.action}]`})]}),{status:r,node:e,elementId:e.elementId,nodes:{...n,[e.id]:{node:e,status:a,result:void 0,postCallbacks:[],startTime:t,endTime:i}},startTime:t,endTime:i})},QA=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t}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]||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){!this.has(e,t)||!this.events[e]||(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length&&delete this.events[e][t],0===Object.keys(this.events[e]).length&&delete this.events[e])}async emit(e,t=[],...n){let r;this.debugMode&&za.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]&&delete this.events[e]:this.events={}}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)}}},JA=({children:e,debugMode:t,onInit:n})=>{let r=x(()=>new QA({debugMode:t}),[t]);g(()=>()=>{r.clear()},[r]);let i=x(()=>({eventBridge:r}),[r]);return g(()=>{n?.(i)},[n,i]),/* @__PURE__ */O(uC,{value:i,children:e})},KA=QA,XA=class e{eventBridge;parentManager;childManagers;interactionsData;subscriptors;callbacksAvailables;interactionsRunning;lastUpdate;listeners=/* @__PURE__ */new Set;constructor(e="",t={},n={}){this.eventBridge=new KA,this.parentManager=void 0,this.childManagers=[],this.subscriptors={},this.callbacksAvailables={},this.interactionsRunning={},this.interactionsData={currentPageId:e,...t,...n},this.lastUpdate=Date.now()}eventBridgeCallback=e=>async(t,n,r)=>{if(e&&n&&t&&!Y(this.interactionsRunning,`${t}.${n}`)){G(this.interactionsRunning,`${t}.${n}`,!0);try{let i,a=Y(this.subscriptors,`${t}.getAdditionalParams`,void 0);"function"==typeof a&&({dataSource:i}=a());let o=Object.values(e).filter(e=>"trigger"===e.type&&e.action===n&&e.enabled);await Promise.all(o.map(t=>(async(e,t={},n={},r={},i={},a=[])=>{let o=za.getTime().valueOf(),{action:s,enabled:l,when:c}=e;s&&l&&(!c||bN(c,{...i,...r}))?GA(e,o,await YA(e,t,n,r,i,a),"completed"):GA(e,o,{},"skipped")})(t,e,this.getCallbacksAvailables(),{[t.id]:r},{...this.interactionsData,...i})))}finally{G(this.interactionsRunning,`${t}.${n}`,!1)}}};subscribe(e,t={},n={},r={},i){if(this.subscriptors[e])return!1;G(this.subscriptors,e,{id:e,triggers:n,getAdditionalParams:i});let a=Object.keys(r);return a.length>0&&(this.callbacksAvailables[e]=a.reduce((t,n)=>{let{title:i,callback:a,postCallback:o,params:s,preview:l,type:c}=r[n];return"function"==typeof a?{...t,[n]:{elementId:e,title:i,action:n,type:c,callback:a,postCallback:o,params:s,preview:l}}:t},{})),Object.keys(n).length>0&&this.eventBridge.on("interaction",e,this.eventBridgeCallback(t),{override:!0}),this.touch(),!0}unsubscribe(e){return!!this.subscriptors[e]&&(this.eventBridge.off("interaction",e),delete this.subscriptors[e],this.callbacksAvailables[e]&&delete this.callbacksAvailables[e],this.touch(),!0)}getRootManager(){return this.parentManager?this.parentManager.getRootManager():this}getSubscriptorInternal(e){let t=Y(this.subscriptors,e);if(!t&&this.childManagers.length>0)for(let n of this.childManagers)if(t=n.getSubscriptorInternal(e),t)break;return t}getSubscriptor(e){return this.parentManager?this.getRootManager()?.getSubscriptorInternal(e):this.getSubscriptorInternal(e)}getCallbacksAvailablesInternal(){let e={};if(this.childManagers.length>0)for(let t of this.childManagers)e={...e,...t.getCallbacksAvailablesInternal()};return{...e,...this.callbacksAvailables}}getCallbacksAvailables(){return this.parentManager?this.getRootManager()?.getCallbacksAvailablesInternal()??{}:this.getCallbacksAvailablesInternal()}interactionTrigger(e,t,n={}){return this.eventBridge.emit("interaction",e,e,t,n)}createChildManager=(t={},n={})=>{let r=new e(this.interactionsData.currentPageId,t,n);return r.parentManager=this,this.childManagers.push(r),r};removeChildManager=e=>{this.childManagers=this.childManagers.filter(t=>t!==e)};onUpdate(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}touch(){let e=Date.now();this.lastUpdate=e;for(let t of this.listeners)t(e)}},ZA=({children:e,currentPageId:t,routeParams:n,queryParams:r})=>{let i=x(()=>new XA(t,n,r),[]);return i.interactionsData=x(()=>({currentPageId:t,...n,...r}),[t,n,r]),/* @__PURE__ */O($A,{value:x(()=>({interactionsManager:i,useInteractions:qA}),[i]),children:e})},eI=class{cache;enableRefresh=!1;tokenStorage="localStorage";state="init";listeners=/* @__PURE__ */new Set;constructor({enableRefresh:e=!1,tokenStorage:t="localStorage"}={}){this.enableRefresh=e,this.tokenStorage=t;try{let e=null;"localStorage"===t?e=localStorage.getItem("user_state"):"sessionStorage"===t&&(e=sessionStorage.getItem("user_state")),e&&this.setCache("token",JSON.parse(e))}catch{}return new Proxy(this,{get:(e,n,r)=>n in e?Reflect.get(e,n,r):e.cache&&n in e.cache&&"token"===n&&""===t||!e.cache||!(n in e.cache)?void 0:e.cache[n]})}internalRefresh(e){e||(this.setState("guest"),this.setCache(void 0,void 0)),this.setCache("token",e)}internalGetUser(e){this.setCache("user",e),e?this.setState("authenticated"):(this.setState("guest"),this.isExpired()&&this.clearCache())}internalLogin(e,t){this.setCache("user",e),this.setCache("token",t),e?this.setState("authenticated"):this.setState("guest")}internalLogout(){this.clearCache(),this.setState("guest"),this.emit({type:"logout"})}isExpired(){return!this.cache||!this.cache.token||!this.cache.token.expiresAt||Date.now()>=this.cache.token.expiresAt}setCache(e,t){if(!e)return this.cache=t,void(typeof localStorage<"u"&&"localStorage"===this.tokenStorage&&this.cache.token?localStorage.setItem("user_state",JSON.stringify(this.cache.token)):typeof sessionStorage<"u"&&"sessionStorage"===this.tokenStorage&&this.cache.token&&sessionStorage.setItem("user_state",JSON.stringify(this.cache.token)));this.cache||={},this.cache[e]=t,this.cache.token&&(typeof localStorage<"u"&&"localStorage"===this.tokenStorage?localStorage.setItem("user_state",JSON.stringify(this.cache.token)):typeof sessionStorage<"u"&&"sessionStorage"===this.tokenStorage&&sessionStorage.setItem("user_state",JSON.stringify(this.cache.token)))}clearCache(e){if(e&&this.cache)return delete this.cache[e],void("token"===e&&(typeof localStorage<"u"&&"localStorage"===this.tokenStorage?localStorage.removeItem("user_state"):typeof sessionStorage<"u"&&"sessionStorage"===this.tokenStorage&&sessionStorage.removeItem("user_state")));typeof localStorage<"u"&&"localStorage"===this.tokenStorage?localStorage.removeItem("user_state"):typeof sessionStorage<"u"&&"sessionStorage"===this.tokenStorage&&sessionStorage.removeItem("user_state"),this.cache=void 0}on(e){return Array.isArray(e)?(e.forEach(e=>this.listeners.add(e)),()=>e.forEach(e=>this.listeners.delete(e))):(this.listeners.add(e),()=>this.listeners.delete(e))}emit(e){for(let t of this.listeners)t(e)}setState(e){this.state!==e&&(this.state=e,this.emit({type:"state",state:e}))}getState(){return this.state}async request(e,t){let n,r;try{n=await fetch(e,t)}catch{return Promise.resolve({data:void 0,status:500})}if(!n.ok)return Promise.resolve({data:void 0,status:n.status});try{r=await n.json()}catch{r=void 0}return{data:r,status:n.status}}},tI={auth0:class extends eI{name="auth0";init(){throw Error("Method not implemented.")}login(...e){throw Error("Method not implemented.")}getUser(){throw Error("Method not implemented.")}refresh(){throw Error("Method not implemented.")}can(e){throw Error("Method not implemented.")}logout(){throw Error("Method not implemented.")}},basic:class extends eI{name="basic";baseUrl;options;constructor({tokenStorage:e="localStorage",enableRefresh:t=!0,loginUrl:n="",userUrl:r="",refreshUrl:i="",logoutUrl:a="",detailsPath:o="",tokenPath:s="",refreshTokenPath:l="",expirationTimePath:c="",isSSR:u=!1}={}){super({enableRefresh:t,tokenStorage:e}),this.options={tokenStorage:e,loginUrl:n,userUrl:r,refreshUrl:i,logoutUrl:a,detailsPath:o,tokenPath:s,refreshTokenPath:l,expirationTimePath:c,isSSR:u}}async init(e,t){t?this.setState("guest"):(this.setState("initLoading"),this.options.isSSR?e?super.internalGetUser(e):this.setState("guest"):await this.getUser())}async login(e){let{username:t="",password:n=""}=e;super.setState("authenticating");let r=await this.request(this.options.loginUrl,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:n})}),i=this.getTokenFromResponse(r);return super.internalLogin(Y(r.data,this.options.detailsPath),i),i}async getUser(){if(this.cache?.user&&"init"!==this.state)return this.cache.user;if(!this.options.userUrl)return void super.internalGetUser(void 0);let e=await this.request(this.options.userUrl,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});return super.internalGetUser(Y(e.data,this.options.detailsPath)),e.data}async refresh(){let e=await this.request(this.options.refreshUrl,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:this.cache?.token?.refreshToken??""})}),t=this.getTokenFromResponse(e);return super.internalRefresh(t),t}can(e){return!!this.cache?.user&&Y(this.cache.user,"permissions",[]).includes(e)}async logout(){await this.request(this.options.logoutUrl,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}}),super.internalLogout()}getTokenFromResponse(e){if(e.status>=400)return;let t={errors:Y(e.data,"errors",{}),accessToken:Y(e.data,this.options.tokenPath,""),refreshToken:Y(e.data,this.options.refreshTokenPath,""),expiresAt:Y(e.data,this.options.expirationTimePath,0)};return e.data&&!("errors"in e.data)&&delete t.errors,t}}},nI=class{providerType="basic";provider=void 0;constructor(e="basic",t,...n){this.providerType=e,tI[e]&&(this.provider=new tI[e](...n),this.provider.on(t))}getProviderType(){return this.providerType}getProvider(){return this.provider}init(e,t){return this.provider?.init(e,t)}login(...e){return this.provider?.login(...e)??Promise.resolve(void 0)}refresh(){return this.provider?.refresh()??Promise.resolve(void 0)}getUser(){return this.provider?.getUser()}can(e){return this.provider?.can(e)??!1}logout(){return this.provider?.logout()??Promise.resolve()}on(e){return this.provider?.on(e)}},rI=s({});rI.displayName="AuthContext";var iI=({server:e})=>{let t=x(()=>typeof window<"u"?window.location:Y(e,"location",{pathname:"/"}),[e]),n=x(()=>function(e){!e&&typeof window<"u"&&(e=window.location.search);let t={};if(!e||0===e.length)return t;let n=e.replace("?","").split("&");for(let r=0;r<n.length;r++){let e=n[r].split("="),i=decodeURIComponent(e[0]),a=decodeURIComponent(e[1]);void 0===t[i]?t[i]=decodeURIComponent(a):"string"==typeof t[i]?t[i]=[t[i],decodeURIComponent(a)]:t[i].push(decodeURIComponent(a))}return t}(t.search),[t.search]),r=x(()=>t.hostname?t.hostname:"localhost",[t.hostname]);return x(()=>({queryParams:n,hostname:r,location:t}),[n,r,t])},aI=({previewMode:e=!0,isHydrating:t=!1,children:n,server:r,environment:i="production"})=>{let{useStore:a}=Gr(),[[{userProvider:o,loginUrl:s,userUrl:l,refreshUrl:c,logoutUrl:u,tokenStorage:d="localStorage",detailsPath:p="details",tokenPath:f="access_token",expirationTimePath:m="expire_at"},y]]=a(["schema.settings","schema.variables"]),{queryParams:b,hostname:v}=iI({server:r}),w=x(()=>({queryParams:b,hostname:v,environment:i}),[b,v,i]),k=x(()=>Array.isArray(y)?y.reduce((e,t)=>{let{name:n,value:r,subValues:i}=t;if(!Array.isArray(i)||0===i.length)return{...e,[n]:r};let a=i.find(e=>bN(e.when,w));return a?{...e,[n]:a.value}:{...e,[n]:r}},{}):{},[y,w]),T=x(()=>{try{return JSON.parse(Lo(JSON.stringify({loginUrl:s,userUrl:l,refreshUrl:c,logoutUrl:u,detailsPath:p,tokenPath:f,expirationTimePath:m}),k))}catch{return{loginUrl:s,userUrl:l,refreshUrl:c,logoutUrl:u,detailsPath:p,tokenPath:f,expirationTimePath:m}}},[s,l,c,u,p,f,m,k]),{manager:N,loading:C,authenticated:E}=(({server:e,isHydrating:t=!1,tokenStorage:n="localStorage",provider:r="",loginUrl:i="",userUrl:a="",refreshUrl:o="",logoutUrl:s="",detailsPath:l="details",tokenPath:c="access_token",expirationTimePath:u="expire_at"})=>{let d=typeof window>"u"||t||!!e?.user&&e.authenticated,[p,f]=S(!!a&&!d),[m,y]=S(!1),b=h(e=>{"state"===e.type&&(f("initLoading"===e.state),y("authenticated"===e.state))},[]),v=x(()=>{let t={};"basic"===r&&(t={tokenStorage:n,loginUrl:i,userUrl:a,refreshUrl:o,logoutUrl:s,detailsPath:l,tokenPath:c,expirationTimePath:u,isSSR:d});let p=new nI(r,b,t);return p.init(e?.authenticated?e.user?.details:void 0,e?.skipAuth),p},[r,b,e?.authenticated,e?.user?.details,e?.skipAuth,n,i,a,o,s,l,c,u,d]);return g(()=>{let e=v.getProvider();if(!e||!e.token?.expiresAt)return;let t=Math.floor(Date.now()/1e3);if(e.token.expiresAt){let n=setTimeout(()=>{v.logout()},1e3*Math.abs(t-e.token.expiresAt));return()=>clearTimeout(n)}},[v,m]),x(()=>({manager:v,loading:p,authenticated:m}),[v,p,m])})({server:r,isHydrating:t,tokenStorage:d,provider:o,loginUrl:T.loginUrl,userUrl:T.userUrl,refreshUrl:T.refreshUrl,logoutUrl:T.logoutUrl,detailsPath:T.detailsPath,tokenPath:T.tokenPath,expirationTimePath:T.expirationTimePath});/* @__PURE__ */
402
- return O(rI,{value:x(()=>({manager:N,login:N.login.bind(N),refresh:N.refresh.bind(N),can:N.can.bind(N),logout:N.logout.bind(N),authenticated:E||!e,user:N.getProvider()?{details:N.getProvider()?.user,accessToken:N.getProvider()?.token?.accessToken}:void 0}),[N,E,e]),children:!C&&n})},oI=({children:e,authProvider:t="basic"})=>{let{login:n,refresh:r,logout:i}=f(rI),{useInteractions:a}=f($A),o=h(e=>n(e),[n]),s=h(e=>r(e),[r]),l=h(()=>i(),[i]);return a({id:"auth",callbacks:x(()=>{let e={};return"auth0"===t?e={login:{action:"authLogin",title:"Auth Login",type:"globalCallback",callback:o,params:{}},logout:{action:"authLogout",title:"Auth Logout",type:"globalCallback",callback:l,params:{}}}:"basic"===t&&(e={login:{action:"authLogin",title:"Auth Login",type:"globalCallback",callback:o,params:{mode:{label:"Mode",canBind:!1,type:"select",defaultValue:"normal",options:[{label:"Token",value:"token"},{label:"User and Password",value:"normal"}]},username:{type:"text",defaultValue:"",when:e=>"normal"===e.mode},password:{type:"text",defaultValue:"",when:e=>"normal"===e.mode},token:{type:"text",defaultValue:"",when:e=>"token"===e.mode}},preview:{errors:{username:"",password:"",token:""},success:"",access_token:"",expires_at:"",details:{id:"",username:"",email:"",verified:"",permissions:""}}},refreshDetails:{action:"authRefreshDetails",title:"Auth Refresh Details",type:"globalCallback",callback:s,params:{},preview:{errors:"",success:"",access_token:"",expires_at:"",details:{id:"",username:"",email:"",roles:"",permissions:"",verified:""}}},logout:{action:"authLogout",title:"Auth Logout",type:"globalCallback",callback:l,preview:{},params:{}}}),e},[o,l,s,t])}),e},sI={text:{icon:"fas fa-font",label:"Plain Text"},richText:{icon:"fas fa-align-justify",label:"Rich Text"},image:{icon:"far fa-image",label:"Image"},multiImage:{icon:"far fa-images",label:"Multi Image"},video:{icon:"fab fa-youtube",label:"Video Link"},link:{icon:"fas fa-link",label:"Link"},email:{icon:"far fa-envelope",label:"Email"},phone:{icon:"fas fa-phone",label:"Phone"},number:{icon:"fas fa-hashtag",label:"Number"},date:{icon:"fas fa-calendar-day",label:"Date / Time"},switch:{icon:"fas fa-toggle-off",label:"Switch"},color:{icon:"fas fa-tint",label:"Color"},option:{icon:"",label:"Option"},file:{icon:"far fa-file",label:"File"}},lI=e=>{let t;switch(e){case"switch":case"boolean":t="boolean";break;case"option":t="select";break;default:t="text"}return t},cI=(Object.keys(sI).map(e=>({label:e,value:e,icon:/* @__PURE__ */O(vg,{icon:sI[e].icon,size:"xs"})})),({children:e})=>{const{useInteractions:t}=f($A),{collections:n,addRecord:r,updateRecord:i,removeRecord:a}=f(Xa),o=h((e,t)=>{if(!e)return!1;const{fields:n}=e;if("object"!=typeof n)return!0;const r=Object.values(n).filter(e=>e.params.required);if(0===r.length)return!0;let i=!0;return r.forEach(e=>{t[e.machineName]||!i||(i=!1)}),i},[]),s=h(async e=>{const{collectionId:t,recordStatus:i="draft"}=e,a=Y(n,t,void 0);if(!a)return{success:!1,record:void 0};if(!o(a,e))return{success:!1,record:void 0};const{fields:s}=a;return{success:!0,record:await r(t,i,Q(e,Object.keys(s)))}},[r,n,o]),l=h(async e=>{const{collectionId:t,recordStatus:r="draft",recordId:a}=e,s=Y(n,t,void 0);if(!s||!a)return{success:!1,record:void 0};if(!o(s,e))return{success:!1,record:void 0};const{fields:l}=s;return{success:!0,collectionId:t,record:await i(t,a,r,Q(e,Object.keys(l)))}},[n,i,o]),c=h(async e=>{const{collectionId:t,recordId:r}=e;return Y(n,t,void 0)&&r?(await a(t,r),{success:!0,collectionId:t,recordId:r}):{success:!1,record:void 0}},[n,a]),u=x(()=>n&&"object"==typeof n?Object.keys(n).reduce((e,t)=>[...e,{value:t,label:Y(n[t],"name",t)}],[]):[],[n]);return t({id:"collection",callbacks:x(()=>({addCollectionRecord:{action:"addCollectionRecord",title:"Add Collection Record",type:"globalCallback",callback:s,preview:{success:"",collectionId:"",record:{id:"",status:"",values:{}}},params:e=>{const t=Y(n,`${e.collectionId}.fields`,{});return{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordStatus:{label:"Record Status",defaultValue:"draft",type:"select",options:[{value:"published",label:"Published"},{value:"draft",label:"Draft"},{value:"archived",label:"Archived"},{value:"deleted",label:"Deleted"},{value:"created",label:"Created"}]},...Object.values(t).reduce((e,t)=>{const{machineName:n,name:r,type:i}=t;return{...e,[n]:{label:r,defaultValue:void 0,when:e=>!!e.collectionId,type:lI(i)}}},{})}}},updateCollectionRecord:{action:"updateCollectionRecord",title:"Update Collection Record",type:"globalCallback",callback:l,preview:{success:"",collectionId:"",record:{id:"",status:"",values:{}}},params:e=>{const t=Y(n,`${e.collectionId}.fields`,{});return{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordStatus:{label:"Record Status",defaultValue:"draft",type:"select",options:[{value:"published",label:"Published"},{value:"draft",label:"Draft"},{value:"archived",label:"Archived"},{value:"deleted",label:"Deleted"},{value:"created",label:"Created"}]},recordId:{label:"Record",defaultValue:void 0,type:"select",when:e=>!!e.collectionId,options:e=>{const{collectionId:t}=e,r=n[t];if(!t||!r)return[];const i=Object.values(r.fields).find(e=>e.params.primary);return r.records.map(e=>{let t="";return t=i?e.values[i.machineName]:JSON.stringify(e.values),{value:e.id,label:t}})}},...Object.values(t).reduce((e,t)=>{const{machineName:n,name:r,type:i}=t;return{...e,[n]:{label:r,defaultValue:void 0,when:e=>!!e.collectionId,type:lI(i)}}},{})}}},removeCollectionRecord:{action:"removeCollectionRecord",title:"Remove Collection Record",type:"globalCallback",callback:c,preview:{success:"",collectionId:"",recordId:""},params:{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordId:{label:"Record",defaultValue:void 0,type:"select",when:e=>!!e.collectionId,options:e=>{const{collectionId:t}=e,r=n[t];if(!t||!r)return[];const i=Object.values(r.fields).find(e=>e.params.primary);return r.records.map(e=>{let t="";return t=i?e.values[i.machineName]:JSON.stringify(e.values),{value:e.id,label:t}})}}}}}),[n,u,s,c,l])}),e}),uI=s({state:{}});uI.displayName="StateManagerContext";var dI=({children:e,previewMode:t=!0})=>{const{setStateByKey:n,clearCache:r}=f(uI),{useInteractions:i}=f($A),{navigate:a}=f(UO),{useStore:o}=Gr(),[[{keepState:s,stateStorage:l},c,u]]=o(["schema.settings","schema.pages","pageDefinitions"]),d=h(e=>{const{key:t,type:r}=e;let{value:i}=e;"boolean"===r?i="true"===i:"number"===r&&(i=parseInt(i,10)),s&&l?n(t,i,l):n(t,i)},[n,s,l]),p=h(()=>{s&&l&&r(l)},[r,l,s]),m=x(()=>{const e=Q(u,c);return Object.keys(e).reduce((t,n)=>{const r=e[n];return[...t,{key:n,label:Y(r,"attributes.name",n),defaultPage:Y(r,"attributes.default",!1)}]},[])},[u,c]),g=h(e=>{if(!t)return;const{url:n,urlType:r}=e;"page"===r||"internal"===r?a(n):a(n,!0)},[a,t]);return i({id:"page",callbacks:x(()=>({navigate:{action:"navigateToPage",title:"Navigate To Page",type:"globalCallback",callback:g,preview:{},params:{urlType:{label:"Url Type",defaultValue:void 0,type:"select",options:[{value:"page",label:"Space Page"},{value:"internal",label:"Inside Space"},{value:"external",label:"Outside Space"}]},url:{defaultValue:m.find(e=>e.defaultPage)?.key??"",type:e=>"page"===e.urlType?"select":"text",when:e=>!!e.urlType,options:m.map(e=>({value:e.key,label:e.label}))}}},setPageState:{action:"setPageState",title:"Set Page State",type:"globalCallback",callback:d,preview:{},params:{key:{defaultValue:"",type:"text"},type:{defaultValue:void 0,type:"select",options:[{value:"boolean",label:"True / False"},{value:"number",label:"Numeric"},{value:"text",label:"Text"}]},value:{defaultValue:void 0,type:e=>"boolean"===e.type?"select":"text",when:e=>!!e.type,options:[{value:"true",label:"True"},{value:"false",label:"False"}]}}},clearState:{action:"clearState",title:"Clear Page State",type:"globalCallback",callback:p,preview:{},params:{}}}),[d,p,g,m])}),e},pI=({children:e,previewMode:t=!1})=>{const{currentPageId:n,routeParams:r,queryParams:i}=f(UO),{useStore:a}=Gr(),[o]=a("schema.settings.userProvider");/* @__PURE__ */
403
- return O(ZA,{currentPageId:n,routeParams:r,queryParams:i,children:/* @__PURE__ */O(oI,{authProvider:o,children:/* @__PURE__ */O(cI,{children:/* @__PURE__ */O(dI,{previewMode:t,children:e})})})})},fI=({children:e,renderMode:t="iframe",currentPageId:n,previewMode:r=!0})=>{const{server:i}=f(vh),{useStore:a}=Gr(),[[o,s]]=a(["schema.pageFolders","pageDefinitions"]),{queryParams:l,hostname:c,location:u}=iI({server:i}),d=k(s);d.current=s;const{authenticated:p}=f(rI),m="widget"!==t?LE():void 0,y=x(()=>((e={},t=[],n,r="",i=!0,a=!0)=>{let o=Object.keys(e).reduce((a,o)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[o],{attributes:{unauthorizedPageRedirect:u}}=e[o];if(!l&&i)return a;u&&=P_(e,t,u.replace("/",""),!0);let d=P_(e,t,o),p=Object.keys(d).map(e=>({pageId:o,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${o}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:M_(s,n,i)}));return[...a,...p]},[]).filter(e=>"*"!==e.path||e.hasAccess).sort((e,t)=>e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1);if(!o.find(e=>"*"===e.path)&&!a){let e=o.find(e=>"/"===e.path&&e.hasAccess);e&&"redirect"===e.unauthorizedBehaviour&&e.unauthorizedPageRedirect&&o.push({...e,path:"*",hasAccess:!1,isRaw:!0,unauthorizedBehaviour:"redirect",unauthorizedPageRedirect:"/"})}return o})(s,o,p,i.basePath,r),[s,o,p,i.basePath,r]),{action:b,pageId:v="",pathMatch:w}=x(()=>"widget"===t?{action:{type:"normal",path:""},pageId:n}:((e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=iE({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e);if(i||=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),!i&&e.find(e=>"/"===e.path&&e.hasAccess))return{action:{type:"redirect",path:"/"},pathMatch:void 0};if(!i)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:a,matchResult:o,path:{hasAccess:s,unauthorizedBehaviour:l,unauthorizedPageRedirect:c}}=i;return!s&&"redirect"===l&&c?{action:{type:"redirect",path:c},pathMatch:void 0}:s?{action:{type:"normal",path:void 0},pathMatch:o,pageId:a}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}})(y,u.pathname,p),[y,u.pathname,p,t,n]),S=n||v;g(()=>{za.info("navigation",/* @__PURE__ */A("span",{children:["Navigated to page"," ",
404
- /* @__PURE__ */O("b",{children:Y(s,`${S}.attributes.name`,S||"Unknown")})]}),{status:b.type,elementId:S})},[b.type,S,s]);const T=h((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=Y(d,`current.${e}`,void 0);if(!n)return void m?.(e);const r=Y(n,"attributes.slug");r||""===r?m?.(r):Y(n,"attributes.default")?m?.("/"):m?.(`/${e}`)},[m]),N=x(()=>{const e=y.find(e=>e.pageId===S&&!e.isRaw);return e?{...R_(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...Y(w,"params",{})}:Y(w,"params",{})},[y,w,S]),C=x(()=>new URLSearchParams(u.search),[u.search]),E=x(()=>"widget"===t?{urlSearchParams:C,routeParams:N,queryParams:l,currentPageId:S}:{navigate:T,urlSearchParams:C,routeParams:N,queryParams:l,hostname:c,currentPageId:S,Helmet:PA},[t,T,C,N,l,c,S]);return"notFound"===b.type?"Not Found":"accessDenied"===b.type?"Access Denied":"redirect"===b.type?/* @__PURE__ */O(JE,{to:b.path??"",replace:!0}):/* @__PURE__ */O(UO,{value:E,children:e})},hI=(e,{src:t,type:n,isMain:r},i=!1)=>{let a,o=`${e}/${t}`,s=btoa(o);return a="style"===n&&o.endsWith(".css")?{type:"link",id:s,params:{href:o,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:o,type:"text/javascript"},isMain:r},i&&delete a.isMain,a},mI=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{runtime:{scope:a="",module:o=""},definition:{name:s="Plitzi's Demo Plugin",owner:l="Plitzi",verified:c=!1,license:u="MIT",website:d="https://plitzi.com",backgroundColor:p="#4422ee",icon:f="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:h,assetsSettings:m,pluginSchema:g}=t;return Object.values(Y(t,"pluginSchema",{})).reduce((e,y)=>{let{definition:b,builder:v,defaultStyle:x,attributes:w}=y,k=[];return b.type===i&&(k=Object.keys(ee(g,[i]))),{...e,[b.type]:{attributes:w,builder:v,defaultStyle:x,definition:b,market:{owner:l,verified:c,license:u,website:d,backgroundColor:p,icon:f,category:s},resource:n,isMain:b.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(m).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>hI(n,e,!0)),assets:Object.values(h).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>hI(n,e)),scope:a,module:o,subPlugins:k}}},{})}catch{return{}}},gI=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{let t;try{return t=await(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json(),t}catch{return t}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[Y(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=Y(n,r);t={...t,...mI(e,i)}}),t},yI=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:a="",instanceId:o,environment:s="development",offlineMode:l=!1,offlineData:c,offlineDataType:u="json",debugMode:d=!1})=>{const p=l&&!!c&&!!c.schema,m=f(GO()).client,[y,b]=S(!(l&&c)),[v,w]=S(void 0),{components:k}=f($a),[T,N]=S(()=>p&&"json"===u?{...c,plugins:{},segments:{},collections:{}}:{plugins:{},segments:{},collections:{}}),C=h(async(e,t,n="network-only")=>{const r=kh[e];if(!r)throw w("Query Not Found"),new Error(`Query ${e} not found`);let i;try{i=await(m?.query({query:r,variables:{environment:s,...t},fetchPolicy:n}))}catch(jR){return{success:!1,result:void 0,error:jR}}return i||w("Network Not Available, Please try again"),{success:!0,result:i?.data}},[m,s]),E=h(async(e,t,n=!0,r={})=>{if(!wh[e])return{success:!1,result:void 0,error:"Mutation Not Found"};let i;try{i=await(m?.mutate({mutation:wh[e],variables:n?{environment:s,...t}:t,context:{fetchOptions:{customFetch:!1,...r}}}))}catch(jR){return{success:!1,result:void 0,error:jR}}return i?i.data&&void 0!==i.data[e]?{success:!0,result:i.data[e]}:{success:!0,result:i.data}:{success:!1,result:void 0,error:"Network Not Available, Please try again"}},[m,s]),_=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await C("Init",{environment:s,revision:e,limit:99},"network-only");if(t.error)return b(!1),void("string"==typeof t.error?w(t.error):"statusCode"in t.error&&401===t.error.statusCode?w("Access not authorized"):"networkError"in t.error&&t.error.networkError?w("Service not available"):w(t.error.message));if(t.success&&t.result){const{Space:e,Collections:n}=J(t.result);if(!e)return w(/* @__PURE__ */A("span",{children:["Space not found, publish to ",
402
+ return O(rI,{value:x(()=>({manager:N,login:N.login.bind(N),refresh:N.refresh.bind(N),can:N.can.bind(N),logout:N.logout.bind(N),authenticated:E||!e,user:N.getProvider()?{details:N.getProvider()?.user,accessToken:N.getProvider()?.token?.accessToken}:void 0}),[N,E,e]),children:!C&&n})},oI=({children:e,authProvider:t="basic"})=>{let{login:n,refresh:r,logout:i}=f(rI),{useInteractions:a}=f($A),o=h(e=>n(e),[n]),s=h(e=>r(e),[r]),l=h(()=>i(),[i]);return a({id:"auth",callbacks:x(()=>{let e={};return"auth0"===t?e={login:{action:"authLogin",title:"Auth Login",type:"globalCallback",callback:o,params:{}},logout:{action:"authLogout",title:"Auth Logout",type:"globalCallback",callback:l,params:{}}}:"basic"===t&&(e={login:{action:"authLogin",title:"Auth Login",type:"globalCallback",callback:o,params:{mode:{label:"Mode",canBind:!1,type:"select",defaultValue:"normal",options:[{label:"Token",value:"token"},{label:"User and Password",value:"normal"}]},username:{type:"text",defaultValue:"",when:e=>"normal"===e.mode},password:{type:"text",defaultValue:"",when:e=>"normal"===e.mode},token:{type:"text",defaultValue:"",when:e=>"token"===e.mode}},preview:{errors:{username:"",password:"",token:""},success:"",access_token:"",expires_at:"",details:{id:"",username:"",email:"",verified:"",permissions:""}}},refreshDetails:{action:"authRefreshDetails",title:"Auth Refresh Details",type:"globalCallback",callback:s,params:{},preview:{errors:"",success:"",access_token:"",expires_at:"",details:{id:"",username:"",email:"",roles:"",permissions:"",verified:""}}},logout:{action:"authLogout",title:"Auth Logout",type:"globalCallback",callback:l,preview:{},params:{}}}),e},[o,l,s,t])}),e},sI={text:{icon:"fas fa-font",label:"Plain Text"},richText:{icon:"fas fa-align-justify",label:"Rich Text"},image:{icon:"far fa-image",label:"Image"},multiImage:{icon:"far fa-images",label:"Multi Image"},video:{icon:"fab fa-youtube",label:"Video Link"},link:{icon:"fas fa-link",label:"Link"},email:{icon:"far fa-envelope",label:"Email"},phone:{icon:"fas fa-phone",label:"Phone"},number:{icon:"fas fa-hashtag",label:"Number"},date:{icon:"fas fa-calendar-day",label:"Date / Time"},switch:{icon:"fas fa-toggle-off",label:"Switch"},color:{icon:"fas fa-tint",label:"Color"},option:{icon:"",label:"Option"},file:{icon:"far fa-file",label:"File"}},lI=e=>{let t;switch(e){case"switch":case"boolean":t="boolean";break;case"option":t="select";break;default:t="text"}return t},cI=(Object.keys(sI).map(e=>({label:e,value:e,icon:/* @__PURE__ */O(vg,{icon:sI[e].icon,size:"xs"})})),({children:e})=>{const{useInteractions:t}=f($A),{collections:n,addRecord:r,updateRecord:i,removeRecord:a}=f(Xa),o=h((e,t)=>{if(!e)return!1;const{fields:n}=e;if("object"!=typeof n)return!0;const r=Object.values(n).filter(e=>e.params.required);if(0===r.length)return!0;let i=!0;return r.forEach(e=>{t[e.machineName]||!i||(i=!1)}),i},[]),s=h(async e=>{const{collectionId:t,recordStatus:i="draft"}=e,a=Y(n,t,void 0);if(!a)return{success:!1,record:void 0};if(!o(a,e))return{success:!1,record:void 0};const{fields:s}=a;return{success:!0,record:await r(t,i,Q(e,Object.keys(s)))}},[r,n,o]),l=h(async e=>{const{collectionId:t,recordStatus:r="draft",recordId:a}=e,s=Y(n,t,void 0);if(!s||!a)return{success:!1,record:void 0};if(!o(s,e))return{success:!1,record:void 0};const{fields:l}=s;return{success:!0,collectionId:t,record:await i(t,a,r,Q(e,Object.keys(l)))}},[n,i,o]),c=h(async e=>{const{collectionId:t,recordId:r}=e;return Y(n,t,void 0)&&r?(await a(t,r),{success:!0,collectionId:t,recordId:r}):{success:!1,record:void 0}},[n,a]),u=x(()=>n&&"object"==typeof n?Object.keys(n).reduce((e,t)=>[...e,{value:t,label:Y(n[t],"name",t)}],[]):[],[n]);return t({id:"collection",callbacks:x(()=>({addCollectionRecord:{action:"addCollectionRecord",title:"Add Collection Record",type:"globalCallback",callback:s,preview:{success:"",collectionId:"",record:{id:"",status:"",values:{}}},params:e=>{const t=Y(n,`${e.collectionId}.fields`,{});return{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordStatus:{label:"Record Status",defaultValue:"draft",type:"select",options:[{value:"published",label:"Published"},{value:"draft",label:"Draft"},{value:"archived",label:"Archived"},{value:"deleted",label:"Deleted"},{value:"created",label:"Created"}]},...Object.values(t).reduce((e,t)=>{const{machineName:n,name:r,type:i}=t;return{...e,[n]:{label:r,defaultValue:void 0,when:e=>!!e.collectionId,type:lI(i)}}},{})}}},updateCollectionRecord:{action:"updateCollectionRecord",title:"Update Collection Record",type:"globalCallback",callback:l,preview:{success:"",collectionId:"",record:{id:"",status:"",values:{}}},params:e=>{const t=Y(n,`${e.collectionId}.fields`,{});return{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordStatus:{label:"Record Status",defaultValue:"draft",type:"select",options:[{value:"published",label:"Published"},{value:"draft",label:"Draft"},{value:"archived",label:"Archived"},{value:"deleted",label:"Deleted"},{value:"created",label:"Created"}]},recordId:{label:"Record",defaultValue:void 0,type:"select",when:e=>!!e.collectionId,options:e=>{const{collectionId:t}=e,r=n[t];if(!t||!r)return[];const i=Object.values(r.fields).find(e=>e.params.primary);return r.records.map(e=>{let t="";return t=i?e.values[i.machineName]:JSON.stringify(e.values),{value:e.id,label:t}})}},...Object.values(t).reduce((e,t)=>{const{machineName:n,name:r,type:i}=t;return{...e,[n]:{label:r,defaultValue:void 0,when:e=>!!e.collectionId,type:lI(i)}}},{})}}},removeCollectionRecord:{action:"removeCollectionRecord",title:"Remove Collection Record",type:"globalCallback",callback:c,preview:{success:"",collectionId:"",recordId:""},params:{collectionId:{label:"Collection",defaultValue:void 0,type:"select",options:u},recordId:{label:"Record",defaultValue:void 0,type:"select",when:e=>!!e.collectionId,options:e=>{const{collectionId:t}=e,r=n[t];if(!t||!r)return[];const i=Object.values(r.fields).find(e=>e.params.primary);return r.records.map(e=>{let t="";return t=i?e.values[i.machineName]:JSON.stringify(e.values),{value:e.id,label:t}})}}}}}),[n,u,s,c,l])}),e}),uI=s({state:{}});uI.displayName="StateManagerContext";var dI=({children:e,previewMode:t=!0})=>{const{setStateByKey:n,clearCache:r}=f(uI),{useInteractions:i}=f($A),{navigate:a}=f(WO),{useStore:o}=Gr(),[[{keepState:s,stateStorage:l},c,u]]=o(["schema.settings","schema.pages","pageDefinitions"]),d=h(e=>{const{key:t,type:r}=e;let{value:i}=e;"boolean"===r?i="true"===i:"number"===r&&(i=parseInt(i,10)),s&&l?n(t,i,l):n(t,i)},[n,s,l]),p=h(()=>{s&&l&&r(l)},[r,l,s]),m=x(()=>{const e=Q(u,c);return Object.keys(e).reduce((t,n)=>{const r=e[n];return[...t,{key:n,label:Y(r,"attributes.name",n),defaultPage:Y(r,"attributes.default",!1)}]},[])},[u,c]),g=h(e=>{if(!t)return;const{url:n,urlType:r}=e;"page"===r||"internal"===r?a(n):a(n,!0)},[a,t]);return i({id:"page",callbacks:x(()=>({navigate:{action:"navigateToPage",title:"Navigate To Page",type:"globalCallback",callback:g,preview:{},params:{urlType:{label:"Url Type",defaultValue:void 0,type:"select",options:[{value:"page",label:"Space Page"},{value:"internal",label:"Inside Space"},{value:"external",label:"Outside Space"}]},url:{defaultValue:m.find(e=>e.defaultPage)?.key??"",type:e=>"page"===e.urlType?"select":"text",when:e=>!!e.urlType,options:m.map(e=>({value:e.key,label:e.label}))}}},setPageState:{action:"setPageState",title:"Set Page State",type:"globalCallback",callback:d,preview:{},params:{key:{defaultValue:"",type:"text"},type:{defaultValue:void 0,type:"select",options:[{value:"boolean",label:"True / False"},{value:"number",label:"Numeric"},{value:"text",label:"Text"}]},value:{defaultValue:void 0,type:e=>"boolean"===e.type?"select":"text",when:e=>!!e.type,options:[{value:"true",label:"True"},{value:"false",label:"False"}]}}},clearState:{action:"clearState",title:"Clear Page State",type:"globalCallback",callback:p,preview:{},params:{}}}),[d,p,g,m])}),e},pI=({children:e,previewMode:t=!1})=>{const{currentPageId:n,routeParams:r,queryParams:i}=f(WO),{useStore:a}=Gr(),[o]=a("schema.settings.userProvider");/* @__PURE__ */
403
+ return O(ZA,{currentPageId:n,routeParams:r,queryParams:i,children:/* @__PURE__ */O(oI,{authProvider:o,children:/* @__PURE__ */O(cI,{children:/* @__PURE__ */O(dI,{previewMode:t,children:e})})})})},fI=({children:e,renderMode:t="iframe",currentPageId:n,previewMode:r=!0})=>{const{server:i}=f(vh),{useStore:a}=Gr(),[[o,s]]=a(["schema.pageFolders","pageDefinitions"]),{queryParams:l,hostname:c,location:u}=iI({server:i}),d=k(s);d.current=s;const{authenticated:p}=f(rI),m="widget"!==t?$E():void 0,y=x(()=>((e={},t=[],n,r="",i=!0,a=!0)=>{let o=Object.keys(e).reduce((a,o)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[o],{attributes:{unauthorizedPageRedirect:u}}=e[o];if(!l&&i)return a;u&&=R_(e,t,u.replace("/",""),!0);let d=R_(e,t,o),p=Object.keys(d).map(e=>({pageId:o,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${o}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:j_(s,n,i)}));return[...a,...p]},[]).filter(e=>"*"!==e.path||e.hasAccess).sort((e,t)=>e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1);if(!o.find(e=>"*"===e.path)&&!a){let e=o.find(e=>"/"===e.path&&e.hasAccess);e&&"redirect"===e.unauthorizedBehaviour&&e.unauthorizedPageRedirect&&o.push({...e,path:"*",hasAccess:!1,isRaw:!0,unauthorizedBehaviour:"redirect",unauthorizedPageRedirect:"/"})}return o})(s,o,p,i.basePath,r),[s,o,p,i.basePath,r]),{action:b,pageId:v="",pathMatch:w}=x(()=>"widget"===t?{action:{type:"normal",path:""},pageId:n}:((e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=oE({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e);if(i||=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),!i&&e.find(e=>"/"===e.path&&e.hasAccess))return{action:{type:"redirect",path:"/"},pathMatch:void 0};if(!i)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:a,matchResult:o,path:{hasAccess:s,unauthorizedBehaviour:l,unauthorizedPageRedirect:c}}=i;return!s&&"redirect"===l&&c?{action:{type:"redirect",path:c},pathMatch:void 0}:s?{action:{type:"normal",path:void 0},pathMatch:o,pageId:a}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}})(y,u.pathname,p),[y,u.pathname,p,t,n]),S=n||v;g(()=>{za.info("navigation",/* @__PURE__ */A("span",{children:["Navigated to page"," ",
404
+ /* @__PURE__ */O("b",{children:Y(s,`${S}.attributes.name`,S||"Unknown")})]}),{status:b.type,elementId:S})},[b.type,S,s]);const T=h((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=Y(d,`current.${e}`,void 0);if(!n)return void m?.(e);const r=Y(n,"attributes.slug");r||""===r?m?.(r):Y(n,"attributes.default")?m?.("/"):m?.(`/${e}`)},[m]),N=x(()=>{const e=y.find(e=>e.pageId===S&&!e.isRaw);return e?{...z_(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...Y(w,"params",{})}:Y(w,"params",{})},[y,w,S]),C=x(()=>new URLSearchParams(u.search),[u.search]),E=x(()=>"widget"===t?{urlSearchParams:C,routeParams:N,queryParams:l,currentPageId:S}:{navigate:T,urlSearchParams:C,routeParams:N,queryParams:l,hostname:c,currentPageId:S,Helmet:PA},[t,T,C,N,l,c,S]);return"notFound"===b.type?"Not Found":"accessDenied"===b.type?"Access Denied":"redirect"===b.type?/* @__PURE__ */O(XE,{to:b.path??"",replace:!0}):/* @__PURE__ */O(WO,{value:E,children:e})},hI=(e,{src:t,type:n,isMain:r},i=!1)=>{let a,o=`${e}/${t}`,s=btoa(o);return a="style"===n&&o.endsWith(".css")?{type:"link",id:s,params:{href:o,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:o,type:"text/javascript"},isMain:r},i&&delete a.isMain,a},mI=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{runtime:{scope:a="",module:o=""},definition:{name:s="Plitzi's Demo Plugin",owner:l="Plitzi",verified:c=!1,license:u="MIT",website:d="https://plitzi.com",backgroundColor:p="#4422ee",icon:f="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:h,assetsSettings:m,pluginSchema:g}=t;return Object.values(Y(t,"pluginSchema",{})).reduce((e,y)=>{let{definition:b,builder:v,defaultStyle:x,attributes:w}=y,k=[];return b.type===i&&(k=Object.keys(ee(g,[i]))),{...e,[b.type]:{attributes:w,builder:v,defaultStyle:x,definition:b,market:{owner:l,verified:c,license:u,website:d,backgroundColor:p,icon:f,category:s},resource:n,isMain:b.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(m).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>hI(n,e,!0)),assets:Object.values(h).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>hI(n,e)),scope:a,module:o,subPlugins:k}}},{})}catch{return{}}},gI=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{let t;try{return t=await(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json(),t}catch{return t}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[Y(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=Y(n,r);t={...t,...mI(e,i)}}),t},yI=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:a="",instanceId:o,environment:s="development",offlineMode:l=!1,offlineData:c,offlineDataType:u="json",debugMode:d=!1})=>{const p=l&&!!c&&!!c.schema,m=f(JO()).client,[y,b]=S(!(l&&c)),[v,w]=S(void 0),{components:k}=f($a),[T,N]=S(()=>p&&"json"===u?{...c,plugins:{},segments:{},collections:{}}:{plugins:{},segments:{},collections:{}}),C=h(async(e,t,n="network-only")=>{const r=kh[e];if(!r)throw w("Query Not Found"),new Error(`Query ${e} not found`);let i;try{i=await(m?.query({query:r,variables:{environment:s,...t},fetchPolicy:n}))}catch(jR){return{success:!1,result:void 0,error:jR}}return i||w("Network Not Available, Please try again"),{success:!0,result:i?.data}},[m,s]),E=h(async(e,t,n=!0,r={})=>{if(!wh[e])return{success:!1,result:void 0,error:"Mutation Not Found"};let i;try{i=await(m?.mutate({mutation:wh[e],variables:n?{environment:s,...t}:t,context:{fetchOptions:{customFetch:!1,...r}}}))}catch(jR){return{success:!1,result:void 0,error:jR}}return i?i.data&&void 0!==i.data[e]?{success:!0,result:i.data[e]}:{success:!0,result:i.data}:{success:!1,result:void 0,error:"Network Not Available, Please try again"}},[m,s]),_=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await C("Init",{environment:s,revision:e,limit:99},"network-only");if(t.error)return b(!1),void("string"==typeof t.error?w(t.error):"statusCode"in t.error&&401===t.error.statusCode?w("Access not authorized"):"networkError"in t.error&&t.error.networkError?w("Service not available"):w(t.error.message));if(t.success&&t.result){const{Space:e,Collections:n}=J(t.result);if(!e)return w(/* @__PURE__ */A("span",{children:["Space not found, publish to ",
405
405
  /* @__PURE__ */O("b",{children:s})," environment"]})),void b(!1);let r={};e.plugins.length>0&&(r=await gI(e.plugins.filter(e=>!k.current[e.type]))),N({schema:{...bh,...e.schema,flat:e.schema.flat.reduce((e,t)=>({...e,[t.id]:t}),{})},plugins:r,style:e.style,collections:n.edges.reduce((e,t)=>({...e,[t.id]:t}),{}),segments:e.segments?.map(e=>({...e,schema:{...Y(e,"schema"),flat:Y(e,"schema.flat",[]).reduce((e,t)=>({...e,[t.id]:t}),{})}})).reduce((e,t)=>({...e,[t.identifier]:t}),{})??{}})}b(!1)};g(()=>{l&&c?p&&(async()=>{let e={};c?.plugins&&c.plugins.length>0&&(e=await gI(c.plugins.filter(e=>!k.current[e.type]))),N(t=>({...t,plugins:e})),b(!1)})():(b(e=>e||!0),_())},[p,l&&u,r,s,d]);const I=x(()=>({query:C,mutate:E,webKey:r,webId:i,server:t,environment:s,instanceId:o,userKey:a}),[C,E,r,i,t,s,o,a]);return v?/* @__PURE__ */O("div",{children:v}):y?null:/* @__PURE__ */O(vh,{value:I,children:/* @__PURE__ */O(xh,{value:T,children:e})})},bI=s({assets:{}});bI.displayName="PluginsContext";var vI=({children:e,renderMode:t="iframe",plugins:n,sdkStylePath:r="./plitzi-sdk.css"})=>{const[i,a]=S({}),o=f(xh),s=x(()=>n||o.plugins,[n,o]),{components:l}=f($a),c=h((e,t,n="")=>t?Y(s,`${e}.settings.${t}`,n):Y(s,`${e}.settings`,{}),[s]),u=h((e=[])=>{const t=e.reduce((e,t)=>{let n="";return n="script"===t.type?t.params.src:t.params.href,n?(n=btoa(n),{...e,[n]:{...t,key:n}}):e},{});0!==Object.keys(t).length&&a(e=>({...e,...t}))},[]),d=h((e=[])=>{const t=e.filter(e=>!re(e)).map(e=>btoa(e));a(e=>ee(e,t))},[]),p=x(()=>(e=>Object.values(e).reduce((e,t)=>({...e,...Y(t,"assets",[]).filter(e=>"link"===e.type).reduce((e,t)=>({...e,[btoa(t.id)]:t}),{})}),{}))(s),[s]),m=x(()=>Object.keys(l.current).filter(e=>"local-custom"===l.current[e].origin).reduce((e,t)=>({...e,...Y(l,`${t}.assets`,[]).reduce((e,n,r)=>({...e,[`${t}-${r}`]:{type:"link",id:`${t}-${r}`,params:n}}),{})}),{}),[l.current]),g=x(()=>{const e={};return"iframe"!==t&&"shadow"!==t||(e["static-99"]={type:"link",id:"static-99",params:{type:"text/css",href:r,rel:"stylesheet"}}),{"static-1":{type:"link",id:"static-1",params:{type:"text/css",href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css",rel:"stylesheet"}},"static-2":{type:"link",id:"static-2",params:{type:"text/css",href:"https://fonts.googleapis.com/css?family=Rubik:400|Bitter:400|Changa One:400|Droid Sans:400|Droid Serif:400|Exo:400|Great Vibes:400|Inconsolata:400|Lato:400|Merriweather:400|Montserrat:400|Open Sans:400|Oswald:400|PT Sans:400|PT Serif:400|Ubuntu:400|Varela:400|Varela Round:400|Vollkorn:400&amp;text=RubikBterChang ODodSsfExGVIclLMwpPTU",rel:"stylesheet"}},...e,...m,...p,...i}},[m,p,i,t,r]),y=x(()=>({assets:g,getSettings:c,plugins:s,registerCustomAssets:u,unregisterCustomAssets:d}),[g,c,s,u,d]),b=x(()=>Object.values({...p,...i}).map((e,t)=>/* @__PURE__ */O(e.type,{...e.params},t)),[p,i]);/* @__PURE__ */
406
406
  return A(_,{children:[/* @__PURE__ */O(PA,{children:("raw"===t||"widget"===t)&&b}),/* @__PURE__ */O(bI,{value:y,children:e})]})},xI=({children:e,schema:t})=>{const n=f(xh),r=x(()=>({...bh,...t||n.schema}),[t,n.schema]),{useStoreSync:i}=Gr();return i("schema",r),i("pageDefinitions",x(()=>Q(Y(r,"flat",{}),Y(r,"pages",[])),[r.pages])),e},wI=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,kI=/^rgba?\(\s*(\d{1,3}%?\s*,\s*){2,3}\d{1,3}%?\s*\)$/,SI=/^hsla?\(\s*\d{1,3}(deg|rad|turn)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|0?\.\d+|1))?\s*\)$/,TI=new Set(["black","white","red","green","blue","yellow","cyan","magenta","orange","purple","brown","pink","gray","lime","teal","navy","silver","maroon","olive","aqua","fuchsia"]),NI=({children:e})=>{const{addToast:t}=(()=>{let e=f(kN);if(void 0===e)throw Error("ToastContext value is undefined. Make sure you use the ToastProvider before using the hook.");return e})(),{useInteractions:n}=f($A),r=h(e=>{const{placement:n,appeareance:r,autoDismiss:i,autoDismissTimeout:a}=e;let{content:o}=e;"string"!=typeof o&&(o=JSON.stringify(o)),t(/* @__PURE__ */O("div",{className:"whitespace-break-spaces",children:o}),{appeareance:r,autoDismiss:i,placement:n,autoDismissTimeout:a})},[t]);return n({id:"space",callbacks:x(()=>({addNotification:{title:"Add Notification",action:"addNotification",type:"globalCallback",callback:r,preview:{},params:{content:{label:"Content",defaultValue:"Content",type:"textarea"},placement:{label:"Placement",defaultValue:"top-right",type:"select",options:[{value:"top-right",label:"Top Right"},{value:"top-center",label:"Top Center"},{value:"top-left",label:"Top Left"},{value:"bottom-right",label:"Bottom Right"},{value:"bottom-center",label:"Bottom Center"},{value:"bottom-left",label:"Bottom Left"}]},appeareance:{label:"Appeareance",defaultValue:"success",type:"select",options:[{value:"success",label:"Success"},{value:"danger",label:"Danger"},{value:"warning",label:"Warning"},{value:"info",label:"Info"}]},autoDismiss:{label:"Auto Dismiss",defaultValue:!0,canBind:!1,type:"boolean"},autoDismissTimeout:{label:"Auto Dismiss Timeout",defaultValue:5e3,type:"text",when:e=>e.autoDismiss}}}}),[r])}),/* @__PURE__ */O(_,{children:e})},CI=({children:e})=>{const{webId:t}=f(vh);/* @__PURE__ */
407
407
  return O(aC,{containerId:`toast-container-${t}`,children:/* @__PURE__ */O(NI,{children:e})})},EI=({pageId:e=""})=>/* @__PURE__ */O("a",{className:"made-in-plitzi",href:"https://plitzi.com","data-page-id":e,rel:"noreferrer noopener",target:"_blank",children:"Made in Plitzi"}),_I=p(({pageId:e="",style:t="",plitziContextValue:n,assets:r=Qr,ref:i})=>{const a=x(()=>({id:e,rootId:e}),[e]);/* @__PURE__ */
408
- return O(Lg,{ref:i,id:"i-sdk",css:t,assets:r,className:"w-full grow",children:/* @__PURE__ */A(CI,{children:[/* @__PURE__ */O(cr,{value:n,children:e&&/* @__PURE__ */O(cO,{internalProps:a},e)}),/* @__PURE__ */O(EI,{pageId:e})]})})}),OI=p(({pageId:e="",style:t="",plitziContextValue:n,renderMode:r="raw"})=>{const i=x(()=>({id:e,rootId:e}),[e]),{useStore:a}=Gr(),[o]=a("schema.flat"),s=x(()=>e&&"widget"===r?Y(o,`${e}.definition.type`,"page"):"page",[e,r,o]);/* @__PURE__ */
408
+ return O(Lg,{ref:i,id:"i-sdk",css:t,assets:r,className:"w-full grow",children:/* @__PURE__ */A(CI,{children:[/* @__PURE__ */O(cr,{value:n,children:e&&/* @__PURE__ */O(dO,{internalProps:a},e)}),/* @__PURE__ */O(EI,{pageId:e})]})})}),OI=p(({pageId:e="",style:t="",plitziContextValue:n,renderMode:r="raw"})=>{const i=x(()=>({id:e,rootId:e}),[e]),{useStore:a}=Gr(),[o]=a("schema.flat"),s=x(()=>e&&"widget"===r?Y(o,`${e}.definition.type`,"page"):"page",[e,r,o]);/* @__PURE__ */
409
409
  return A(CI,{children:[
410
410
  /* @__PURE__ */O("style",{type:"text/css",rel:"stylesheet","data-id":"plitzi-runtime-style",children:t}),
411
- /* @__PURE__ */A(cr,{value:n,children:[e&&"widget"!==r&&/* @__PURE__ */O(cO,{internalProps:i},e),e&&"widget"===r&&/* @__PURE__ */O(kC,{type:s,internalProps:i},e)]}),
411
+ /* @__PURE__ */A(cr,{value:n,children:[e&&"widget"!==r&&/* @__PURE__ */O(dO,{internalProps:i},e),e&&"widget"===r&&/* @__PURE__ */O(kC,{type:s,internalProps:i},e)]}),
412
412
  /* @__PURE__ */O(EI,{pageId:e})]})}),AI=p(({pageId:e="",sdkStylePath:t="",style:n="",plitziContextValue:r,assets:i})=>{const a=x(()=>({id:e,rootId:e}),[e]);/* @__PURE__ */
413
413
  return A(Hg,{children:[x(()=>Object.values(i),[i]).map((e,t)=>/* @__PURE__ */O(Hg.Link,{href:e.params.href},t)),
414
414
  /* @__PURE__ */O(Hg.Link,{href:t}),
415
415
  /* @__PURE__ */O(Hg.Content,{children:/* @__PURE__ */A(CI,{children:[
416
416
  /* @__PURE__ */O("style",{dangerouslySetInnerHTML:{__html:n}}),
417
- /* @__PURE__ */O(cr,{value:r,children:e&&/* @__PURE__ */O(cO,{internalProps:a},e)}),
418
- /* @__PURE__ */O(EI,{pageId:e})]})})]})}),II=e=>{},DI=({renderMode:e="iframe",externalStyle:t="",environment:n="main",previewMode:r=!0,isHydrating:i=!1,debugMode:a=!1,sdkStylePath:o="./plitzi-sdk.css",server:s})=>{const{theme:l}=f(_h),{currentPageId:c}=f(UO),{assets:u}=f(bI),d=k(null),{rootRef:p}=f(Pg),{useStore:m}=Gr(),[[g,y,b]]=m(["schema.settings","style.cache","segments"]),[v]=m("runtime.sources.variables",{defaultValue:{}}),w=v,S=x(()=>{const e=Object.values(b).map(e=>e.style.cache);return`@layer plitzi-sdk-runtime{.plitzi-sdk{${(e=>e?Object.keys(e).filter(t=>"string"==typeof e[t]||"number"==typeof e[t]).map(t=>{let n=e[t];return(e=>{if(!e||"string"!=typeof e)return!1;let t=e.trim().toLowerCase();return wI.test(t)||kI.test(t)||SI.test(t)||TI.has(t)})(n)?`--${t}:${n};`:`--${t}:"${n}";`}).join("\n"):"")(w)}}\n${((e="",t={},n={missing:""})=>{let r=n.missing??"";return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi,(e,n)=>{let i=n.split("."),a=t;for(let t of i){if("object"!=typeof a||!a)return r;if(!(t in a))return r;a=a[t]}return"string"==typeof a||"number"==typeof a||"boolean"==typeof a?String(a):r})})(y,w)}${e.join("")}\n${g.customCss}\n${t}}`},[b,w,y,g.customCss,t]),T=h(()=>d.current?d.current.contentWindow:"undefined"!=typeof window?window:{innerWidth:1440,innerHeight:900},[d]),N=x(()=>({settings:{isHydrating:i,previewMode:r,debugMode:a,currentPageId:c,renderMode:e,environment:n,...g,theme:l},root:{baseElementId:c},utils:{displayBorderComponents:!1,getWindow:T,rootRef:p},customContexts:{},contexts:{ComponentContext:$a,SegmentsContext:Sh,CollectionContext:Xa,NetworkContext:vh,PluginsContext:bI,NavigationContext:UO,StateManagerContext:uI,EventBridgeContext:uC,InteractionsContext:$A}}),[i,r,a,c,e,n,g,l,T,p]);/* @__PURE__ */
417
+ /* @__PURE__ */O(cr,{value:r,children:e&&/* @__PURE__ */O(dO,{internalProps:a},e)}),
418
+ /* @__PURE__ */O(EI,{pageId:e})]})})]})}),II=e=>{},DI=({renderMode:e="iframe",externalStyle:t="",environment:n="main",previewMode:r=!0,isHydrating:i=!1,debugMode:a=!1,sdkStylePath:o="./plitzi-sdk.css",server:s})=>{const{theme:l}=f(_h),{currentPageId:c}=f(WO),{assets:u}=f(bI),d=k(null),{rootRef:p}=f(Pg),{useStore:m}=Gr(),[[g,y,b]]=m(["schema.settings","style.cache","segments"]),[v]=m("runtime.sources.variables",{defaultValue:{}}),w=v,S=x(()=>{const e=Object.values(b).map(e=>e.style.cache);return`@layer plitzi-sdk-runtime{.plitzi-sdk{${(e=>e?Object.keys(e).filter(t=>"string"==typeof e[t]||"number"==typeof e[t]).map(t=>{let n=e[t];return(e=>{if(!e||"string"!=typeof e)return!1;let t=e.trim().toLowerCase();return wI.test(t)||kI.test(t)||SI.test(t)||TI.has(t)})(n)?`--${t}:${n};`:`--${t}:"${n}";`}).join("\n"):"")(w)}}\n${((e="",t={},n={missing:""})=>{let r=n.missing??"";return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi,(e,n)=>{let i=n.split("."),a=t;for(let t of i){if("object"!=typeof a||!a)return r;if(!(t in a))return r;a=a[t]}return"string"==typeof a||"number"==typeof a||"boolean"==typeof a?String(a):r})})(y,w)}${e.join("")}\n${g.customCss}\n${t}}`},[b,w,y,g.customCss,t]),T=h(()=>d.current?d.current.contentWindow:"undefined"!=typeof window?window:{innerWidth:1440,innerHeight:900},[d]),N=x(()=>({settings:{isHydrating:i,previewMode:r,debugMode:a,currentPageId:c,renderMode:e,environment:n,...g,theme:l},root:{baseElementId:c},utils:{displayBorderComponents:!1,getWindow:T,rootRef:p},customContexts:{},contexts:{ComponentContext:$a,SegmentsContext:Sh,CollectionContext:Xa,NetworkContext:vh,PluginsContext:bI,NavigationContext:WO,StateManagerContext:uI,EventBridgeContext:uC,InteractionsContext:$A}}),[i,r,a,c,e,n,g,l,T,p]);/* @__PURE__ */
419
419
  return A(Dh,{navigationKey:c,rscData:s?.rscData,children:[("raw"===e||"widget"===e)&&/* @__PURE__ */O(OI,{renderMode:e,style:S,plitziContextValue:N,pageId:c}),"shadow"===e&&/* @__PURE__ */O(AI,{sdkStylePath:o,style:S,plitziContextValue:N,pageId:c,assets:u}),!["raw","widget","shadow"].includes(e)&&/* @__PURE__ */O(_I,{style:S,plitziContextValue:N,pageId:c,assets:u,ref:d})]})};DI.Plugin=II;var PI=DI,MI=({children:e})=>{const{query:t}=f(vh),n=f(xh),r=x(()=>n.segments,[n]),[i,a]=S(r),{useStoreSync:o,useStoreGetter:s}=Gr();o("segments",i);const l=s("segments");g(()=>{a(r)},[r]);const c=h(async e=>{const n=l(e,void 0);if(n)return n;try{const r=await t("Segment",{identifier:e},"network-only"),i=r.result?.Segment;let o;return r.success&&i&&(o={...i,schema:{...Y(i,"schema"),flat:Y(i,"schema.flat",[]).reduce((e,t)=>({...e,[t.id]:t}),{})}},a({...l(),[o.id]:o})),n}catch{return}},[l,t]);/* @__PURE__ */
420
420
  return O(Sh,{value:x(()=>({segmentGet:c}),[c]),children:e})},RI=({attribute:e,value:t,isDefinition:n=!1,onSelectElement:r})=>{let{useStore:i}=Gr(),[a]=i("schema.flat"),o=h(e=>()=>r?.(e),[r]);/* @__PURE__ */
421
421
  return O("div",{className:"grow basis-0 truncate",children:x(()=>"items"===e&&n&&Array.isArray(t)?/* @__PURE__ */O("div",{className:"flex flex-col",children:t.map((e,t)=>/* @__PURE__ */O("div",{className:"cursor-pointer text-purple-400",onClick:o(e),children:Y(a,`${e}.definition.label`,e)},t))}):e&&["rootId","parentId"].includes(e)&&n?/* @__PURE__ */O("div",{className:"cursor-pointer text-purple-400",onClick:o(t),children:Y(a,`${t}.definition.label`,t)}):"styleSelectors"===e&&n&&t&&"object"==typeof t?Object.values(t).join(", "):"object"==typeof t&&t?JSON.stringify(t):"boolean"==typeof t?t?"True":"False":t,[e,n,t,o,a])})},jI=({attributes:e})=>/* @__PURE__ */O("div",{className:"w-full text-sm",children:e&&Object.entries(e).map(([e,t],n)=>/* @__PURE__ */A("div",{className:"flex gap-4 border-gray-300 [&:not(:first-child)]:border-t",children:[/* @__PURE__ */O("div",{className:"grow basis-0",children:e}),/* @__PURE__ */O(RI,{isAttribute:!0,attribute:e,value:t})]},n))}),zI=({definition:e,onSelectElement:t})=>/* @__PURE__ */O("div",{className:"w-full text-sm",children:e&&Object.entries(e).map(([e,n],r)=>/* @__PURE__ */A("div",{className:"flex gap-4 border-gray-300 [&:not(:first-child)]:border-t",children:[/* @__PURE__ */O("div",{className:"grow basis-0",children:e}),/* @__PURE__ */O(RI,{isDefinition:!0,attribute:e,value:n,onSelectElement:t})]},r))}),LI=[{label:"Definition"},{label:"Attributes"}],FI=({definition:e,attributes:t,onSelectElement:n})=>/* @__PURE__ */A(Kg,{className:"w-full grow gap-4 overflow-hidden p-4",children:[
@@ -423,7 +423,7 @@ return O("div",{className:"grow basis-0 truncate",children:x(()=>"items"===e&&n&
423
423
  /* @__PURE__ */O(Kg.TabContent,{className:"flex-col",children:/* @__PURE__ */O(zI,{definition:e,onSelectElement:n})}),
424
424
  /* @__PURE__ */O(Kg.TabContent,{children:/* @__PURE__ */O(jI,{attributes:t})})]}),$I=({name:e,id:t,isSelected:n,isVisible:r=!0,onSelect:i})=>{let a=h(()=>i?.(t),[i,t]);/* @__PURE__ */
425
425
  return A("div",{className:ae("flex w-full cursor-pointer items-center justify-between gap-2 border-l-2 px-2 py-1.5 transition-colors",{"border-l-violet-500 bg-violet-50 text-violet-700 dark:border-l-violet-500 dark:bg-violet-500/15 dark:text-violet-300":n,"border-l-transparent text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:border-l-transparent dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-100":!n}),onClick:a,children:[/* @__PURE__ */O("div",{className:"truncate",title:e,children:e}),/* @__PURE__ */O("i",{className:ae("shrink-0 text-[10px]",{"fa-solid fa-eye text-zinc-400 dark:text-zinc-500":r,"fa-solid fa-eye-slash text-zinc-300 dark:text-zinc-700":!r})})]})},qI=({elements:e,elementSelected:t,onSelect:n})=>{let[r,i]=S(""),a=x(()=>(e??[]).filter(e=>e.definition.label.toLowerCase().includes(r.toLowerCase())),[e,r]);/* @__PURE__ */
426
- return A("div",{className:"flex h-full w-[280px] shrink-0 flex-col gap-2 border-r border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */O("div",{className:"px-2 pt-2",children:/* @__PURE__ */O(ry,{value:r,onChange:h(e=>i(e),[]),placeholder:"Search elements...",size:"sm"})}),/* @__PURE__ */O("div",{className:"flex flex-col overflow-y-auto text-xs text-zinc-700 dark:text-zinc-300",children:0===a.length?/* @__PURE__ */O("div",{className:"p-4 text-center text-zinc-400 dark:text-zinc-600",children:"No elements"}):a.map((e,r)=>/* @__PURE__ */O($I,{name:e.definition.label,isSelected:t===e.id,isVisible:Y(e,"definition.initialState.visibility",!0),id:e.id,onSelect:n},r))})]})},BI=({className:e,elementSelected:t,onSelectElement:n})=>{let{currentPageId:r}=f(UO),{useStore:i}=Gr(),[a]=i("schema.flat"),o=x(()=>Object.values(a).filter(e=>e.definition.rootId===r),[a,r]),s=x(()=>o.find(e=>e.id===t),[o,t]),l=h(e=>n(e),[n]);/* @__PURE__ */
426
+ return A("div",{className:"flex h-full w-[280px] shrink-0 flex-col gap-2 border-r border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */O("div",{className:"px-2 pt-2",children:/* @__PURE__ */O(ry,{value:r,onChange:h(e=>i(e),[]),placeholder:"Search elements...",size:"sm"})}),/* @__PURE__ */O("div",{className:"flex flex-col overflow-y-auto text-xs text-zinc-700 dark:text-zinc-300",children:0===a.length?/* @__PURE__ */O("div",{className:"p-4 text-center text-zinc-400 dark:text-zinc-600",children:"No elements"}):a.map((e,r)=>/* @__PURE__ */O($I,{name:e.definition.label,isSelected:t===e.id,isVisible:Y(e,"definition.initialState.visibility",!0),id:e.id,onSelect:n},r))})]})},BI=({className:e,elementSelected:t,onSelectElement:n})=>{let{currentPageId:r}=f(WO),{useStore:i}=Gr(),[a]=i("schema.flat"),o=x(()=>Object.values(a).filter(e=>e.definition.rootId===r),[a,r]),s=x(()=>o.find(e=>e.id===t),[o,t]),l=h(e=>n(e),[n]);/* @__PURE__ */
427
427
  return A("div",{className:ae("flex h-full w-full",e),children:[/* @__PURE__ */O(qI,{elements:o,elementSelected:t,onSelect:l}),t&&/* @__PURE__ */O(FI,{definition:s?.definition,attributes:s?.attributes,onSelectElement:n})]})},VI=e=>new Date(e).toLocaleTimeString(void 0,{hour12:!1})+"."+String(e%1e3).padStart(3,"0"),UI=e=>{if(void 0===e)return"";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);let t,n=Array.isArray(e)?"[…]":"{…}";try{t=JSON.stringify(e)||n}catch{t=n}return t.length>120?t.slice(0,120)+"…":t},HI=({index:e,path:t,value:n,timestamp:r,isSelected:i,isFuture:a,onSelect:o})=>{let s=k(null),l=h(()=>o(e),[o,e]);return g(()=>{i&&s.current?.scrollIntoView({block:"nearest"})},[i]),/* @__PURE__ */A("button",{ref:s,onClick:l,className:ae("flex w-full flex-col gap-0.5 border-b border-zinc-100 px-3 py-1.5 text-left font-mono text-xs dark:border-zinc-800",{"bg-violet-600 text-white dark:bg-violet-600":i,"text-zinc-600 hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800/60":!i,"opacity-50":a}),children:[/* @__PURE__ */A("div",{className:"flex w-full items-center gap-2",children:[/* @__PURE__ */O("span",{className:"grow truncate",children:t??/* @__PURE__ */O("span",{className:"italic opacity-70",children:0===e?"initial state":"replace"})}),/* @__PURE__ */O("span",{className:"shrink-0 text-[10px] opacity-70",children:VI(r)})]}),void 0!==n&&/* @__PURE__ */O("span",{className:"w-full truncate text-[10px] opacity-70",children:UI(n)})]})},WI=({index:e,total:t,canUndo:n,canRedo:r,filter:i,onUndo:a,onRedo:o,onClear:s,onFilterChange:l})=>/* @__PURE__ */A("div",{className:"flex shrink-0 flex-col gap-1.5 border-b border-zinc-200 bg-zinc-50 px-2 py-1.5 dark:border-zinc-800 dark:bg-zinc-900",children:[/* @__PURE__ */A("div",{className:"flex items-center gap-1",children:[
428
428
  /* @__PURE__ */A("button",{onClick:a,disabled:!n,className:"flex h-6 items-center gap-1 rounded px-2 text-xs font-medium text-zinc-600 enabled:hover:bg-zinc-200 disabled:opacity-40 dark:text-zinc-300 dark:enabled:hover:bg-zinc-700",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-rotate-left"}),"Undo"]}),
429
429
  /* @__PURE__ */A("button",{onClick:o,disabled:!r,className:"flex h-6 items-center gap-1 rounded px-2 text-xs font-medium text-zinc-600 enabled:hover:bg-zinc-200 disabled:opacity-40 dark:text-zinc-300 dark:enabled:hover:bg-zinc-700",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-rotate-right"}),"Redo"]}),
@@ -544,11 +544,11 @@ return O("div",{className:"flex h-full w-full flex-col",children:/* @__PURE__ */
544
544
  return A("div",{className:"flex w-full flex-col gap-4 overflow-y-auto p-3",children:[/* @__PURE__ */A("section",{className:"flex flex-col gap-1.5",children:[/* @__PURE__ */A("div",{className:"flex items-center gap-2 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-code"}),"Schema Variables"]}),/* @__PURE__ */O(yR,{variables:t,variablesParsed:r})]}),/* @__PURE__ */A("section",{className:"flex flex-col gap-1.5",children:[/* @__PURE__ */A("div",{className:"flex items-center gap-2 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",children:[/* @__PURE__ */O("i",{className:"fa-solid fa-palette"}),"Style Variables"]}),/* @__PURE__ */O(bR,{variables:n})]})]})},xR=({className:e,tabSelected:t,orientation:n,elementSelected:r,onSelectElement:i})=>{let{logs:a,clearLogs:o}=f(mh);/* @__PURE__ */
545
545
  return O("div",{className:ae("flex h-full w-full grow overflow-auto bg-white dark:bg-zinc-900",e),children:/* @__PURE__ */A("div",{className:"flex w-full flex-col",children:["logs"===t&&/* @__PURE__ */O(DD,{items:a,orientation:n,onClear:o}),"store"===t&&/* @__PURE__ */O(hR,{elementSelected:r}),"history"===t&&/* @__PURE__ */O(eD,{}),"variables"===t&&/* @__PURE__ */O(vR,{}),"elements"===t&&/* @__PURE__ */O(BI,{elementSelected:r,onSelectElement:i}),"plugins"===t&&/* @__PURE__ */O(jD,{})]})})},wR=[{id:"logs",label:"Logs",icon:"fa-solid fa-terminal"},{id:"store",label:"Store",icon:"fa-solid fa-database"},{id:"history",label:"History",icon:"fa-solid fa-clock-rotate-left"},{id:"elements",label:"Elements",icon:"fa-solid fa-layer-group"},{id:"variables",label:"Variables",icon:"fa-solid fa-code"},{id:"plugins",label:"Plugins",icon:"fa-solid fa-puzzle-piece"}],kR=({tabSelected:e,orientation:t="vertical",onChangeOrientation:n,onTabSelect:r})=>{let i=h(()=>{n?.("horizontal"===t?"vertical":"horizontal")},[t,n]),a=h(e=>()=>r?.(e),[r]);/* @__PURE__ */
546
546
  return A("div",{className:"flex shrink-0 items-stretch justify-between border-b border-zinc-200 bg-zinc-100 select-none dark:border-zinc-700 dark:bg-zinc-800",children:[/* @__PURE__ */O("div",{className:"flex items-stretch overflow-x-auto",children:wR.map(t=>{let n=e===t.id;/* @__PURE__ */
547
- return A("button",{onClick:a(t.id),className:ae("flex cursor-pointer items-center gap-1.5 border-b-2 px-3 py-2 font-medium transition-colors",{"border-violet-500 text-violet-600 dark:text-violet-400":n,"border-transparent text-zinc-500 hover:bg-zinc-200/70 hover:text-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700/50 dark:hover:text-zinc-100":!n}),children:[/* @__PURE__ */O("i",{className:ae(t.icon,"text-[10px]")}),t.label]},t.id)})}),/* @__PURE__ */O("div",{className:"flex shrink-0 items-center gap-1 border-l border-zinc-200 px-2 dark:border-zinc-700",children:/* @__PURE__ */O("button",{className:"flex h-6 w-6 items-center justify-center rounded text-zinc-500 transition-colors hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-100",title:"horizontal"===t?"Switch to side panel":"Switch to bottom panel",onClick:i,children:/* @__PURE__ */O("i",{className:ae("fa-solid fa-table-columns text-xs",{"rotate-90":"vertical"===t})})})})]})},SR=({className:e,iconClassName:t,title:n,isSelected:r=!1,onClick:i})=>/* @__PURE__ */O("button",{className:ae("flex h-6 w-6 cursor-pointer items-center justify-center rounded transition-colors",{"bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400":r,"text-zinc-500 hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-100":!r},e),title:n,onClick:i,children:/* @__PURE__ */O("i",{className:ae("text-xs",t)})}),TR=({className:e,elementSelected:t,currentPageId:n,onSelectElement:r})=>{let[i,a]=S(!1),o=h(e=>{let{id:t}=e?.dataset??{};r(t)},[r]),s=x(()=>ne(o,100),[o]),l=h(e=>{e.target.closest(".plitzi-sdk")&&s(e.target.closest("[data-id]"))},[s]),c=h(e=>{e.target.closest(".plitzi-sdk")&&(e.stopPropagation(),e.preventDefault(),a(!1))},[]),u=h(e=>{e.stopPropagation(),e.preventDefault(),a(!0)},[a]),d=h(()=>{a(!1),r(n)},[n,r]),p=h(()=>{a(!1),r("")},[r]);return g(()=>{if(typeof document>"u")return;let e=document.querySelectorAll(`[data-id="${t}"]`);return e.forEach(e=>e.classList.add("devtools-element-hovered")),()=>{e.forEach(e=>e.classList.remove("devtools-element-hovered"))}},[t]),g(()=>{if(!i||typeof document>"u")return;let e=document.getElementsByClassName("plitzi-sdk")[0];return e?(e.addEventListener("click",c),e.addEventListener("mousemove",l),()=>{e.removeEventListener("click",c),e.removeEventListener("mousemove",l)}):void 0},[c,l,i]),/* @__PURE__ */A("div",{className:ae("flex shrink-0 items-center justify-between gap-2 border-b border-zinc-200 bg-zinc-50 px-2 py-1 dark:border-zinc-700 dark:bg-zinc-800",e),children:[/* @__PURE__ */A("div",{className:"flex gap-1",children:[/* @__PURE__ */O(SR,{iconClassName:"fa-regular fa-hand-pointer",title:"Select an element in the page to inspect it",onClick:u,isSelected:i}),/* @__PURE__ */O(SR,{iconClassName:"fa-regular fa-file",title:"Current Page",onClick:d,isSelected:t===n})]}),/* @__PURE__ */O(SR,{iconClassName:"fa-solid fa-ban",onClick:p,title:"Clear",isSelected:!!t})]})},NR=({className:e,orientation:t="vertical",onChangeOrientation:n})=>{let[r,i]=Eh("plitzi-sdk.dev-tools.tab","logs"),{currentPageId:a}=f(UO),[o,s]=S(),l=x(()=>"vertical"===t?["w"]:["n"],[t]),c=k(typeof document<"u"?document.querySelector(".plitzi-sdk"):null),u=h(e=>i(e),[i]),d=h(e=>s(e),[s]);/* @__PURE__ */
547
+ return A("button",{onClick:a(t.id),className:ae("flex cursor-pointer items-center gap-1.5 border-b-2 px-3 py-2 font-medium transition-colors",{"border-violet-500 text-violet-600 dark:text-violet-400":n,"border-transparent text-zinc-500 hover:bg-zinc-200/70 hover:text-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700/50 dark:hover:text-zinc-100":!n}),children:[/* @__PURE__ */O("i",{className:ae(t.icon,"text-[10px]")}),t.label]},t.id)})}),/* @__PURE__ */O("div",{className:"flex shrink-0 items-center gap-1 border-l border-zinc-200 px-2 dark:border-zinc-700",children:/* @__PURE__ */O("button",{className:"flex h-6 w-6 items-center justify-center rounded text-zinc-500 transition-colors hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-100",title:"horizontal"===t?"Switch to side panel":"Switch to bottom panel",onClick:i,children:/* @__PURE__ */O("i",{className:ae("fa-solid fa-table-columns text-xs",{"rotate-90":"vertical"===t})})})})]})},SR=({className:e,iconClassName:t,title:n,isSelected:r=!1,onClick:i})=>/* @__PURE__ */O("button",{className:ae("flex h-6 w-6 cursor-pointer items-center justify-center rounded transition-colors",{"bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400":r,"text-zinc-500 hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-100":!r},e),title:n,onClick:i,children:/* @__PURE__ */O("i",{className:ae("text-xs",t)})}),TR=({className:e,elementSelected:t,currentPageId:n,onSelectElement:r})=>{let[i,a]=S(!1),o=h(e=>{let{id:t}=e?.dataset??{};r(t)},[r]),s=x(()=>ne(o,100),[o]),l=h(e=>{e.target.closest(".plitzi-sdk")&&s(e.target.closest("[data-id]"))},[s]),c=h(e=>{e.target.closest(".plitzi-sdk")&&(e.stopPropagation(),e.preventDefault(),a(!1))},[]),u=h(e=>{e.stopPropagation(),e.preventDefault(),a(!0)},[a]),d=h(()=>{a(!1),r(n)},[n,r]),p=h(()=>{a(!1),r("")},[r]);return g(()=>{if(typeof document>"u")return;let e=document.querySelectorAll(`[data-id="${t}"]`);return e.forEach(e=>e.classList.add("devtools-element-hovered")),()=>{e.forEach(e=>e.classList.remove("devtools-element-hovered"))}},[t]),g(()=>{if(!i||typeof document>"u")return;let e=document.getElementsByClassName("plitzi-sdk")[0];return e?(e.addEventListener("click",c),e.addEventListener("mousemove",l),()=>{e.removeEventListener("click",c),e.removeEventListener("mousemove",l)}):void 0},[c,l,i]),/* @__PURE__ */A("div",{className:ae("flex shrink-0 items-center justify-between gap-2 border-b border-zinc-200 bg-zinc-50 px-2 py-1 dark:border-zinc-700 dark:bg-zinc-800",e),children:[/* @__PURE__ */A("div",{className:"flex gap-1",children:[/* @__PURE__ */O(SR,{iconClassName:"fa-regular fa-hand-pointer",title:"Select an element in the page to inspect it",onClick:u,isSelected:i}),/* @__PURE__ */O(SR,{iconClassName:"fa-regular fa-file",title:"Current Page",onClick:d,isSelected:t===n})]}),/* @__PURE__ */O(SR,{iconClassName:"fa-solid fa-ban",onClick:p,title:"Clear",isSelected:!!t})]})},NR=({className:e,orientation:t="vertical",onChangeOrientation:n})=>{let[r,i]=Eh("plitzi-sdk.dev-tools.tab","logs"),{currentPageId:a}=f(WO),[o,s]=S(),l=x(()=>"vertical"===t?["w"]:["n"],[t]),c=k(typeof document<"u"?document.querySelector(".plitzi-sdk"):null),u=h(e=>i(e),[i]),d=h(e=>s(e),[s]);/* @__PURE__ */
548
548
  return O(jg,{className:ae("component__container-resizable-sidebar text-xs",e,{"h-full":"vertical"===t}),minConstraintsX:"vertical"===t?500:1/0,maxConstraintsX:"vertical"===t?1e3:1/0,minConstraintsY:"vertical"===t?1/0:34,maxConstraintsY:"vertical"===t?1/0:600,width:"vertical"===t?500:1/0,height:"vertical"===t?1/0:200,resizeHandles:l,parentRef:c,autoGrow:!1,children:/* @__PURE__ */A("div",{className:"flex h-full w-full flex-col bg-white text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200",children:[
549
549
  /* @__PURE__ */O(kR,{orientation:t,onChangeOrientation:n,onTabSelect:u,tabSelected:r}),["store","elements"].includes(r)&&/* @__PURE__ */O(TR,{elementSelected:o,onSelectElement:d,currentPageId:a}),
550
550
  /* @__PURE__ */O(xR,{orientation:t,tabSelected:r,elementSelected:o,onSelectElement:d})]})})},CR=({children:e})=>{let[t,n]=S([]),[r,i]=S({}),a=k(!1),o=h((e,t,r,i,a)=>{n(n=>[...n,{logType:e,category:t,message:r,time:a,params:i}])},[n]),s=h((e,t)=>i(n=>({...n,[e]:t})),[]),l=h(e=>i(t=>ee(t,[e])),[]),c=h((e,...t)=>{if(e&&"function"==typeof r[e])return r[e](...t)},[r]),u=h(()=>n([]),[]);return a.current||=(za.setCallback(o),za.setCallbackAddProvider(s),za.setCallbackRemoveProvider(l),!0),g(()=>(za.setCallback(o),za.setCallbackAddProvider(s),za.setCallbackRemoveProvider(l),za.processPendingLogs(),()=>{za.setCallback(void 0),za.setCallbackAddProvider(void 0),za.setCallbackRemoveProvider(void 0),za.flush()}),[o,s,l]),/* @__PURE__ */O(mh,{value:x(()=>({providers:r,logs:t,setLogs:n,clearLogs:u,getData:c}),[r,t,n,u,c]),children:e})},ER=({children:e,className:t,innerClassName:n,enabled:r=!1,renderMode:i="default",devToolsStyle:a="",devToolsStyleLink:o=""})=>{let{theme:s}=f(_h),[l,c]=S("horizontal"),u=h(e=>c(e),[]);return r?/* @__PURE__ */O(CR,{children:/* @__PURE__ */A("div",{className:ae("flex grow overflow-auto",{"flex-col":"horizontal"===l,"h-screen":"vertical"===l},t),children:[
551
- /* @__PURE__ */O("div",{className:ae("grow basis-0 flex-col overflow-auto",n),children:e}),"default"===i&&/* @__PURE__ */O(NR,{orientation:l,onChangeOrientation:u}),"shadow"===i&&/* @__PURE__ */A(Hg,{children:[o&&/* @__PURE__ */O(Hg.Link,{href:o}),/* @__PURE__ */A(Hg.Content,{children:[/* @__PURE__ */O("style",{dangerouslySetInnerHTML:{__html:a}}),/* @__PURE__ */O(NR,{className:ae({dark:"dark"===s}),orientation:l,onChangeOrientation:u})]})]})]})}):e},_R=({children:e,environment:t="main"})=>{let{useStore:n,useStoreSync:r}=Gr(),{routeParams:i,queryParams:a,hostname:o,currentPageId:s}=f(UO),[l]=n("schema.variables"),c=x(()=>l?l.reduce((e,n)=>{let{name:r,value:s,subValues:l}=n;if(!Array.isArray(l)||0===l.length)return{...e,[r]:s};let c={routeParams:i,queryParams:a,hostname:o,environment:t},u=l.find(e=>bN(e.when,c));return{...e,[r]:u?u.value:s}},{}):{},[t,o,a,i,l]);hh({id:"global",source:"variables",name:"Variables",fields:h(()=>Jr(c).map(e=>({path:e,name:`variables.${e}`})),[c])}),r("runtime.sources.variables",c);let u=x(()=>({routeParams:i,queryParams:a}),[i,a]);hh({id:"global",source:"navigation",name:"Navigation",fields:h(()=>Jr({routeParams:i,queryParams:a}).map(e=>({path:e,name:`navigation.${e}`})),[i,a])}),r("runtime.sources.navigation",u);let{user:d,authenticated:p}=f(rI),[m="basic"]=n("schema.settings.userProvider"),g=x(()=>{switch(m){case"auth0":return{isAuthenticated:p,user:{given_name:"",family_name:"",nickname:"",name:"",picture:"",locale:"",updated_at:"",email:"",email_verified:!1,sub:"",...d}};case"basic":return{isAuthenticated:p,accessToken:d?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...d?.details??{}}};default:return{}}},[m,d,p]);hh({id:"global",source:"auth",name:"Auth State",fields:h(()=>Jr(g).map(e=>({path:e,name:`user.${e}`})),[g])}),r("runtime.sources.auth",g);let{state:y}=f(uI),[b={}]=n("pageDefinitions"),v=x(()=>Object.values(b).map(e=>({value:e.id,label:Y(e,"attributes.name",e.id)})),[b]),w=x(()=>({...y,currentPageId:s}),[y,s]);return hh({id:"global",source:"page",name:"Page",fields:h(()=>[...Jr(y).map(e=>({path:e,name:`page.${e}`})),v.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:v}:{path:"currentPageId",name:"Current Page"}],[y,v])}),r("runtime.sources.page",w),e},OR=({children:e,webId:t,state:n,onInit:r})=>{let i=x(()=>`plitzi_${t}_state`,[t]),{useStore:a}=Gr(),[o]=a("schema.settings"),s=h((e,t={},n)=>{let r=t;try{"localStorage"===n?r=localStorage.getItem(i):"sessionStorage"===n&&(r=sessionStorage.getItem(i)),"string"==typeof r&&(r=JSON.parse(r))}catch{r=t}return e?Y(r,e,t):r},[i]),[l,c]=S(()=>{let e=Y(o,"keepState",!1),t=Y(o,"stateStorage",void 0);return e&&t?{...n??{},...s("",{},t)}:n??{}}),u=k(!1);g(()=>{u.current?c(n??{}):u.current=!0},[n]);let d=h((e,t="",n="")=>{let r=s(),a=r;a=t?ar(r,n=>{G(n,t,e)}):e;try{let e=JSON.stringify(a);"localStorage"===n?localStorage.setItem(i,e):"sessionStorage"===n&&sessionStorage.setItem(i,e)}catch{return!1}return!0},[i,s]),p=h((e="")=>{try{"localStorage"===e?(localStorage.removeItem(i),c({})):"sessionStorage"===e&&(sessionStorage.removeItem(i),c({}))}catch{}},[i]),f=h((e,t,n)=>{c(r=>{let i=ar(r,n=>{G(n,e,t)});return n&&d(i,"",n),i})},[d]),m=x(()=>({state:l,setState:c,setStateByKey:f,clearCache:p}),[l,c,f,p]);return g(()=>{"function"==typeof r&&r(m)},[r,m]),/* @__PURE__ */O(uI,{value:m,children:e})},AR=s({});AR.displayName="StyleContext";var IR,DR,PR=({children:e,style:t})=>{let{style:n}=f(xh),r=x(()=>({}),[]),{useStoreSync:i}=Gr();return i("style",t??(n||yh)),/* @__PURE__ */O(AR,{value:r,children:e})},MR="/plitzi-sdk.css",RR=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:a,isHydrating:o=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d="iframe",sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:f="./plitzi-sdk-devtools.css",previewMode:h=!0,debugMode:m=!1,state:g,onInitEventBridge:y,onInitStateManager:b,...v})=>/* @__PURE__ */O(yI,{webKey:t,webId:n,instanceId:u,server:a,offlineMode:s,offlineData:l,offlineDataType:c,environment:r,revision:e,debugMode:m,children:/* @__PURE__ */O(xI,{children:/* @__PURE__ */O(FA,{children:/* @__PURE__ */O(vI,{renderMode:d,sdkStylePath:MR,children:/* @__PURE__ */O(PR,{children:/* @__PURE__ */O(JA,{onInit:y,debugMode:m,children:/* @__PURE__ */O(MI,{children:/* @__PURE__ */O(aI,{previewMode:h,environment:r,server:a,isHydrating:o,children:/* @__PURE__ */O(fI,{renderMode:d,currentPageId:i,previewMode:h,children:/* @__PURE__ */O(OR,{webId:n,state:g,onInit:b,children:/* @__PURE__ */O(_R,{environment:r,children:/* @__PURE__ */O(pI,{previewMode:h,children:/* @__PURE__ */O(ER,{enabled:m,devToolsStyleLink:"/plitzi-sdk-devtools.css",renderMode:"shadow",innerClassName:ae({flex:"iframe"===d}),children:/* @__PURE__ */O(PI,{renderMode:d,previewMode:h,debugMode:m,environment:r,isHydrating:o,sdkStylePath:MR,server:a,...v})})})})})})})})})})})})})}),jR=e=>{},zR=e=>{},LR=(e={})=>{let{filter:t,sink:n=jR,errorSink:r=zR}="function"==typeof e?{filter:void 0,sink:e,errorSink:zR}:e;return()=>({onChange:e=>{(!t||t(e))&&n(e)},onError:r})},FR={Button:xg,ContentEditable:Xg,Input:ty,Heading:iy,ContainerResizable:Mg,ContainerCollapsable:Cg,Text:wN,Markdown:ay,ContainerTabs:Qg},$R=({className:e="min-h-screen",children:t,webKey:r="",server:a,renderMode:o="iframe",debugMode:s=!1,...l})=>{const c=x(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}return Y(t,"data.spaceId",0)}(r),[r]),[d,p]=Eh(`web_${c}_state.debugMode`,!1,"localStorage",s),f=x(()=>(e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",nodeServer:"https://server.plitzi.com",graphqlServer:"https://server.plitzi.com/graphql",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}))(a),[a]),m=x(()=>((e,t)=>{const n=new ih({uri:e.graphqlServer}),r=new gf;return new Wf({link:new MA(e=>({headers:{...e.headers,"sdk-version":"0.31.0",authorization:t?`Bearer ${t}`:""}})).concat(new Gd((e,t)=>new Nl(n=>{let r=t(e).subscribe({next:e=>{n.next(e.data?{...e,data:fh(e.data)}:e)},error:e=>n.error(e),complete:()=>n.complete()});return()=>{r.unsubscribe()}})),n),cache:r})})(f,r),[f,r]);g(()=>{},[]);const y=h(e=>{e.shiftKey&&"F12"===e.key&&p(e=>!e)},[p]);g(()=>{s&&window.addEventListener("keydown",y)},[y,s]);const b=x(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==II)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&f.requestUrl;const v="widget"===o?i:"undefined"==typeof window?E_:v_,w="widget"===o?{}:{basename:Y(f,"basePath","/"),location:"undefined"==typeof window?f.requestUrl??"":void 0};/* @__PURE__ */
552
- return O(NC,{value:{segments:{}},middlewares:[LR(La("sdk")),...d?[QI()]:[]],children:/* @__PURE__ */O(Oh,{children:/* @__PURE__ */O(VT,{components:FR,children:/* @__PURE__ */O(Fg,{className:ae("plitzi-sdk flex",e,{"sdk-debug-mode":d}),children:/* @__PURE__ */O(AA,{children:/* @__PURE__ */O(v,{...w,children:/* @__PURE__ */O(QO,{client:m,children:/* @__PURE__ */O(WO,{localCustomComponents:b,localComponents:BR,children:/* @__PURE__ */O(RR,{server:f,webKey:r,renderMode:o,debugMode:d,webId:c,...l})})})})})})})})})},qR=dC(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:a}}=lr(),{server:o}=f(a);/* @__PURE__ */
551
+ /* @__PURE__ */O("div",{className:ae("grow basis-0 flex-col overflow-auto",n),children:e}),"default"===i&&/* @__PURE__ */O(NR,{orientation:l,onChangeOrientation:u}),"shadow"===i&&/* @__PURE__ */A(Hg,{children:[o&&/* @__PURE__ */O(Hg.Link,{href:o}),/* @__PURE__ */A(Hg.Content,{children:[/* @__PURE__ */O("style",{dangerouslySetInnerHTML:{__html:a}}),/* @__PURE__ */O(NR,{className:ae({dark:"dark"===s}),orientation:l,onChangeOrientation:u})]})]})]})}):e},_R=({children:e,environment:t="main"})=>{let{useStore:n,useStoreSync:r}=Gr(),{routeParams:i,queryParams:a,hostname:o,currentPageId:s}=f(WO),[l]=n("schema.variables"),c=x(()=>l?l.reduce((e,n)=>{let{name:r,value:s,subValues:l}=n;if(!Array.isArray(l)||0===l.length)return{...e,[r]:s};let c={routeParams:i,queryParams:a,hostname:o,environment:t},u=l.find(e=>bN(e.when,c));return{...e,[r]:u?u.value:s}},{}):{},[t,o,a,i,l]);hh({id:"global",source:"variables",name:"Variables",fields:h(()=>Jr(c).map(e=>({path:e,name:`variables.${e}`})),[c])}),r("runtime.sources.variables",c);let u=x(()=>({routeParams:i,queryParams:a}),[i,a]);hh({id:"global",source:"navigation",name:"Navigation",fields:h(()=>Jr({routeParams:i,queryParams:a}).map(e=>({path:e,name:`navigation.${e}`})),[i,a])}),r("runtime.sources.navigation",u);let{user:d,authenticated:p}=f(rI),[m="basic"]=n("schema.settings.userProvider"),g=x(()=>{switch(m){case"auth0":return{isAuthenticated:p,user:{given_name:"",family_name:"",nickname:"",name:"",picture:"",locale:"",updated_at:"",email:"",email_verified:!1,sub:"",...d}};case"basic":return{isAuthenticated:p,accessToken:d?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...d?.details??{}}};default:return{}}},[m,d,p]);hh({id:"global",source:"auth",name:"Auth State",fields:h(()=>Jr(g).map(e=>({path:e,name:`user.${e}`})),[g])}),r("runtime.sources.auth",g);let{state:y}=f(uI),[b={}]=n("pageDefinitions"),v=x(()=>Object.values(b).map(e=>({value:e.id,label:Y(e,"attributes.name",e.id)})),[b]),w=x(()=>({...y,currentPageId:s}),[y,s]);return hh({id:"global",source:"page",name:"Page",fields:h(()=>[...Jr(y).map(e=>({path:e,name:`page.${e}`})),v.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:v}:{path:"currentPageId",name:"Current Page"}],[y,v])}),r("runtime.sources.page",w),e},OR=({children:e,webId:t,state:n,onInit:r})=>{let i=x(()=>`plitzi_${t}_state`,[t]),{useStore:a}=Gr(),[o]=a("schema.settings"),s=h((e,t={},n)=>{let r=t;try{"localStorage"===n?r=localStorage.getItem(i):"sessionStorage"===n&&(r=sessionStorage.getItem(i)),"string"==typeof r&&(r=JSON.parse(r))}catch{r=t}return e?Y(r,e,t):r},[i]),[l,c]=S(()=>{let e=Y(o,"keepState",!1),t=Y(o,"stateStorage",void 0);return e&&t?{...n??{},...s("",{},t)}:n??{}}),u=k(!1);g(()=>{u.current?c(n??{}):u.current=!0},[n]);let d=h((e,t="",n="")=>{let r=s(),a=r;a=t?ar(r,n=>{G(n,t,e)}):e;try{let e=JSON.stringify(a);"localStorage"===n?localStorage.setItem(i,e):"sessionStorage"===n&&sessionStorage.setItem(i,e)}catch{return!1}return!0},[i,s]),p=h((e="")=>{try{"localStorage"===e?(localStorage.removeItem(i),c({})):"sessionStorage"===e&&(sessionStorage.removeItem(i),c({}))}catch{}},[i]),f=h((e,t,n)=>{c(r=>{let i=ar(r,n=>{G(n,e,t)});return n&&d(i,"",n),i})},[d]),m=x(()=>({state:l,setState:c,setStateByKey:f,clearCache:p}),[l,c,f,p]);return g(()=>{"function"==typeof r&&r(m)},[r,m]),/* @__PURE__ */O(uI,{value:m,children:e})},AR=s({});AR.displayName="StyleContext";var IR,DR,PR=({children:e,style:t})=>{let{style:n}=f(xh),r=x(()=>({}),[]),{useStoreSync:i}=Gr();return i("style",t??(n||yh)),/* @__PURE__ */O(AR,{value:r,children:e})},MR="/plitzi-sdk.css",RR=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:a,isHydrating:o=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d="iframe",sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:f="./plitzi-sdk-devtools.css",previewMode:h=!0,debugMode:m=!1,state:g,onInitEventBridge:y,onInitStateManager:b,...v})=>/* @__PURE__ */O(yI,{webKey:t,webId:n,instanceId:u,server:a,offlineMode:s,offlineData:l,offlineDataType:c,environment:r,revision:e,debugMode:m,children:/* @__PURE__ */O(xI,{children:/* @__PURE__ */O(FA,{children:/* @__PURE__ */O(vI,{renderMode:d,sdkStylePath:MR,children:/* @__PURE__ */O(PR,{children:/* @__PURE__ */O(JA,{onInit:y,debugMode:m,children:/* @__PURE__ */O(MI,{children:/* @__PURE__ */O(aI,{previewMode:h,environment:r,server:a,isHydrating:o,children:/* @__PURE__ */O(fI,{renderMode:d,currentPageId:i,previewMode:h,children:/* @__PURE__ */O(OR,{webId:n,state:g,onInit:b,children:/* @__PURE__ */O(_R,{environment:r,children:/* @__PURE__ */O(pI,{previewMode:h,children:/* @__PURE__ */O(ER,{enabled:m,devToolsStyleLink:"/plitzi-sdk-devtools.css",renderMode:"shadow",innerClassName:ae({flex:"iframe"===d}),children:/* @__PURE__ */O(PI,{renderMode:d,previewMode:h,debugMode:m,environment:r,isHydrating:o,sdkStylePath:MR,server:a,...v})})})})})})})})})})})})})}),jR=e=>{},zR=e=>{},LR=(e={})=>{let{filter:t,sink:n=jR,errorSink:r=zR}="function"==typeof e?{filter:void 0,sink:e,errorSink:zR}:e;return()=>({onChange:e=>{(!t||t(e))&&n(e)},onError:r})},FR={Button:xg,ContentEditable:Xg,Input:ty,Heading:iy,ContainerResizable:Mg,ContainerCollapsable:Cg,Text:wN,Markdown:ay,ContainerTabs:Qg},$R=({className:e="min-h-screen",children:t,webKey:r="",server:a,renderMode:o="iframe",debugMode:s=!1,...l})=>{const c=x(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}return Y(t,"data.spaceId",0)}(r),[r]),[d,p]=Eh(`web_${c}_state.debugMode`,!1,"localStorage",s),f=x(()=>(e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",nodeServer:"https://server.plitzi.com",graphqlServer:"https://server.plitzi.com/graphql",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}))(a),[a]),m=x(()=>((e,t)=>{const n=new ih({uri:e.graphqlServer}),r=new gf;return new Wf({link:new MA(e=>({headers:{...e.headers,"sdk-version":"0.31.2",authorization:t?`Bearer ${t}`:""}})).concat(new Gd((e,t)=>new Nl(n=>{let r=t(e).subscribe({next:e=>{n.next(e.data?{...e,data:fh(e.data)}:e)},error:e=>n.error(e),complete:()=>n.complete()});return()=>{r.unsubscribe()}})),n),cache:r})})(f,r),[f,r]);g(()=>{},[]);const y=h(e=>{e.shiftKey&&"F12"===e.key&&p(e=>!e)},[p]);g(()=>{s&&window.addEventListener("keydown",y)},[y,s]);const b=x(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==II)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&f.requestUrl;const v="widget"===o?i:"undefined"==typeof window?O_:w_,w="widget"===o?{}:{basename:Y(f,"basePath","/"),location:"undefined"==typeof window?f.requestUrl??"":void 0};/* @__PURE__ */
552
+ return O(EC,{value:{segments:{}},middlewares:[LR(La("sdk")),...d?[QI()]:[]],children:/* @__PURE__ */O(Oh,{children:/* @__PURE__ */O(VT,{components:FR,children:/* @__PURE__ */O(Fg,{className:ae("plitzi-sdk flex",e,{"sdk-debug-mode":d}),children:/* @__PURE__ */O(AA,{children:/* @__PURE__ */O(v,{...w,children:/* @__PURE__ */O(KO,{client:m,children:/* @__PURE__ */O(GO,{localCustomComponents:b,localComponents:BR,children:/* @__PURE__ */O(RR,{server:f,webKey:r,renderMode:o,debugMode:d,webId:c,...l})})})})})})})})})},qR=dC(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:a}}=lr(),{server:o}=f(a);/* @__PURE__ */
553
553
  return O(Fa,{ref:e,className:ae("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!i}),children:n&&/* @__PURE__ */O($R,{webKey:n,environment:r,renderMode:"widget",server:o,className:"h-full w-full"})})}),BR={plitziSdk:Object.assign(qR,{type:"plitziSdk",content:{attributes:{spaceId:"",spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",type:"plitziSdk",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canTemplate:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */O(sC,{})},defaultStyle:{name:"Plitzi Sdk",displayMode:"desktop",style:{base:{default:{"min-width":"50px","min-height":"50px"}}}},settings:{}}})};function VR(e,t={},n={},r=!1,i=!1){const a=({isHydrating:e=!1})=>{const i=Object.keys(n);r||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{t[n]="function"==typeof t[n]?e:null})})();const a=h(e=>{IR=e},[]),o=h(e=>{DR=e},[]);/* @__PURE__ */
554
- return O($R,{...t,debugMode:r,isHydrating:e,onInitStateManager:a,onInitEventBridge:o,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */O(PI.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})},o="undefined"!=typeof document?document.getElementById(e):void 0;o&&(i?C(o,/* @__PURE__ */O(a,{isHydrating:!0})):N(o).render(/* @__PURE__ */O(a,{})))}Promise.resolve({ });var UR=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a="iframe",...o})=>/* @__PURE__ */O($R,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});UR.Plugin=PI.Plugin;var HR=lr,WR="0.31.0",YR=()=>IR,GR=()=>DR;export{$a as ComponentContext,WO as ComponentProvider,or as ElementContext,fC as JsxManager,cr as PlitziServiceProvider,kC as PluginManager,Ga as PluginRemote,CO as ReplicaProvider,Fa as RootElement,UR as default,GR as getEventBridge,YR as getStateManager,VR as render,BR as sdkComponents,gh as useElement,HR as usePlitziServiceContext,Ih as useRscData,WR as version,dC as withElement};
554
+ return O($R,{...t,debugMode:r,isHydrating:e,onInitStateManager:a,onInitEventBridge:o,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */O(PI.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})},o="undefined"!=typeof document?document.getElementById(e):void 0;o&&(i?C(o,/* @__PURE__ */O(a,{isHydrating:!0})):N(o).render(/* @__PURE__ */O(a,{})))}Promise.resolve({ });var UR=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a="iframe",...o})=>/* @__PURE__ */O($R,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});UR.Plugin=PI.Plugin;var HR=lr,WR="0.31.2",YR=()=>IR,GR=()=>DR;export{$a as ComponentContext,GO as ComponentProvider,or as ElementContext,fC as JsxManager,cr as PlitziServiceProvider,kC as PluginManager,Ga as PluginRemote,_O as ReplicaProvider,Fa as RootElement,UR as default,GR as getEventBridge,YR as getStateManager,VR as render,BR as sdkComponents,gh as useElement,HR as usePlitziServiceContext,Ih as useRscData,WR as version,dC as withElement};