var zc=Object.defineProperty;var Tc=(e,t,n)=>t in e?zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>(Tc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Oc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vs={exports:{}},El={},ms={exports:{}},F={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hr=Symbol.for("react.element"),Ic=Symbol.for("react.portal"),Mc=Symbol.for("react.fragment"),Rc=Symbol.for("react.strict_mode"),Fc=Symbol.for("react.profiler"),jc=Symbol.for("react.provider"),Dc=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),$c=Symbol.for("react.suspense"),Bc=Symbol.for("react.memo"),Vc=Symbol.for("react.lazy"),tu=Symbol.iterator;function Ac(e){return e===null||typeof e!="object"?null:(e=tu&&e[tu]||e["@@iterator"],typeof e=="function"?e:null)}var ys={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gs=Object.assign,ws={};function _n(e,t,n){this.props=e,this.context=t,this.refs=ws,this.updater=n||ys}_n.prototype.isReactComponent={};_n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ss(){}Ss.prototype=_n.prototype;function ii(e,t,n){this.props=e,this.context=t,this.refs=ws,this.updater=n||ys}var ui=ii.prototype=new Ss;ui.constructor=ii;gs(ui,_n.prototype);ui.isPureReactComponent=!0;var nu=Array.isArray,Es=Object.prototype.hasOwnProperty,si={current:null},ks={key:!0,ref:!0,__self:!0,__source:!0};function xs(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Es.call(t,r)&&!ks.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,J=x[W];if(0>>1;Wl(Dl,I))Otl(Sr,Dl)?(x[W]=Sr,x[Ot]=I,W=Ot):(x[W]=Dl,x[Tt]=I,W=Tt);else if(Otl(Sr,I))x[W]=Sr,x[Ot]=I,W=Ot;else break e}}return T}function l(x,T){var I=x.sortIndex-T.sortIndex;return I!==0?I:x.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],v=1,p=null,h=3,S=!1,E=!1,k=!1,$=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var T=n(c);T!==null;){if(T.callback===null)r(c);else if(T.startTime<=x)r(c),T.sortIndex=T.expirationTime,t(s,T);else break;T=n(c)}}function y(x){if(k=!1,d(x),!E)if(n(s)!==null)E=!0,Ze(C);else{var T=n(c);T!==null&&Zt(y,T.startTime-x)}}function C(x,T){E=!1,k&&(k=!1,f(L),L=-1),S=!0;var I=h;try{for(d(T),p=n(s);p!==null&&(!(p.expirationTime>T)||x&&!ke());){var W=p.callback;if(typeof W=="function"){p.callback=null,h=p.priorityLevel;var J=W(p.expirationTime<=T);T=e.unstable_now(),typeof J=="function"?p.callback=J:p===n(s)&&r(s),d(T)}else r(s);p=n(s)}if(p!==null)var zt=!0;else{var Tt=n(c);Tt!==null&&Zt(y,Tt.startTime-T),zt=!1}return zt}finally{p=null,h=I,S=!1}}var N=!1,P=null,L=-1,H=5,M=-1;function ke(){return!(e.unstable_now()-Mx||125W?(x.sortIndex=I,t(c,x),n(s)===null&&x===n(c)&&(k?(f(L),L=-1):k=!0,Zt(y,I-W))):(x.sortIndex=J,t(s,x),E||S||(E=!0,Ze(C))),x},e.unstable_shouldYield=ke,e.unstable_wrapCallback=function(x){var T=h;return function(){var I=h;h=T;try{return x.apply(this,arguments)}finally{h=I}}}})(Ps);Ns.exports=Ps;var ef=Ns.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ls=Ft,Ne=ef;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),po=Object.prototype.hasOwnProperty,tf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,lu={},ou={};function nf(e){return po.call(ou,e)?!0:po.call(lu,e)?!1:tf.test(e)?ou[e]=!0:(lu[e]=!0,!1)}function rf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lf(e,t,n,r){if(t===null||typeof t>"u"||rf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function me(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ue[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ue[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ue[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ue[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ue[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ue[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ue[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ue[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ue[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var ci=/[\-:]([a-z])/g;function fi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ci,fi);ue[t]=new me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ci,fi);ue[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ci,fi);ue[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ue[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});ue.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ue[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function di(e,t,n,r){var l=ue.hasOwnProperty(t)?ue[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` `+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Bl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dn(e):""}function of(e){switch(e.tag){case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 2:case 15:return e=Vl(e.type,!1),e;case 11:return e=Vl(e.type.render,!1),e;case 1:return e=Vl(e.type,!0),e;default:return""}}function yo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case en:return"Fragment";case bt:return"Portal";case ho:return"Profiler";case pi:return"StrictMode";case vo:return"Suspense";case mo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Os:return(e.displayName||"Context")+".Consumer";case Ts:return(e._context.displayName||"Context")+".Provider";case hi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vi:return t=e.displayName||null,t!==null?t:yo(e.type)||"Memo";case ct:t=e._payload,e=e._init;try{return yo(e(t))}catch{}}return null}function uf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yo(t);case 8:return t===pi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ct(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ms(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sf(e){var t=Ms(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xr(e){e._valueTracker||(e._valueTracker=sf(e))}function Rs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ms(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Jr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function go(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ct(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fs(e,t){t=t.checked,t!=null&&di(e,"checked",t,!1)}function wo(e,t){Fs(e,t);var n=Ct(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?So(e,t.type,n):t.hasOwnProperty("defaultValue")&&So(e,t.type,Ct(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function su(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function So(e,t,n){(t!=="number"||Jr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function dn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Cr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},af=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){af.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function $s(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function Bs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=$s(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var cf=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xo(e,t){if(t){if(cf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(g(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(g(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(g(61))}if(t.style!=null&&typeof t.style!="object")throw Error(g(62))}}function Co(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _o=null;function mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var No=null,pn=null,hn=null;function fu(e){if(e=yr(e)){if(typeof No!="function")throw Error(g(280));var t=e.stateNode;t&&(t=Nl(t),No(e.stateNode,e.type,t))}}function Vs(e){pn?hn?hn.push(e):hn=[e]:pn=e}function As(){if(pn){var e=pn,t=hn;if(hn=pn=null,fu(e),t)for(e=0;e>>=0,e===0?32:31-(Ef(e)/kf|0)|0}var _r=64,Nr=4194304;function $n(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=$n(u):(o&=i,o!==0&&(r=$n(o)))}else i=n&~l,i!==0?r=$n(i):o!==0&&(r=$n(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function vr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ve(t),e[t]=n}function Nf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Hn),Su=" ",Eu=!1;function sa(e,t){switch(e){case"keyup":return ed.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tn=!1;function nd(e,t){switch(e){case"compositionend":return aa(t);case"keypress":return t.which!==32?null:(Eu=!0,Su);case"textInput":return e=t.data,e===Su&&Eu?null:e;default:return null}}function rd(e,t){if(tn)return e==="compositionend"||!Ci&&sa(e,t)?(e=ia(),Vr=Ei=ht=null,tn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_u(n)}}function pa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ha(){for(var e=window,t=Jr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function _i(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dd(e){var t=ha(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pa(n.ownerDocument.documentElement,n)){if(r!==null&&_i(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Nu(n,o);var i=Nu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,nn=null,Io=null,Qn=null,Mo=!1;function Pu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mo||nn==null||nn!==Jr(r)||(r=nn,"selectionStart"in r&&_i(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qn&&lr(Qn,r)||(Qn=r,r=ll(Io,"onSelect"),0on||(e.current=$o[on],$o[on]=null,on--)}function B(e,t){on++,$o[on]=e.current,e.current=t}var _t={},de=Pt(_t),we=Pt(!1),Ht=_t;function wn(e,t){var n=e.type.contextTypes;if(!n)return _t;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Se(e){return e=e.childContextTypes,e!=null}function il(){A(we),A(de)}function Ru(e,t,n){if(de.current!==_t)throw Error(g(168));B(de,t),B(we,n)}function xa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(g(108,uf(e)||"Unknown",l));return G({},n,r)}function ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_t,Ht=de.current,B(de,e),B(we,we.current),!0}function Fu(e,t,n){var r=e.stateNode;if(!r)throw Error(g(169));n?(e=xa(e,t,Ht),r.__reactInternalMemoizedMergedChildContext=e,A(we),A(de),B(de,e)):A(we),B(we,n)}var qe=null,Pl=!1,to=!1;function Ca(e){qe===null?qe=[e]:qe.push(e)}function Cd(e){Pl=!0,Ca(e)}function Lt(){if(!to&&qe!==null){to=!0;var e=0,t=U;try{var n=qe;for(U=1;e>=i,l-=i,be=1<<32-Ve(t)+l|n<L?(H=P,P=null):H=P.sibling;var M=h(f,P,d[L],y);if(M===null){P===null&&(P=H);break}e&&P&&M.alternate===null&&t(f,P),a=o(M,a,L),N===null?C=M:N.sibling=M,N=M,P=H}if(L===d.length)return n(f,P),K&&Mt(f,L),C;if(P===null){for(;LL?(H=P,P=null):H=P.sibling;var ke=h(f,P,M.value,y);if(ke===null){P===null&&(P=H);break}e&&P&&ke.alternate===null&&t(f,P),a=o(ke,a,L),N===null?C=ke:N.sibling=ke,N=ke,P=H}if(M.done)return n(f,P),K&&Mt(f,L),C;if(P===null){for(;!M.done;L++,M=d.next())M=p(f,M.value,y),M!==null&&(a=o(M,a,L),N===null?C=M:N.sibling=M,N=M);return K&&Mt(f,L),C}for(P=r(f,P);!M.done;L++,M=d.next())M=S(P,f,L,M.value,y),M!==null&&(e&&M.alternate!==null&&P.delete(M.key===null?L:M.key),a=o(M,a,L),N===null?C=M:N.sibling=M,N=M);return e&&P.forEach(function(Fe){return t(f,Fe)}),K&&Mt(f,L),C}function $(f,a,d,y){if(typeof d=="object"&&d!==null&&d.type===en&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case kr:e:{for(var C=d.key,N=a;N!==null;){if(N.key===C){if(C=d.type,C===en){if(N.tag===7){n(f,N.sibling),a=l(N,d.props.children),a.return=f,f=a;break e}}else if(N.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ct&&Au(C)===N.type){n(f,N.sibling),a=l(N,d.props),a.ref=Mn(f,N,d),a.return=f,f=a;break e}n(f,N);break}else t(f,N);N=N.sibling}d.type===en?(a=At(d.props.children,f.mode,y,d.key),a.return=f,f=a):(y=Gr(d.type,d.key,d.props,null,f.mode,y),y.ref=Mn(f,a,d),y.return=f,f=y)}return i(f);case bt:e:{for(N=d.key;a!==null;){if(a.key===N)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=ao(d,f.mode,y),a.return=f,f=a}return i(f);case ct:return N=d._init,$(f,a,N(d._payload),y)}if(Un(d))return E(f,a,d,y);if(Ln(d))return k(f,a,d,y);Mr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=so(d,f.mode,y),a.return=f,f=a),i(f)):n(f,a)}return $}var En=Ia(!0),Ma=Ia(!1),gr={},Xe=Pt(gr),sr=Pt(gr),ar=Pt(gr);function Ut(e){if(e===gr)throw Error(g(174));return e}function Ri(e,t){switch(B(ar,t),B(sr,e),B(Xe,gr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ko(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ko(t,e)}A(Xe),B(Xe,t)}function kn(){A(Xe),A(sr),A(ar)}function Ra(e){Ut(ar.current);var t=Ut(Xe.current),n=ko(t,e.type);t!==n&&(B(sr,e),B(Xe,n))}function Fi(e){sr.current===e&&(A(Xe),A(sr))}var Y=Pt(0);function pl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var no=[];function ji(){for(var e=0;en?n:4,e(!0);var r=ro.transition;ro.transition={};try{e(!1),t()}finally{U=n,ro.transition=r}}function Za(){return Re().memoizedState}function Ld(e,t,n){var r=kt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ja(e))qa(t,n);else if(n=La(e,t,n,r),n!==null){var l=he();Ae(n,e,r,l),ba(n,t,r)}}function zd(e,t,n){var r=kt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ja(e))qa(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,He(u,i)){var s=t.interleaved;s===null?(l.next=l,Ii(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=La(e,t,l,r),n!==null&&(l=he(),Ae(n,e,r,l),ba(n,t,r))}}function Ja(e){var t=e.alternate;return e===X||t!==null&&t===X}function qa(e,t){Kn=hl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ba(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gi(e,n)}}var vl={readContext:Me,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useInsertionEffect:se,useLayoutEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useMutableSource:se,useSyncExternalStore:se,useId:se,unstable_isNewReconciler:!1},Td={readContext:Me,useCallback:function(e,t){return Qe().memoizedState=[e,t===void 0?null:t],e},useContext:Me,useEffect:Wu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qr(4194308,4,Qa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qr(4,2,e,t)},useMemo:function(e,t){var n=Qe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ld.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=Qe();return e={current:e},t.memoizedState=e},useState:Hu,useDebugValue:Vi,useDeferredValue:function(e){return Qe().memoizedState=e},useTransition:function(){var e=Hu(!1),t=e[0];return e=Pd.bind(null,e[1]),Qe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,l=Qe();if(K){if(n===void 0)throw Error(g(407));n=n()}else{if(n=t(),le===null)throw Error(g(349));Qt&30||Da(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Wu($a.bind(null,r,o,e),[e]),r.flags|=2048,dr(9,Ua.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Qe(),t=le.identifierPrefix;if(K){var n=et,r=be;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ke]=t,e[ur]=r,sc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Co(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;lCn&&(t.flags|=128,r=!0,Rn(o,!1),t.lanes=4194304)}else{if(!r)if(e=pl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!K)return ae(t),null}else 2*q()-o.renderingStartTime>Cn&&n!==1073741824&&(t.flags|=128,r=!0,Rn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=q(),t.sibling=null,n=Y.current,B(Y,r?n&1|2:n&1),t):(ae(t),null);case 22:case 23:return Yi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xe&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(t),null;case 24:return null;case 25:return null}throw Error(g(156,t.tag))}function Ud(e,t){switch(Pi(t),t.tag){case 1:return Se(t.type)&&il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kn(),A(we),A(de),ji(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fi(t),null;case 13:if(A(Y),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(g(340));Sn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(Y),null;case 4:return kn(),null;case 10:return Oi(t.type._context),null;case 22:case 23:return Yi(),null;case 24:return null;default:return null}}var Fr=!1,fe=!1,$d=typeof WeakSet=="function"?WeakSet:Set,_=null;function cn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Jo(e,t,n){try{n()}catch(r){Z(e,t,r)}}var bu=!1;function Bd(e,t){if(Ro=nl,e=ha(),_i(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,c=0,v=0,p=e,h=null;t:for(;;){for(var S;p!==n||l!==0&&p.nodeType!==3||(u=i+l),p!==o||r!==0&&p.nodeType!==3||(s=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(S=p.firstChild)!==null;)h=p,p=S;for(;;){if(p===e)break t;if(h===n&&++c===l&&(u=i),h===o&&++v===r&&(s=i),(S=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=S}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fo={focusedElem:e,selectionRange:n},nl=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var k=E.memoizedProps,$=E.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:Ue(t.type,k),$);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(y){Z(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return E=bu,bu=!1,E}function Yn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Jo(t,n,o)}l=l.next}while(l!==r)}}function Tl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fc(e){var t=e.alternate;t!==null&&(e.alternate=null,fc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ke],delete t[ur],delete t[Uo],delete t[kd],delete t[xd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dc(e){return e.tag===5||e.tag===3||e.tag===4}function es(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ol));else if(r!==4&&(e=e.child,e!==null))for(bo(e,t,n),e=e.sibling;e!==null;)bo(e,t,n),e=e.sibling}function ei(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ei(e,t,n),e=e.sibling;e!==null;)ei(e,t,n),e=e.sibling}var oe=null,$e=!1;function st(e,t,n){for(n=n.child;n!==null;)pc(e,t,n),n=n.sibling}function pc(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 5:fe||cn(n,t);case 6:var r=oe,l=$e;oe=null,st(e,t,n),oe=r,$e=l,oe!==null&&($e?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&($e?(e=oe,n=n.stateNode,e.nodeType===8?eo(e.parentNode,n):e.nodeType===1&&eo(e,n),nr(e)):eo(oe,n.stateNode));break;case 4:r=oe,l=$e,oe=n.stateNode.containerInfo,$e=!0,st(e,t,n),oe=r,$e=l;break;case 0:case 11:case 14:case 15:if(!fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Jo(n,t,i),l=l.next}while(l!==r)}st(e,t,n);break;case 1:if(!fe&&(cn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Z(n,t,u)}st(e,t,n);break;case 21:st(e,t,n);break;case 22:n.mode&1?(fe=(r=fe)||n.memoizedState!==null,st(e,t,n),fe=r):st(e,t,n);break;default:st(e,t,n)}}function ts(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $d),t.forEach(function(r){var l=Gd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function je(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ad(r/1960))-r,10e?16:e,vt===null)var r=!1;else{if(e=vt,vt=null,gl=0,j&6)throw Error(g(331));var l=j;for(j|=4,_=e.current;_!==null;){var o=_,i=o.child;if(_.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sq()-Qi?Vt(e,0):Wi|=n),Ee(e,t)}function Ec(e,t){t===0&&(e.mode&1?(t=Nr,Nr<<=1,!(Nr&130023424)&&(Nr=4194304)):t=1);var n=he();e=lt(e,t),e!==null&&(vr(e,t,n),Ee(e,n))}function Xd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ec(e,n)}function Gd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(t),Ec(e,n)}var kc;kc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||we.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,jd(e,t,n);ge=!!(e.flags&131072)}else ge=!1,K&&t.flags&1048576&&_a(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kr(e,t),e=t.pendingProps;var l=wn(t,de.current);mn(t,n),l=Ui(null,t,r,e,l,n);var o=$i();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Se(r)?(o=!0,ul(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Mi(t),l.updater=Ll,t.stateNode=l,l._reactInternals=t,Wo(t,r,e,n),t=Yo(null,t,r,!0,o,n)):(t.tag=0,K&&o&&Ni(t),pe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Jd(r),e=Ue(r,e),l){case 0:t=Ko(null,t,r,e,n);break e;case 1:t=Zu(null,t,r,e,n);break e;case 11:t=Xu(null,t,r,e,n);break e;case 14:t=Gu(null,t,r,Ue(r.type,e),n);break e}throw Error(g(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),Ko(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),Zu(e,t,r,l,n);case 3:e:{if(oc(t),e===null)throw Error(g(387));r=t.pendingProps,o=t.memoizedState,l=o.element,za(e,t),dl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=xn(Error(g(423)),t),t=Ju(e,t,r,n,l);break e}else if(r!==l){l=xn(Error(g(424)),t),t=Ju(e,t,r,n,l);break e}else for(Ce=wt(t.stateNode.containerInfo.firstChild),_e=t,K=!0,Be=null,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Sn(),r===l){t=ot(e,t,n);break e}pe(e,t,r,n)}t=t.child}return t;case 5:return Ra(t),e===null&&Vo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,jo(r,l)?i=null:o!==null&&jo(r,o)&&(t.flags|=32),lc(e,t),pe(e,t,i,n),t.child;case 6:return e===null&&Vo(t),null;case 13:return ic(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=En(t,null,r,n):pe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),Xu(e,t,r,l,n);case 7:return pe(e,t,t.pendingProps,n),t.child;case 8:return pe(e,t,t.pendingProps.children,n),t.child;case 12:return pe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,B(cl,r._currentValue),r._currentValue=i,o!==null)if(He(o.value,i)){if(o.children===l.children&&!we.current){t=ot(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=tt(-1,n&-n),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var v=c.pending;v===null?s.next=s:(s.next=v.next,v.next=s),c.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Ao(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(g(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ao(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}pe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,mn(t,n),l=Me(l),r=r(l),t.flags|=1,pe(e,t,r,n),t.child;case 14:return r=t.type,l=Ue(r,t.pendingProps),l=Ue(r.type,l),Gu(e,t,r,l,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),Kr(e,t),t.tag=1,Se(r)?(e=!0,ul(t)):e=!1,mn(t,n),Oa(t,r,l),Wo(t,r,l,n),Yo(null,t,r,!0,e,n);case 19:return uc(e,t,n);case 22:return rc(e,t,n)}throw Error(g(156,t.tag))};function xc(e,t){return Gs(e,t)}function Zd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,n,r){return new Zd(e,t,n,r)}function Gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jd(e){if(typeof e=="function")return Gi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hi)return 11;if(e===vi)return 14}return 2}function xt(e,t){var n=e.alternate;return n===null?(n=Oe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Gi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case en:return At(n.children,l,o,t);case pi:i=8,l|=8;break;case ho:return e=Oe(12,n,t,l|2),e.elementType=ho,e.lanes=o,e;case vo:return e=Oe(13,n,t,l),e.elementType=vo,e.lanes=o,e;case mo:return e=Oe(19,n,t,l),e.elementType=mo,e.lanes=o,e;case Is:return Il(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ts:i=10;break e;case Os:i=9;break e;case hi:i=11;break e;case vi:i=14;break e;case ct:i=16,r=null;break e}throw Error(g(130,e==null?e:typeof e,""))}return t=Oe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function At(e,t,n,r){return e=Oe(7,e,r,t),e.lanes=n,e}function Il(e,t,n,r){return e=Oe(22,e,r,t),e.elementType=Is,e.lanes=n,e.stateNode={isHidden:!1},e}function so(e,t,n){return e=Oe(6,e,null,t),e.lanes=n,e}function ao(e,t,n){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hl(0),this.expirationTimes=Hl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Zi(e,t,n,r,l,o,i,u,s){return e=new qd(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mi(o),e}function bd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Pc)}catch(e){console.error(e)}}Pc(),_s.exports=Pe;var lp=_s.exports,as=lp;fo.createRoot=as.createRoot,fo.hydrateRoot=as.hydrateRoot;const m=Object.freeze({Text:"Text",NumericLiteral:"NumericLiteral",BooleanLiteral:"BooleanLiteral",StringLiteral:"StringLiteral",Identifier:"Identifier",Equals:"Equals",OpenParen:"OpenParen",CloseParen:"CloseParen",OpenStatement:"OpenStatement",CloseStatement:"CloseStatement",OpenExpression:"OpenExpression",CloseExpression:"CloseExpression",OpenSquareBracket:"OpenSquareBracket",CloseSquareBracket:"CloseSquareBracket",Comma:"Comma",Dot:"Dot",Colon:"Colon",Pipe:"Pipe",CallOperator:"CallOperator",AdditiveBinaryOperator:"AdditiveBinaryOperator",MultiplicativeBinaryOperator:"MultiplicativeBinaryOperator",ComparisonBinaryOperator:"ComparisonBinaryOperator",UnaryOperator:"UnaryOperator",Set:"Set",If:"If",For:"For",In:"In",Is:"Is",NotIn:"NotIn",Else:"Else",EndIf:"EndIf",ElseIf:"ElseIf",EndFor:"EndFor",And:"And",Or:"Or",Not:"UnaryOperator"}),cs=Object.freeze({set:m.Set,for:m.For,in:m.In,is:m.Is,if:m.If,else:m.Else,endif:m.EndIf,elif:m.ElseIf,endfor:m.EndFor,and:m.And,or:m.Or,not:m.Not,"not in":m.NotIn,true:m.BooleanLiteral,false:m.BooleanLiteral});class It{constructor(t,n){this.value=t,this.type=n}}function fs(e){return/\w/.test(e)}function co(e){return/[0-9]/.test(e)}const op=[["{%",m.OpenStatement],["%}",m.CloseStatement],["{{",m.OpenExpression],["}}",m.CloseExpression],["(",m.OpenParen],[")",m.CloseParen],["[",m.OpenSquareBracket],["]",m.CloseSquareBracket],[",",m.Comma],[".",m.Dot],[":",m.Colon],["|",m.Pipe],["<=",m.ComparisonBinaryOperator],[">=",m.ComparisonBinaryOperator],["==",m.ComparisonBinaryOperator],["!=",m.ComparisonBinaryOperator],["<",m.ComparisonBinaryOperator],[">",m.ComparisonBinaryOperator],["+",m.AdditiveBinaryOperator],["-",m.AdditiveBinaryOperator],["*",m.MultiplicativeBinaryOperator],["/",m.MultiplicativeBinaryOperator],["%",m.MultiplicativeBinaryOperator],["=",m.Equals]],ip=new Map([["n",` `],["t"," "],["r","\r"],["b","\b"],["f","\f"],["v","\v"],["'","'"],['"','"'],["\\","\\"]]);function up(e,t={}){return e.endsWith(` `)&&(e=e.slice(0,-1)),t.trim_blocks&&(e=e.replace(/%}\n/g,"%}")),t.lstrip_blocks&&(e=e.replace(/^[ \t]*{%/gm,"{%")),e.replace(/-%}\s*/g,"%}").replace(/\s*{%-/g,"{%").replace(/-}}\s*/g,"}}").replace(/\s*{{-/g,"{{")}function sp(e,t={}){var i,u,s;const n=[],r=up(e,t);let l=0;const o=c=>{let v="";for(;c(r[l]);){if(r[l]==="\\"){if(++l,l>=r.length)throw new SyntaxError("Unexpected end of input");const p=r[l++],h=ip.get(p);if(h===void 0)throw new SyntaxError(`Unexpected escaped character: ${p}`);v+=h;continue}if(v+=r[l++],l>=r.length)throw new SyntaxError("Unexpected end of input")}return v};e:for(;l0){n.push(new It(p,m.Text));continue}}o(p=>/\s/.test(p));const v=r[l];if(v==="-"||v==="+"){const p=(u=n.at(-1))==null?void 0:u.type;if(p===m.Text||p===void 0)throw new SyntaxError(`Unexpected character: ${v}`);switch(p){case m.Identifier:case m.NumericLiteral:case m.BooleanLiteral:case m.StringLiteral:case m.CloseParen:case m.CloseSquareBracket:break;default:{++l;const h=o(co);n.push(new It(`${v}${h}`,h.length>0?m.NumericLiteral:m.UnaryOperator));continue}}}for(const[p,h]of op)if(r.slice(l,l+p.length)===p){n.push(new It(p,h)),l+=p.length;continue e}if(v==="'"){++l;const p=o(h=>h!=="'");n.push(new It(p,m.StringLiteral)),++l;continue}if(co(v)){const p=o(co);n.push(new It(p,m.NumericLiteral));continue}if(fs(v)){const p=o(fs),h=Object.hasOwn(cs,p)?cs[p]:m.Identifier;h===m.In&&((s=n.at(-1))==null?void 0:s.type)===m.Not?(n.pop(),n.push(new It("not in",m.NotIn))):n.push(new It(p,h));continue}throw new SyntaxError(`Unexpected character: ${v}`)}return n}class wr{constructor(){R(this,"type","Statement")}}class ap extends wr{constructor(n){super();R(this,"type","Program");this.body=n}}class cp extends wr{constructor(n,r,l){super();R(this,"type","If");this.test=n,this.body=r,this.alternate=l}}class fp extends wr{constructor(n,r,l){super();R(this,"type","For");this.loopvar=n,this.iterable=r,this.body=l}}class dp extends wr{constructor(n,r){super();R(this,"type","Set");this.assignee=n,this.value=r}}class Ge extends wr{constructor(){super(...arguments);R(this,"type","Expression")}}class pp extends Ge{constructor(n,r,l){super();R(this,"type","MemberExpression");this.object=n,this.property=r,this.computed=l}}class hp extends Ge{constructor(n,r){super();R(this,"type","CallExpression");this.callee=n,this.args=r}}class qt extends Ge{constructor(n){super();R(this,"type","Identifier");this.value=n}}class eu extends Ge{constructor(n){super();R(this,"type","Literal");this.value=n}}class vp extends eu{constructor(){super(...arguments);R(this,"type","NumericLiteral")}}class ds extends eu{constructor(n){super(n);R(this,"type","StringLiteral")}}class ps extends eu{constructor(){super(...arguments);R(this,"type","BooleanLiteral")}}class jn extends Ge{constructor(n,r,l){super();R(this,"type","BinaryExpression");this.operator=n,this.left=r,this.right=l}}class mp extends Ge{constructor(n,r){super();R(this,"type","FilterExpression");this.operand=n,this.filter=r}}class yp extends Ge{constructor(n,r,l){super();R(this,"type","TestExpression");this.operand=n,this.negate=r,this.test=l}}class gp extends Ge{constructor(n,r){super();R(this,"type","UnaryExpression");this.operator=n,this.argument=r}}class wp extends Ge{constructor(n=void 0,r=void 0,l=void 0){super();R(this,"type","SliceExpression");this.start=n,this.stop=r,this.step=l}}class Sp extends Ge{constructor(n,r){super();R(this,"type","KeywordArgumentExpression");this.key=n,this.value=r}}function Ep(e){const t=new ap([]);let n=0;function r(w,z){const O=e[n++];if(!O||O.type!==w)throw new Error(`Parser Error: ${z}. ${O.type} !== ${w}.`);return O}function l(){switch(e[n].type){case m.Text:return u();case m.OpenStatement:return s();case m.OpenExpression:return c();default:throw new SyntaxError(`Unexpected token type: ${e[n].type}`)}}function o(...w){return n+w.length<=e.length&&w.some((z,O)=>z!==e[n+O].type)}function i(...w){return n+w.length<=e.length&&w.every((z,O)=>z===e[n+O].type)}function u(){return new ds(r(m.Text,"Expected text token").value)}function s(){r(m.OpenStatement,"Expected opening statement token");let w;switch(e[n].type){case m.Set:++n,w=v(),r(m.CloseStatement,"Expected closing statement token");break;case m.If:++n,w=p(),r(m.OpenStatement,"Expected {% token"),r(m.EndIf,"Expected endif token"),r(m.CloseStatement,"Expected %} token");break;case m.For:++n,w=h(),r(m.OpenStatement,"Expected {% token"),r(m.EndFor,"Expected endfor token"),r(m.CloseStatement,"Expected %} token");break;default:throw new SyntaxError(`Unknown statement type: ${e[n].type}`)}return w}function c(){r(m.OpenExpression,"Expected opening expression token");const w=S();return r(m.CloseExpression,"Expected closing expression token"),w}function v(){const w=S();if(i(m.Equals)){++n;const z=v();return new dp(w,z)}return w}function p(){var Ze,Zt,x,T,I,W,J,zt;const w=S();r(m.CloseStatement,"Expected closing statement token");const z=[],O=[];for(;!(((Ze=e[n])==null?void 0:Ze.type)===m.OpenStatement&&(((Zt=e[n+1])==null?void 0:Zt.type)===m.ElseIf||((x=e[n+1])==null?void 0:x.type)===m.Else||((T=e[n+1])==null?void 0:T.type)===m.EndIf));)z.push(l());if(((I=e[n])==null?void 0:I.type)===m.OpenStatement&&((W=e[n+1])==null?void 0:W.type)!==m.EndIf)if(++n,i(m.ElseIf))r(m.ElseIf,"Expected elseif token"),O.push(p());else for(r(m.Else,"Expected else token"),r(m.CloseStatement,"Expected closing statement token");!(((J=e[n])==null?void 0:J.type)===m.OpenStatement&&((zt=e[n+1])==null?void 0:zt.type)===m.EndIf);)O.push(l());return new cp(w,z,O)}function h(){const w=Fe();if(!(w instanceof qt))throw new SyntaxError("Expected identifier for the loop variable");r(m.In,"Expected `in` keyword following loop variable");const z=S();r(m.CloseStatement,"Expected closing statement token");const O=[];for(;o(m.OpenStatement,m.EndFor);)O.push(l());return new fp(w,z,O)}function S(){return E()}function E(){let w=k();for(;i(m.Or);){const z=e[n];++n;const O=k();w=new jn(z,w,O)}return w}function k(){let w=$();for(;i(m.And);){const z=e[n];++n;const O=$();w=new jn(z,w,O)}return w}function $(){let w;for(;i(m.Not);){const z=e[n];++n;const O=$();w=new gp(z,O)}return w??f()}function f(){let w=a();for(;i(m.ComparisonBinaryOperator)||i(m.In)||i(m.NotIn);){const z=e[n];++n;const O=a();w=new jn(z,w,O)}return w}function a(){let w=H();for(;i(m.AdditiveBinaryOperator);){const z=e[n];++n;const O=H();w=new jn(z,w,O)}return w}function d(){const w=L();return i(m.OpenParen)?y(w):w}function y(w){let z=new hp(w,C());return i(m.OpenParen)&&(z=y(z)),z}function C(){r(m.OpenParen,"Expected opening parenthesis for arguments list");const w=N();return r(m.CloseParen,"Expected closing parenthesis for arguments list"),w}function N(){const w=[];for(;!i(m.CloseParen);){let z=S();if(i(m.Equals)){if(++n,!(z instanceof qt))throw new SyntaxError("Expected identifier for keyword argument");const O=S();z=new Sp(z,O)}w.push(z),i(m.Comma)&&++n}return w}function P(){const w=[];let z=!1;for(;!i(m.CloseSquareBracket);)i(m.Colon)?(w.push(void 0),++n,z=!0):(w.push(S()),i(m.Colon)&&(++n,z=!0));if(w.length===0)throw new SyntaxError("Expected at least one argument for member/slice expression");if(z){if(w.length>3)throw new SyntaxError("Expected 0-3 arguments for slice expression");return new wp(...w)}return w[0]}function L(){let w=Fe();for(;i(m.Dot)||i(m.OpenSquareBracket);){const z=e[n];++n;let O;const Ze=z.type!==m.Dot;if(Ze)O=P(),r(m.CloseSquareBracket,"Expected closing square bracket");else if(O=Fe(),O.type!=="Identifier")throw new SyntaxError("Expected identifier following dot operator");w=new pp(w,O,Ze)}return w}function H(){let w=M();for(;i(m.MultiplicativeBinaryOperator);){const z=e[n];++n;const O=M();w=new jn(z,w,O)}return w}function M(){let w=ke();for(;i(m.Is);){++n;const z=i(m.Not);z&&++n;let O=Fe();if(O instanceof ps&&(O=new qt(O.value.toString())),!(O instanceof qt))throw new SyntaxError("Expected identifier for the test");w=new yp(w,z,O)}return w}function ke(){let w=d();for(;i(m.Pipe);){++n;const z=Fe();if(!(z instanceof qt))throw new SyntaxError("Expected identifier for the filter");w=new mp(w,z)}return w}function Fe(){const w=e[n];switch(w.type){case m.NumericLiteral:return++n,new vp(Number(w.value));case m.StringLiteral:return++n,new ds(w.value);case m.BooleanLiteral:return++n,new ps(w.value==="true");case m.Identifier:return++n,new qt(w.value);case m.OpenParen:{++n;const z=S();if(e[n].type!==m.CloseParen)throw new SyntaxError("Expected closing parenthesis");return++n,z}default:throw new SyntaxError(`Unexpected token: ${w.type}`)}}for(;n=0?(t=(t??(t=0))<0?Math.max(e.length+t,0):Math.min(t,e.length),n=(n??(n=e.length))<0?Math.max(e.length+n,0):Math.min(n,e.length)):(t=(t??(t=e.length-1))<0?Math.max(e.length+t,-1):Math.min(t,e.length-1),n=(n??(n=-1))<-1?Math.max(e.length+n,-1):Math.min(n,e.length-1));const o=[];for(let i=t;l*it.toUpperCase())}class ut{constructor(t=void 0){R(this,"type","RuntimeValue");R(this,"value");R(this,"builtins",new Map);this.value=t}__bool__(){return new ee(!!this.value)}}class Q extends ut{constructor(){super(...arguments);R(this,"type","NumericValue")}}class D extends ut{constructor(){super(...arguments);R(this,"type","StringValue");R(this,"builtins",new Map([["upper",new Bt(()=>new D(this.value.toUpperCase()))],["lower",new Bt(()=>new D(this.value.toLowerCase()))],["strip",new Bt(()=>new D(this.value.trim()))],["title",new Bt(()=>new D(Lc(this.value)))],["length",new Q(this.value.length)]]))}}class ee extends ut{constructor(){super(...arguments);R(this,"type","BooleanValue")}}class $t extends ut{constructor(){super(...arguments);R(this,"type","ObjectValue")}__bool__(){return new ee(this.value.size>0)}}class De extends ut{constructor(){super(...arguments);R(this,"type","ArrayValue");R(this,"builtins",new Map([["length",new Q(this.value.length)]]))}__bool__(){return new ee(this.value.length>0)}}class Bt extends ut{constructor(){super(...arguments);R(this,"type","FunctionValue")}}class Zn extends ut{constructor(){super(...arguments);R(this,"type","NullValue")}}class at extends ut{constructor(){super(...arguments);R(this,"type","UndefinedValue")}}class oi{constructor(t){R(this,"variables",new Map([["namespace",new Bt(t=>{if(t.length===0)return new $t(new Map);if(t.length!==1||!(t[0]instanceof $t))throw new Error("`namespace` expects either zero arguments or a single object argument");return t[0]})]]));this.parent=t}set(t,n){return this.declareVariable(t,Zr(n))}declareVariable(t,n){if(this.variables.has(t))throw new SyntaxError(`Variable already declared: ${t}`);return this.variables.set(t,n),n}setVariable(t,n){let r;try{r=this.resolve(t)}catch{}return(r??this).variables.set(t,n),n}resolve(t){if(this.variables.has(t))return this;if(this.parent)return this.parent.resolve(t);throw new Error(`Unknown variable: ${t}`)}lookupVariable(t){return this.resolve(t).variables.get(t)??new Zn}}class xp{constructor(t){R(this,"global");this.global=t??new oi}run(t){return this.evaluate(t,this.global)}evaluateBinaryExpression(t,n){const r=this.evaluate(t.left,n);switch(t.operator.value){case"and":return r.__bool__().value?this.evaluate(t.right,n):r;case"or":return r.__bool__().value?r:this.evaluate(t.right,n)}const l=this.evaluate(t.right,n);switch(t.operator.value){case"==":return new ee(r.value==l.value);case"!=":return new ee(r.value!=l.value)}if(r instanceof at||l instanceof at)throw new Error("Cannot perform operation on undefined values");if(r instanceof Zn||l instanceof Zn)throw new Error("Cannot perform operation on null values");if(r instanceof Q&&l instanceof Q)switch(t.operator.value){case"+":return new Q(r.value+l.value);case"-":return new Q(r.value-l.value);case"*":return new Q(r.value*l.value);case"/":return new Q(r.value/l.value);case"%":return new Q(r.value%l.value);case"<":return new ee(r.value":return new ee(r.value>l.value);case">=":return new ee(r.value>=l.value);case"<=":return new ee(r.value<=l.value)}else if(l instanceof De){const o=l.value.find(i=>i.value===r.value)!==void 0;switch(t.operator.value){case"in":return new ee(o);case"not in":return new ee(!o)}}if(r instanceof D||l instanceof D)switch(t.operator.value){case"+":return new D(r.value.toString()+l.value.toString())}if(r instanceof D&&l instanceof D)switch(t.operator.value){case"in":return new ee(l.value.includes(r.value));case"not in":return new ee(!l.value.includes(r.value))}throw new SyntaxError(`Unknown operator "${t.operator.value}" between ${r.type} and ${l.type}`)}evaluateFilterExpression(t,n){const r=this.evaluate(t.operand,n);if(r instanceof De)switch(t.filter.value){case"first":return r.value[0];case"last":return r.value[r.value.length-1];case"length":return new Q(r.value.length);case"reverse":return new De(r.value.reverse());case"sort":return new De(r.value.sort((l,o)=>{if(l.type!==o.type)throw new Error(`Cannot compare different types: ${l.type} and ${o.type}`);switch(l.type){case"NumericValue":return l.value-o.value;case"StringValue":return l.value.localeCompare(o.value);default:throw new Error(`Cannot compare type: ${l.type}`)}}));default:throw new Error(`Unknown ArrayValue filter: ${t.filter.value}`)}else if(r instanceof D)switch(t.filter.value){case"length":return new Q(r.value.length);case"upper":return new D(r.value.toUpperCase());case"lower":return new D(r.value.toLowerCase());case"title":return new D(Lc(r.value));case"capitalize":return new D(r.value.charAt(0).toUpperCase()+r.value.slice(1));case"trim":return new D(r.value.trim());default:throw new Error(`Unknown StringValue filter: ${t.filter.value}`)}else if(r instanceof Q)switch(t.filter.value){case"abs":return new Q(Math.abs(r.value));default:throw new Error(`Unknown NumericValue filter: ${t.filter.value}`)}throw new Error(`Cannot apply filter "${t.filter.value}" to type: ${r.type}`)}evaluateTestExpression(t,n){const r=(()=>{try{const l=this.evaluate(t.operand,n);switch(t.test.value){case"boolean":return l.type==="BooleanValue";case"callable":return l instanceof Bt;case"odd":if(l.type!=="NumericValue")throw new Error(`Cannot apply test "odd" to type: ${l.type}`);return l.value%2!==0;case"even":if(l.type!=="NumericValue")throw new Error(`Cannot apply test "even" to type: ${l.type}`);return l.value%2===0;case"false":return l.type==="BooleanValue"&&!l.value;case"true":return l.type==="BooleanValue"&&l.value;case"number":return l.type==="NumericValue";case"integer":return l.type==="NumericValue"&&Number.isInteger(l.value);case"iterable":return l instanceof De||l instanceof D;case"lower":{const o=l.value;return l.type==="StringValue"&&o===o.toLowerCase()}case"upper":{const o=l.value;return l.type==="StringValue"&&o===o.toUpperCase()}case"none":return l.type==="NullValue";case"defined":return!0;case"undefined":return!1}throw new Error(`Unknown test: ${t.test.value}`)}catch(l){if(t.operand.type==="Identifier"){if(t.test.value==="defined")return!1;if(t.test.value==="undefined")return!0}throw l}})();return new ee(t.negate?!r:r)}evaluateUnaryExpression(t,n){const r=this.evaluate(t.argument,n);switch(t.operator.value){case"not":return new ee(!r.value);default:throw new SyntaxError(`Unknown operator: ${t.operator.value}`)}}evalProgram(t,n){return this.evaluateBlock(t.body,n)}evaluateBlock(t,n){let r="";for(const l of t){const o=this.evaluate(l,n);o.type!=="NullValue"&&(r+=o.value)}return new D(r)}evaluateIdentifier(t,n){return n.lookupVariable(t.value)}evaluateCallExpression(t,n){const r=[],l=new Map;for(const i of t.args)if(i.type==="KeywordArgumentExpression"){const u=i;l.set(u.key.value,this.evaluate(u.value,n))}else r.push(this.evaluate(i,n));l.size>0&&r.push(new $t(l));const o=this.evaluate(t.callee,n);if(o.type!=="FunctionValue")throw new Error(`Cannot call something that is not a function: got ${o.type}`);return o.value(r,n)}evaluateSliceExpression(t,n,r){if(!(t instanceof De||t instanceof D))throw new Error("Slice object must be an array or string");const l=this.evaluate(n.start,r),o=this.evaluate(n.stop,r),i=this.evaluate(n.step,r);if(!(l instanceof Q||l instanceof at))throw new Error("Slice start must be numeric or undefined");if(!(o instanceof Q||o instanceof at))throw new Error("Slice stop must be numeric or undefined");if(!(i instanceof Q||i instanceof at))throw new Error("Slice step must be numeric or undefined");return t instanceof De?new De(hs(t.value,l.value,o.value,i.value)):new D(hs(Array.from(t.value),l.value,o.value,i.value).join(""))}evaluateMemberExpression(t,n){const r=this.evaluate(t.object,n);let l;if(t.computed){if(t.property.type==="SliceExpression")return this.evaluateSliceExpression(r,t.property,n);l=this.evaluate(t.property,n)}else l=new D(t.property.value);let o;if(r instanceof $t){if(!(l instanceof D))throw new Error(`Cannot access property with non-string: got ${l.type}`);o=r.value.get(l.value)??r.builtins.get(l.value)}else if(r instanceof De||r instanceof D)if(l instanceof Q)o=r.value.at(l.value),r instanceof D&&(o=new D(r.value.at(l.value)));else if(l instanceof D)o=r.builtins.get(l.value);else throw new Error(`Cannot access property with non-string/non-number: got ${l.type}`);else{if(!(l instanceof D))throw new Error(`Cannot access property with non-string: got ${l.type}`);o=r.builtins.get(l.value)}if(!(o instanceof ut))throw new Error(`${r.type} has no property '${l.value}'`);return o}evaluateSet(t,n){const r=this.evaluate(t.value,n);if(t.assignee.type==="Identifier"){const l=t.assignee.value;n.setVariable(l,r)}else if(t.assignee.type==="MemberExpression"){const l=t.assignee,o=this.evaluate(l.object,n);if(!(o instanceof $t))throw new Error("Cannot assign to member of non-object");if(l.property.type!=="Identifier")throw new Error("Cannot assign to member with non-identifier property");o.value.set(l.property.value,r)}else throw new Error(`Invalid LHS inside assignment expression: ${JSON.stringify(t.assignee)}`);return new Zn}evaluateIf(t,n){const r=this.evaluate(t.test,n);return this.evaluateBlock(r.__bool__().value?t.body:t.alternate,n)}evaluateFor(t,n){const r=new oi(n),l=this.evaluate(t.iterable,r);if(!(l instanceof De))throw new Error(`Expected iterable type in for loop: got ${l.type}`);let o="";for(let i=0;i0?l.value[i-1]:new at],["nextitem",i[t,Zr(n)])));case"function":return new Bt((t,n)=>{const r=e(...t.map(l=>l.value))??null;return Zr(r)});default:throw new Error(`Cannot convert to runtime value: ${e}`)}}class Cp{constructor(t){R(this,"parsed");const n=sp(t,{lstrip_blocks:!0,trim_blocks:!0});this.parsed=Ep(n)}render(t){const n=new oi;n.set("false",!1),n.set("true",!0),n.set("raise_exception",o=>{throw new Error(o)}),n.set("range",kp);for(const[o,i]of Object.entries(t))n.set(o,i);return new xp(n).run(this.parsed).value}}function _p(e,t={}){return new Cp(e).render(t)}const Np=[{role:"system",content:"You are a friendly chatbot who always responds in the style of a pirate"},{role:"user",content:"How many helicopters can a human eat in one sitting?"}],Pp=JSON.stringify(Np,null,2),Lp=()=>{const[e,t]=Ft.useState([{name:"add_generation_prompt",value:"true"},{name:"eos_token",value:""},{name:"messages",value:Pp}]),[n,r]=Ft.useState(`{% for message in messages %} {% if message['role'] == 'user' %} {{ '<|user|> ' + message['content'] + eos_token }} {% elif message['role'] == 'system' %} {{ '<|system|> ' + message['content'] + eos_token }} {% elif message['role'] == 'assistant' %} {{ '<|assistant|> ' + message['content'] + eos_token }} {% endif %} {% if loop.last and add_generation_prompt %} {{ '<|assistant|>' }} {% endif %} {% endfor %}`),[l,o]=Ft.useState();Ft.useEffect(()=>{if(n)try{const u=e.reduce((c,{name:v,value:p})=>{let h=p;try{h=JSON.parse(p)}catch{}return{...c,[v]:h}},{}),s=_p(n,u);o(s)}catch(u){o(u.message)}},[n,e]);const i=(u,s,c)=>{const v=e.map((p,h)=>h===u?{...p,[s]:c}:p);t(v)};return ce.jsxs("div",{className:"grid grid-cols-2 gap-4 h-screen p-8 bg-[#f3f4f6]",children:[ce.jsxs("div",{className:"flex flex-col p-6 rounded-md",children:[ce.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Template"}),ce.jsx("textarea",{onChange:u=>r(u.target.value),className:"flex h-[40vh] min-h-[80px] w-full rounded-md border border-input px-2 py-2 text-md ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 mb-4",placeholder:"Enter your Jinja template here.",value:n,spellCheck:!1}),ce.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Variables"}),ce.jsx("div",{className:"max-h-[25vh] overflow-y-scroll px-2 py-1",children:e.map((u,s)=>ce.jsxs("div",{className:"flex mb-4",children:[ce.jsx("input",{className:"flex grow w-[30%] h-10 rounded-md border border-input px-2 py-2 text-sm ring-offset-background file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 mr-2",placeholder:"Name",type:"text",value:u.name,onChange:c=>i(s,"name",c.target.value)}),ce.jsx("textarea",{rows:u.name==="messages"?9:2,className:"flex w-full rounded-md border border-input px-2 py-2 text-sm ring-offset-background file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 mr-2",placeholder:"Value",value:u.value,onChange:c=>i(s,"value",c.target.value)}),ce.jsx("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-red-500 text-white hover:bg-destructive/90 h-10 px-4 py-2",onClick:()=>t(e.filter((c,v)=>v!==s)),children:"Delete"})]},s))}),ce.jsx("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring bg-black/90 text-white hover:bg-black h-10 px-4 py-2",onClick:()=>t([...e,{name:"",value:""}]),children:"Add"})]}),ce.jsxs("div",{className:"flex flex-col p-6 rounded-md",children:[ce.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Rendered Text"}),ce.jsx("textarea",{className:"flex h-[40vh] min-h-[80px] w-full rounded-md border border-input px-2 py-2 text-md ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 mb-4",placeholder:"The rendered template will appear here.",value:l})]})]})};fo.createRoot(document.getElementById("root")).render(ce.jsx(Yc.StrictMode,{children:ce.jsx(Lp,{})}));