@benbraide/inlinejs-stripe 1.0.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- (()=>{var e={866:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AddChanges:()=>X,AddDirectiveExpansionRule:()=>J,AddDirectiveHandler:()=>Pt,AddMagicHandler:()=>Jt,AddOutsideEventExcept:()=>ke,AddOutsideEventListener:()=>xe,ApplyDirectiveExpansionRules:()=>z,AreObjects:()=>g,AttributeInterpolator:()=>kt,AutoBootstrap:()=>Gt,BaseComponent:()=>Pe,BaseGlobal:()=>Te,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>zt,BindEvent:()=>$t,BootstrapAndAttach:()=>St,BuildGetterProxyOptions:()=>We,BuildIntersectionOptions:()=>Dt,BuildProxyOptions:()=>qe,CallIfFunction:()=>nt,Changes:()=>pe,ChildProxy:()=>Fe,ClassDirectiveExpansionRule:()=>Ut,Config:()=>$e,Context:()=>me,ContextKeys:()=>d,CreateAnimationLoop:()=>I,CreateChildProxy:()=>te,CreateDirective:()=>q,CreateDirectiveExpansionRule:()=>L,CreateDirectiveHandlerCallback:()=>wt,CreateGlobal:()=>De,CreateInplaceProxy:()=>He,CreateLoop:()=>k,CreateMagicHandlerCallback:()=>Ht,CreateReadonlyProxy:()=>ze,DeepCopy:()=>_,DefaultTransitionDelay:()=>pt,DefaultTransitionDuration:()=>ht,DefaultTransitionRepeats:()=>mt,DeleteProxyProp:()=>ee,DirectiveManager:()=>ge,DisableProxyAction:()=>Ue,DispatchDirective:()=>B,ElementScope:()=>Se,ElementScopeKey:()=>V,EndsWith:()=>b,EvaluateLater:()=>it,EvaluateMagicProperty:()=>Z,ExtractDuration:()=>Bt,FindComponentById:()=>R,FindComponentByName:()=>T,FindComponentByRoot:()=>N,FlattenDirective:()=>M,ForwardEvent:()=>Ot,Future:()=>i,GenerateFunctionFromString:()=>rt,GenerateUniqueId:()=>ce,GenerateValueReturningFunction:()=>et,GenerateVoidFunction:()=>tt,GenericProxy:()=>ie,GetAttribute:()=>E,GetConfig:()=>j,GetDefaultUniqueMarkers:()=>se,GetDirectiveValue:()=>Rt,GetElementContent:()=>Ct,GetElementScopeId:()=>Y,GetGlobal:()=>je,GetLocal:()=>ct,GetOrCreateGlobal:()=>Me,GetProxyProp:()=>ne,GetTarget:()=>p,GetTargets:()=>m,GlobalCreatedEvent:()=>Be,IncrementUniqueMarkers:()=>le,InferComponent:()=>Q,InitComponentCache:()=>$,InitJITProxy:()=>Ve,InlineJS:()=>Vt,InlineJSGlobalKey:()=>Ne,InsertHtml:()=>gt,Interpolate:()=>At,InterpolateText:()=>xt,IntersectionObserver:()=>Mt,IsEqual:()=>x,IsObject:()=>v,JoinPath:()=>w,JoinUniqueMarkers:()=>ae,JournalError:()=>o,JournalLog:()=>Wt,JournalTry:()=>s,JournalWarn:()=>D,LazyCheck:()=>Lt,Loop:()=>l,MagicManager:()=>we,MeasureCallback:()=>A,MutationObserver:()=>Oe,NativeFetchConcept:()=>Re,NextTick:()=>_t,Nothing:()=>a,OnDirectiveExpansionRule:()=>qt,PathToRelative:()=>G,PeekCurrentComponent:()=>he,PeekCurrentScope:()=>ye,PopCurrentComponent:()=>de,PopCurrentScope:()=>be,ProcessDirectives:()=>K,ProxyKeys:()=>h,PushCurrentComponent:()=>ue,PushCurrentScope:()=>_e,QueryGlobalComponent:()=>dt,RemoveDirectiveExpansionRule:()=>H,RemoveOutsideEventListener:()=>Ae,ReplaceText:()=>Et,ResolveKeyValue:()=>Tt,ResolveOptions:()=>jt,ResolveTransition:()=>ft,RootProxy:()=>oe,Scope:()=>Ge,SetAttributeUtil:()=>O,SetProxyProp:()=>re,SplitPath:()=>P,Stack:()=>r,StreamData:()=>ot,SubscribeToChanges:()=>lt,SupportsAttributes:()=>y,TextContentInterpolator:()=>It,TidyPath:()=>S,ToCamelCase:()=>u,ToString:()=>Je,TraverseDirectives:()=>W,UnbindOutsideEvent:()=>Ie,UseEffect:()=>at,WaitForGlobal:()=>Le,WaitPromise:()=>Ye,WaitTransition:()=>vt,WaitWhile:()=>st});class r{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class i{constructor(e){this.callback_=e}Get(){return this.callback_()}}function o(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){o(e,t,n)}}class l{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class a{}function c(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function u(e,t,n){let[r="",...i]=e.trim().split(n||"-"),o=e=>e.charAt(0).toUpperCase()+e.substring(1);return r&&(t?o(r):r)+(i||[]).map((e=>o(e))).join("")}const d={self:"self",event:"event",scope:"scope"},h={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function p(e){return(Array.isArray(e)||e&&"object"==typeof e)&&h.target in e?p(e[h.target]):e}function m(e){return e.map((e=>p(e)))}function f(e){return(e=p(e))&&"object"==typeof e&&(h.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function v(e){return!!f(e)}function g(e){return-1==e.findIndex((e=>!f(e)))}function _(e){if(e=p(e),!Array.isArray(e)&&!v(e))return e;if(Array.isArray(e))return e.map((e=>_(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=_(n))),t}function b(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function y(e){return(e=p(e))&&"getAttribute"in e&&"setAttribute"in e}function C(e,t){return t&&y(e)?e.getAttribute(t):null}function E(e,t){for(let n of Array.isArray(t)?t:[t]){let t=C(e,n);if(t)return t}return null}function x(e,t,n=!0){let[r,i]=n?m([e,t]):[e,t];if(r===i)return!0;if(Array.isArray(r)&&Array.isArray(i))return r.length==i.length&&-1==r.findIndex(((e,t)=>!x(e,i[t],n)));if(g([r,i])){let e=Object.keys(r),t=Object.keys(i);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!x(r[e],i[e],n)))}return r==i}function A(e){let t=performance.now();return e(),performance.now()-t}function k(e,t=1e3,n=0,r=0,i=!0){t=t||1;let o=0,s=e?Math.floor(e/t):-1,a=0,c=!1,u=0,d=(t,n,r)=>{let s=()=>{const i=A((()=>n({passes:t,elapsed:t*r,duration:e,abort:()=>c=!0})));if(i>r){const e=Math.floor((i-r)/r);t+=e,o=i-Math.floor(i/r)*r}};if(i){let e=++u;requestAnimationFrame((()=>e==u&&s()))}else s()},h=(i,l,u)=>{if(c)return u();if(a+=1,s>=0&&a>=s){if(!n)return l({passes:s,elapsed:s*t,duration:e});setTimeout((()=>setTimeout(h.bind(null,i,l,u),t)),r),o=0,d(s,i,r),n>0&&(n-=1)}else setTimeout(h.bind(null,i,l,u),t-o),o=0,d(a,i,t)};return new l(((e,n,r)=>{setTimeout(h.bind(null,e,n,r),t)}))}function I(e,t=1e3,n=0,r=0){let i=t,o=-1,s=-1,a=!1,c=0,u=(l,d,h)=>{if(a)return;-1==o&&(o=h);let p=h-o;if(e&&p>=e){if(!n)return d({passes:c,elapsed:p,duration:e});i=r,s=h,n>0&&(n-=1)}-1==s&&(s=h);let m=h-s;m>=i&&(s=h-(m-i),i=t,l({passes:++c,elapsed:p,duration:e,abort:()=>a=!0})),requestAnimationFrame(u.bind(null,l,d))};return new l(((e,t)=>{requestAnimationFrame(u.bind(null,e,t))}))}function S(e){return(e=e?e.trim():"")?e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"").replace(/^[\/?&=]+/,"").split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),""):""}function G(e,t,n){return(e=S(e))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function P(e,t,n){let r=(e=t?G(e,t,n):e).indexOf("?");return{base:-1==r?e:e.substring(0,r),query:-1==r?"":e.substring(r+1)}}function w({base:e,query:t},n,r,i){let o=`${S(e)}?${t}`;return o=n?G(o,n,r):S(o),o=i?S(`${n}/${o}`):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function O(e,t,n){t&&y(e)&&e.setAttribute(t,n)}const F="InlineJS_Comp_Cache";function $(){return globalThis[F]={id:"",component:null}}function R(e){let t=globalThis[F]=globalThis[F]||$();return e===t.id||(t.component=je().FindComponentById(e),t.id=t.component?e:""),t.component}function T(e){return je().FindComponentByName(e)}function N(e){return je().FindComponentByRoot(e)}function D(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function M(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function B(e,t,n,r=0){let i="string"==typeof e?R(e):e;if(!i)return o(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=i.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++r),l=l||je().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){let e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}return l?(0!=r||a||i.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},M(n)),{componentId:i.GetId(),component:i,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(D(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function j(){return je().GetConfig()}function L(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function J(e){return je().GetDirectiveManager().AddExpansionRule(e)}function H(e){je().GetDirectiveManager().RemoveExpansionRule(e)}function z(e){return je().GetDirectiveManager().Expand(e)}let U={};function q(e,t){if(!e||!(e=e.trim()))return null;if((t=t.trim())===e&&(t=""),e in U)return{meta:U[e],value:t};let n=z(e),r=n.match(j().GetDirectiveRegex());if(!r||3!=r.length||!r[2])return null;let i=r[2].indexOf(":"),o=-1==i?[r[2]]:[r[2].substring(0,i),r[2].substring(i+1)],s="",l="";o.length>1?[s,l]=o:[l]=o;let a=l.split("."),c="";s?c=a[0]:s=a[0],a.splice(0,1);let u=s.split("-"),d={view:{original:e,expanded:n},name:{value:s,joined:u.join("."),parts:u},arg:{key:c,options:a||[]}};return U[e]=d,{meta:d,value:t}}function W({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((r=>{try{n&&n(r.name,r.value||"");let e=q(r.name,r.value||"");e&&t(e)}catch(t){o(t,"InlineJS.TraverseDirectives",e)}}))}function K({component:e,element:t,options:n={}}){var r;if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||e instanceof HTMLTemplateElement||!e.closest("template"))}(t,n))return;let i="string"==typeof e?R(e):e;if(!i)return o("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let s=0;W({element:t,callback:n=>{B(e,t,n,s)&&(t.removeAttribute(n.meta.view.original),++s)},attributeCallback:(e,n)=>je().DispatchAttributeProcessing({name:e,value:n,componentId:i.GetId(),component:i,contextElement:t})}),je().DispatchTextContentProcessing({componentId:i.GetId(),component:i,contextElement:t}),n.ignoreChildren||t instanceof HTMLTemplateElement||(null==i||i.PushSelectionScope(),Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>K({component:e,options:n,element:t}))),null==i||i.PopSelectionScope()),null===(r=null==i?void 0:i.FindElementScope(t))||void 0===r||r.ExecutePostProcessCallbacks()}const V="__InlineJS_ELSCOPE_KEY__";function Y(e){let t="";for(;e;){if(t=V in(n=e)&&"string"==typeof n[V]?n[V]:"",t||e===document.body)return t||"";e=e.parentElement}var n;return""}function Q(e){let t=Y(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}function Z(e,t,n,r="",i=!0){let l="string"==typeof e?R(e):e;if(!l)return o(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),je().CreateNothing();let a=je().GetMagicManager().FindHandler(r&&n.startsWith(r)?n.substring(r.length):n,{contextElement:t,componentId:l.GetId(),component:l});if(!a){if(i&&r&&n.startsWith(`${r}${r}`)){let e=l.GetId();return t=>{let i=Q(t)||R(e);if(!i)return null;let o=i.FindElementScope(t),s=o&&o.GetLocal(n.substring(r.length));return o&&!je().IsNothing(s)?s:Z(i.GetId(),t,n,`${r}${r}`,!1)}}return je().CreateNothing()}return s((()=>a({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function X(e,t,n,r,i=!0){if(!r)return;let o={componentId:r.GetComponentId(),type:e,path:t,prop:n,origin:r.PeekOrigin()};if(r.Add(o),!i)return;let s=t.split(".");for(;s.length>2;)s.pop(),r.Add({original:o,path:s.join(".")})}function ee(e,t,n,r){var i;if(!(r in t))return!1;let o=R(e);return null===(i=null==o?void 0:o.FindProxy(n))||void 0===i||i.RemoveChild(r),delete t[r],null==o||o.RemoveProxy(`${n}.${r}`),X("delete",n,r,null==o?void 0:o.GetBackend().changes),!0}function te(e,t,n,r){if(!e)return null;let i=e.FindChild(t);if(i)return i;if(!Array.isArray(n)&&!v(n))return null;let o=je().CreateChildProxy(e,t,n);return r&&r.AddProxy(o),o}function ne(e,t,n,r,i){var o;if(r===h.target)return t;if(r===h.componentId)return e;if(r===h.name)return n.split(".").at(-1);if(r===h.path)return n;if(r===h.parentPath)return n.split(".").slice(0,-1).join(".")||"";let s=r in t;if(!s&&i){let t=i(R(e)||void 0,r);if(!je().IsNothing(t))return je().IsFuture(t)?t.Get():t}if(s&&!t.hasOwnProperty(r))return t[r];let l=s?t[r]:null;if(je().IsFuture(l))return l.Get();let a=R(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${r}`),(null===(o=te((null==a?void 0:a.FindProxy(n))||null,r,l,a||void 0))||void 0===o?void 0:o.GetNative())||l}function re(e,t,n,r,i){var o;if(r in t&&i===t[r])return!0;let s=R(e);return null===(o=null==s?void 0:s.FindProxy(n))||void 0===o||o.RemoveChild(r),t[r]=i,null==s||s.RemoveProxy(`${n}.${r}`),X("set",`${n}.${r}`,r,null==s?void 0:s.GetBackend().changes),!0}class ie{constructor(e,t,n,r,i=!1){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==r?void 0:r.GetPath())||"",null==r||r.AddChild(this);let o=this.componentId_,s=this.GetPath(),l=(e,t)=>{let{context:n}=null==e?void 0:e.GetBackend(),r=null==t?void 0:t.startsWith("$");if(r){let e=n.Peek(t.substring(1),je().CreateNothing());if(!je().IsNothing(e))return e}let i=n.Peek(d.self),o=null==e?void 0:e.FindElementLocalValue(i||e.GetRoot(),t,!0);if(!je().IsNothing(o))return o;let s=r?Z(e,i,t,"$"):je().CreateNothing();return je().IsNothing(s)&&t&&t in globalThis&&(s=globalThis[t]),s},a=!i&&!this.parentPath_,c={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):ne(o,e,s,t.toString(),a?l:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):re(o,e,s,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):ee(o,e,s,t.toString()),has:(e,t)=>"symbol"!=typeof t||Reflect.has(e,t)};this.native_=new window.Proxy(this.target_,c)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}}class oe extends ie{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,!!n)}}function se(){return{level0:0,level1:0,level2:0}}function le(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?le(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function ae(e){return`${e.level2}_${e.level1}_${e.level0}`}function ce(e,t,n,r){return le(e),`${t||""}${n||""}${ae(e)}${r||""}`}function ue(e){je().PushCurrentComponent(e)}function de(){return je().PopCurrentComponent()}function he(){return je().PeekCurrentComponent()}class pe{constructor(e){this.componentId_=e,this.nextTickHandlers_=new Array,this.isScheduled_=!1,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new r,this.origins_=new r}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule()}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;let e=new Array;this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{let r=e.find((e=>e.callback===n));r?r.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),e.forEach((e=>e.callback(e.changes))),this.nextTickHandlers_.splice(0).forEach((e=>{try{e()}catch(e){o(e,`InlineJs.Region<${this.componentId_}>.NextTick`)}}))})))}Add(e){this.list_.push(e),this.Schedule()}AddComposed(e,t,n){let r={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:r,path:n}):this.Add(r)}GetLastChange(e=0){return _(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,r,i;let o=(null===(t=R(he()||""))||void 0===t?void 0:t.GetBackend().changes)||this,s=e.lastIndexOf(".");this.lastAccessContext_=-1==s?"":e.substring(0,s);let l=o.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(r=l.details.raw)||void 0===r?void 0:r.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e)}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_=""}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new r}:void 0,raw:{entries:new Array,snapshots:new r}},lastAccessPath:""})}PopGetAccessStorage(){var e;return(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null}SwapOptimizedGetAccessStorage(){let e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries)}RestoreOptimizedGetAccessStorage(){var e;let t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0)}PushGetAccessStorageSnapshot(){var e,t;let n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e))))}PopGetAccessStorageSnapshot(e){var t,n,r,i;let o=this.getAccessStorages_.Peek(),s=null===(t=null==o?void 0:o.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&s&&(null===(n=null==o?void 0:o.details.optimized)||void 0===n?void 0:n.entries)&&(o.details.optimized.entries=s);let l=null===(r=null==o?void 0:o.details.raw)||void 0===r?void 0:r.snapshots.Pop();!e&&l&&(null===(i=null==o?void 0:o.details.raw)||void 0===i?void 0:i.entries)&&(o.details.raw.entries=l)}PopAllGetAccessStorageSnapshots(e){var t,n,r,i,o,s;let l=this.getAccessStorages_.Peek(),a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(r=null==l?void 0:l.details.optimized)||void 0===r?void 0:r.entries)&&(l.details.optimized.entries=a);let c=null===(i=null==l?void 0:l.details.raw)||void 0===i?void 0:i.snapshots.Pop();for(;(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.entries)&&(l.details.raw.entries=c)}PushOrigin(e){this.origins_.Push(e)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){return this.origins_.Pop()}Subscribe(e,t){var n;let r=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return r&&(this.subscribers_[r]={path:e,callback:t}),r||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,r])=>e===r.callback&&(!t||t===r.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e)}Unsubscribe_(e){delete this.subscribers_[e]}}class me{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new r).Push(t)}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}function fe(e,t,n){let r="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},r)):e(Object.assign({argKey:n},r))},extensions:{}}}(e):e;return r.extensions[t]=n,r}function ve(e,t){let n="",r=null;return"function"==typeof e?(n=t||"",r=e):(n=e.GetName(),r=t=>e.Handle(t)),{computedName:n,callback:r}}class ge{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=je().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(let t in this.expansionRules_){let n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){let{computedName:n,callback:r}=ve(e,t);n&&r&&(this.handlers_[n]=r)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;let t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){let r=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!r)return;let{computedName:i,callback:o}=ve(t,n);i&&o&&(this.handlers_[e]=fe(r,i,o))}RemoveHandlerExtension(e,t){let n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}function _e(e,t){var n;null===(n="string"==typeof e?R(e):e)||void 0===n||n.PushCurrentScope(t)}function be(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function ye(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}const Ce="InlineJS_OutsideEvent";function Ee(){return globalThis[Ce]=globalThis[Ce]||{targetScopes:new Array,eventCallbacks:{}}}function xe(e,t,n){let r=Ee(),i=r.targetScopes.find((t=>t.target===e));i||(i={target:e,listeners:{}},r.targetScopes.push(i)),(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners||(i.listeners[e]={handlers:new Array,excepts:null}),i.listeners[e].handlers.push({callback:n,excepts:null}),e in r.eventCallbacks||(r.eventCallbacks[e]=e=>{r.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,r.eventCallbacks[e]))}))}function Ae(e,t,n){let r=Ee().targetScopes.find((t=>t.target===e));r&&(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners&&(n?r.listeners[e].handlers=r.listeners[e].handlers.filter((e=>e.callback!==n)):delete r.listeners[e])}))}function ke(e,t,n){let r=Ee().targetScopes.find((t=>t.target===e));r&&Object.keys(t).forEach((e=>{if(e in r.listeners)if(n){let i=r.listeners[e].handlers.find((e=>e.callback===n));i&&(i.excepts=i.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{i.excepts.push(e)})))}else r.listeners[e].excepts=r.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{r.listeners[e].excepts.push(t)}))}))}function Ie(e){Ee().targetScopes=Ee().targetScopes.filter((t=>t.target!==e&&e.contains(t.target)))}class Se{constructor(e,t,n,r){this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=r,this.scopeId_="",this.key_="",this.locals_={},this.data_={},this.managers_={directive:null},this.callbacks_={post:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1},this.scopeId_=ye(this.componentId_)||""}GetComponentId(){return this.componentId_}GetScopeId(){return this.scopeId_}GetId(){return this.id_}SetKey(e){this.key_=e}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t)}DeleteLocal(e){delete this.locals_[e]}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:je().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t)}GetData(e){return e in this.data_?this.data_[e]:je().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||this.callbacks_.post.push(e)}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||this.callbacks_.uninit.push(e)}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e))}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e))}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;let n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]})}RemoveAttributeChangeCallback(e,t){let n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;let r="string"==typeof t?[t]:t||[];0!=r.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?r.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1)}ExecuteAttributeChangeCallbacks(e){(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)){let t=R(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,Ie(this.element_),je().GetMutationObserver().Unobserve(this.element_);let t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[V],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>je().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new ge}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{let r=e.FindElementScope(t);r?r.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Ge{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new oe(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class Pe{constructor(e,t){this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new me,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new r,this.selectionScopes_=new r,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new pe(this.id_),this.rootProxy_=new oe(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,this.CreateElementScope(this.root_),je().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:r})=>{let i=R(e);if(!i)return;let o=new Array,l=je().GetConfig().GetDirectiveRegex(),a=null==r?void 0:r.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==i?void 0:i.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{let t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&s((()=>e.callback(t)))})),o.forEach((e=>K({element:e,component:i,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){K({component:i,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=null==i?void 0:i.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=i.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.reactiveState_=e}GetReactiveState(){return"default"===this.reactiveState_?j().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){return ce(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t)}SetName(e){this.name_=e}GetName(){return this.name_}CreateScope(e){let t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;let n=new Ge(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),n}RemoveScope(e){let t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t])}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e)}PopCurrentScope(){return this.currentScope_.Pop()}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){var t;return this.FindScopeById((null===(t=this.FindElementScope(Y(e)))||void 0===t?void 0:t.GetScopeId())||"")||null}PushSelectionScope(){let e={set:!1};return this.selectionScopes_.Push(e),e}PopSelectionScope(){return this.selectionScopes_.Pop()}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){let t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;let n=new Se(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);return this.elementScopes_[n.GetId()]=n,e[V]=n.GetId(),n}RemoveElementScope(e){delete this.elementScopes_[e]}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;let t=!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_;return t&&V in t&&"string"==typeof t[V]&&t[V]in this.elementScopes_?this.elementScopes_[t[V]]:null}FindElementLocalValue(e,t,n){let r=this.FindElementScope(e),i=r?r.GetLocal(t):je().CreateNothing();if(!je().IsNothing(i)||!n||!r&&"string"==typeof e)return i;let o=(null==r?void 0:r.GetElement())||(!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_);if(!o)return i;let s=this.FindAncestor(o);return s?this.FindElementLocalValue(s,t,!0):i}AddProxy(e){this.proxies_[e.GetPath()]=e}RemoveProxy(e){let t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&delete this.proxies_[t]}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t})}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e&&n.callback!==t))}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&delete this.observers_.intersections[e]}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return je()}}class we{constructor(){this.handlers_={}}AddHandler(e,t,n){let r="",i=null;"function"==typeof e?(r=t||"",i=e):(r=e.GetName(),i=t=>e.Handle(t)),r&&i&&(this.handlers_[r]={callback:i,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class Oe{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{let t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,r;if("childList"===(null==e?void 0:e.type)){let r=e=>{var t;let i=Y((null===(t=Q(e))||void 0===t?void 0:t.GetRoot())||null);i?n(i).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(r)};e.removedNodes.forEach(r);let i=e.target instanceof HTMLElement?Y((null===(t=Q(e.target))||void 0===t?void 0:t.GetRoot())||null):"";i&&n(i).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){let t=e.target instanceof HTMLElement?Y((null===(r=Q(e.target))||void 0===r?void 0:r.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{let r=n.target instanceof HTMLElement?Y(n.target):"";if(!r||!(r in t))return;let i=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=i("add",n,t[r].added),l=i("remove",n,t[r].removed),a=i("attribute",n,t[r].attributes);(o||l||a)&&s((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){let r=ce(this.uniqueMarkers_);return this.handlers_[r]={target:e,handler:t,whitelist:n},r}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}}class Fe extends ie{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}class $e{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",elementPrefix:r,directiveRegex:i,directiveNameBuilder:o}={}){this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.appName_=e,this.reactiveState_=t,this.directivePrefix_=n,this.elementPrefix_=r||n,this.directiveRegex_=i||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=o||((e,t=!1)=>t?`data-${this.directivePrefix_||"x"}-${e}`:`${this.directivePrefix_||"x"}-${e}`)}GetAppName(){return this.appName_}SetDirectivePrefix(e){this.directivePrefix_=e,this.directiveRegex_=new RegExp(`^(data-)?${e||"x"}-(.+)$`)}GetDirectivePrefix(){return this.directivePrefix_}SetElementPrefix(e){this.elementPrefix_=e}GetElementPrefix(){return this.elementPrefix_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}GetElementName(e){return`${this.elementPrefix_||this.directivePrefix_||"x"}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.reactiveState_=e}GetReactiveState(){return this.reactiveState_}}class Re{Get(e,t){return fetch(e,t)}}class Te{constructor(e,t=0){this.nothing_=new a,this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new r,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.managers_={directive:new ge,magic:new we},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Oe,this.nativeFetch_=new Re,this.fetchConcept_=null,this.concepts_={},this.config_=new $e(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.config_=e}GetConfig(){return this.config_}GenerateUniqueId(e,t){return ce(this.uniqueMarkers_,"",e,t)}AddComponentMonitor(e){this.componentsMonitorList_.push(e)}RemoveComponentMonitor(e){this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e))}CreateComponent(e){let t=this.InferComponentFrom(e);if(t)return t;let n=new Pe(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.slice(0).forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),n}RemoveComponent(e){let t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){let e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent")))}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}PushCurrentComponent(e){this.currentComponent_.Push(e)}PopCurrentComponent(){return this.currentComponent_.Pop()}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e)}DispatchAttributeProcessing(e){this.attributeProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchAttribute",e.contextElement)))}AddTextContentProcessor(e){this.textContentProcessors_.push(e)}DispatchTextContentProcessing(e){this.textContentProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchTextContent",e.contextElement)))}GetMutationObserver(){return this.mutationObserver_}SetFetchConcept(e){this.fetchConcept_=e}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t}RemoveConcept(e){delete this.concepts_[e]}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}CreateChildProxy(e,t,n){return new Fe(e,t,n)}CreateFuture(e){return new i(e)}IsFuture(e){return e instanceof i}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof a}}const Ne="__InlineJS_GLOBAL_KEY__";function De(e,t=0){return $(),globalThis[Ne]=new Te(e,t),(globalThis.InlineJS=globalThis.InlineJS||{}).global=globalThis[Ne],window.dispatchEvent(new CustomEvent(Be)),globalThis[Ne]}function Me(e,t=0){return je()||De(e,t)}const Be="inlinejs.global.created";function je(){return globalThis[Ne]}function Le(){return je()?Promise.resolve():new Promise((e=>window.addEventListener(Be,e)))}function Je(e){return e=p(e),je().IsFuture(e)?Je(e.Get()):!e&&!1!==e&&0!==e||je().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function He({target:e,getter:t,setter:n,deleter:r,lookup:i,alert:o}){let s={get(e,n){var r;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);let i=t?t(n.toString(),e):e[n];return je().IsNothing(i)?Reflect.get(e,n):(!o||o.list&&!(n in o.list)||null===(r=R(o.componentId))||void 0===r||r.GetBackend().changes.AddGetAccess(`${o.id}.${n}`),i)},set:(e,t,r)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,r):n?!1!==n(t.toString(),r,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):r?!1!==r(t.toString(),e):!!delete e[t]||!0,has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(i)?i.includes(t.toString()):i?i(t.toString(),e):t in e)};return new window.Proxy(e||{},s)}function ze(e){return He(We({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Ue(){return!1}function qe(e){var{setter:t,deleter:n,lookup:r}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},i),{setter:t||Ue,deleter:n||Ue,lookup:r||Ue})}function We(e){return qe(e)}const Ke="InlineJS_ProxyGlobal";function Ve(e,t,n){let r=null==t?void 0:t.FindElementScope(n),i=null==r?void 0:r.GetId();if(!i)return["",null,null];let o=globalThis[Ke]=globalThis[Ke]||{},s=o[e]=o[e]||{};return i in s?[i,s[i],s]:(null==r||r.AddUninitCallback((()=>delete s[i])),[i,null,s])}function Ye(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>Ye(e,t,!0))):e.then(t)}const Qe="__InlineJS_Context__";let Ze={},Xe={};function et(e,t){if(Ze.hasOwnProperty(e))return Ze[e];if(Xe.hasOwnProperty(e))return null;try{let t=new Function(Qe,`\n with (${Qe}){\n return (${e});\n };\n `);return Ze[e]=t}catch(e){e instanceof SyntaxError||o(e,`InlineJs.Region<${t||"NIL"}>.GenerateValueReturningFunction`)}return null}function tt(e,t){if(Xe.hasOwnProperty(e))return Xe[e];try{let t=new Function(Qe,`\n with (${Qe}){\n ${e};\n };\n `);return Xe[e]=t}catch(e){o(e,`InlineJs.Region<${t||"NIL"}>.GenerateVoidFunction`)}return null}function nt(e,t,n,r=[]){var i;if("function"==typeof e){let o=R(n||""),s=null==o?void 0:o.FindProxy(null==o?void 0:o.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(i=s||(null==o?void 0:o.GetRootProxy()))||void 0===i?void 0:i.GetNative())||null,r||[]);return t?t(l):l}return t?t(e):e}function rt({componentId:e,contextElement:t,expression:n,disableFunctionCall:r=!1,waitPromise:i="recursive"}){if(!(n=n.trim()))return e=>(e&&e(null),null);let s=(s,l,a,c,u=!0,h)=>{var p;let m=R(e),f=null==m?void 0:m.GetRootProxy().GetNative();if(!f||(null===(p=null==m?void 0:m.FindElementScope(t))||void 0===p?void 0:p.IsDestroyed()))return;let{context:v=null,changes:g=null}=(null==m?void 0:m.GetBackend())||{};null==v||v.Push(d.self,t),null==g||g.ResetLastAccessContext(),ue(e),Object.entries(c||{}).forEach((([e,t])=>null==v?void 0:v.Push(e,t)));try{let t=l(f);if(je().IsFuture(t)&&(t=t.Get()),!s)return r?t:nt(t,s,e,a);let n=e=>{if(e&&"none"!==i)return Ye(e,s,"recursive"===i),h||"Loading data...";s(e)};r?n(t):nt(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;o(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==v?void 0:v.Pop(e,t))),de(),null==v||v.Pop(d.self)}},l=et(n,e),a=null;return l||(a=tt(n,e)),(r,i=[],o,c)=>{if(!a&&l)try{return s(r,l.bind(t),i||[],o||{},void 0,c)}catch(t){if(!(t instanceof SyntaxError))throw t;a=tt(n,e)}return a?s(r,a.bind(t),i||[],o||{},!1)||null:(r&&r(null),null)}}function it(e){return rt(e)}function ot(e,t){let n=(e,t)=>Ye(e,t,!0);return e instanceof l?new l(((r,i)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>r(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))}))})):e instanceof Promise?new Promise((r=>{n(e,(e=>{n(t(e),(e=>r(e)))}))})):t(e)}function st(e,t,n){e instanceof l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function lt({componentId:e,changes:t,callback:n,subscriptionsCallback:r,contextElement:i}){var s,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();let{optimized:u,raw:d}=t.PopGetAccessStorage();if(0==((null===(s=u||d)||void 0===s?void 0:s.entries.length)||0))return r&&r({}),null;let h={},p=()=>{Object.keys(h).map((e=>R(e))).filter((e=>!!e)).forEach((e=>{let{changes:t}=e.GetBackend();h[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),h={}},m=!1,f=()=>{m=!0},v=t=>{let r=R(e);if(!r||m)return void p();let{changes:i}=r.GetBackend();i.PushOrigin(v);try{n({changes:t||[],cancel:f})}catch(t){o(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}i.PopOrigin(),m&&p()},g={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(g[e.path]=g[e.path]||{})[e.compnentId]=!0)),Object.entries(g).forEach((([e,t])=>{Object.keys(t).map((e=>R(e))).filter((e=>!!e)).forEach((t=>{(h[t.GetId()]=h[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,v))}))})),i&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(i))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),r&&r(h),p}function at({componentId:e,callback:t,contextElement:n,options:r,subscriptionsCallback:i}){var s;let l=()=>{let r=R(e);if(!r)return;let{changes:s}=r.GetBackend(),l=!1,a=n?r.FindElementScope(n):null,c=()=>{l=!0},u=null==a?void 0:a.GetElement();try{s.PushGetAccessStorage(),t({changes:[],cancel:c})}catch(t){o(t,`InlineJS.Component<${e}>.UseEffect`,u)}if(l)return s.PopAllGetAccessStorageSnapshots(!1),s.RestoreOptimizedGetAccessStorage(),void s.PopGetAccessStorage();lt({componentId:e,changes:s,callback:t,subscriptionsCallback:i,contextElement:u})};(null==r?void 0:r.nextTick)?null===(s=R(e))||void 0===s||s.GetBackend().changes.AddNextTickHandler(l):l()}function ct(e,t,n,r={}){var i;let o=null;if(o=e instanceof HTMLElement?(null===(i="string"==typeof n?R(n):n)||void 0===i?void 0:i.FindElementScope(e))||null:e,!o)return r;let s=o.GetLocal(t);return je().IsNothing(s)&&o.SetLocal(t,s=r),s}const ut="__InlineJS_GLOBAL_COMPONENT_KEY__";function dt(e){let t=globalThis[ut];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[ut]={root:n,component:je().CreateComponent(n)},globalThis[ut]}const ht=300,pt=0,mt=0;function ft(e,t){if(!e||je().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=je().GetConcept("animation");return e.ease=e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,e.actor=e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,e.duration=e.duration||ht,e.delay=e.delay||pt,e.repeats=e.repeats||mt,e}function vt({componentId:e,contextElement:t,target:n,callback:r,onAbort:i,reverse:o,allowRepeats:l}){var a,c,u,d;let h=ft((null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c?void 0:c.GetData("transition"))||null,o||!1);if(!h||!h.actor||!h.ease||"number"!=typeof h.duration||h.duration<=0)return r(!1),null;let p=e=>{var t;return"function"==typeof(null==h?void 0:h.actor)?null==h?void 0:h.actor(e):h&&(null===(t=h.actor)||void 0===t?void 0:t.Handle(e))},m=e=>{var t;return"function"==typeof h.ease?h.ease(e):h&&(null===(t=h.ease)||void 0===t?void 0:t.Handle(e))||0},f=!1,v=()=>f=!0,g=0,_=e=>o?1-e:e,b=()=>{var r,o;return null===(o=null===(r=R(e))||void 0===r?void 0:r.FindElementScope(t))||void 0===o||o.RemoveUninitCallback(v),(n||t).dispatchEvent(new CustomEvent("transition.canceled")),i&&i(),!1};return null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d||d.AddUninitCallback(v),I(h.duration,0,l?h.repeats:0,h.delay).While((({elapsed:e})=>{if(f)return b();0==g&&((n||t).style.transform="",(n||t).style.transformOrigin="50% 50%",(n||t).dispatchEvent(new CustomEvent("transition.enter"))),p({target:n||t,stage:0==g++?"start":"middle",fraction:m({duration:h.duration,elapsed:e,fraction:_(e/h.duration)})})})).Final((()=>{f?b():(p({target:n||t,stage:"end",fraction:m({duration:h.duration,elapsed:h.duration,fraction:_(1)})}),(n||t).dispatchEvent(new CustomEvent("transition.leave")),s((()=>r(!0))))})),v}function gt({element:e,html:t,type:n="replace",component:r,processDirectives:i=!0,afterRemove:o,afterInsert:l,afterTransitionCallback:a,transitionScope:c}){let u="string"==typeof r?r:(null==r?void 0:r.GetId())||"",d=()=>{let r=document.createElement("template");r.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(r.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(r.content.childNodes)),l&&s(l,"InlineJS.InsertHtml",e);let o=R(u);i&&o&&Array.from(e.children).forEach((e=>K({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),a&&((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),vt({componentId:u,contextElement:c||e,target:e,callback:()=>((c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),a())}))};if("replace"===n){let t=e=>{let n=R(u),r=je();Array.from(e.children).forEach((e=>{var i;let o=null==n?void 0:n.FindElementScope(e);o||(o=null===(i=r.InferComponentFrom(e))||void 0===i?void 0:i.FindElementScope(e))?o.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),o&&s(o,"InlineJS.InsertHtml",e),d()};a?((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),vt({componentId:u,contextElement:c||e,target:e,reverse:!0,callback:()=>((c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n())})):n()}else d()}class _t{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;let n=()=>(this.setCallback_||e||this.callback_)&&(this.setCallback_||e||this.callback_)();!this.queued_&&this.initialized_?(this.queued_=!0,null===(t=R(this.componentId_))||void 0===t||t.GetBackend().changes.AddNextTickHandler((()=>{this.queued_=!1,n()}))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}}const bt=/\{\{\s*(.+?)\s*\}\}/g,yt=/\{\{.+?\}\}/;function Ct(e){let t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function Et({componentId:e,contextElement:t,text:n,handler:r}){var i;let o=it({componentId:e,contextElement:t,expression:"let output = "+JSON.stringify(n).replace(bt,'"+($1)+"')+"; return output;"});null===(i=R(e))||void 0===i||i.CreateElementScope(t),at({componentId:e,contextElement:t,callback:()=>o(r)})}function xt(e){var{text:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["text"]);yt.test(t)&&Et(Object.assign({text:t},n))}function At({componentId:e,contextElement:t,text:n,handler:r}){if("string"==typeof n)return r&&xt({componentId:e,contextElement:t,text:n,handler:r});if(!yt.test(t.textContent||""))return;let i=new Array,o=new Array;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&yt.test(n.textContent)){let r={text:n.textContent||"",evaluated:n.textContent||""};i.push(r),o.push((()=>Et({componentId:e,contextElement:t,text:r.text,handler:e=>{r.evaluated=e,(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;i.forEach((n=>{let r=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(r,e):t.append(r),e=r}))})()}})))}else 3==n.nodeType?i.push(n.textContent||""):i.push(n)})),i.reverse(),o.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function kt({componentId:e,contextElement:t,name:n,value:r}){At({componentId:e,contextElement:t,text:r,handler:e=>t.setAttribute(n,e)})}function It({componentId:e,contextElement:t}){At({componentId:e,contextElement:t})}function St(e){let t=je(),n=t.GetConfig();[n.GetDirectiveName("data",!0),n.GetDirectiveName("data",!1)].forEach((n=>{(e||document).querySelectorAll(`[${n}]`).forEach((e=>{e.hasAttribute(n)&&document.contains(e)&&K({component:t.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function Gt(e){Me(),setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{St(e)})):St(e)}),0)}function Pt(e,t){let n="",r=null;if("function"==typeof e){let t=e();t?({name:n,callback:r}=t):(n=e("name"),r=e("callback"))}else v(e)?({name:n,callback:r}=e):je().GetDirectiveManager().AddHandler(e);n&&r&&(t?je().GetDirectiveManager().AddHandlerExtension(t,r,n):je().GetDirectiveManager().AddHandler(r,n))}function wt(e,t){return{name:e,callback:t}}function Ot(e,t,n,r,i){let o=je().GetConfig().GetDirectiveName("on"),s=(i||[]).join("."),l=q(s?`${o}:${n}.${s}`:`${o}:${n}`,r||"");return!!l&&B(e,t,l)}const Ft=["bind","event","on"];function $t({component:e,contextElement:t,key:n,event:r,expression:i,options:o,defaultEvent:s,eventWhitelist:l=[],optionBlacklist:a}){let c=()=>a?null==o?void 0:o.filter((e=>!a.includes(e))):o,u=e=>n?`${n}-${e}.join`:e;return l.includes(r)?Ot(e,t,u(r),i,c()):!(!s||r!==s&&!Ft.includes(r))&&Ot(e,t,u(s),i,c())}function Rt(e,t,n){let r=je().GetConfig().GetDirectiveName(t,!1),i=je().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(r)||e.getAttribute(i)||n&&e.getAttribute(n)||null}function Tt({componentId:e,contextElement:t,key:n,expression:r,callback:i,arrayCallback:o,useEffect:s=!0}){let l=0,a=it({componentId:e,contextElement:t,expression:r}),c=(e,t)=>{ot(e,(e=>{t==l&&(n?i([n,e]):v(e)?Object.entries(e).forEach(i):o&&("string"==typeof e||Array.isArray(e))&&o("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};s?at({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const Nt=Array.from(Array(100).keys()).map((e=>e/100));function Dt(e){let t={root:null,rootMargin:"0px",threshold:0};return v(e)&&Object.entries(t).forEach((([n,r])=>t[n]=n in e&&e[n]||r)),e.spread&&(t.threshold=Nt),t}class Mt{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;let n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((r=>{s((()=>r.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),Dt(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}function Bt(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function jt({options:e,list:t,defaultNumber:n,callback:r,unknownCallback:i}){let o=Array.isArray(e)?e:[e],s=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{let a=o.find((e=>e&&n in e));if(!a)return i&&i({options:e,list:t,option:n,index:l});r&&!0===r({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=Bt(t[l+1].trim(),s(n)):a[n]=s(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Lt({componentId:e,component:t,contextElement:n,expression:r,argOptions:i,callback:o,options:s,defaultOptionValue:l,useEffect:a}){let c=it({componentId:e,contextElement:n,expression:r}),u=jt({options:s||{lazy:!1,ancestor:-1,threshold:-1},list:i,defaultNumber:0===l?0:l||-1}),d=()=>c((e=>Ye(e,o))),h=()=>!1===a?d():at({componentId:e,contextElement:n,callback:d});if(u.lazy){let r=t||R(e),i={root:u.ancestor<0?null:null==r?void 0:r.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},o=r?new Mt(r.GenerateUniqueId("intob_"),i):null;o?(null==r||r.AddIntersectionObserver(o),o.Observe(n,(({id:t,entry:n}={})=>{var r;(null==n?void 0:n.isIntersecting)&&(null===(r=R(e))||void 0===r||r.RemoveIntersectionObserver(t),h())}))):h()}else h()}function Jt(e){let t,n="",r=null;if("function"==typeof e){let i=e();i?({name:n,callback:r,onAccess:t}=i):(n=e("name"),r=e("callback"),t=e("access"))}else v(e)?({name:n,callback:r,onAccess:t}=e):je().GetMagicManager().AddHandler(e);n&&r&&je().GetMagicManager().AddHandler(r,n,t)}function Ht(e,t,n){return{name:e,callback:t,onAccess:n}}function zt(e){return e.startsWith(":")?je().GetConfig().GetDirectiveName("bind")+e:null}function Ut(e){return e.startsWith(".")?e.replace(".",je().GetConfig().GetDirectiveName("class:")):null}function qt(e){return e.startsWith("@")?e.replace("@",je().GetConfig().GetDirectiveName("on:")):null}function Wt(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}var Kt=n(749);function Vt(){Gt(),je().AddAttributeProcessor(kt),je().AddTextContentProcessor(It);let e=globalThis.InlineJS=globalThis.InlineJS||{};e.utilities={beginsWith:c,endsWith:b,toCamelCase:u,getAttribute:E,setAttribute:O,supportsAttributes:y,getTarget:p,getTargets:m,isEqual:x,isObject:v,toString:Je,deepCopy:_,tidyPath:S,pathToRelative:G,splitPath:P,joinPath:w,getRandomString:e=>(0,Kt.generate)(e)},e.values={future:i,loop:l,nothing:a,stack:r}}},666:(e,t,n)=>{"use strict";var r;"Set"in n.g?"function"==typeof Set.prototype.forEach&&(r=!1,new Set([!0]).forEach((function(e){r=e})),!0===r)?e.exports=function(e){var t=[];return new Set(e).forEach((function(e){t.push(e)})),t}:e.exports=function(e){var t=new Set;return e.filter((function(e){if(!t.has(e))return t.add(e),!0}))}:e.exports=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}},798:(e,t,n)=>{"use strict";var r=n.g.crypto||n.g.msCrypto;r&&r.getRandomValues?e.exports=function(e,t){if(e>65536)throw new Error("requested too many random bytes");var i=new n.g.Uint8Array(e);e>0&&r.getRandomValues(i);var o=new Buffer(i.buffer);return"function"==typeof t?process.nextTick((function(){t(null,o)})):o}:e.exports=function(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}},749:(e,t,n)=>{e.exports=n(968)},838:(e,t,n)=>{var r=n(666);function i(){this.chars=""}i.prototype.setType=function(e){var t,n="0123456789",r="abcdefghijklmnopqrstuvwxyz",i=r.toUpperCase();t="alphanumeric"===e?n+r+i:"numeric"===e?n:"alphabetic"===e?r+i:"hex"===e?n+"abcdef":"binary"===e?"01":"octal"===e?"01234567":e,this.chars=t},i.prototype.removeUnreadable=function(){this.chars=this.chars.replace(/[0OIl]/g,"")},i.prototype.setcapitalization=function(e){"uppercase"===e?this.chars=this.chars.toUpperCase():"lowercase"===e&&(this.chars=this.chars.toLowerCase())},i.prototype.removeDuplicates=function(){var e=this.chars.split("");e=r(e),this.chars=e.join("")},e.exports=i},968:(e,t,n)=>{"use strict";var r=n(798),i=n(838);function o(e){for(;;)try{return r(e)}catch(e){continue}}function s(e,t,n,r,i){for(var o=t,s=0;s<e.length&&o.length<r;s++){var l=e.readUInt8(s);l<i&&(o+=n.charAt(l%n.length))}return o}function l(e,t,n,i,o){r(n,(function(r,a){r&&o(r);var c=s(a,e,t,n,i);c.length<n?l(c,t,n,i,o):o(null,c)}))}t.generate=function(e,t){var n,r=new i,a="";"object"==typeof e?(n=e.length||32,e.charset?r.setType(e.charset):r.setType("alphanumeric"),e.capitalization&&r.setcapitalization(e.capitalization),e.readable&&r.removeUnreadable(),r.removeDuplicates()):"number"==typeof e?(n=e,r.setType("alphanumeric")):(n=32,r.setType("alphanumeric"));var c=256-256%r.chars.length;if(!t){for(;a.length<n;)a=s(o(Math.ceil(256*n/c)),a,r.chars,n,c);return a}l(a,r.chars,n,c,t)}},694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDirectiveHandlerCompact=t.StripeDirectiveHandler=void 0;const r=n(866),i=["submit","save","name","email","phone","address"],o={number:"cardNumber",expiry:"cardExpiry",cvc:"cardCvc",postal:"postalCode",zip:"postalCode"},s="stripe";let l="",a="https://js.stripe.com/v3/",c=null,u=null;t.StripeDirectiveHandler=(0,r.CreateDirectiveHandlerCallback)(s,(({componentId:e,component:t,contextElement:n,expression:d,argKey:h,argOptions:p})=>{var m;if((0,r.BindEvent)({contextElement:n,expression:d,component:t||e,key:s,event:h,defaultEvent:"success",eventWhitelist:["error","before","after","ready","focus","complete"],options:p,optionBlacklist:["window","document","outside"]}))return;let f=t||(0,r.FindComponentById)(e),v=null==f?void 0:f.FindElementScope(n);if(!f||!v)return(0,r.JournalError)("Failed to retrieve element scope.",`InlineJS.${s}`,n);let g=`$${s}`,_=`#${s}`;if(g in(v.GetLocals()||{}))return;if(i.includes(h)){let t=f.FindElementLocalValue(n,_,!0);return void(t&&(t.specialMounts[h]=n,v.SetLocal(g,(0,r.CreateInplaceProxy)((0,r.BuildGetterProxyOptions)({getter:t=>{var i;let o=n.parentElement?null===(i=(0,r.FindComponentById)(e))||void 0===i?void 0:i.FindElementLocalValue(n.parentElement,g,!0):null;return"parent"===t?o:t&&o?o[t]:null},lookup:["parent"]})))))}if(o.hasOwnProperty(h))return null===(m=f.FindElementLocalValue(n,_,!0))||void 0===m?void 0:m.addField(h,n,((t,i)=>{let o=(0,r.FindComponentById)(e),l=null==o?void 0:o.FindElementScope(n),a=null==o?void 0:o.GenerateUniqueId(`${s}_proxy_`);t.element&&(null==l||l.SetLocal(g,(0,r.CreateInplaceProxy)((0,r.BuildGetterProxyOptions)({getter:i=>{var o,s,l,c,u;if("complete"===i)return null===(o=(0,r.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${a}.${i}`),t.complete;if("focused"===i)return null===(s=(0,r.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${a}.${i}`),t.focused;if("error"===i)return null===(l=(0,r.FindComponentById)(e))||void 0===l||l.GetBackend().changes.AddGetAccess(`${a}.${i}`),t.error;if("parent"===i)return n.parentElement?null===(c=(0,r.FindComponentById)(e))||void 0===c?void 0:c.FindElementLocalValue(n.parentElement,g,!0):null;if("clear"===i)return()=>{t.element&&t.element.clear()};if("focus"===i)return()=>{t.element&&t.element.focus()};if("blur"===i)return()=>{t.element&&t.element.blur()};if("disable"===i)return(e=!0)=>{t.element&&t.element.update({disabled:e})};let d=n.parentElement?null===(u=(0,r.FindComponentById)(e))||void 0===u?void 0:u.FindElementLocalValue(n.parentElement,g,!0):null;return i&&d?d[i]:null},lookup:["complete","focused","error","parent","clear","focus","blur","disable"]}))),t.element.on("ready",(()=>{t.ready||(t.ready=!0,t.mount.dispatchEvent(new CustomEvent(`${s}.ready`)),i.onReady())})),t.element.on("change",(n=>{var o,l;if((null==n?void 0:n.complete)!==t.complete){if(t.complete=null==n?void 0:n.complete,t.mount.dispatchEvent(new CustomEvent(`${s}.complete`,{detail:{completed:null==n?void 0:n.complete}})),t.complete){if(t.error&&(t.error=void 0,(0,r.AddChanges)("set",`${a}.error`,"error",null===(o=(0,r.FindComponentById)(e))||void 0===o?void 0:o.GetBackend().changes)),i.options.autofocus){let e=i.fields.indexOf(t);if(-1!=e&&e<i.fields.length-1){let t=i.fields[e+1];t.element?t.element.focus():"focus"in t.mount&&"function"==typeof t.mount.focus&&t.mount.focus()}else i.specialMounts.submit&&i.specialMounts.submit.focus()}}else(null==n?void 0:n.error)&&n.error.message!==t.error&&(t.error=n.error.message,(0,r.AddChanges)("set",`${a}.error`,"error",null===(l=(0,r.FindComponentById)(e))||void 0===l?void 0:l.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent(`${s}.error`,{detail:{message:n.error.message}})));i.onChange()}})),t.element.on("focus",(()=>{var n;t.focused||(t.focused=!0,(0,r.AddChanges)("set",`${a}.focused`,"focused",null===(n=(0,r.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent(`${s}.focus`,{detail:{focused:!0}})))})),t.element.on("blur",(()=>{var n;t.focused&&(t.focused=!1,(0,r.AddChanges)("set",`${a}.focused`,"focused",null===(n=(0,r.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent(`${s}.focus`,{detail:{focused:!1}})))})))}));let b=null,y=null,C=new Array,E=()=>{(0,r.EvaluateLater)({componentId:e,contextElement:n,expression:d})((e=>(b=Stripe(e||l),b?(y=b.elements(),y?void C.splice(0).forEach((e=>(0,r.JournalTry)(e,`InlineJS.${s}.Init`,n))):(0,r.JournalError)("Failed to initialize stripe",`InlineJS.${s}.Init`,n)):(0,r.JournalError)("Failed to initialize stripe",`InlineJS.${s}.Init`,n))))},x=new Array,A={submit:null,save:null,name:null,email:null,phone:null,address:null},k=f.GenerateUniqueId(`${s}_proxy_`),I=(0,r.ResolveOptions)({options:{autofocus:!1,nexttick:!1,manual:!1},list:p}),S=!1,G=!1,P=0,w={fields:x,specialMounts:A,options:I,addField(t,n,i){let s=()=>{var s,l;let a={name:t,mount:n,element:y.create(o[t],{style:c||void 0,classes:u||void 0}),ready:!1,complete:!1,error:void 0};a.element.mount(n),this.fields.push(a),null===(l=null===(s=(0,r.FindComponentById)(e))||void 0===s?void 0:s.FindElementScope(n))||void 0===l||l.AddUninitCallback((()=>{var e;null===(e=a.element)||void 0===e||e.destroy(),this.fields=this.fields.filter((e=>e!==a))})),i(a,this)};y?s():C.push(s)},onReady:()=>{var t;return(0,r.AddChanges)("set",`${k}.readyCount`,"readyCount",null===(t=(0,r.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes)},onChange:()=>{var t;(t=>{var n;t!=G&&(G=t,(0,r.AddChanges)("set",`${k}.complete`,"complete",null===(n=(0,r.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))})(!x.find((e=>!e.complete)));let n=x.reduce(((e,t)=>e+(t.error?1:0)),0);n!=P&&(P=n,(0,r.AddChanges)("set",`${k}.errors`,"errors",null===(t=(0,r.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes))}},O=t=>{var n;t!=S&&(S=t,(0,r.AddChanges)("set",`${k}.active`,"active",null===(n=(0,r.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))},F=(0,r.EvaluateLater)({componentId:e,contextElement:n,expression:d}),$=t=>{var i;t.error?R(t.error.message||""):(n.dispatchEvent(new CustomEvent(`${s}.success`,{detail:{intent:t.paymentIntent}})),n.dispatchEvent(new CustomEvent(`${s}.after`)),O(!1),I.nexttick?null===(i=(0,r.FindComponentById)(e))||void 0===i||i.GetBackend().changes.AddNextTickHandler((()=>F())):F())},R=e=>{n.dispatchEvent(new CustomEvent(`${s}.error`,{detail:{type:"host",message:e}})),T("host",e),n.dispatchEvent(new CustomEvent(`${s}.after`)),O(!1)},T=(e,t)=>{n.dispatchEvent(new CustomEvent(`${s}.error`,{detail:{type:e,message:t}}))},N=(e,t)=>{var n;if(e&&"string"==typeof e)return{payment_method:e,setup_future_usage:t?"off_session":void 0};let r=null===(n=x.find((e=>"number"===e.name)))||void 0===n?void 0:n.element;if(!r)return null;let i={},o=t=>e&&e[t]||(A[t]?A[t].value:void 0);return["name","email","phone","address"].forEach((e=>{"address"===e?i.address={line1:o(e)}:i[e]=o(e)})),!t&&A.save&&A.save instanceof HTMLInputElement&&(t=A.save.checked),{payment_method:{card:r,billing_details:i},setup_future_usage:t?"off_session":void 0}},D=(e,t=!1)=>{t||G&&!x.find((e=>!!e.error))?(O(!0),n.dispatchEvent(new CustomEvent(`${s}.before`)),e()):T("incomplete","Please fill in all required fields.")};v.SetLocal(_,w),v.SetLocal(g,(0,r.CreateInplaceProxy)((0,r.BuildProxyOptions)({getter:t=>{var n,i,o,s;return"bind"===t?()=>{b||M()}:"active"===t?(null===(n=(0,r.FindComponentById)(e))||void 0===n||n.GetBackend().changes.AddGetAccess(`${k}.${t}`),S):"readyCount"===t?(null===(i=(0,r.FindComponentById)(e))||void 0===i||i.GetBackend().changes.AddGetAccess(`${k}.${t}`),x.reduce(((e,t)=>e+(t.ready?1:0)),0)):"complete"===t?(null===(o=(0,r.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${k}.${t}`),G):"errors"===t?(null===(s=(0,r.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${k}.${t}`),x.filter((e=>!!e.error)).map((e=>e.error))):"instance"===t?b:"publicKey"===t?l:"styles"===t?c:"classes"===t?u:"url"===t?a:"pay"===t?(e,t,n=!1)=>{D((()=>{let r=N(t,n);r&&(null==b||b.confirmCardPayment(e,r).then($).catch(R))}),!!t&&"string"==typeof t)}:"setup"===t?(e,t)=>{D((()=>{let n=N(t,!1);n&&(null==b||b.confirmCardSetup(e,n).then($).catch(R))}),!!t&&"string"==typeof t)}:void 0},setter:(e,t)=>("publicKey"===e?l=t:"styles"===e?c=t:"classes"===e?u=t:"url"===e&&(a=t),!0),lookup:["bind","active","readyCount","complete","errors","instance","publicKey","styles","classes","url","pay","setup"]})));let M=()=>{let e=(0,r.GetGlobal)().GetConcept("resource");a&&e?e.GetScript(a).then(E):E()};I.manual||M()})),t.StripeDirectiveHandlerCompact=function(){(0,r.AddDirectiveHandler)(t.StripeDirectiveHandler)}},419:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const r=n(866),i=n(694);t.InlineJSStripe=function(){(0,r.WaitForGlobal)().then((()=>(0,i.StripeDirectiveHandlerCompact)()))}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";(0,n(419).InlineJSStripe)()})()})();
1
+ (()=>{"use strict";var e={16:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>u,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>g,NativeElement:()=>h,NativeElementCompact:()=>d,Property:()=>c,Register:()=>y,RegisterCustomElement:()=>r,ResourceElement:()=>m,ResourceElementCompact:()=>f,ResourceTargetElement:()=>b,ResourceTargetElementCompact:()=>v});var i=n(617);function r(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const s=(0,i.RandomString)();function o(){return s}function l(){return(0,i.GetGlobalScope)(`customProperties.${s}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,r){let s="",o=null;(void 0!==(null==e?void 0:e.initial)||!r&&(null==e?void 0:e.update))&&(e.initial=e.initial||t[n],o="boolean"===e.type?(e,t)=>{e&&"false"!==e?t.setAttribute(s,s):t.hasAttribute(s)&&t.removeAttribute(s)}:(e,t)=>{t.setAttribute(s,e)});let c=null,u={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:(null==e?void 0:e.initial)||void 0,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(r){if("function"==typeof r.value&&!r.get&&!r.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(r.value.name))){const t=r.value;s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||r.value.name.replace(/^Update(.+)Property/,"$1")),c=(e,n)=>t.call(n,e)}}else s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),c=(e,t)=>t[n]=e;if(s&&c){u.name=s,u.handler=c;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(u)}}}class u extends HTMLElement{constructor(e={}){if(super(),this.options_=e,this.componentId_="",this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none"),!(this.options_.disableImplicitData||"InlineJS"in globalThis&&(0,i.IsObject)(globalThis.InlineJS)&&globalThis.InlineJS.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t,n;null===(n=null===(t=(0,i.FindComponentById)(this.componentId_))||void 0===t?void 0:t.FindScopeByRoot(this))||void 0===n||n.SetName(e.trim())}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,r=new Array,s=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?r.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?r.push(e.GetResource()):r.push(e)})),r.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:r,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?s([]):Promise.all(n).then(s).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}AddPropertyScope_(e){this.propertyScopes_.push(a(u,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{e.initial&&e.setInitial&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>this.nativeElement_=null))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const r=this.FindProperty_(e),s=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(r){let o=null;if(r.checkStoredObject&&t){if(t===s)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(r.handler):(0,i.JournalTry)((()=>r.handler(this.DecodeValue_(t,r.type||"string",r.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t?this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t):this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||u.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}u.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);s>3&&o&&Object.defineProperty(t,n,o)}([c({type:"string"})],u.prototype,"UpdateComponentProperty",null);class h extends u{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function d(){r(h)}var p=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class m extends u{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function f(){r(m,"resource")}p([c({type:"string"})],m.prototype,"src",void 0),p([c({type:"string"})],m.prototype,"type",void 0);var _=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class b extends u{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1}UpdateAttributesProperty(e){this.attributes_=e}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function v(){r(b,"resource-target")}function y(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function g(){(0,i.WaitForGlobal)().then((()=>{d(),f(),v()}))}_([c({type:"object",checkStoredObject:!0})],b.prototype,"UpdateAttributesProperty",null),_([c({type:"boolean"})],b.prototype,"sequential",void 0),_([c({type:"boolean"})],b.prototype,"defer",void 0)},617:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>N,AddDirectiveExpansionRule:()=>g,AddDirectiveHandler:()=>un,AddMagicHandler:()=>En,AddOutsideEventExcept:()=>ve,AddOutsideEventListener:()=>_e,ApplyDirectiveExpansionRules:()=>C,AreObjects:()=>$,AttributeInterpolator:()=>on,AutoBootstrap:()=>cn,BaseComponent:()=>Ce,BaseGlobal:()=>Oe,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>Pn,BindEvent:()=>mn,BootstrapAndAttach:()=>an,BuildGetterProxyOptions:()=>Et,BuildIntersectionOptions:()=>vn,BuildProxyOptions:()=>Ct,CallIfFunction:()=>wt,Changes:()=>oe,ChildProxy:()=>xe,ClassDirectiveExpansionRule:()=>xn,Config:()=>ke,Context:()=>le,ContextKeys:()=>f,CreateAnimationLoop:()=>ut,CreateChildProxy:()=>H,CreateDirective:()=>S,CreateDirectiveExpansionRule:()=>y,CreateDirectiveHandlerCallback:()=>hn,CreateGlobal:()=>we,CreateInplaceProxy:()=>yt,CreateLoop:()=>ct,CreateMagicHandlerCallback:()=>Sn,CreateReadonlyProxy:()=>gt,DecodeAttribute:()=>Ke,DecodeValue:()=>We,DeepCopy:()=>te,DefaultTransitionDelay:()=>Jt,DefaultTransitionDuration:()=>Bt,DefaultTransitionRepeats:()=>zt,DeleteProxyProp:()=>j,DirectiveManager:()=>ue,DisableProxyAction:()=>At,DispatchDirective:()=>I,ElementScope:()=>ge,ElementScopeKey:()=>_,EncodeAttribute:()=>Ye,EncodeValue:()=>Ve,EndsWith:()=>Ze,EvaluateLater:()=>jt,EvaluateMagicProperty:()=>w,ExtractDuration:()=>gn,FindAncestor:()=>Qe,FindAncestorByAttribute:()=>et,FindAncestorByAttributeValue:()=>tt,FindAncestorByClass:()=>Xe,FindAncestorByTagName:()=>nt,FindCacheValue:()=>p,FindComponentById:()=>Me,FindComponentByName:()=>$e,FindComponentByRoot:()=>He,FindFirstAttribute:()=>V,FindFirstAttributeValue:()=>Y,FlattenDirective:()=>x,ForwardEvent:()=>dn,Future:()=>r,GenerateFunctionFromString:()=>Nt,GenerateUniqueId:()=>ee,GenerateValueReturningFunction:()=>Ot,GenerateVoidFunction:()=>Rt,GenericProxy:()=>z,GetAttribute:()=>K,GetCache:()=>h,GetConfig:()=>v,GetDefaultUniqueMarkers:()=>Z,GetDirectiveValue:()=>fn,GetElementContent:()=>tn,GetElementScopeId:()=>b,GetGlobal:()=>Fe,GetGlobalScope:()=>it,GetLocal:()=>Mt,GetOrCreateGlobal:()=>Ne,GetProxyProp:()=>B,GetTarget:()=>L,GetTargets:()=>T,GlobalCreatedEvent:()=>je,IncrementUniqueMarkers:()=>Q,InferComponent:()=>Be,InitCache:()=>u,InitComponentCache:()=>De,InitJITProxy:()=>Pt,InitializeDev:()=>Gn,InitializeGlobal:()=>On,InitializeGlobalScope:()=>rt,InitializeUtilities:()=>Rn,InitializeValues:()=>wn,InitializeVersion:()=>Nn,InlineJS:()=>jn,InlineJSGlobalKey:()=>Re,InsertHtml:()=>Ut,Interpolate:()=>sn,InterpolateText:()=>rn,IntersectionObserver:()=>yn,IsBooleanAttribute:()=>st,IsEqual:()=>ot,IsInsideTemplate:()=>O,IsObject:()=>M,IsTemplate:()=>G,JoinPath:()=>ft,JoinUniqueMarkers:()=>X,JournalError:()=>s,JournalLog:()=>kn,JournalTry:()=>o,JournalWarn:()=>P,LazyCheck:()=>Cn,Loop:()=>l,MagicManager:()=>Ee,MeasureCallback:()=>ht,MutationObserver:()=>Se,NativeFetchConcept:()=>Ge,NextIdle:()=>Vt,NextNonIdle:()=>Yt,NextTick:()=>Zt,Nothing:()=>a,OnDirectiveExpansionRule:()=>In,PathToRelative:()=>pt,PeekCurrentComponent:()=>se,PeekCurrentScope:()=>pe,PeekStoredObject:()=>qe,PopCurrentComponent:()=>re,PopCurrentScope:()=>de,ProcessDirectives:()=>R,ProxyKeys:()=>F,PushCurrentComponent:()=>ie,PushCurrentScope:()=>he,QueryGlobalComponent:()=>Ht,RandomString:()=>Ie,RemoveDirectiveExpansionRule:()=>A,RemoveOutsideEventListener:()=>be,ReplaceText:()=>nn,ResizeObserver:()=>Pe,ResolveKeyValue:()=>_n,ResolveOptions:()=>An,ResolveTransition:()=>qt,RetrieveStoredObject:()=>ze,RootProxy:()=>q,Scope:()=>Ae,SetAttributeUtil:()=>_t,SetCacheValue:()=>d,SetProxyProp:()=>J,SplitPath:()=>mt,Stack:()=>i,StreamData:()=>Ft,SubscribeToChanges:()=>Tt,SupportsAttributes:()=>W,TextContentInterpolator:()=>ln,TidyPath:()=>dt,ToCamelCase:()=>m,ToSnakeCase:()=>bt,ToString:()=>Ue,TraverseDirectives:()=>k,UnbindOutsideEvent:()=>ye,UseEffect:()=>Dt,WaitForGlobal:()=>Le,WaitPromise:()=>xt,WaitTransition:()=>Wt,WaitWhile:()=>Lt});class i{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class r{constructor(e){this.callback_=e}Get(){return this.callback_()}}function s(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function o(e,t,n){try{return e()}catch(e){s(e,t,n)}}class l{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===o((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>o((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class a{}function c(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function u(e,t){return globalThis[e]=t}function h(e,t){return globalThis[e]=globalThis[e]||u(e,t)}function d(e,t,n,i){let r=h(e,i);"object"==typeof r&&(r[t]=n)}function p(e,t){let n=e in globalThis&&globalThis[e]||null;if(n&&"object"==typeof n&&t in n)return n[t]}function m(e,t,n){let[i="",...r]=e.trim().split(n||"-"),s=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?s(i):i)+(r||[]).map((e=>s(e))).join("")}const f={self:"self",event:"event",scope:"scope"},_="__InlineJS_ELSCOPE_KEY__";function b(e){let t="";for(;e;){if(t=_ in(n=e)&&"string"==typeof n[_]?n[_]:"",t||e===document.body)return t||"";e=e.parentElement}var n;return""}function v(){return Fe().GetConfig()}function y(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function g(e){return Fe().GetDirectiveManager().AddExpansionRule(e)}function A(e){Fe().GetDirectiveManager().RemoveExpansionRule(e)}function C(e){return Fe().GetDirectiveManager().Expand(e)}let E={};function S(e,t){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in E)return{meta:E[e],value:t};let n=C(e),i=n.match(v().GetDirectiveRegex());if(!i||3!=i.length||!i[2])return null;let r=i[2].indexOf(":"),s=-1==r?[i[2]]:[i[2].substring(0,r),i[2].substring(r+1)],o="",l="";s.length>1?[o,l]=s:[l]=s;let a=l.split("."),c="";o?c=a[0]:o=a[0],a.splice(0,1);let u=o.split("-"),h={view:{original:e,expanded:n},name:{value:o,joined:u.join("."),parts:u},arg:{key:c,options:a||[]}};return E[e]=h,{meta:h,value:t}}function P(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function x(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function I(e,t,n,i=0){let r="string"==typeof e?Me(e):e;if(!r)return s(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=r.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++i),l=l||Fe().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){let e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}return l?(0!=i||a||r.CreateElementScope(t),o((()=>{l(Object.assign(Object.assign({},x(n)),{componentId:r.GetId(),component:r,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(P(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function k({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((i=>{try{n&&n(i.name,i.value||"");let e=S(i.name,i.value||"");e&&t(e)}catch(t){s(t,"InlineJS.TraverseDirectives",e)}}))}function G(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function O(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&G(t))return!0;return!1}function R({component:e,element:t,options:n={}}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!O(e))}(t,n))return;let i="string"==typeof e?Me(e):e;if(!i)return s("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let r=0;k({element:t,callback:n=>{I(e,t,n,r)&&(t.removeAttribute(n.meta.view.original),++r)},attributeCallback:(e,n)=>Fe().DispatchAttributeProcessing({name:e,value:n,componentId:i.GetId(),component:i,contextElement:t})}),Fe().DispatchTextContentProcessing({componentId:i.GetId(),component:i,contextElement:t}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&i.CreateElementScope(t);let o=i.FindElementScope(t);if(null==o||o.ExecutePostAttributesProcessCallbacks(),!n.ignoreChildren&&!G(t)){i.PushSelectionScope();let n={checkTemplate:!1,checkDocument:!1},r=(t,i)=>R({component:e,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>r(e,e.contains(t)))):Array.from(t.children).forEach((e=>r(e,e.contains(t)))),i.PopSelectionScope()}null==o||o.ExecutePostProcessCallbacks()}function w(e,t,n,i="",r=!0){let l="string"==typeof e?Me(e):e;if(!l)return s(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),Fe().CreateNothing();let a=i&&n.startsWith(i)?n.substring(i.length):n,c=Fe().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!r)return Fe().CreateNothing();let e=i&&n.startsWith(`${i}${i}`)||!1;a=e?a.substring(i.length):a;let t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();let s=$e(a);if(s)return e?s.GetRoot():s.GetRootProxy().GetNative();if(e){let e=l.GetId();return t=>{let r=Be(t)||Me(e);if(!r)return null;let s=r.FindElementScope(t),o=s&&s.GetLocal(n.substring(i.length));return s&&!Fe().IsNothing(o)?o:w(r.GetId(),t,n,`${i}${i}`,!1)}}return Fe().CreateNothing()}return o((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function N(e,t,n,i,r=!0){if(!i)return;let s={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(s),!r)return;let o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:s,path:o.join(".")})}function j(e,t,n,i){var r;if(!(i in t))return!1;let s=Me(e);return null===(r=null==s?void 0:s.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==s||s.RemoveProxy(`${n}.${i}`),N("delete",n,i,null==s?void 0:s.GetBackend().changes),!0}const F={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function L(e){return(Array.isArray(e)||e&&"object"==typeof e)&&F.target in e?L(e[F.target]):e}function T(e){return e.map((e=>L(e)))}function D(e){return(e=L(e))&&"object"==typeof e&&(F.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function M(e){return!!D(e)}function $(e){return-1==e.findIndex((e=>!D(e)))}function H(e,t,n,i){if(!e)return null;let r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!M(n))return null;let s=Fe().CreateChildProxy(e,t,n);return i&&i.AddProxy(s),s}function B(e,t,n,i,r){var s;if(i===F.target)return t;if(i===F.componentId)return e;if(i===F.name)return n.split(".").at(-1);if(i===F.path)return n;if(i===F.parentPath)return n.split(".").slice(0,-1).join(".")||"";let o=i in t;if(!o&&r){let t=r(Me(e)||void 0,i);if(!Fe().IsNothing(t))return Fe().IsFuture(t)?t.Get():t}if(o&&!t.hasOwnProperty(i))return t[i];let l=o?t[i]:null;if(Fe().IsFuture(l))return l.Get();let a=Me(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(s=H((null==a?void 0:a.FindProxy(n))||null,i,l,a||void 0))||void 0===s?void 0:s.GetNative())||l}function J(e,t,n,i,r){var s;if(i in t&&r===t[i])return!0;let o=Me(e);return null===(s=null==o?void 0:o.FindProxy(n))||void 0===s||s.RemoveChild(i),t[i]=r,null==o||o.RemoveProxy(`${n}.${i}`),N("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class z{constructor(e,t,n,i,r=!1){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);let s=this.componentId_,o=this.GetPath(),l=(e,t)=>{let{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){let e=n.Peek(t.substring(1),Fe().CreateNothing());if(!Fe().IsNothing(e))return e}let r=n.Peek(f.self),s=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!Fe().IsNothing(s))return s;let o=i?w(e,r,t,"$"):Fe().CreateNothing();return Fe().IsNothing(o)&&t&&t in globalThis&&(o=globalThis[t]),o},a=!r&&!this.parentPath_,c={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):B(s,e,o,t.toString(),a?l:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):J(s,e,o,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):j(s,e,o,t.toString()),has:(e,t)=>"symbol"!=typeof t||Reflect.has(e,t)};this.native_=new window.Proxy(this.target_,c)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}}class q extends z{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,!!n)}}function W(e){return(e=L(e))&&"getAttribute"in e&&"setAttribute"in e}function U(e,t){return t&&W(e)?e.getAttribute(t):null}function K(e,t){for(let n of Array.isArray(t)?t:[t]){let t=U(e,n);if(t)return t}return null}function V(e,t){if(!W(e))return null;for(let n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function Y(e,t){let n=V(e,t);return n?n.value:null}function Z(){return{level0:0,level1:0,level2:0}}function Q(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?Q(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function X(e){return`${e.level2}_${e.level1}_${e.level0}`}function ee(e,t,n,i){return Q(e),`${t||""}${n||""}${X(e)}${i||""}`}function te(e){if(e=L(e),!Array.isArray(e)&&!M(e))return e;if(Array.isArray(e))return e.map((e=>te(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=te(n))),t}class ne{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>o((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){let t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>o((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>o((()=>n({target:e,object:()=>te(t)})))))}}function ie(e){Fe().PushCurrentComponent(e)}function re(){return Fe().PopCurrentComponent()}function se(){return Fe().PeekCurrentComponent()}class oe extends ne{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new i,this.origins_=new i}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1,this.isIdle_&&(this.isIdle_=!1,this.nextNonIdleHandlers_.splice(0).forEach((e=>o(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))));let e=new Array;this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{let i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),e.forEach((e=>e.callback(e.changes))),this.nextTickHandlers_.splice(0).forEach((e=>o(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.isScheduled_||(this.isIdle_=!0,this.nextIdleHandlers_.splice(0).forEach((e=>o(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))))})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){let i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return te(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,r;let s=(null===(t=Me(se()||""))||void 0===t?void 0:t.GetBackend().changes)||this,o=e.lastIndexOf(".");s.lastAccessContext_=-1==o?"":e.substring(0,o);let l=s.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(r=l.details.raw)||void 0===r?void 0:r.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e,this.NotifyListeners_("last-access-context",this.list_),s.NotifyListeners_("get-access-storages",this.getAccessStorages_))}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_="",this.NotifyListeners_("last-access-context",this.lastAccessContext_)}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=Me(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new i}:void 0,raw:{entries:new Array,snapshots:new i}},lastAccessPath:""}),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorage(){var e;let t=(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null;return this.NotifyListeners_("get-access-storages",this.getAccessStorages_),t}SwapOptimizedGetAccessStorage(){let e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries,this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}RestoreOptimizedGetAccessStorage(){var e;let t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushGetAccessStorageSnapshot(){var e,t;let n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e)))),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorageSnapshot(e){var t,n,i,r;let s=this.getAccessStorages_.Peek(),o=null===(t=null==s?void 0:s.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&o&&(null===(n=null==s?void 0:s.details.optimized)||void 0===n?void 0:n.entries)&&(s.details.optimized.entries=o);let l=null===(i=null==s?void 0:s.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(r=null==s?void 0:s.details.raw)||void 0===r?void 0:r.entries)&&(s.details.raw.entries=l),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopAllGetAccessStorageSnapshots(e){var t,n,i,r,s,o;let l=this.getAccessStorages_.Peek(),a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots.Pop();for(;(null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.entries)&&(l.details.raw.entries=c),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){let e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;let i=null===(n=Me(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t},this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e),this.NotifyListeners_("subscribers",this.subscribers_)}Unsubscribe_(e){delete this.subscribers_[e]}}class le{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new i).Push(t)}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}function ae(e,t,n){let i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function ce(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class ue{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=Fe().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(let t in this.expansionRules_){let n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){let{computedName:n,callback:i}=ce(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;let t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){let i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;let{computedName:r,callback:s}=ce(t,n);r&&s&&(this.handlers_[e]=ae(i,r,s))}RemoveHandlerExtension(e,t){let n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}function he(e,t){var n;null===(n="string"==typeof e?Me(e):e)||void 0===n||n.PushCurrentScope(t)}function de(e){var t;return(null===(t="string"==typeof e?Me(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function pe(e){var t;return(null===(t="string"==typeof e?Me(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}const me="InlineJS_OutsideEvent";function fe(){return globalThis[me]=globalThis[me]||{targetScopes:new Array,eventCallbacks:{}}}function _e(e,t,n){let i=fe(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>o((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function be(e,t,n){let i=fe().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function ve(e,t,n){let i=fe().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){let r=i.listeners[e].handlers.find((e=>e.callback===n));r&&(r.excepts=r.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{r.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function ye(e){fe().targetScopes=fe().targetScopes.filter((t=>t.target!==e&&!e.contains(t.target)))}class ge extends ne{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.scopeId_="",this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1},this.scopeId_=pe(this.componentId_)||""}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetScopeId(){return this.scopeId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:Fe().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:Fe().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>o(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>o(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>o((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;let n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){let n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;let i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>o((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)){let t=Me(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,ye(this.element_),Fe().GetMutationObserver().Unobserve(this.element_);let t=Me(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[_],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>Fe().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new ue}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{let i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Ae{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new q(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class Ce extends ne{constructor(e,t){super(),this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new le,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new i,this.selectionScopes_=new i,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new oe(this.id_),this.rootProxy_=new q(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,Fe().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{let r=Me(e);if(!r)return;let s=new Array,l=Fe().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!s.includes(e.target)&&s.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{let t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&o((()=>e.callback(t)))})),s.forEach((e=>R({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){R({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=null==r?void 0:r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?v().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=ee(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}CreateScope(e){let t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;let n=new Ae(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){let t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){let e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){var t;return this.FindScopeById((null===(t=this.FindElementScope(b(e)))||void 0===t?void 0:t.GetScopeId())||"")||null}PushSelectionScope(){let e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){let e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){let t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;let n=new ge(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[_]=n.GetId();let i=t=>{let n=V(e,[v().GetDirectiveName(t,!1),v().GetDirectiveName(t,!0)]);if(n){let t=S(n.name,n.value);t&&I(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&o((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;let t=!0===e?this.context_.Peek(f.self):e instanceof Node?e:this.root_;return t&&_ in t&&"string"==typeof t[_]&&t[_]in this.elementScopes_?this.elementScopes_[t[_]]:null}FindElementLocal(e,t,n){let i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;let r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(f.self):e instanceof Node?e:this.root_);if(!r)return null;let s=this.FindAncestor(r);return s?this.FindElementLocal(s,t,!0):null}FindElementLocalValue(e,t,n){let i=this.FindElementScope(e),r=i?i.GetLocal(t):Fe().CreateNothing();if(!Fe().IsNothing(r)||!n||!i&&"string"==typeof e)return r;let s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(f.self):e instanceof Node?e:this.root_);if(!s)return r;let o=this.FindAncestor(s);return o?this.FindElementLocalValue(o,t,!0):r}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){let t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return Fe()}}class Ee{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",r=null;"function"==typeof e?(i=t||"",r=e):(i=e.GetName(),r=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:r,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class Se{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{let t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){let i=e=>{var t;let r=b((null===(t=Be(e))||void 0===t?void 0:t.GetRoot())||null);r?n(r).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);let r=e.target instanceof HTMLElement?b((null===(t=Be(e.target))||void 0===t?void 0:t.GetRoot())||null):"";r&&n(r).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){let t=e.target instanceof HTMLElement?b((null===(i=Be(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{let i=n.target instanceof HTMLElement?b(n.target):"";if(!i||!(i in t))return;let r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,s=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(s||l||a)&&o((()=>n.handler({id:e,added:s,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){let i=ee(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}}class Pe{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{o((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}class xe extends z{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}function Ie(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}class ke{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",elementPrefix:i,directiveRegex:r,directiveNameBuilder:s}={}){this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),globalThis.InlineJS=globalThis.InlineJS||{};let o=globalThis.InlineJS.config||{};o=M(o)?o:{},this.appName_=o.appName||e,this.reactiveState_=o.reactiveState||t,this.directivePrefix_=o.directivePrefix||n,this.elementPrefix_=o.elementPrefix||i||n,this.directiveRegex_=r||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=s||((e,t=!1)=>t?`data-${this.directivePrefix_||"x"}-${e}`:`${this.directivePrefix_||"x"}-${e}`)}GetAppName(){return this.appName_}SetDirectivePrefix(e){this.directivePrefix_=e,this.directiveRegex_=new RegExp(`^(data-)?${e||"x"}-(.+)$`)}GetDirectivePrefix(){return this.directivePrefix_}SetElementPrefix(e){this.elementPrefix_=e}GetElementPrefix(){return this.elementPrefix_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}GetElementName(e){return`${this.elementPrefix_||this.directivePrefix_||"x"}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.reactiveState_=e}GetReactiveState(){return this.reactiveState_}}class Ge{Get(e,t){return fetch(e,t)}}class Oe extends ne{constructor(e,t=0){super(),this.nothing_=new a,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new i,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new ue,magic:new Ee},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Se,this.resizeObserver_=new Pe,this.nativeFetch_=new Ge,this.fetchConcept_=null,this.concepts_={},this.config_=new ke(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}GenerateUniqueId(e,t){const n=ee(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${Ie(18)}@!@`,n){let r=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(r)return r.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){let t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){let t=this.InferComponentFrom(e);if(t)return t;let n=new Ce(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>o((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){let t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){let e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>o((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){let e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){this.attributeProcessors_.forEach((t=>o((()=>t(e)),"InlineJS.Global.DispatchAttribute",e.contextElement)))}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){this.textContentProcessors_.forEach((t=>o((()=>t(e)),"InlineJS.Global.DispatchTextContent",e.contextElement)))}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new xe(e,t,n)}CreateFuture(e){return new r(e)}IsFuture(e){return e instanceof r}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof a}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){let r=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(r){let t=r.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}}const Re="__InlineJS_GLOBAL_KEY__";function we(e,t=0){return De(),globalThis[Re]=new Oe(e,t),(globalThis.InlineJS=globalThis.InlineJS||{}).global=globalThis[Re],window.dispatchEvent(new CustomEvent(je)),globalThis[Re]}function Ne(e,t=0){return Fe()||we(e,t)}const je="inlinejs.global.created";function Fe(){return globalThis[Re]}function Le(){return Fe()?Promise.resolve():new Promise((e=>window.addEventListener(je,e)))}const Te="InlineJS_Comp_Cache";function De(){u(Te,{id:"",component:null})}function Me(e){let t=h(Te,{id:"",component:null});return e===t.id||(t.component=Fe().FindComponentById(e),t.id=t.component?e:""),t.component}function $e(e){return Fe().FindComponentByName(e)}function He(e){return Fe().FindComponentByRoot(e)}function Be(e){let t=b(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?Me(t[1]):null}var Je=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function ze(e){var{key:t}=e,n=Je(e,["key"]);let i=Fe().RetrieveObject(Object.assign({key:t},n));return Fe().IsNothing(i)?t:i}function qe(e){var{key:t}=e,n=Je(e,["key"]);let i=Fe().PeekObject(Object.assign({key:t},n));return Fe().IsNothing(i)?t:i}function We(e,t,n){var i;return ze({key:e,componentId:t||(n?null===(i=Be(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function Ue(e){return e=L(e),Fe().IsFuture(e)?Ue(e.Get()):!e&&!1!==e&&0!==e||Fe().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function Ke(e,t,n){const i=t&&W(e)?e.getAttribute(t):null;return i?We(i,n,e):Ue(i)}function Ve(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?Ue(e):Fe().StoreObject({object:e,componentId:t||(n?null===(i=Be(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function Ye(e,t,n,i){(!t||!W(e))&&e.setAttribute(t,Ve(n,i,e))}function Ze(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function Qe(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function Xe(e,t){return Qe(e,(e=>e.classList.contains(t)))}function et(e,t){return Qe(e,(e=>e.hasAttribute(t)))}function tt(e,t,n){return Qe(e,(e=>e.getAttribute(t)===n))}function nt(e,t){return Qe(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function it(e){let t=globalThis.InlineJS=globalThis.InlineJS||{};return(e=e.trim())&&e.split(".").forEach((e=>{t=t[e]=t[e]||{}})),t}function rt(e,t){let n=it(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function st(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){let n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return Fe().GetConfig().IsBooleanAttribute(t)}function ot(e,t,n=!0){let[i,r]=n?T([e,t]):[e,t];if(i===r)return!0;if(Array.isArray(i)&&Array.isArray(r))return i.length==r.length&&-1==i.findIndex(((e,t)=>!ot(e,r[t],n)));if($([i,r])){let e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!ot(i[e],r[e],n)))}return i==r}function lt(e,t,n,i,r){let s=!1,a=()=>s=!0,c=0,u=e=>t?Math.floor(e/t):e,h=performance.now(),d=h,p=(l,m,f)=>{if(s)return;let _=f-h;if(r&&_>=r)if(n&&(n<0||c<n)){let t=_-r;i>0&&t<i?setTimeout((()=>{h=performance.now(),e(p.bind(null,l,m))}),i-t):e(p.bind(null,l,m)),c+=1,h=f,d=f}else o((()=>m({repeats:c,steps:r?u(r):-1,elapsed:_,duration:r})));else{e(p.bind(null,l,m));let n=f-d;n>=t&&(d=f+(t?n%t:n),o((()=>l({repeats:c,steps:u(_),elapsed:_,duration:r,abort:a}))))}};return new l(((t,n)=>{e(p.bind(null,t,n))}))}const at=[50,40,30,25,20,15,10,5,4,3,2,1,0];function ct(e,t=1e3,n=0,i=0,r=!0){let s=0,o=Math.floor(t/2.2);for(let e of at)if(e<=o){s=e;break}return lt((e=>setTimeout((()=>{r?requestAnimationFrame(e):e(performance.now())}),s)),t,n,i,e)}function ut(e,t=1e3,n=0,i=0){return lt(requestAnimationFrame,t,n,i,e)}function ht(e){let t=performance.now();return e(),performance.now()-t}function dt(e){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")):""}function pt(e,t,n){return(e=dt(e))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function mt(e,t,n){let i=(e=t?pt(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function ft({base:e,query:t},n,i,r){let s=`${dt(e)}?${t}`;return s=n?pt(s,n,i):dt(s),s=r?dt(`${n}/${s}`):s.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(s)?s:`/${s}`,s}function _t(e,t,n){t&&W(e)&&e.setAttribute(t,n)}function bt(e,t="-"){t=t||"-";let n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}var vt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function yt({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:s}){let o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);let r=t?t(n.toString(),e):e[n];return Fe().IsNothing(r)?Reflect.get(e,n):(!s||s.list&&!(n in s.list)||null===(i=Me(s.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${s.id}.${n}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):!!delete e[t]||!0,has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(r)?r.includes(t.toString()):r?r(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function gt(e){return yt(Et({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function At(){return!1}function Ct(e){var{setter:t,deleter:n,lookup:i}=e,r=vt(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||At,deleter:n||At,lookup:i||At})}function Et(e){return Ct(e)}const St="InlineJS_ProxyGlobal";function Pt(e,t,n){let i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];let s=globalThis[St]=globalThis[St]||{},o=s[e]=s[e]||{};return r in o?[r,o[r],o]:(null==i||i.AddUninitCallback((()=>delete o[r])),[r,null,o])}function xt(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>xt(e,t,!0))):e.then(t)}const It="__InlineJS_Context__",kt="InlineJS_Func_Cache";function Gt(e,t,n,i=!1){let r=p(kt,t);if(r)return r;try{let n=new Function(It,`\n with (${It}){\n ${e(t)};\n };\n `);return d(kt,t,n,{}),n}catch(e){if(i||!(e instanceof SyntaxError))return void s(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Ot(e,t,n=!1){return Gt((e=>`return (${e})`),e,t,n)}function Rt(e,t,n=!1){return Gt((e=>e),e,t,n)}function wt(e,t,n,i=[]){var r;if("function"==typeof e){let s=Me(n||""),o=null==s?void 0:s.FindProxy(null==s?void 0:s.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(r=o||(null==s?void 0:s.GetRootProxy()))||void 0===r?void 0:r.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function Nt({componentId:e,contextElement:t,expression:n,disableFunctionCall:i=!1,waitPromise:r="recursive",voidOnly:o}){let l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Ot(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=Rt(n,e,!0)))return l;let u=(o,l,a,c,u=!0,h)=>{var d;let p=Me(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(d=null==p?void 0:p.FindElementScope(t))||void 0===d?void 0:d.IsDestroyed()))return;let{context:_=null,changes:b=null}=(null==p?void 0:p.GetBackend())||{};null==_||_.Push(f.self,t),null==b||b.ResetLastAccessContext(),ie(e),Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Push(e,t)));try{let t=l(m);if(Fe().IsFuture(t)&&(t=t.Get()),!o)return i?t:wt(t,o,e,a);let n=e=>{if(e&&"none"!==r)return xt(e,o,"recursive"===r),h||"Loading data...";o(e)};i?n(t):wt(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;s(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Pop(e,t))),re(),null==_||_.Pop(f.self)}};return(i,r=[],o,h)=>{try{return u(i,a.bind(t),r||[],o||{},void 0,h)}catch(h){if(h instanceof SyntaxError&&!c)return c=!0,a=Rt(n,e,!0),a?u(i,a.bind(t),r||[],o||{},!1):l(i);s(h,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(i)}}function jt(e){return Nt(e)}function Ft(e,t){let n=(e,t)=>xt(e,t,!0);return e instanceof l?new l(((i,r)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>r(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function Lt(e,t,n){e instanceof l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function Tt({componentId:e,changes:t,callback:n,subscriptionsCallback:i,contextElement:r}){var o,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();let{optimized:u,raw:h}=t.PopGetAccessStorage();if(0==((null===(o=u||h)||void 0===o?void 0:o.entries.length)||0))return i&&i({}),null;let d={},p=()=>{Object.keys(d).map((e=>Me(e))).filter((e=>!!e)).forEach((e=>{let{changes:t}=e.GetBackend();d[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),d={}},m=!1,f=()=>{m=!0},_=t=>{let i=Me(e);if(!i||m)return void p();let{changes:r}=i.GetBackend();r.PushOrigin(_);try{n({changes:t||[],cancel:f})}catch(t){s(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},b={};return null===(l=u||h)||void 0===l||l.entries.forEach((e=>(b[e.path]=b[e.path]||{})[e.compnentId]=!0)),Object.entries(b).forEach((([e,t])=>{Object.keys(t).map((e=>Me(e))).filter((e=>!!e)).forEach((t=>{(d[t.GetId()]=d[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,_))}))})),r&&(null===(c=null===(a=Me(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),i&&i(d),p}function Dt({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r}){var o;let l=()=>{let i=Me(e);if(!i)return;let{changes:o}=i.GetBackend(),l=!1,a=n?i.FindElementScope(n):null,c=()=>{l=!0},u=null==a?void 0:a.GetElement();try{o.PushGetAccessStorage(),t({changes:[],cancel:c})}catch(t){s(t,`InlineJS.Component<${e}>.UseEffect`,u)}if(l)return o.PopAllGetAccessStorageSnapshots(!1),o.RestoreOptimizedGetAccessStorage(),void o.PopGetAccessStorage();Tt({componentId:e,changes:o,callback:t,subscriptionsCallback:r,contextElement:u})};(null==i?void 0:i.nextTick)?null===(o=Me(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(l):l()}function Mt(e,t,n,i={}){var r;let s=null;if(s=e instanceof HTMLElement?(null===(r="string"==typeof n?Me(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!s)return i;let o=s.GetLocal(t);return Fe().IsNothing(o)&&s.SetLocal(t,o=i),o}const $t="__InlineJS_GLOBAL_COMPONENT_KEY__";function Ht(e){let t=globalThis[$t];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[$t]={root:n,component:Fe().CreateComponent(n)},globalThis[$t]}const Bt=300,Jt=0,zt=0;function qt(e,t){if(!e||Fe().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=Fe().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||Bt,delay:e.delay||Jt,repeats:e.repeats||zt,allowed:e.allowed||"both"}}function Wt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,onPass:s,reverse:l,allowRepeats:a,restore:c}){var u,h,d,p;let m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:l,allowRepeats:a});let f=qt((null===(h=null===(u=Me(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===h?void 0:h.GetData("transition"))||null,l||!1);if(!f||!f.actor||!f.ease||"number"!=typeof f.duration||f.duration<=0)return i(!1),null;let _=e=>{var t;return"function"==typeof(null==f?void 0:f.actor)?null==f?void 0:f.actor(e):f&&(null===(t=f.actor)||void 0===t?void 0:t.Handle(e))},b=e=>{var t;return"function"==typeof f.ease?f.ease(e):f&&(null===(t=f.ease)||void 0===t?void 0:t.Handle(e))||0},v=!1,y=()=>v=!0,g=0,A=e=>l?1-e:e,C=()=>{var n,i;return null===(i=null===(n=Me(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(y),m.dispatchEvent(new CustomEvent("transition.canceled")),r&&o((()=>r())),!1},E=(e,t,n)=>{s&&o((()=>s({duration:f.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(d=Me(e))||void 0===d?void 0:d.FindElementScope(t))||void 0===p||p.AddUninitCallback(y);const S=f.duration,P=e=>{const t=A(e/S),n=b({duration:S,elapsed:e,fraction:t}),i=0==g++?"start":"middle";_({duration:S,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),E(i,e,n)};return P(0),ut(S,0,a?f.repeats:0,f.delay).While((({elapsed:e})=>{if(v)return C();0==g&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),P(e)})).Final((()=>{if(v)C();else{const e=A(1);_({duration:S,elapsedFraction:e,elapsed:S,target:m,stage:"end",fraction:b({duration:f.duration,elapsed:f.duration,fraction:e}),reverse:!!l}),E("end",f.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),o((()=>i(!0)))}})),y}function Ut({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterRemove:s,afterInsert:l,afterTransitionCallback:a,transitionScope:c}){let u="string"==typeof i?i:(null==i?void 0:i.GetId())||"",h=()=>{let i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),l&&o(l,"InlineJS.InsertHtml",e);let s=Me(u);r&&s&&Array.from(e.children).forEach((e=>R({component:s,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),a&&((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Wt({componentId:u,contextElement:c||e,target:e,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),a()}}))};if("replace"===n&&0!=e.childNodes.length){let t=e=>{let n=Me(u),i=Fe();Array.from(e.children).forEach((e=>{var r;let s=null==n?void 0:n.FindElementScope(e);s||(s=null===(r=i.InferComponentFrom(e))||void 0===r?void 0:r.FindElementScope(e))?s.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),s&&o(s,"InlineJS.InsertHtml",e)};a?((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Wt({componentId:u,contextElement:c||e,target:e,reverse:!0,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n(),h()}})):(n(),h())}else h()}class Kt{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;let n=()=>(this.setCallback_||e||this.callback_)&&(this.setCallback_||e||this.callback_)();!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=Me(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>{this.queued_=!1,n()}))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class Vt extends Kt{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class Yt extends Kt{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class Zt extends Kt{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}var Qt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const Xt=/\{\{\s*(.+?)\s*\}\}/g,en=/\{\{.+?\}\}/;function tn(e){let t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function nn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s,storeObject:o}){var l;let a=null,c=null;if(o){const o=n.trim();let l=(o.match(r||en)||[])[0];l&&l===o&&(l=l.replace(s||Xt,"$1").trim(),a=l?jt({componentId:e,contextElement:t,expression:`return (${l});`,voidOnly:!0}):e=>e&&e(""),c=n=>i(Ve(n,e,t)))}a||(n=JSON.stringify(n).replace(s||Xt,'"+($1)+"').replace(/"\+\(\s*\)\+"/g,""),a=jt({componentId:e,contextElement:t,expression:`let output = ${n}; return output;`})),null===(l=Me(e))||void 0===l||l.CreateElementScope(t),Dt({componentId:e,contextElement:t,callback:()=>a(c||i)})}function rn(e){var{text:t,testRegex:n,matchRegex:i}=e,r=Qt(e,["text","testRegex","matchRegex"]);(n||i||en).test(t)&&nn(Object.assign({text:t,testRegex:n,matchRegex:i},r))}function sn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s}){if("string"==typeof n)return i&&rn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s});if(!(r||s||en).test(t.textContent||""))return;let l=new Array,a=new Array,c=!1;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&en.test(n.textContent)){let i={text:n.textContent||"",evaluated:n.textContent||""};l.push(i),a.push((()=>nn({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,c||(c=!0,queueMicrotask((()=>{c=!1,o((()=>(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;l.forEach((n=>{let i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()),"InlineJS.Interpolate",t)})))},testRegex:r,matchRegex:s})))}else 3==n.nodeType?l.push(n.textContent||""):l.push(n)})),l.reverse(),a.forEach((e=>o(e,"InlineJS.Interpolate",t)))}function on({componentId:e,contextElement:t,name:n,value:i}){rn({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function ln({componentId:e,contextElement:t}){sn({componentId:e,contextElement:t})}function an(e){const t=e&&Be(e);if(t)return void R({component:t,element:e});const n=Fe(),i=n.GetConfig();[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)].forEach((t=>{(e||document).querySelectorAll(`[${t}]`).forEach((e=>{e.hasAttribute(t)&&document.contains(e)&&R({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function cn(e){Ne(),globalThis.InlineJS=globalThis.InlineJS||{},globalThis.InlineJS.hasOwnProperty("disableAutoBootstrap")&&globalThis.InlineJS.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{an(e)})):an(e)}),0)}function un(e,t){let n="",i=null;if("function"==typeof e){let t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else M(e)?({name:n,callback:i}=e):Fe().GetDirectiveManager().AddHandler(e);n&&i&&(t?Fe().GetDirectiveManager().AddHandlerExtension(t,i,n):Fe().GetDirectiveManager().AddHandler(i,n))}function hn(e,t){return{name:e,callback:t}}function dn(e,t,n,i,r){let s=Fe().GetConfig().GetDirectiveName("on"),o=(r||[]).join("."),l=S(o?`${s}:${n}.${o}`:`${s}:${n}`,i||"");return!!l&&I(e,t,l)}const pn=["bind","event","on"];function mn({component:e,contextElement:t,key:n,event:i,expression:r,options:s,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){let c=()=>a?null==s?void 0:s.filter((e=>!a.includes(e))):s,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?dn(e,t,u(i),r,c()):!(!o||i!==o&&!pn.includes(i))&&dn(e,t,u(o),r,c())}function fn(e,t,n){let i=Fe().GetConfig().GetDirectiveName(t,!1),r=Fe().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function _n({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:s,useEffect:o=!0}){let l=0,a=jt({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{Ft(e,(e=>{t==l&&(n?r([n,e]):M(e)?Object.entries(e).forEach(r):s&&("string"==typeof e||Array.isArray(e))&&s("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?Dt({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const bn=Array.from(Array(100).keys()).map((e=>e/100));function vn(e){let t={root:null,rootMargin:"0px",threshold:0};return M(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=bn),t}class yn{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;let n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{o((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),vn(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}function gn(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function An({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){let s=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{let a=s.find((e=>e&&n in e));if(!a)return r&&r({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=gn(t[l+1].trim(),o(n)):a[n]=o(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Cn({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:s,options:o,defaultOptionValue:l,useEffect:a}){let c=jt({componentId:e,contextElement:n,expression:i}),u=An({options:o||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===l?0:l||-1}),h=()=>c((e=>xt(e,s))),d=()=>!1===a?h():Dt({componentId:e,contextElement:n,callback:h});if(u.lazy){let i=t||Me(e),r={root:u.ancestor<0?null:null==i?void 0:i.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},s=i?new yn(i.GenerateUniqueId("intob_"),r):null;s?(null==i||i.AddIntersectionObserver(s),s.Observe(n,(({id:t,entry:n}={})=>{var i;(null==n?void 0:n.isIntersecting)&&(null===(i=Me(e))||void 0===i||i.RemoveIntersectionObserver(t),d())}))):d()}else d()}function En(e){let t,n="",i=null;if("function"==typeof e){let r=e();r?({name:n,callback:i,onAccess:t}=r):(n=e("name"),i=e("callback"),t=e("access"))}else M(e)?({name:n,callback:i,onAccess:t}=e):Fe().GetMagicManager().AddHandler(e);n&&i&&Fe().GetMagicManager().AddHandler(i,n,t)}function Sn(e,t,n){return{name:e,callback:t,onAccess:n}}function Pn(e){return e.startsWith(":")?Fe().GetConfig().GetDirectiveName("bind")+e:null}function xn(e){return e.startsWith(".")?e.replace(".",Fe().GetConfig().GetDirectiveName("class:")):null}function In(e){return e.startsWith("@")?e.replace("@",Fe().GetConfig().GetDirectiveName("on:")):null}function kn(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function Gn(e=!0){e&&cn(),Fe().AddAttributeProcessor(on),Fe().AddTextContentProcessor(ln)}function On(){rt("",{waitForGlobal:Le,bootstrap:an})}function Rn(){rt("utilities",{beginsWith:c,endsWith:Ze,toCamelCase:m,toSnakeCase:bt,insertHtml:Ut,findAncestor:Qe,getAttribute:K,findFirstAttribute:V,findFirstAttributeValue:Y,setAttribute:_t,isBooleanAttribute:st,supportsAttributes:W,getTarget:L,getTargets:T,isEqual:ot,isObject:M,toString:Ue,deepCopy:te,tidyPath:dt,pathToRelative:pt,splitPath:mt,joinPath:ft,getRandomString:Ie,measureCallback:ht,encodeAttribute:Ye,decodeAttribute:Ke,encodeValue:Ve,decodeValue:We})}function wn(){rt("values",{future:r,loop:l,nothing:a,stack:i})}function Nn(){rt("version",{major:1,minor:1,patch:2,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function jn(){Gn(),On(),Rn(),wn(),Nn()}},409:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const r=n(16);class s extends r.CustomElement{constructor(){super(),this.input=null,this.name="",this.value=""}WaitReady(){return Promise.resolve()}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();this.name&&(t||this.value)&&(e.billingDetails=e.billingDetails||{},"address"===this.name?(e.billingDetails.address=e.billingDetails.address||{},e.billingDetails.address.line1=(null==t?void 0:t.value)||this.value):e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value)}GetInput_(){return this.input||this.querySelector("input")}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],s.prototype,"input",void 0),i([(0,r.Property)({type:"string"})],s.prototype,"name",void 0),i([(0,r.Property)({type:"string"})],s.prototype,"value",void 0),t.StripeDetailElement=s,t.StripeDetailElementCompact=function(){(0,r.RegisterCustomElement)(s,"stripe-detail")}},538:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const s=n(617),o=n(16);class l extends o.CustomElement{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.readyWaiters_=new Array,this.stripe=null,this.options=null,this.type="",this.onready="",this.oncomplete="",this.onerrors=""}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()})),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!e)return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n&&(this.stripeField_=e.elements().create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.readyWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{var t;(null==e?void 0:e.error)?(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[],{error:e.error}):(null==e?void 0:e.complete)&&((0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(),null===(t=this.GetStripe_())||void 0===t||t.FocusNextField(this))})),this.stripeField_.mount(this))}))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}GetStripe_(){return this.stripe||(0,s.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],l.prototype,"stripe",void 0),i([(0,o.Property)({type:"object",checkStoredObject:!0})],l.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"onerrors",void 0),t.StripeFieldElement=l,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(l,"stripe-field")}},380:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const r=n(16);class s extends r.CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}WaitReady(){return Promise.resolve()}ToggleFocus(e){}Reset(){}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],s.prototype,"value",void 0),t.StripePaymentMenthodElement=s,t.StripePaymentMenthodElementCompact=function(){(0,r.RegisterCustomElement)(s,"stripe-payment-method")}},645:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const s=n(617),o=n(16);class l extends o.CustomElement{constructor(){super(),this.stripe_=null,this.mounting_=!1,this.mounted_=!1,this.fields_=null,this.instanceWaiters_=new Array,this.options=null,this.publicKey="",this.onready="",this.defer=!1,this.autofocus=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e)}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e)))}FocusNextField(e){if(this.autofocus&&this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.stripe_):this.instanceWaiters_.push((()=>e(this.stripe_)))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.instanceWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,r)=>{this.WaitInstance().then((s=>{var o,l;if(!s)return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"!=typeof a.method?{payment_method:{card:a.method,billing_details:a.billingDetails}}:{payment_method:a.method},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),s.confirmCardPayment(t,c).then(i).catch(r)):s.confirmCardSetup(t,c).then(i).catch(r)})).catch(r)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],l.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],l.prototype,"onready",void 0),i([(0,o.Property)({type:"boolean"})],l.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],l.prototype,"autofocus",void 0),t.StripeElement=l,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(l,"stripe")}},419:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(617),r=n(645),s=n(538),o=n(409),l=n(380);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,r.StripeElementCompact)(),(0,s.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(0,n(419).InlineJSStripe)()})();
@@ -0,0 +1,14 @@
1
+ import { CustomElement } from "@benbraide/inlinejs-element";
2
+ import { IStripeField, IStripePaymentDetails } from "../types";
3
+ export declare class StripeDetailElement extends CustomElement implements IStripeField {
4
+ input: HTMLInputElement | null;
5
+ name: string;
6
+ value: string;
7
+ constructor();
8
+ WaitReady(): Promise<void>;
9
+ ToggleFocus(focused: boolean): void;
10
+ Reset(): void;
11
+ AddDetails(details: IStripePaymentDetails): void;
12
+ protected GetInput_(): HTMLInputElement | null;
13
+ }
14
+ export declare function StripeDetailElementCompact(): void;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.StripeDetailElementCompact = exports.StripeDetailElement = void 0;
10
+ const inlinejs_element_1 = require("@benbraide/inlinejs-element");
11
+ class StripeDetailElement extends inlinejs_element_1.CustomElement {
12
+ constructor() {
13
+ super();
14
+ this.input = null;
15
+ this.name = '';
16
+ this.value = '';
17
+ }
18
+ WaitReady() {
19
+ return Promise.resolve();
20
+ }
21
+ ToggleFocus(focused) {
22
+ const input = this.GetInput_();
23
+ input && (focused ? input.focus() : input.blur());
24
+ }
25
+ Reset() {
26
+ const input = this.GetInput_();
27
+ input && (input.value = '');
28
+ }
29
+ AddDetails(details) {
30
+ const input = this.GetInput_();
31
+ if (!this.name || (!input && !this.value)) {
32
+ return;
33
+ }
34
+ details.billingDetails = (details.billingDetails || {});
35
+ if (this.name === 'address') {
36
+ details.billingDetails.address = (details.billingDetails.address || {});
37
+ details.billingDetails.address.line1 = ((input === null || input === void 0 ? void 0 : input.value) || this.value);
38
+ }
39
+ else {
40
+ details.billingDetails[this.name] = ((input === null || input === void 0 ? void 0 : input.value) || this.value);
41
+ }
42
+ }
43
+ GetInput_() {
44
+ return (this.input || this.querySelector('input'));
45
+ }
46
+ }
47
+ __decorate([
48
+ (0, inlinejs_element_1.Property)({ type: 'object', checkStoredObject: true })
49
+ ], StripeDetailElement.prototype, "input", void 0);
50
+ __decorate([
51
+ (0, inlinejs_element_1.Property)({ type: 'string' })
52
+ ], StripeDetailElement.prototype, "name", void 0);
53
+ __decorate([
54
+ (0, inlinejs_element_1.Property)({ type: 'string' })
55
+ ], StripeDetailElement.prototype, "value", void 0);
56
+ exports.StripeDetailElement = StripeDetailElement;
57
+ function StripeDetailElementCompact() {
58
+ (0, inlinejs_element_1.RegisterCustomElement)(StripeDetailElement, 'stripe-detail');
59
+ }
60
+ exports.StripeDetailElementCompact = StripeDetailElementCompact;
@@ -0,0 +1,23 @@
1
+ /// <reference types="stripe-v3" />
2
+ import { IElementScopeCreatedCallbackParams } from "@benbraide/inlinejs";
3
+ import { CustomElement } from "@benbraide/inlinejs-element";
4
+ import { IStripeElement, IStripeField, IStripePaymentDetails } from "../types";
5
+ export declare class StripeFieldElement extends CustomElement implements IStripeField {
6
+ protected stripeField_: stripe.elements.Element | null;
7
+ protected isReady_: boolean;
8
+ protected readyWaiters_: (() => void)[];
9
+ stripe: IStripeElement | null;
10
+ options: stripe.elements.ElementsOptions | null;
11
+ type: string;
12
+ onready: string;
13
+ oncomplete: string;
14
+ onerrors: string;
15
+ constructor();
16
+ WaitReady(): Promise<void>;
17
+ ToggleFocus(focused: boolean): void;
18
+ Reset(): void;
19
+ AddDetails(details: IStripePaymentDetails): void;
20
+ protected HandleElementScopeCreated_({ scope, ...rest }: IElementScopeCreatedCallbackParams, postAttributesCallback?: () => void): void;
21
+ protected GetStripe_(): IStripeElement | null;
22
+ }
23
+ export declare function StripeFieldElementCompact(): void;