@benbraide/inlinejs-stripe 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/inlinejs-stripe.js +155 -138
- package/dist/inlinejs-stripe.min.js +1 -1
- package/lib/common/directive/stripe.js +155 -138
- package/lib/esm/directive/stripe.js +155 -138
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";var e={992:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Z,AddDirectiveExpansionRule:()=>j,AddDirectiveHandler:()=>It,AddMagicHandler:()=>Bt,AddOutsideEventExcept:()=>xe,AddOutsideEventListener:()=>Ce,ApplyDirectiveExpansionRules:()=>H,AreObjects:()=>_,AttributeInterpolator:()=>Et,AutoBootstrap:()=>kt,BaseComponent:()=>Ae,BaseGlobal:()=>Re,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>jt,BindEvent:()=>wt,BootstrapAndAttach:()=>Gt,BuildGetterProxyOptions:()=>qe,BuildIntersectionOptions:()=>$t,BuildProxyOptions:()=>ze,CallIfFunction:()=>Xe,Changes:()=>he,ChildProxy:()=>we,ClassDirectiveExpansionRule:()=>Jt,Config:()=>Oe,Context:()=>pe,ContextKeys:()=>d,CreateAnimationLoop:()=>k,CreateChildProxy:()=>ee,CreateDirective:()=>q,CreateDirectiveExpansionRule:()=>L,CreateDirectiveHandlerCallback:()=>At,CreateGlobal:()=>Ne,CreateInplaceProxy:()=>je,CreateLoop:()=>G,CreateMagicHandlerCallback:()=>Lt,CreateReadonlyProxy:()=>Je,DeepCopy:()=>g,DefaultTransitionDelay:()=>ut,DefaultTransitionDuration:()=>ct,DefaultTransitionRepeats:()=>dt,DeleteProxyProp:()=>X,DirectiveManager:()=>ve,DisableProxyAction:()=>He,DispatchDirective:()=>M,ElementScope:()=>ke,ElementScopeKey:()=>K,EndsWith:()=>b,EvaluateLater:()=>tt,EvaluateMagicProperty:()=>Q,ExtractDuration:()=>Tt,FindComponentById:()=>R,FindComponentByName:()=>$,FindComponentByRoot:()=>N,FlattenDirective:()=>D,ForwardEvent:()=>St,Future:()=>r,GenerateFunctionFromString:()=>et,GenerateUniqueId:()=>ae,GenerateValueReturningFunction:()=>Qe,GenerateVoidFunction:()=>Ze,GenericProxy:()=>ie,GetAttribute:()=>E,GetConfig:()=>B,GetDefaultUniqueMarkers:()=>oe,GetDirectiveValue:()=>Ot,GetElementContent:()=>gt,GetElementScopeId:()=>V,GetGlobal:()=>Me,GetLocal:()=>st,GetOrCreateGlobal:()=>Te,GetProxyProp:()=>te,GetTarget:()=>p,GetTargets:()=>m,GlobalCreatedEvent:()=>De,IncrementUniqueMarkers:()=>se,InferComponent:()=>Y,InitComponentCache:()=>F,InitJITProxy:()=>Ue,InlineJSGlobalKey:()=>$e,InsertHtml:()=>mt,Interpolate:()=>Ct,InterpolateText:()=>yt,IntersectionObserver:()=>Nt,IsEqual:()=>x,IsObject:()=>v,JoinPath:()=>P,JoinUniqueMarkers:()=>le,JournalError:()=>o,JournalLog:()=>zt,JournalTry:()=>s,JournalWarn:()=>T,LazyCheck:()=>Mt,Loop:()=>l,MagicManager:()=>Se,MutationObserver:()=>Pe,NativeFetchConcept:()=>Fe,NextTick:()=>ft,Nothing:()=>a,OnDirectiveExpansionRule:()=>Ht,PathToRelative:()=>A,PeekCurrentComponent:()=>de,PeekCurrentScope:()=>be,PopCurrentComponent:()=>ue,PopCurrentScope:()=>ge,ProcessDirectives:()=>W,ProxyKeys:()=>h,PushCurrentComponent:()=>ce,PushCurrentScope:()=>_e,QueryGlobalComponent:()=>at,RemoveDirectiveExpansionRule:()=>J,RemoveOutsideEventListener:()=>Ee,ReplaceText:()=>bt,ResolveKeyValue:()=>Ft,ResolveOptions:()=>Dt,ResolveTransition:()=>ht,RootProxy:()=>re,Scope:()=>Ie,SetAttributeUtil:()=>w,SetProxyProp:()=>ne,SplitPath:()=>S,Stack:()=>i,StreamData:()=>nt,SubscribeToChanges:()=>rt,SupportsAttributes:()=>y,TextContentInterpolator:()=>xt,TidyPath:()=>I,ToCamelCase:()=>u,ToString:()=>Le,TraverseDirectives:()=>U,UnbindOutsideEvent:()=>Ge,UseEffect:()=>ot,WaitForGlobal:()=>Be,WaitPromise:()=>We,WaitTransition:()=>pt,WaitWhile:()=>it});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 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[i="",...r]=e.trim().split(n||"-"),o=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?o(i):i)+(r||[]).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 _(e){return-1==e.findIndex((e=>!f(e)))}function g(e){if(e=p(e),!Array.isArray(e)&&!v(e))return e;if(Array.isArray(e))return e.map((e=>g(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=g(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[i,r]=n?m([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)=>!x(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)||!x(i[e],r[e],n)))}return i==r}function G(e,t=1e3,n=0,i=0,r=!0){t=t||1;let o=e?Math.floor(e/t):-1,s=0,a=!1,c=0,u=(n,i)=>{if(r){let r=++c;requestAnimationFrame((()=>r==c&&i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})))}else i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})},d=(r,l,c)=>{if(a)return c();if(s+=1,o>=0&&s>=o){if(!n)return l({passes:o,elapsed:o*t,duration:e});setTimeout((()=>setTimeout(d.bind(null,r,l,c),t)),i),u(o,r),n>0&&(n-=1)}else setTimeout(d.bind(null,r,l,c),t),u(s,r)};return new l(((e,n,i)=>{setTimeout(d.bind(null,e,n,i),t)}))}function k(e,t=1e3,n=0,i=0){let r=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});r=i,s=h,n>0&&(n-=1)}-1==s&&(s=h);let m=h-s;m>=r&&(s=h-(m-r),r=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 I(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 A(e,t,n){return(e=I(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 S(e,t,n){let i=(e=t?A(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function P({base:e,query:t},n,i,r){let o=`${I(e)}?${t}`;return o=n?A(o,n,i):I(o),o=r?I(`${n}/${o}`):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function w(e,t,n){t&&y(e)&&e.setAttribute(t,n)}const O="InlineJS_Comp_Cache";function F(){return globalThis[O]={id:"",component:null}}function R(e){let t=globalThis[O]=globalThis[O]||F();return e===t.id||(t.component=Me().FindComponentById(e),t.id=t.component?e:""),t.component}function $(e){return Me().FindComponentByName(e)}function N(e){return Me().FindComponentByRoot(e)}function T(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function D(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 M(e,t,n,i=0){let r="string"==typeof e?R(e):e;if(!r)return o(`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||Me().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),s((()=>{l(Object.assign(Object.assign({},D(n)),{componentId:r.GetId(),component:r,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(T(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function B(){return Me().GetConfig()}function L(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function j(e){return Me().GetDirectiveManager().AddExpansionRule(e)}function J(e){Me().GetDirectiveManager().RemoveExpansionRule(e)}function H(e){return Me().GetDirectiveManager().Expand(e)}let z={};function q(e,t){if(!e||!(e=e.trim()))return null;if((t=t.trim())===e&&(t=""),e in z)return{meta:z[e],value:t};let n=H(e),i=n.match(B().GetDirectiveRegex());if(!i||3!=i.length||!i[2])return null;let r=i[2].indexOf(":"),o=-1==r?[i[2]]:[i[2].substring(0,r),i[2].substring(r+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 z[e]=d,{meta:d,value:t}}function U({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((i=>{try{n&&n(i.name,i.value||"");let e=q(i.name,i.value||"");e&&t(e)}catch(t){o(t,"InlineJS.TraverseDirectives",e)}}))}function W({component:e,element:t,options:n={}}){var i;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 r="string"==typeof e?R(e):e;if(!r)return o("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let s=0;U({element:t,callback:n=>{M(e,t,n,s)&&(t.removeAttribute(n.meta.view.original),++s)},attributeCallback:(e,n)=>Me().DispatchAttributeProcessing({name:e,value:n,componentId:r.GetId(),component:r,contextElement:t})}),Me().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t}),n.ignoreChildren||t instanceof HTMLTemplateElement||(null==r||r.PushSelectionScope(),Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>W({component:e,options:n,element:t}))),null==r||r.PopSelectionScope()),null===(i=null==r?void 0:r.FindElementScope(t))||void 0===i||i.ExecutePostProcessCallbacks()}const K="__InlineJS_ELSCOPE_KEY__";function V(e){let t="";for(;e;){if(t=K in(n=e)&&n[K],t||e===document.body)return t||"";e=e.parentElement}var n;return""}function Y(e){let t=V(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}function Q(e,t,n,i="",r=!0){let l="string"==typeof e?R(e):e;if(!l)return o(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),Me().CreateNothing();let a=Me().GetMagicManager().FindHandler(i&&n.startsWith(i)?n.substring(i.length):n,{contextElement:t,componentId:l.GetId(),component:l});if(!a){if(r&&i&&n.startsWith(`${i}${i}`)){let e=l.GetId();return t=>{let r=Y(t)||R(e);if(!r)return null;let o=r.FindElementScope(t),s=o&&o.GetLocal(n.substring(i.length));return o&&!Me().IsNothing(s)?s:Q(r.GetId(),t,n,`${i}${i}`,!1)}}return Me().CreateNothing()}return s((()=>a({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Z(e,t,n,i,r=!0){if(!i)return;let o={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(o),!r)return;let s=t.split(".");for(;s.length>2;)s.pop(),i.Add({original:o,path:s.join(".")})}function X(e,t,n,i){var r;if(!(i in t))return!1;let o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==o||o.RemoveProxy(`${n}.${i}`),Z("delete",n,i,null==o?void 0:o.GetBackend().changes),!0}function ee(e,t,n,i){if(!e)return null;let r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!v(n))return null;let o=Me().CreateChildProxy(e,t,n);return i&&i.AddProxy(o),o}function te(e,t,n,i,r){var o;if(i===h.target)return t;if(i===h.componentId)return e;if(i===h.name)return n.split(".").at(-1);if(i===h.path)return n;if(i===h.parentPath)return n.split(".").slice(0,-1).join(".")||"";let s=i in t;if(!s&&r){let t=r(R(e)||void 0,i);if(!Me().IsNothing(t))return Me().IsFuture(t)?t.Get():t}if(s&&!t.hasOwnProperty(i))return t[i];let l=s?t[i]:null;if(Me().IsFuture(l))return l.Get();let a=R(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(o=ee((null==a?void 0:a.FindProxy(n))||null,i,l,a||void 0))||void 0===o?void 0:o.GetNative())||l}function ne(e,t,n,i,r){var o;if(i in t&&r===t[i])return!0;let s=R(e);return null===(o=null==s?void 0:s.FindProxy(n))||void 0===o||o.RemoveChild(i),t[i]=r,null==s||s.RemoveProxy(`${n}.${i}`),Z("set",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}class ie{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 o=this.componentId_,s=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),Me().CreateNothing());if(!Me().IsNothing(e))return e}let r=n.Peek(d.self),o=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!Me().IsNothing(o))return o;let s=i?Q(e,r,t,"$"):Me().CreateNothing();return Me().IsNothing(s)&&t&&t in globalThis&&(s=globalThis[t]),s},a=!r&&!this.parentPath_,c={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):te(o,e,s,t.toString(),a?l:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):ne(o,e,s,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):X(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 re extends ie{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,!!n)}}function oe(){return{level0:0,level1:0,level2:0}}function se(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?se(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function le(e){return`${e.level2}_${e.level1}_${e.level0}`}function ae(e,t,n,i){return se(e),`${t||""}${n||""}${le(e)}${i||""}`}function ce(e){Me().PushCurrentComponent(e)}function ue(){return Me().PopCurrentComponent()}function de(){return Me().PeekCurrentComponent()}class he{constructor(e){this.componentId_=e,this.nextTickHandlers_=new Array,this.isScheduled_=!1,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()}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 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=>{try{e()}catch(e){o(e,`InlineJs.Region<${this.componentId_}>.NextTick`)}}))})))}Add(e){this.list_.push(e),this.Schedule()}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 g(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,r;let o=(null===(t=R(de()||""))||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===(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)}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 i}:void 0,raw:{entries:new Array,snapshots:new i}},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,i,r;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===(i=null==o?void 0:o.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(r=null==o?void 0:o.details.raw)||void 0===r?void 0:r.entries)&&(o.details.raw.entries=l)}PopAllGetAccessStorageSnapshots(e){var t,n,i,r,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===(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===(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 i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t}),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)}Unsubscribe_(e){delete this.subscribers_[e]}}class pe{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 me(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 fe(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 ve{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=Me().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}=fe(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:o}=fe(t,n);r&&o&&(this.handlers_[e]=me(i,r,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 ge(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function be(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function ye(){return globalThis.InlineJS_OutsideEvent=globalThis.InlineJS_OutsideEvent||{targetScopes:new Array,eventCallbacks:{}}}function Ce(e,t,n){let i=ye(),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=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ee(e,t,n){let i=ye().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 xe(e,t,n){let i=ye().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 Ge(e){ye().targetScopes=ye().targetScopes.filter((t=>t.target!==e&&e.contains(t.target)))}class ke{constructor(e,t,n,i){this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,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_=be(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]:Me().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]:Me().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 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)}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,Ge(this.element_),Me().GetMutationObserver().Unobserve(this.element_);let t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[K],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>Me().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new ve}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 Ie{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new re(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 Ae{constructor(e,t){this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new pe,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.observers_={intersections:{}},this.changes_=new he(this.id_),this.rootProxy_=new re(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,this.CreateElementScope(this.root_),Me().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{let r=R(e);if(!r)return;let o=new Array,s=Me().GetConfig().GetDirectiveRegex();null==i||i.filter((e=>e.target instanceof HTMLElement)).forEach((e=>{var t;s.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),o.forEach((e=>W({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let l=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){W({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=>!l.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.reactiveState_=e}GetReactiveState(){return"default"===this.reactiveState_?B().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){return ae(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 Ie(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(V(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 ke(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);return this.elementScopes_[n.GetId()]=n,e[K]=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&&K in t&&t[K]in this.elementScopes_?this.elementScopes_[t[K]]:null}FindElementLocalValue(e,t,n){let i=this.FindElementScope(e),r=i?i.GetLocal(t):Me().CreateNothing();if(!Me().IsNothing(r)||!n||!i&&"string"==typeof e)return r;let o=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_);if(!o)return r;let s=this.FindAncestor(o);return s?this.FindElementLocalValue(s,t,!0):r}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}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 Me()}}class Se{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&&r&&(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 Pe{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=V((null===(t=Y(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?V((null===(t=Y(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?V((null===(i=Y(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?V(n.target):"";if(!i||!(i in t))return;let r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].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 i=ae(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 we extends ie{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}class Oe{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",directiveRegex:i,directiveNameBuilder:r}={}){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.directiveRegex_=i||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=r||((e,t=!1)=>t?`data-${n||"x"}-${e}`:`${n||"x"}-${e}`)}GetAppName(){return this.appName_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}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 Fe{Get(e,t){return fetch(e,t)}}class Re{constructor(e,t=0){this.nothing_=new a,this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new i,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.managers_={directive:new ve,magic:new Se},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Pe,this.nativeFetch_=new Fe,this.fetchConcept_=null,this.concepts_={},this.config_=new Oe(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.config_=e}GetConfig(){return this.config_}GenerateUniqueId(e,t){return ae(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 Ae(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 we(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}}const $e="__InlineJS_GLOBAL_KEY__";function Ne(e,t=0){return F(),globalThis[$e]=new Re(e,t),(globalThis.InlineJS=globalThis.InlineJS||{}).global=globalThis[$e],window.dispatchEvent(new CustomEvent(De)),globalThis[$e]}function Te(e,t=0){return Me()||Ne(e,t)}const De="inlinejs.global.created";function Me(){return globalThis[$e]}function Be(){return Me()?Promise.resolve():new Promise((e=>window.addEventListener(De,e)))}function Le(e){return e=p(e),Me().IsFuture(e)?Le(e.Get()):!e&&!1!==e&&0!==e||Me().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function je({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:o}){let s={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 Me().IsNothing(r)?Reflect.get(e,n):(!o||o.list&&!(n in o.list)||null===(i=R(o.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${o.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||{},s)}function Je(e){return je(qe({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function He(){return!1}function ze(e){var{setter:t,deleter:n,lookup:i}=e,r=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}(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||He,deleter:n||He,lookup:i||He})}function qe(e){return ze(e)}function Ue(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 o=globalThis.InlineJS_ProxyGlobal=globalThis.InlineJS_ProxyGlobal||{},s=o[e]=o[e]||{};return r in s?[r,s[r],s]:(null==i||i.AddUninitCallback((()=>delete s[r])),[r,null,s])}function We(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>We(e,t,!0))):e.then(t)}const Ke="__InlineJS_Context__";let Ve={},Ye={};function Qe(e,t){if(Ve.hasOwnProperty(e))return Ve[e];if(Ye.hasOwnProperty(e))return null;try{let t=new Function(Ke,`\n with (__InlineJS_Context__){\n return (${e});\n };\n `);return Ve[e]=t}catch(e){e instanceof SyntaxError||o(e,`InlineJs.Region<${t||"NIL"}>.GenerateValueReturningFunction`)}return null}function Ze(e,t){if(Ye.hasOwnProperty(e))return Ye[e];try{let t=new Function(Ke,`\n with (__InlineJS_Context__){\n ${e};\n };\n `);return Ye[e]=t}catch(e){o(e,`InlineJs.Region<${t||"NIL"}>.GenerateVoidFunction`)}return null}function Xe(e,t,n,i=[]){var r;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===(r=s||(null==o?void 0:o.GetRootProxy()))||void 0===r?void 0:r.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function et({componentId:e,contextElement:t,expression:n,disableFunctionCall:i=!1,waitPromise:r="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:_=null}=(null==m?void 0:m.GetBackend())||{};null==v||v.Push(d.self,t),null==_||_.ResetLastAccessContext(),ce(e),Object.entries(c||{}).forEach((([e,t])=>null==v?void 0:v.Push(e,t)));try{let t=l(f);if(Me().IsFuture(t)&&(t=t.Get()),!s)return i?t:Xe(t,s,e,a);let n=e=>{if(e&&"none"!==r)return We(e,s,"recursive"===r),h||"Loading data...";s(e)};i?n(t):Xe(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))),ue(),null==v||v.Pop(d.self)}},l=Qe(n,e),a=null;return l||(a=Ze(n,e)),(i,r=[],o,c)=>{if(!a&&l)try{return s(i,l.bind(t),r||[],o||{},void 0,c)}catch(t){if(!(t instanceof SyntaxError))throw t;a=Ze(n,e)}return a?s(i,a.bind(t),r||[],o||{},!1)||null:(i&&i(null),null)}}function tt(e){return et(e)}function nt(e,t){let n=(e,t)=>We(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 it(e,t,n){e instanceof l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function rt({componentId:e,changes:t,callback:n,subscriptionsCallback:i,contextElement:r}){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 i&&i({}),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 i=R(e);if(!i||m)return void p();let{changes:r}=i.GetBackend();r.PushOrigin(v);try{n({changes:t||[],cancel:f})}catch(t){o(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},_={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(_[e.path]=_[e.path]||{})[e.compnentId]=!0)),Object.entries(_).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))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),i&&i(h),p}function ot({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r}){var s;let l=()=>{let i=R(e);if(!i)return;let{changes:s}=i.GetBackend(),l=!1,a=n?i.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();rt({componentId:e,changes:s,callback:t,subscriptionsCallback:r,contextElement:u})};(null==i?void 0:i.nextTick)?null===(s=R(e))||void 0===s||s.GetBackend().changes.AddNextTickHandler(l):l()}function st(e,t,n,i={}){var r;let o=null;if(o=e instanceof HTMLElement?(null===(r="string"==typeof n?R(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!o)return i;let s=o.GetLocal(t);return Me().IsNothing(s)&&o.SetLocal(t,s=i),s}const lt="__InlineJS_GLOBAL_COMPONENT_KEY__";function at(e){let t=globalThis[lt];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[lt]={root:n,component:Me().CreateComponent(n)},globalThis[lt]}const ct=300,ut=0,dt=0;function ht(e,t){if(!e||Me().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=Me().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||ct,e.delay=e.delay||ut,e.repeats=e.repeats||dt,e}function pt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:o,allowRepeats:l}){var a,c,u,d;let h=ht((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 i(!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,_=0,g=e=>o?1-e:e,b=()=>{var i,o;return null===(o=null===(i=R(e))||void 0===i?void 0:i.FindElementScope(t))||void 0===o||o.RemoveUninitCallback(v),(n||t).dispatchEvent(new CustomEvent("transition.canceled")),r&&r(),!1};return null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d||d.AddUninitCallback(v),k(h.duration,0,l?h.repeats:0,h.delay).While((({elapsed:e})=>{if(f)return b();0==_&&((n||t).style.transform="",(n||t).style.transformOrigin="50% 50%",(n||t).dispatchEvent(new CustomEvent("transition.enter"))),p({target:n||t,stage:0==_++?"start":"middle",fraction:m({duration:h.duration,elapsed:e,fraction:g(e/h.duration)})})})).Final((()=>{f?b():(p({target:n||t,stage:"end",fraction:m({duration:h.duration,elapsed:h.duration,fraction:g(1)})}),(n||t).dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0))))})),v}function mt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterInsert:o,afterTransitionCallback:l,transitionScope:a}){let c="string"==typeof i?i:(null==i?void 0:i.GetId())||"",u=()=>{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)),o&&s(o,"InlineJS.InsertHtml",e);let u=R(c);r&&u&&Array.from(e.children).forEach((e=>W({component:u,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),l&&((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),pt({componentId:c,contextElement:a||e,target:e,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),l())}))};if("replace"===n){let t=e=>{let n=R(c),i=Me();Array.from(e.children).forEach((e=>{var r;let o=null==n?void 0:n.FindElementScope(e);o||K in e&&(o=null===(r=i.InferComponentFrom(e))||void 0===r?void 0:r.FindElementScope(e))?o.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),u()};l?((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),pt({componentId:c,contextElement:a||e,target:e,reverse:!0,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n())})):n()}else u()}class ft{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 vt=/\{\{\s*(.+?)\s*\}\}/g,_t=/\{\{.+?\}\}/;function gt(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 bt({componentId:e,contextElement:t,text:n,handler:i}){var r;let o=tt({componentId:e,contextElement:t,expression:"let output = "+JSON.stringify(n).replace(vt,'"+($1)+"')+"; return output;"});null===(r=R(e))||void 0===r||r.CreateElementScope(t),ot({componentId:e,contextElement:t,callback:()=>o(i)})}function yt(e){var{text:t}=e,n=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}(e,["text"]);_t.test(t)&&bt(Object.assign({text:t},n))}function Ct({componentId:e,contextElement:t,text:n,handler:i}){if("string"==typeof n)return i&&yt({componentId:e,contextElement:t,text:n,handler:i});if(!_t.test(t.textContent||""))return;let r=new Array,o=new Array;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&_t.test(n.textContent)){let i={text:n.textContent||"",evaluated:n.textContent||""};r.push(i),o.push((()=>bt({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;r.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}))})()}})))}else 3==n.nodeType?r.push(n.textContent||""):r.push(n)})),r.reverse(),o.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Et({componentId:e,contextElement:t,name:n,value:i}){Ct({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e)})}function xt({componentId:e,contextElement:t}){Ct({componentId:e,contextElement:t})}function Gt(e){let t=Me(),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)&&W({component:t.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function kt(e){Te(),setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{Gt(e)})):Gt(e)}),0)}function It(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 v(e)?({name:n,callback:i}=e):Me().GetDirectiveManager().AddHandler(e);n&&i&&(t?Me().GetDirectiveManager().AddHandlerExtension(t,i,n):Me().GetDirectiveManager().AddHandler(i,n))}function At(e,t){return{name:e,callback:t}}function St(e,t,n,i,r){let o=Me().GetConfig().GetDirectiveName("on"),s=(r||[]).join("."),l=q(s?`${o}:${n}.${s}`:`${o}:${n}`,i||"");return!!l&&M(e,t,l)}const Pt=["bind","event","on"];function wt({component:e,contextElement:t,key:n,event:i,expression:r,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(i)?St(e,t,u(i),r,c()):!(!s||i!==s&&!Pt.includes(i))&&St(e,t,u(s),r,c())}function Ot(e,t,n){let i=Me().GetConfig().GetDirectiveName(t,!1),r=Me().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function Ft({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:o,useEffect:s=!0}){let l=0,a=tt({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{nt(e,(e=>{t==l&&(n?r([n,e]):v(e)?Object.entries(e).forEach(r):o&&("string"==typeof e||Array.isArray(e))&&o("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};s?ot({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const Rt=Array.from(Array(100).keys()).map((e=>e/100));function $t(e){let t={root:null,rootMargin:"0px",threshold:0};return v(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=Rt),t}class Nt{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=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),$t(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 Tt(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 Dt({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){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 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]=Tt(t[l+1].trim(),s(n)):a[n]=s(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Mt({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:s,defaultOptionValue:l,useEffect:a}){let c=tt({componentId:e,contextElement:n,expression:i}),u=Dt({options:s||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===l?0:l||-1}),d=()=>c((e=>We(e,o))),h=()=>!1===a?d():ot({componentId:e,contextElement:n,callback:d});if(u.lazy){let i=t||R(e),r={root:u.ancestor<0?null:null==i?void 0:i.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},o=i?new Nt(i.GenerateUniqueId("intob_"),r):null;o?(null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:t,entry:n}={})=>{var i;(null==n?void 0:n.isIntersecting)&&(null===(i=R(e))||void 0===i||i.RemoveIntersectionObserver(t),h())}))):h()}else h()}function Bt(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 v(e)?({name:n,callback:i,onAccess:t}=e):Me().GetMagicManager().AddHandler(e);n&&i&&Me().GetMagicManager().AddHandler(i,n,t)}function Lt(e,t,n){return{name:e,callback:t,onAccess:n}}function jt(e){return e.startsWith(":")?Me().GetConfig().GetDirectiveName("bind")+e:null}function Jt(e){return e.startsWith(".")?e.replace(".",Me().GetConfig().GetDirectiveName("class:")):null}function Ht(e){return e.startsWith("@")?e.replace("@",Me().GetConfig().GetDirectiveName("on:")):null}function zt(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}},694:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDirectiveHandlerCompact=t.StripeDirectiveHandler=void 0;const i=n(992),r=["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,i.CreateDirectiveHandlerCallback)(s,(({componentId:e,component:t,contextElement:n,expression:d,argKey:h,argOptions:p})=>{if((0,i.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 m=t||(0,i.FindComponentById)(e),f=null==m?void 0:m.FindElementScope(n);if(!m||!f)return(0,i.JournalError)("Failed to retrieve element scope.","InlineJS.stripe",n);let v="$stripe",_="#stripe";if(v in(f.GetLocals()||{}))return;if(r.includes(h)){let t=m.FindElementLocalValue(n,_,!0);return void(t&&(t.specialMounts[h]=n,f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var r;if("parent"===t)return n.parentElement?null===(r=(0,i.FindComponentById)(e))||void 0===r?void 0:r.FindElementLocalValue(n.parentElement,v,!0):null},lookup:["parent"]})))))}if(h in o){let t=m.FindElementLocalValue(n,_,!0);if(!t)return;let r=m.GenerateUniqueId("stripe_proxy_"),s={name:h,mount:n,element:t.elements.create(o[h],{style:c||void 0,classes:u||void 0}),ready:!1,complete:!1,error:void 0};if(!s.element)return;s.element.mount(n),t.fields.push(s),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var o,l,a,c;return"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.complete):"focused"===t?(null===(l=(0,i.FindComponentById)(e))||void 0===l||l.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.focused):"error"===t?(null===(a=(0,i.FindComponentById)(e))||void 0===a||a.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.error):"parent"===t?n.parentElement?null===(c=(0,i.FindComponentById)(e))||void 0===c?void 0:c.FindElementLocalValue(n.parentElement,v,!0):null:"clear"===t?()=>{s.element&&s.element.clear()}:"focus"===t?()=>{s.element&&s.element.focus()}:"blur"===t?()=>{s.element&&s.element.blur()}:void 0},lookup:["complete","focused","error","parent","clear","focus","blur"]})));let l=t.fields;return f.AddUninitCallback((()=>{var e;null===(e=s.element)||void 0===e||e.destroy(),l.splice(l.indexOf(s),1)})),s.element.on("ready",(()=>{s.ready||(s.ready=!0,s.mount.dispatchEvent(new CustomEvent("stripe.ready")),t.onReady())})),s.element.on("change",(n=>{var o,l;if((null==n?void 0:n.complete)!==s.complete){if(s.complete=null==n?void 0:n.complete,s.mount.dispatchEvent(new CustomEvent("stripe.complete",{detail:{completed:null==n?void 0:n.complete}})),s.complete){if(s.error&&(s.error=void 0,(0,i.AddChanges)("set",`${r}.error`,"error",null===(o=(0,i.FindComponentById)(e))||void 0===o?void 0:o.GetBackend().changes)),t.options.autofocus){let e=t.fields.indexOf(s);if(-1!=e&&e<t.fields.length-1){let n=t.fields[e+1];n.element?n.element.focus():"focus"in n.mount&&"function"==typeof n.mount.focus&&n.mount.focus()}else t.specialMounts.submit&&t.specialMounts.submit.focus()}}else(null==n?void 0:n.error)&&n.error.message!==s.error&&(s.error=n.error.message,(0,i.AddChanges)("set",`${r}.error`,"error",null===(l=(0,i.FindComponentById)(e))||void 0===l?void 0:l.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.error",{detail:{message:n.error.message}})));t.onChange()}})),s.element.on("focus",(()=>{var t;s.focused||(s.focused=!0,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!0}})))})),void s.element.on("blur",(()=>{var t;s.focused&&(s.focused=!1,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!1}})))}))}let g=null,b=null,y=new Array,C=()=>{(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d})((e=>(g=Stripe(e||l),g?(b=g.elements(),b?void y.splice(0).forEach((e=>(0,i.JournalTry)(e,"InlineJS.stripe.Init",n))):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n)):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n))))},E=new Array,x={submit:null,save:null,name:null,email:null,phone:null,address:null},G=m.GenerateUniqueId("stripe_proxy_"),k=(0,i.ResolveOptions)({options:{autofocus:!1,nexttick:!1,manual:!1},list:p}),I=!1,A=!1,S=0,P={fields:E,specialMounts:x,options:k,onReady:()=>{var t;return(0,i.AddChanges)("set",`${G}.readyCount`,"readyCount",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes)},onChange:()=>{var t;(t=>{var n;t!=A&&(A=t,(0,i.AddChanges)("set",`${G}.complete`,"complete",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))})(!E.find((e=>!e.complete)));let n=E.reduce(((e,t)=>e+(t.error?1:0)),0);n!=S&&(S=n,(0,i.AddChanges)("set",`${G}.errors`,"errors",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes))}},w=t=>{var n;t!=I&&(I=t,(0,i.AddChanges)("set",`${G}.active`,"active",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))},O=(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d}),F=t=>{var r;t.error?R(t.error.message||""):(n.dispatchEvent(new CustomEvent("stripe.success",{detail:{intent:t.paymentIntent}})),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1),k.nexttick?null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddNextTickHandler((()=>O())):O())},R=e=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:"host",message:e}})),$("host",e),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1)},$=(e,t)=>{n.dispatchEvent(new CustomEvent("stripe.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 i=null===(n=E.find((e=>"number"===e.name)))||void 0===n?void 0:n.element;if(!i)return null;let r={},o=t=>e&&e[t]||(x[t]?x[t].value:void 0);return["name","email","phone","address"].forEach((e=>{"address"===e?r.address={line1:o(e)}:r[e]=o(e)})),!t&&x.save&&x.save instanceof HTMLInputElement&&(t=x.save.checked),{payment_method:{card:i,billing_details:r},setup_future_usage:t?"off_session":void 0}},T=(e,t=!1)=>{t||A&&!E.find((e=>!!e.error))?(w(!0),n.dispatchEvent(new CustomEvent("stripe.before")),e()):$("incomplete","Please fill in all required fields.")};f.SetLocal(_,P),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildProxyOptions)({getter:t=>{var n,r,o,s;return"bind"===t?()=>{g||D()}:"active"===t?(null===(n=(0,i.FindComponentById)(e))||void 0===n||n.GetBackend().changes.AddGetAccess(`${G}.${t}`),I):"readyCount"===t?(null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddGetAccess(`${G}.${t}`),E.reduce(((e,t)=>e+(t.ready?1:0)),0)):"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${G}.${t}`),A):"errors"===t?(null===(s=(0,i.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${G}.${t}`),E.filter((e=>!!e.error)).map((e=>e.error))):"instance"===t?g:"publicKey"===t?l:"styles"===t?c:"classes"===t?u:"url"===t?a:"pay"===t?(e,t,n=!1)=>{T((()=>{let i=N(t,n);i&&(null==g||g.confirmCardPayment(e,i).then(F).catch(R))}),!!t&&"string"==typeof t)}:"setup"===t?(e,t,n=!1)=>{T((()=>{let i=N(t,n);i&&(null==g||g.confirmCardSetup(e,i).then(F).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 D=()=>{let e=(0,i.GetGlobal)().GetConcept("resource");a&&e?e.GetScript(a).then(C):C()};k.manual||D()})),t.StripeDirectiveHandlerCompact=function(){(0,i.AddDirectiveHandler)(t.StripeDirectiveHandler)}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.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})},(()=>{const e=n(992),t=n(694);(0,e.WaitForGlobal)().then((()=>(0,t.StripeDirectiveHandlerCompact)()))})()})();
|
1
|
+
(()=>{"use strict";var e={992:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Z,AddDirectiveExpansionRule:()=>j,AddDirectiveHandler:()=>kt,AddMagicHandler:()=>Mt,AddOutsideEventExcept:()=>xe,AddOutsideEventListener:()=>Ce,ApplyDirectiveExpansionRules:()=>H,AreObjects:()=>_,AttributeInterpolator:()=>Et,AutoBootstrap:()=>Gt,BaseComponent:()=>Ae,BaseGlobal:()=>Re,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>jt,BindEvent:()=>wt,BootstrapAndAttach:()=>It,BuildGetterProxyOptions:()=>qe,BuildIntersectionOptions:()=>$t,BuildProxyOptions:()=>ze,CallIfFunction:()=>Xe,Changes:()=>he,ChildProxy:()=>we,ClassDirectiveExpansionRule:()=>Jt,Config:()=>Oe,Context:()=>pe,ContextKeys:()=>d,CreateAnimationLoop:()=>G,CreateChildProxy:()=>ee,CreateDirective:()=>q,CreateDirectiveExpansionRule:()=>L,CreateDirectiveHandlerCallback:()=>At,CreateGlobal:()=>Ne,CreateInplaceProxy:()=>je,CreateLoop:()=>I,CreateMagicHandlerCallback:()=>Lt,CreateReadonlyProxy:()=>Je,DeepCopy:()=>g,DefaultTransitionDelay:()=>ut,DefaultTransitionDuration:()=>ct,DefaultTransitionRepeats:()=>dt,DeleteProxyProp:()=>X,DirectiveManager:()=>ve,DisableProxyAction:()=>He,DispatchDirective:()=>B,ElementScope:()=>Ge,ElementScopeKey:()=>K,EndsWith:()=>b,EvaluateLater:()=>tt,EvaluateMagicProperty:()=>Q,ExtractDuration:()=>Tt,FindComponentById:()=>R,FindComponentByName:()=>$,FindComponentByRoot:()=>N,FlattenDirective:()=>D,ForwardEvent:()=>St,Future:()=>r,GenerateFunctionFromString:()=>et,GenerateUniqueId:()=>ae,GenerateValueReturningFunction:()=>Qe,GenerateVoidFunction:()=>Ze,GenericProxy:()=>ie,GetAttribute:()=>E,GetConfig:()=>M,GetDefaultUniqueMarkers:()=>oe,GetDirectiveValue:()=>Ot,GetElementContent:()=>gt,GetElementScopeId:()=>V,GetGlobal:()=>Be,GetLocal:()=>st,GetOrCreateGlobal:()=>Te,GetProxyProp:()=>te,GetTarget:()=>p,GetTargets:()=>m,GlobalCreatedEvent:()=>De,IncrementUniqueMarkers:()=>se,InferComponent:()=>Y,InitComponentCache:()=>F,InitJITProxy:()=>Ue,InlineJSGlobalKey:()=>$e,InsertHtml:()=>mt,Interpolate:()=>Ct,InterpolateText:()=>yt,IntersectionObserver:()=>Nt,IsEqual:()=>x,IsObject:()=>v,JoinPath:()=>P,JoinUniqueMarkers:()=>le,JournalError:()=>o,JournalLog:()=>zt,JournalTry:()=>s,JournalWarn:()=>T,LazyCheck:()=>Bt,Loop:()=>l,MagicManager:()=>Se,MutationObserver:()=>Pe,NativeFetchConcept:()=>Fe,NextTick:()=>ft,Nothing:()=>a,OnDirectiveExpansionRule:()=>Ht,PathToRelative:()=>A,PeekCurrentComponent:()=>de,PeekCurrentScope:()=>be,PopCurrentComponent:()=>ue,PopCurrentScope:()=>ge,ProcessDirectives:()=>W,ProxyKeys:()=>h,PushCurrentComponent:()=>ce,PushCurrentScope:()=>_e,QueryGlobalComponent:()=>at,RemoveDirectiveExpansionRule:()=>J,RemoveOutsideEventListener:()=>Ee,ReplaceText:()=>bt,ResolveKeyValue:()=>Ft,ResolveOptions:()=>Dt,ResolveTransition:()=>ht,RootProxy:()=>re,Scope:()=>ke,SetAttributeUtil:()=>w,SetProxyProp:()=>ne,SplitPath:()=>S,Stack:()=>i,StreamData:()=>nt,SubscribeToChanges:()=>rt,SupportsAttributes:()=>y,TextContentInterpolator:()=>xt,TidyPath:()=>k,ToCamelCase:()=>u,ToString:()=>Le,TraverseDirectives:()=>U,UnbindOutsideEvent:()=>Ie,UseEffect:()=>ot,WaitForGlobal:()=>Me,WaitPromise:()=>We,WaitTransition:()=>pt,WaitWhile:()=>it});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 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[i="",...r]=e.trim().split(n||"-"),o=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?o(i):i)+(r||[]).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 _(e){return-1==e.findIndex((e=>!f(e)))}function g(e){if(e=p(e),!Array.isArray(e)&&!v(e))return e;if(Array.isArray(e))return e.map((e=>g(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=g(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[i,r]=n?m([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)=>!x(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)||!x(i[e],r[e],n)))}return i==r}function I(e,t=1e3,n=0,i=0,r=!0){t=t||1;let o=e?Math.floor(e/t):-1,s=0,a=!1,c=0,u=(n,i)=>{if(r){let r=++c;requestAnimationFrame((()=>r==c&&i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})))}else i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})},d=(r,l,c)=>{if(a)return c();if(s+=1,o>=0&&s>=o){if(!n)return l({passes:o,elapsed:o*t,duration:e});setTimeout((()=>setTimeout(d.bind(null,r,l,c),t)),i),u(o,r),n>0&&(n-=1)}else setTimeout(d.bind(null,r,l,c),t),u(s,r)};return new l(((e,n,i)=>{setTimeout(d.bind(null,e,n,i),t)}))}function G(e,t=1e3,n=0,i=0){let r=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});r=i,s=h,n>0&&(n-=1)}-1==s&&(s=h);let m=h-s;m>=r&&(s=h-(m-r),r=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 k(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 A(e,t,n){return(e=k(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 S(e,t,n){let i=(e=t?A(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function P({base:e,query:t},n,i,r){let o=`${k(e)}?${t}`;return o=n?A(o,n,i):k(o),o=r?k(`${n}/${o}`):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function w(e,t,n){t&&y(e)&&e.setAttribute(t,n)}const O="InlineJS_Comp_Cache";function F(){return globalThis[O]={id:"",component:null}}function R(e){let t=globalThis[O]=globalThis[O]||F();return e===t.id||(t.component=Be().FindComponentById(e),t.id=t.component?e:""),t.component}function $(e){return Be().FindComponentByName(e)}function N(e){return Be().FindComponentByRoot(e)}function T(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function D(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,i=0){let r="string"==typeof e?R(e):e;if(!r)return o(`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||Be().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),s((()=>{l(Object.assign(Object.assign({},D(n)),{componentId:r.GetId(),component:r,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(T(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function M(){return Be().GetConfig()}function L(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function j(e){return Be().GetDirectiveManager().AddExpansionRule(e)}function J(e){Be().GetDirectiveManager().RemoveExpansionRule(e)}function H(e){return Be().GetDirectiveManager().Expand(e)}let z={};function q(e,t){if(!e||!(e=e.trim()))return null;if((t=t.trim())===e&&(t=""),e in z)return{meta:z[e],value:t};let n=H(e),i=n.match(M().GetDirectiveRegex());if(!i||3!=i.length||!i[2])return null;let r=i[2].indexOf(":"),o=-1==r?[i[2]]:[i[2].substring(0,r),i[2].substring(r+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 z[e]=d,{meta:d,value:t}}function U({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((i=>{try{n&&n(i.name,i.value||"");let e=q(i.name,i.value||"");e&&t(e)}catch(t){o(t,"InlineJS.TraverseDirectives",e)}}))}function W({component:e,element:t,options:n={}}){var i;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 r="string"==typeof e?R(e):e;if(!r)return o("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let s=0;U({element:t,callback:n=>{B(e,t,n,s)&&(t.removeAttribute(n.meta.view.original),++s)},attributeCallback:(e,n)=>Be().DispatchAttributeProcessing({name:e,value:n,componentId:r.GetId(),component:r,contextElement:t})}),Be().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t}),n.ignoreChildren||t instanceof HTMLTemplateElement||(null==r||r.PushSelectionScope(),Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>W({component:e,options:n,element:t}))),null==r||r.PopSelectionScope()),null===(i=null==r?void 0:r.FindElementScope(t))||void 0===i||i.ExecutePostProcessCallbacks()}const K="__InlineJS_ELSCOPE_KEY__";function V(e){let t="";for(;e;){if(t=K in(n=e)&&n[K],t||e===document.body)return t||"";e=e.parentElement}var n;return""}function Y(e){let t=V(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}function Q(e,t,n,i="",r=!0){let l="string"==typeof e?R(e):e;if(!l)return o(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),Be().CreateNothing();let a=Be().GetMagicManager().FindHandler(i&&n.startsWith(i)?n.substring(i.length):n,{contextElement:t,componentId:l.GetId(),component:l});if(!a){if(r&&i&&n.startsWith(`${i}${i}`)){let e=l.GetId();return t=>{let r=Y(t)||R(e);if(!r)return null;let o=r.FindElementScope(t),s=o&&o.GetLocal(n.substring(i.length));return o&&!Be().IsNothing(s)?s:Q(r.GetId(),t,n,`${i}${i}`,!1)}}return Be().CreateNothing()}return s((()=>a({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Z(e,t,n,i,r=!0){if(!i)return;let o={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(o),!r)return;let s=t.split(".");for(;s.length>2;)s.pop(),i.Add({original:o,path:s.join(".")})}function X(e,t,n,i){var r;if(!(i in t))return!1;let o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==o||o.RemoveProxy(`${n}.${i}`),Z("delete",n,i,null==o?void 0:o.GetBackend().changes),!0}function ee(e,t,n,i){if(!e)return null;let r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!v(n))return null;let o=Be().CreateChildProxy(e,t,n);return i&&i.AddProxy(o),o}function te(e,t,n,i,r){var o;if(i===h.target)return t;if(i===h.componentId)return e;if(i===h.name)return n.split(".").at(-1);if(i===h.path)return n;if(i===h.parentPath)return n.split(".").slice(0,-1).join(".")||"";let s=i in t;if(!s&&r){let t=r(R(e)||void 0,i);if(!Be().IsNothing(t))return Be().IsFuture(t)?t.Get():t}if(s&&!t.hasOwnProperty(i))return t[i];let l=s?t[i]:null;if(Be().IsFuture(l))return l.Get();let a=R(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(o=ee((null==a?void 0:a.FindProxy(n))||null,i,l,a||void 0))||void 0===o?void 0:o.GetNative())||l}function ne(e,t,n,i,r){var o;if(i in t&&r===t[i])return!0;let s=R(e);return null===(o=null==s?void 0:s.FindProxy(n))||void 0===o||o.RemoveChild(i),t[i]=r,null==s||s.RemoveProxy(`${n}.${i}`),Z("set",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}class ie{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 o=this.componentId_,s=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),Be().CreateNothing());if(!Be().IsNothing(e))return e}let r=n.Peek(d.self),o=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!Be().IsNothing(o))return o;let s=i?Q(e,r,t,"$"):Be().CreateNothing();return Be().IsNothing(s)&&t&&t in globalThis&&(s=globalThis[t]),s},a=!r&&!this.parentPath_,c={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):te(o,e,s,t.toString(),a?l:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):ne(o,e,s,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):X(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 re extends ie{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,!!n)}}function oe(){return{level0:0,level1:0,level2:0}}function se(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?se(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function le(e){return`${e.level2}_${e.level1}_${e.level0}`}function ae(e,t,n,i){return se(e),`${t||""}${n||""}${le(e)}${i||""}`}function ce(e){Be().PushCurrentComponent(e)}function ue(){return Be().PopCurrentComponent()}function de(){return Be().PeekCurrentComponent()}class he{constructor(e){this.componentId_=e,this.nextTickHandlers_=new Array,this.isScheduled_=!1,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()}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 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=>{try{e()}catch(e){o(e,`InlineJs.Region<${this.componentId_}>.NextTick`)}}))})))}Add(e){this.list_.push(e),this.Schedule()}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 g(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,r;let o=(null===(t=R(de()||""))||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===(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)}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 i}:void 0,raw:{entries:new Array,snapshots:new i}},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,i,r;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===(i=null==o?void 0:o.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(r=null==o?void 0:o.details.raw)||void 0===r?void 0:r.entries)&&(o.details.raw.entries=l)}PopAllGetAccessStorageSnapshots(e){var t,n,i,r,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===(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===(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 i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t}),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)}Unsubscribe_(e){delete this.subscribers_[e]}}class pe{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 me(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 fe(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 ve{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=Be().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}=fe(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:o}=fe(t,n);r&&o&&(this.handlers_[e]=me(i,r,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 ge(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function be(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function ye(){return globalThis.InlineJS_OutsideEvent=globalThis.InlineJS_OutsideEvent||{targetScopes:new Array,eventCallbacks:{}}}function Ce(e,t,n){let i=ye(),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=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ee(e,t,n){let i=ye().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 xe(e,t,n){let i=ye().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 Ie(e){ye().targetScopes=ye().targetScopes.filter((t=>t.target!==e&&e.contains(t.target)))}class Ge{constructor(e,t,n,i){this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,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_=be(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]:Be().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]:Be().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 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)}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_),Be().GetMutationObserver().Unobserve(this.element_);let t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[K],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>Be().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new ve}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 ke{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new re(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 Ae{constructor(e,t){this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new pe,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.observers_={intersections:{}},this.changes_=new he(this.id_),this.rootProxy_=new re(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,this.CreateElementScope(this.root_),Be().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{let r=R(e);if(!r)return;let o=new Array,s=Be().GetConfig().GetDirectiveRegex();null==i||i.filter((e=>e.target instanceof HTMLElement)).forEach((e=>{var t;s.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),o.forEach((e=>W({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let l=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){W({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=>!l.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.reactiveState_=e}GetReactiveState(){return"default"===this.reactiveState_?M().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){return ae(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 ke(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(V(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 Ge(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);return this.elementScopes_[n.GetId()]=n,e[K]=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&&K in t&&t[K]in this.elementScopes_?this.elementScopes_[t[K]]:null}FindElementLocalValue(e,t,n){let i=this.FindElementScope(e),r=i?i.GetLocal(t):Be().CreateNothing();if(!Be().IsNothing(r)||!n||!i&&"string"==typeof e)return r;let o=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_);if(!o)return r;let s=this.FindAncestor(o);return s?this.FindElementLocalValue(s,t,!0):r}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}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 Be()}}class Se{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&&r&&(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 Pe{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=V((null===(t=Y(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?V((null===(t=Y(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?V((null===(i=Y(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?V(n.target):"";if(!i||!(i in t))return;let r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].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 i=ae(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 we extends ie{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}class Oe{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",directiveRegex:i,directiveNameBuilder:r}={}){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.directiveRegex_=i||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=r||((e,t=!1)=>t?`data-${n||"x"}-${e}`:`${n||"x"}-${e}`)}GetAppName(){return this.appName_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}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 Fe{Get(e,t){return fetch(e,t)}}class Re{constructor(e,t=0){this.nothing_=new a,this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new i,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.managers_={directive:new ve,magic:new Se},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Pe,this.nativeFetch_=new Fe,this.fetchConcept_=null,this.concepts_={},this.config_=new Oe(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.config_=e}GetConfig(){return this.config_}GenerateUniqueId(e,t){return ae(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 Ae(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 we(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}}const $e="__InlineJS_GLOBAL_KEY__";function Ne(e,t=0){return F(),globalThis[$e]=new Re(e,t),(globalThis.InlineJS=globalThis.InlineJS||{}).global=globalThis[$e],window.dispatchEvent(new CustomEvent(De)),globalThis[$e]}function Te(e,t=0){return Be()||Ne(e,t)}const De="inlinejs.global.created";function Be(){return globalThis[$e]}function Me(){return Be()?Promise.resolve():new Promise((e=>window.addEventListener(De,e)))}function Le(e){return e=p(e),Be().IsFuture(e)?Le(e.Get()):!e&&!1!==e&&0!==e||Be().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function je({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:o}){let s={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 Be().IsNothing(r)?Reflect.get(e,n):(!o||o.list&&!(n in o.list)||null===(i=R(o.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${o.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||{},s)}function Je(e){return je(qe({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function He(){return!1}function ze(e){var{setter:t,deleter:n,lookup:i}=e,r=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}(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||He,deleter:n||He,lookup:i||He})}function qe(e){return ze(e)}function Ue(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 o=globalThis.InlineJS_ProxyGlobal=globalThis.InlineJS_ProxyGlobal||{},s=o[e]=o[e]||{};return r in s?[r,s[r],s]:(null==i||i.AddUninitCallback((()=>delete s[r])),[r,null,s])}function We(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>We(e,t,!0))):e.then(t)}const Ke="__InlineJS_Context__";let Ve={},Ye={};function Qe(e,t){if(Ve.hasOwnProperty(e))return Ve[e];if(Ye.hasOwnProperty(e))return null;try{let t=new Function(Ke,`\n with (__InlineJS_Context__){\n return (${e});\n };\n `);return Ve[e]=t}catch(e){e instanceof SyntaxError||o(e,`InlineJs.Region<${t||"NIL"}>.GenerateValueReturningFunction`)}return null}function Ze(e,t){if(Ye.hasOwnProperty(e))return Ye[e];try{let t=new Function(Ke,`\n with (__InlineJS_Context__){\n ${e};\n };\n `);return Ye[e]=t}catch(e){o(e,`InlineJs.Region<${t||"NIL"}>.GenerateVoidFunction`)}return null}function Xe(e,t,n,i=[]){var r;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===(r=s||(null==o?void 0:o.GetRootProxy()))||void 0===r?void 0:r.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function et({componentId:e,contextElement:t,expression:n,disableFunctionCall:i=!1,waitPromise:r="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:_=null}=(null==m?void 0:m.GetBackend())||{};null==v||v.Push(d.self,t),null==_||_.ResetLastAccessContext(),ce(e),Object.entries(c||{}).forEach((([e,t])=>null==v?void 0:v.Push(e,t)));try{let t=l(f);if(Be().IsFuture(t)&&(t=t.Get()),!s)return i?t:Xe(t,s,e,a);let n=e=>{if(e&&"none"!==r)return We(e,s,"recursive"===r),h||"Loading data...";s(e)};i?n(t):Xe(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))),ue(),null==v||v.Pop(d.self)}},l=Qe(n,e),a=null;return l||(a=Ze(n,e)),(i,r=[],o,c)=>{if(!a&&l)try{return s(i,l.bind(t),r||[],o||{},void 0,c)}catch(t){if(!(t instanceof SyntaxError))throw t;a=Ze(n,e)}return a?s(i,a.bind(t),r||[],o||{},!1)||null:(i&&i(null),null)}}function tt(e){return et(e)}function nt(e,t){let n=(e,t)=>We(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 it(e,t,n){e instanceof l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function rt({componentId:e,changes:t,callback:n,subscriptionsCallback:i,contextElement:r}){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 i&&i({}),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 i=R(e);if(!i||m)return void p();let{changes:r}=i.GetBackend();r.PushOrigin(v);try{n({changes:t||[],cancel:f})}catch(t){o(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},_={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(_[e.path]=_[e.path]||{})[e.compnentId]=!0)),Object.entries(_).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))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),i&&i(h),p}function ot({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r}){var s;let l=()=>{let i=R(e);if(!i)return;let{changes:s}=i.GetBackend(),l=!1,a=n?i.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();rt({componentId:e,changes:s,callback:t,subscriptionsCallback:r,contextElement:u})};(null==i?void 0:i.nextTick)?null===(s=R(e))||void 0===s||s.GetBackend().changes.AddNextTickHandler(l):l()}function st(e,t,n,i={}){var r;let o=null;if(o=e instanceof HTMLElement?(null===(r="string"==typeof n?R(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!o)return i;let s=o.GetLocal(t);return Be().IsNothing(s)&&o.SetLocal(t,s=i),s}const lt="__InlineJS_GLOBAL_COMPONENT_KEY__";function at(e){let t=globalThis[lt];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[lt]={root:n,component:Be().CreateComponent(n)},globalThis[lt]}const ct=300,ut=0,dt=0;function ht(e,t){if(!e||Be().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=Be().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||ct,e.delay=e.delay||ut,e.repeats=e.repeats||dt,e}function pt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:o,allowRepeats:l}){var a,c,u,d;let h=ht((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 i(!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,_=0,g=e=>o?1-e:e,b=()=>{var i,o;return null===(o=null===(i=R(e))||void 0===i?void 0:i.FindElementScope(t))||void 0===o||o.RemoveUninitCallback(v),(n||t).dispatchEvent(new CustomEvent("transition.canceled")),r&&r(),!1};return null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d||d.AddUninitCallback(v),G(h.duration,0,l?h.repeats:0,h.delay).While((({elapsed:e})=>{if(f)return b();0==_&&((n||t).style.transform="",(n||t).style.transformOrigin="50% 50%",(n||t).dispatchEvent(new CustomEvent("transition.enter"))),p({target:n||t,stage:0==_++?"start":"middle",fraction:m({duration:h.duration,elapsed:e,fraction:g(e/h.duration)})})})).Final((()=>{f?b():(p({target:n||t,stage:"end",fraction:m({duration:h.duration,elapsed:h.duration,fraction:g(1)})}),(n||t).dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0))))})),v}function mt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterInsert:o,afterTransitionCallback:l,transitionScope:a}){let c="string"==typeof i?i:(null==i?void 0:i.GetId())||"",u=()=>{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)),o&&s(o,"InlineJS.InsertHtml",e);let u=R(c);r&&u&&Array.from(e.children).forEach((e=>W({component:u,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),l&&((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),pt({componentId:c,contextElement:a||e,target:e,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),l())}))};if("replace"===n){let t=e=>{let n=R(c),i=Be();Array.from(e.children).forEach((e=>{var r;let o=null==n?void 0:n.FindElementScope(e);o||K in e&&(o=null===(r=i.InferComponentFrom(e))||void 0===r?void 0:r.FindElementScope(e))?o.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),u()};l?((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),pt({componentId:c,contextElement:a||e,target:e,reverse:!0,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n())})):n()}else u()}class ft{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 vt=/\{\{\s*(.+?)\s*\}\}/g,_t=/\{\{.+?\}\}/;function gt(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 bt({componentId:e,contextElement:t,text:n,handler:i}){var r;let o=tt({componentId:e,contextElement:t,expression:"let output = "+JSON.stringify(n).replace(vt,'"+($1)+"')+"; return output;"});null===(r=R(e))||void 0===r||r.CreateElementScope(t),ot({componentId:e,contextElement:t,callback:()=>o(i)})}function yt(e){var{text:t}=e,n=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}(e,["text"]);_t.test(t)&&bt(Object.assign({text:t},n))}function Ct({componentId:e,contextElement:t,text:n,handler:i}){if("string"==typeof n)return i&&yt({componentId:e,contextElement:t,text:n,handler:i});if(!_t.test(t.textContent||""))return;let r=new Array,o=new Array;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&_t.test(n.textContent)){let i={text:n.textContent||"",evaluated:n.textContent||""};r.push(i),o.push((()=>bt({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;r.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}))})()}})))}else 3==n.nodeType?r.push(n.textContent||""):r.push(n)})),r.reverse(),o.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Et({componentId:e,contextElement:t,name:n,value:i}){Ct({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e)})}function xt({componentId:e,contextElement:t}){Ct({componentId:e,contextElement:t})}function It(e){let t=Be(),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)&&W({component:t.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function Gt(e){Te(),setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{It(e)})):It(e)}),0)}function kt(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 v(e)?({name:n,callback:i}=e):Be().GetDirectiveManager().AddHandler(e);n&&i&&(t?Be().GetDirectiveManager().AddHandlerExtension(t,i,n):Be().GetDirectiveManager().AddHandler(i,n))}function At(e,t){return{name:e,callback:t}}function St(e,t,n,i,r){let o=Be().GetConfig().GetDirectiveName("on"),s=(r||[]).join("."),l=q(s?`${o}:${n}.${s}`:`${o}:${n}`,i||"");return!!l&&B(e,t,l)}const Pt=["bind","event","on"];function wt({component:e,contextElement:t,key:n,event:i,expression:r,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(i)?St(e,t,u(i),r,c()):!(!s||i!==s&&!Pt.includes(i))&&St(e,t,u(s),r,c())}function Ot(e,t,n){let i=Be().GetConfig().GetDirectiveName(t,!1),r=Be().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function Ft({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:o,useEffect:s=!0}){let l=0,a=tt({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{nt(e,(e=>{t==l&&(n?r([n,e]):v(e)?Object.entries(e).forEach(r):o&&("string"==typeof e||Array.isArray(e))&&o("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};s?ot({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const Rt=Array.from(Array(100).keys()).map((e=>e/100));function $t(e){let t={root:null,rootMargin:"0px",threshold:0};return v(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=Rt),t}class Nt{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=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),$t(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 Tt(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 Dt({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){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 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]=Tt(t[l+1].trim(),s(n)):a[n]=s(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Bt({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:s,defaultOptionValue:l,useEffect:a}){let c=tt({componentId:e,contextElement:n,expression:i}),u=Dt({options:s||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===l?0:l||-1}),d=()=>c((e=>We(e,o))),h=()=>!1===a?d():ot({componentId:e,contextElement:n,callback:d});if(u.lazy){let i=t||R(e),r={root:u.ancestor<0?null:null==i?void 0:i.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},o=i?new Nt(i.GenerateUniqueId("intob_"),r):null;o?(null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:t,entry:n}={})=>{var i;(null==n?void 0:n.isIntersecting)&&(null===(i=R(e))||void 0===i||i.RemoveIntersectionObserver(t),h())}))):h()}else h()}function Mt(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 v(e)?({name:n,callback:i,onAccess:t}=e):Be().GetMagicManager().AddHandler(e);n&&i&&Be().GetMagicManager().AddHandler(i,n,t)}function Lt(e,t,n){return{name:e,callback:t,onAccess:n}}function jt(e){return e.startsWith(":")?Be().GetConfig().GetDirectiveName("bind")+e:null}function Jt(e){return e.startsWith(".")?e.replace(".",Be().GetConfig().GetDirectiveName("class:")):null}function Ht(e){return e.startsWith("@")?e.replace("@",Be().GetConfig().GetDirectiveName("on:")):null}function zt(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}},694:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDirectiveHandlerCompact=t.StripeDirectiveHandler=void 0;const i=n(992),r=["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,i.CreateDirectiveHandlerCallback)(s,(({componentId:e,component:t,contextElement:n,expression:d,argKey:h,argOptions:p})=>{var m;if((0,i.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,i.FindComponentById)(e),v=null==f?void 0:f.FindElementScope(n);if(!f||!v)return(0,i.JournalError)("Failed to retrieve element scope.","InlineJS.stripe",n);let _="$stripe",g="#stripe";if(_ in(v.GetLocals()||{}))return;if(r.includes(h)){let t=f.FindElementLocalValue(n,g,!0);return void(t&&(t.specialMounts[h]=n,v.SetLocal(_,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var r;let o=n.parentElement?null===(r=(0,i.FindComponentById)(e))||void 0===r?void 0:r.FindElementLocalValue(n.parentElement,_,!0):null;return"parent"===t?o:t&&o?o[t]:null},lookup:["parent"]})))))}if(o.hasOwnProperty(h))return null===(m=f.FindElementLocalValue(n,g,!0))||void 0===m?void 0:m.addField(h,n,((t,r)=>{let o=(0,i.FindComponentById)(e),s=null==o?void 0:o.FindElementScope(n),l=null==o?void 0:o.GenerateUniqueId("stripe_proxy_");t.element&&(null==s||s.SetLocal(_,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:r=>{var o,s,a,c,u;if("complete"===r)return null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${l}.${r}`),t.complete;if("focused"===r)return null===(s=(0,i.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${l}.${r}`),t.focused;if("error"===r)return null===(a=(0,i.FindComponentById)(e))||void 0===a||a.GetBackend().changes.AddGetAccess(`${l}.${r}`),t.error;if("parent"===r)return n.parentElement?null===(c=(0,i.FindComponentById)(e))||void 0===c?void 0:c.FindElementLocalValue(n.parentElement,_,!0):null;if("clear"===r)return()=>{t.element&&t.element.clear()};if("focus"===r)return()=>{t.element&&t.element.focus()};if("blur"===r)return()=>{t.element&&t.element.blur()};if("disable"===r)return(e=!0)=>{t.element&&t.element.update({disabled:e})};let d=n.parentElement?null===(u=(0,i.FindComponentById)(e))||void 0===u?void 0:u.FindElementLocalValue(n.parentElement,_,!0):null;return r&&d?d[r]:null},lookup:["complete","focused","error","parent","clear","focus","blur","disable"]}))),t.element.on("ready",(()=>{t.ready||(t.ready=!0,t.mount.dispatchEvent(new CustomEvent("stripe.ready")),r.onReady())})),t.element.on("change",(n=>{var o,s;if((null==n?void 0:n.complete)!==t.complete){if(t.complete=null==n?void 0:n.complete,t.mount.dispatchEvent(new CustomEvent("stripe.complete",{detail:{completed:null==n?void 0:n.complete}})),t.complete){if(t.error&&(t.error=void 0,(0,i.AddChanges)("set",`${l}.error`,"error",null===(o=(0,i.FindComponentById)(e))||void 0===o?void 0:o.GetBackend().changes)),r.options.autofocus){let e=r.fields.indexOf(t);if(-1!=e&&e<r.fields.length-1){let t=r.fields[e+1];t.element?t.element.focus():"focus"in t.mount&&"function"==typeof t.mount.focus&&t.mount.focus()}else r.specialMounts.submit&&r.specialMounts.submit.focus()}}else(null==n?void 0:n.error)&&n.error.message!==t.error&&(t.error=n.error.message,(0,i.AddChanges)("set",`${l}.error`,"error",null===(s=(0,i.FindComponentById)(e))||void 0===s?void 0:s.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent("stripe.error",{detail:{message:n.error.message}})));r.onChange()}})),t.element.on("focus",(()=>{var n;t.focused||(t.focused=!0,(0,i.AddChanges)("set",`${l}.focused`,"focused",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!0}})))})),t.element.on("blur",(()=>{var n;t.focused&&(t.focused=!1,(0,i.AddChanges)("set",`${l}.focused`,"focused",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes),t.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!1}})))})))}));let b=null,y=null,C=new Array,E=()=>{(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d})((e=>(b=Stripe(e||l),b?(y=b.elements(),y?void C.splice(0).forEach((e=>(0,i.JournalTry)(e,"InlineJS.stripe.Init",n))):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n)):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n))))},x=new Array,I={submit:null,save:null,name:null,email:null,phone:null,address:null},G=f.GenerateUniqueId("stripe_proxy_"),k=(0,i.ResolveOptions)({options:{autofocus:!1,nexttick:!1,manual:!1},list:p}),A=!1,S=!1,P=0,w={fields:x,specialMounts:I,options:k,addField(t,n,r){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,i.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))})),r(a,this)};y?s():C.push(s)},onReady:()=>{var t;return(0,i.AddChanges)("set",`${G}.readyCount`,"readyCount",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes)},onChange:()=>{var t;(t=>{var n;t!=S&&(S=t,(0,i.AddChanges)("set",`${G}.complete`,"complete",null===(n=(0,i.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,i.AddChanges)("set",`${G}.errors`,"errors",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes))}},O=t=>{var n;t!=A&&(A=t,(0,i.AddChanges)("set",`${G}.active`,"active",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))},F=(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d}),R=t=>{var r;t.error?$(t.error.message||""):(n.dispatchEvent(new CustomEvent("stripe.success",{detail:{intent:t.paymentIntent}})),n.dispatchEvent(new CustomEvent("stripe.after")),O(!1),k.nexttick?null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddNextTickHandler((()=>F())):F())},$=e=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:"host",message:e}})),N("host",e),n.dispatchEvent(new CustomEvent("stripe.after")),O(!1)},N=(e,t)=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:e,message:t}}))},T=(e,t)=>{var n;if(e&&"string"==typeof e)return{payment_method:e,setup_future_usage:t?"off_session":void 0};let i=null===(n=x.find((e=>"number"===e.name)))||void 0===n?void 0:n.element;if(!i)return null;let r={},o=t=>e&&e[t]||(I[t]?I[t].value:void 0);return["name","email","phone","address"].forEach((e=>{"address"===e?r.address={line1:o(e)}:r[e]=o(e)})),!t&&I.save&&I.save instanceof HTMLInputElement&&(t=I.save.checked),{payment_method:{card:i,billing_details:r},setup_future_usage:t?"off_session":void 0}},D=(e,t=!1)=>{t||S&&!x.find((e=>!!e.error))?(O(!0),n.dispatchEvent(new CustomEvent("stripe.before")),e()):N("incomplete","Please fill in all required fields.")};v.SetLocal(g,w),v.SetLocal(_,(0,i.CreateInplaceProxy)((0,i.BuildProxyOptions)({getter:t=>{var n,r,o,s;return"bind"===t?()=>{b||B()}:"active"===t?(null===(n=(0,i.FindComponentById)(e))||void 0===n||n.GetBackend().changes.AddGetAccess(`${G}.${t}`),A):"readyCount"===t?(null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddGetAccess(`${G}.${t}`),x.reduce(((e,t)=>e+(t.ready?1:0)),0)):"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${G}.${t}`),S):"errors"===t?(null===(s=(0,i.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${G}.${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 i=T(t,n);i&&(null==b||b.confirmCardPayment(e,i).then(R).catch($))}),!!t&&"string"==typeof t)}:"setup"===t?(e,t)=>{D((()=>{let n=T(t,!1);n&&(null==b||b.confirmCardSetup(e,n).then(R).catch($))}),!!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 B=()=>{let e=(0,i.GetGlobal)().GetConcept("resource");a&&e?e.GetScript(a).then(E):E()};k.manual||B()})),t.StripeDirectiveHandlerCompact=function(){(0,i.AddDirectiveHandler)(t.StripeDirectiveHandler)}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.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})},(()=>{const e=n(992),t=n(694);(0,e.WaitForGlobal)().then((()=>(0,t.StripeDirectiveHandlerCompact)()))})()})();
|