@builder.io/sdk-react 2.0.1 → 2.0.2-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +22 -22
- package/lib/browser/blocks-exports.mjs +745 -758
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/{server-entry-f9067095.js → server-entry-45c77a86.js} +337 -335
- package/lib/browser/server-entry-69a4d3c9.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-6ad2cec7.cjs → accordion-7896cae6.cjs} +1 -1
- package/lib/edge/{accordion-4a70912d.js → accordion-ddf18178.js} +1 -1
- package/lib/edge/blocks-03bf455b.cjs +32 -0
- package/lib/edge/{blocks-fedde8d2.js → blocks-10f68d94.js} +1333 -1346
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-f6426eff.cjs → button-91e0aec2.cjs} +1 -1
- package/lib/edge/{button-af35e8de.js → button-cba5f3f8.js} +2 -2
- package/lib/edge/{columns-f607250b.cjs → columns-080edf58.cjs} +1 -1
- package/lib/edge/{columns-1065c0ae.js → columns-6bfc17df.js} +3 -3
- package/lib/edge/{content-variants-773afb9f.cjs → content-variants-65794f41.cjs} +1 -1
- package/lib/edge/{content-variants-3d57a82f.js → content-variants-d855ce6c.js} +10 -10
- package/lib/edge/{form-5762c22a.cjs → form-23561b33.cjs} +1 -1
- package/lib/edge/{form-0a58d0e4.js → form-f4cd948c.js} +3 -3
- package/lib/edge/{get-class-prop-name-268b0f61.js → get-class-prop-name-1928cf9f.js} +1 -1
- package/lib/edge/{get-class-prop-name-3061c329.cjs → get-class-prop-name-237cd359.cjs} +1 -1
- package/lib/edge/{img-59bb70c7.cjs → img-86db320f.cjs} +1 -1
- package/lib/edge/{img-252c9967.js → img-f9ec8689.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-7ae243e2.js → input-394e72b8.js} +1 -1
- package/lib/edge/{input-2163d4dc.cjs → input-953ef2fe.cjs} +1 -1
- package/lib/edge/{select-cfa0eb8e.js → select-3e25848f.js} +1 -1
- package/lib/edge/{select-39231177.cjs → select-9bb6b8c1.cjs} +1 -1
- package/lib/edge/{server-entry-4750de9c.cjs → server-entry-6bd1c4bc.cjs} +1 -1
- package/lib/edge/{server-entry-681e8e79.js → server-entry-771d1637.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-69da8c56.cjs → slot-22940ad6.cjs} +1 -1
- package/lib/edge/{slot-7c61542f.js → slot-881129c3.js} +3 -3
- package/lib/edge/{symbol-bd999a19.cjs → symbol-58595a6d.cjs} +1 -1
- package/lib/edge/{symbol-4a8a6cda.js → symbol-faa97614.js} +2 -2
- package/lib/edge/{tabs-3d0e242e.cjs → tabs-dc23d0fa.cjs} +1 -1
- package/lib/edge/{tabs-c3ff0c70.js → tabs-f0ca75e4.js} +3 -3
- package/lib/node/blocks-exports.cjs +21 -21
- package/lib/node/blocks-exports.mjs +758 -771
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-78262e65.js → node-runtime-46d21495.js} +1 -1
- package/lib/node/{node-runtime-3bfd8465.cjs → node-runtime-55fc8cd4.cjs} +1 -1
- package/lib/node/server-entry-11eee7d8.cjs +2 -0
- package/lib/node/{server-entry-5f9f100f.js → server-entry-d45c1bf6.js} +337 -335
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +3 -2
- package/types/components/block/block.helpers.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/browser/server-entry-29c5c31c.cjs +0 -2
- package/lib/edge/blocks-0bd38a83.cjs +0 -32
- package/lib/node/server-entry-63058f3f.cjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const I="react",b="[Builder.io]: ",d={log:(...e)=>console.log(b,...e),error:(...e)=>console.error(b,...e),warn:(...e)=>console.warn(b,...e),debug:(...e)=>console.debug(b,...e)};function c(){return typeof window!="undefined"&&typeof document!="undefined"}const ue=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},M=e=>e instanceof URLSearchParams?ue(e):e,U=e=>typeof e=="string"?e:e instanceof URLSearchParams?e.toString():new URLSearchParams(e).toString();function de(){return c()&&window.self!==window.top}function F(e){return de()&&U(e||window.location.search).indexOf("builder.frameEditing=")!==-1}const le=()=>{if(c()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},fe=()=>typeof navigator=="object"&&navigator.userAgent||"",N=()=>{const e=fe(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),r=le();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},p=e=>e!=null,k=e=>JSON.parse(JSON.stringify(e));function ge(e){const t=e||(c()?window.location.search:void 0);return t?U(t).indexOf("builder.preview=")!==-1:!1}const he=e=>({type:"builder.registerComponent",data:D(e)}),pe=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},me=e=>typeof e=="function"?pe(e):k(e),D=({inputs:e,...t})=>({...k(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,s])=>({...r,[o]:me(s)}),{}))}),x={};function j(e,t){let n=x[e];if(n||(n=x[e]=[]),n.push(t),c()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const R={};function ye(e){if(c()){Object.assign(R,e);const t={type:"builder.settingsChange",data:R};parent.postMessage(t,"*")}}const B="builder.",Se="options.",C=e=>{if(!e)return{};const t=M(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(B)){const o=r.replace(B,"").replace(Se,"");n[o]=t[r]}}),n},we=()=>{if(!c())return{};const e=new URLSearchParams(window.location.search);return C(e)},be=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},K=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){d.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},_=async e=>K(e),Ie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(p).join("; "),ve=[["secure",""],["SameSite","None"]],Ee=({name:e,value:t,expires:n})=>{const o=(c()?location.protocol==="https:":!0)?ve:[[]],s=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...s,["path","/"],["domain",be(window.location.hostname)],...o];return Ie(a)},W=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Ee({name:e,value:t,expires:n});document.cookie=o}catch(o){d.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}};function ke(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function $(){return ke().replace(/-/g,"")}const G="builderSessionId",Ce=async({canTrack:e})=>{if(!e)return;const t=await _({name:G,canTrack:e});if(p(t))return t;{const n=Pe();return Oe({id:n,canTrack:e}),n}},Pe=()=>$(),Oe=({id:e,canTrack:t})=>W({name:G,value:e,canTrack:t}),z=()=>c()&&typeof localStorage!="undefined"?localStorage:void 0,Ae=({key:e,canTrack:t})=>{var n;try{return t?(n=z())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},Te=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=z())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},J="builderVisitorId",xe=({canTrack:e})=>{if(!e)return;const t=Ae({key:J,canTrack:e});if(p(t))return t;{const n=Re();return Be({id:n,canTrack:e}),n}},Re=()=>$(),Be=({id:e,canTrack:t})=>Te({key:J,value:e,canTrack:t}),Le=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Ce({canTrack:e}),n=xe({canTrack:e});return{sessionId:t,visitorId:n}},Ve=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await Le({canTrack:t}),userAttributes:N(),ownerId:n}});async function H(e){if(!e.apiKey){d.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!F()&&(c()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Ve(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Me=e=>H({...e,canTrack:!0}),Ue=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function X(e,t){if(!t.origin.startsWith("http")&&!t.origin.startsWith("https"))return!1;const n=new URL(t.origin),r=n.hostname;return(e||Ue).findIndex(o=>o.startsWith("*.")?r.endsWith(o.slice(1)):o===r)>-1}const Fe="2.0.2-0",Ne=()=>{j("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let L=!1;const q=(e={})=>{var t,n;L||(L=!0,c()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:Fe,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",r=>{var s,a;if(!X(e.trustedHosts,r))return;const{data:o}=r;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const l=o.data.text,y=o.data.arguments||[],m=o.data.id,v=new Function(l);let u,g=null;try{u=v.apply(null,y)}catch(h){g=h}g?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):u&&typeof u.then=="function"?u.then(h=>{var S;(S=window.parent)==null||S.postMessage({type:"builder.evaluateResult",data:{id:m,result:h}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:u,id:m}},"*");break}}})))},Q=({model:e,trustedHosts:t,callbacks:n})=>r=>{if(!X(t,r))return;const{data:o}=r;if(o)switch(o.type){case"builder.configureSdk":{n.configureSdk(o.data);break}case"builder.triggerAnimation":{n.animation(o.data);break}case"builder.contentUpdate":{const s=o.data,a=s.key||s.alias||s.entry||s.modelName,l=s.data;a===e&&n.contentUpdate(l);break}}},De=(e,t,n)=>{if(!c)return d.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};q();const r=Q({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},je="builder.tests",P=e=>`${je}.${e}`,Ke=({contentId:e})=>_({name:P(e),canTrack:!0}),_e=({contentId:e})=>K({name:P(e),canTrack:!0}),We=({contentId:e,value:t})=>W({name:P(e),value:t,canTrack:!0}),Y=e=>p(e.id)&&p(e.variations)&&Object.keys(e.variations).length>0,$e=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const a=(o=t[s])==null?void 0:o.testRatio;if(n+=a,r<n)return s}return e},Z=e=>{const t=$e(e);return We({contentId:e.id,value:t}).catch(n=>{d.error("could not store A/B test variation: ",n)}),t},ee=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Ge=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!Y(e))return e;const n=_e({contentId:e.id})||Z({variations:e.variations,id:e.id}),r=ee({item:e,testGroupId:n});return{...e,...r}},ze=async({item:e,canTrack:t})=>{if(!t||!Y(e))return e;const r=await Ke({contentId:e.id})||Z({variations:e.variations,id:e.id}),o=ee({item:e,testGroupId:r});return{...e,...o}},te=e=>p(e)?e:!0;function Je(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:globalThis}function He(){const e=Je().fetch;if(typeof e=="undefined")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const ne=He();function E(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],a=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...E(s,a,n)}:{...r,[a]:s}},{})}function re(e,t,n={}){for(const r in e){const o=e[r],s=t?t+"."+r:r;o&&typeof o=="object"&&!Array.isArray(o)&&!Object.keys(o).find(a=>a.startsWith("$"))?re(o,s,n):n[s]=o}return n}const Xe="v3",V=e=>typeof e=="number"&&!isNaN(e)&&e>=0,O=e=>{const{limit:t=30,userAttributes:n,query:r,model:o,apiKey:s,enrich:a,locale:l,apiVersion:y=Xe,fields:m,omit:v,offset:u,cacheSeconds:g,staleCacheSeconds:h,sort:S,includeUnpublished:A}=e;if(!s)throw new Error("Missing API key");if(!["v3"].includes(y))throw new Error(`Invalid apiVersion: expected 'v3', received '${y}'`);const ae=t!==1,i=new URL(`https://cdn.builder.io/api/${y}/content/${o}`);if(i.searchParams.set("apiKey",s),i.searchParams.set("limit",String(t)),i.searchParams.set("noTraverse",String(ae)),i.searchParams.set("includeRefs",String(!0)),l&&i.searchParams.set("locale",l),a&&i.searchParams.set("enrich",String(a)),i.searchParams.set("omit",v||"meta.componentsUsed"),m&&i.searchParams.set("fields",m),Number.isFinite(u)&&u>-1&&i.searchParams.set("offset",String(Math.floor(u))),typeof A=="boolean"&&i.searchParams.set("includeUnpublished",String(A)),g&&V(g)&&i.searchParams.set("cacheSeconds",String(g)),h&&V(h)&&i.searchParams.set("staleCacheSeconds",String(h)),S){const f=E({sort:S});for(const w in f)i.searchParams.set(w,JSON.stringify(f[w]))}const ce={...we(),...M(e.options||{})},T=E(ce);for(const f in T)i.searchParams.set(f,String(T[f]));if(n&&i.searchParams.set("userAttributes",JSON.stringify(n)),r){const f=re({query:r});for(const w in f)i.searchParams.set(w,JSON.stringify(f[w]))}return i},qe=e=>"results"in e;async function oe(e){const t=await ie({...e,limit:1});return t&&t[0]||null}const Qe=async e=>{var s;const t=O(e);return await(await((s=e.fetch)!=null?s:ne)(t.href,e.fetchOptions)).json()},se=async(e,t,n=O(e))=>{const r=te(e.canTrack);if(n.search.includes("preview="),!r||!(c()||I==="reactNative"))return t.results;try{const o=[];for(const s of t.results)o.push(await ze({item:s,canTrack:r}));t.results=o}catch(o){d.error("Could not process A/B tests. ",o)}return t.results};async function ie(e){try{const t=O(e),n=await Qe(e);return qe(n)?se(e,n):(d.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return d.error("Error fetching data. ",t),null}}const Ye=async e=>{var r,o,s;const t=e.path||((r=e.url)==null?void 0:r.pathname)||((o=e.userAttributes)==null?void 0:o.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:C(e.searchParams||((s=e.url)==null?void 0:s.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await oe(n)}};exports.MSG_PREFIX=b;exports.TARGET=I;exports._processContentResult=se;exports._track=H;exports.checkIsDefined=p;exports.createEditorListener=Q;exports.createRegisterComponentMessage=he;exports.fastClone=k;exports.fetch=ne;exports.fetchBuilderProps=Ye;exports.fetchEntries=ie;exports.fetchOneEntry=oe;exports.getBuilderSearchParams=C;exports.getDefaultCanTrack=te;exports.getUserAttributes=N;exports.handleABTestingSync=Ge;exports.isBrowser=c;exports.isEditing=F;exports.isPreviewing=ge;exports.logger=d;exports.register=j;exports.registerInsertMenu=Ne;exports.serializeComponentInfo=D;exports.setEditorSettings=ye;exports.setupBrowserForEditing=q;exports.subscribeToEditor=De;exports.track=Me;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-69a4d3c9.cjs");exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _processContentResult as r, createRegisterComponentMessage as s, fetchBuilderProps as i, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, setEditorSettings as E, subscribeToEditor as f, track as h } from "./server-entry-
|
|
1
|
+
import { _processContentResult as r, createRegisterComponentMessage as s, fetchBuilderProps as i, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, setEditorSettings as E, subscribeToEditor as f, track as h } from "./server-entry-45c77a86.js";
|
|
2
2
|
export {
|
|
3
3
|
r as _processContentResult,
|
|
4
4
|
s as createRegisterComponentMessage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),O=require("react"),g=require("./blocks-exports.cjs");require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),O=require("react"),g=require("./blocks-exports.cjs");require("./server-entry-6bd1c4bc.cjs");const y=t=>t.toString();function v(t){var u;const[o,s]=O.useState(()=>[]);function d(){return!!(t.grid||t.oneAtATime)}function C(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...t.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function h(){const n={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(n).filter(([l,a])=>a!==void 0))}function j(e){return`builder-accordion-title builder-accordion-title-${o.includes(e)?"open":"closed"}`}function k(e){return`builder-accordion-detail builder-accordion-detail-${o.includes(e)?"open":"closed"}`}function c(){let e=null;if(t.grid&&o.length&&document){const l=o[0];let i=document.querySelector(`.builder-accordion-title[data-index="${l}"]`);if(e=l,i){let m=i.getBoundingClientRect();for(;i=i&&i.nextElementSibling;)if(i){if(i.classList.contains("builder-accordion-detail"))continue;const f=i.getBoundingClientRect();if(f.left>m.left){const b=parseInt(i.getAttribute("data-index")||"",10);isNaN(b)||(m=f,e=b)}else break}}}return typeof e=="number"&&(e=e+1),e}function x(){const e={order:typeof c()=="number"?c():void 0,...t.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(e).filter(([n,l])=>l!==void 0))}function I(e){o.includes(e)?s(d()?[]:o.filter(n=>n!==e)):s(d()?[e]:o.concat(e))}return r.jsx("div",{className:"builder-accordion",style:C(),children:(u=t.items)==null?void 0:u.map((e,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:j(n),style:{...h(),width:t.grid?t.gridRowWidth:void 0,order:c()!==null?y(n):y(n+1)},"data-index":n,onClick:l=>I(n),children:r.jsx(g.Blocks,{blocks:e.title,path:`items.${n}.title`,parent:t.builderBlock.id,context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent})}),o.includes(n)?r.jsx("div",{className:k(n),style:x(),children:r.jsx(g.Blocks,{blocks:e.detail,path:`items.${n}.detail`,parent:t.builderBlock.id,context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent})}):null]}))})}exports.default=v;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as x, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A } from "react";
|
|
3
3
|
import { Blocks as g } from "./blocks-exports.mjs";
|
|
4
|
-
import "./server-entry-
|
|
4
|
+
import "./server-entry-771d1637.js";
|
|
5
5
|
const y = (t) => t.toString();
|
|
6
6
|
function B(t) {
|
|
7
7
|
var a;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";var xn=Object.defineProperty;var wn=(e,t,r)=>t in e?xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Rt=(e,t,r)=>(wn(e,typeof t!="symbol"?t+"":t,r),r);const C=require("react/jsx-runtime"),he=require("react"),Ur=require("./blocks-exports.cjs"),F=require("./server-entry-6bd1c4bc.cjs"),kn=require("./get-class-prop-name-237cd359.cjs"),Sn=require("./dynamic-renderer-b29b45ca.cjs"),Ft=(e,t,r)=>{if(Object(e)!==e)return e;const n=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return n.slice(0,-1).reduce((o,s,a)=>Object(o[s])===o[s]?o[s]:o[s]=Math.abs(Number(n[a+1]))>>0===+n[a+1]?[]:{},e)[n[n.length-1]]=r,e},Fr=({builder:e,context:t,event:r,state:n})=>Object.entries({state:n,Builder:e,builder:e,context:t,event:r}),En=()=>({isEditing:F.isEditing(),isBrowser:F.isBrowser(),isServer:!F.isBrowser(),getUserAttributes:()=>F.getUserAttributes()}),Cn=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,Lr=he.createContext({registeredComponents:{}});function jn(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}const On=({code:e,builder:t,context:r,event:n,localState:o,rootSetState:s,rootState:a})=>{const p=Fr({builder:t,context:r,event:n,state:_r({rootState:a,localState:o,rootSetState:s})});return new Function(...p.map(([g])=>g),e)(...p.map(([,g])=>g))};function _r({rootState:e,localState:t,rootSetState:r}){return new Proxy(e,{get:(n,o)=>{if(t&&o in t)return t[o];const s=n[o];return typeof s=="object"&&s!==null?_r({rootState:s,localState:void 0,rootSetState:r?a=>{n[o]=a,r(n)}:void 0}):s},set:(n,o,s)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return n[o]=s,r==null||r(n),!0}})}var P,An=function(e){function t(i){return 48>i?i===36:58>i?!0:65>i?!1:91>i?!0:97>i?i===95:123>i?!0:170<=i&&vn.test(String.fromCharCode(i))}function r(i){return 65>i?i===36:91>i?!0:97>i?i===95:123>i?!0:170<=i&&Ir.test(String.fromCharCode(i))}function n(i,l){for(var u=d,f=1,k=0;;){ot.lastIndex=k;var L=ot.exec(u);if(L&&L.index<i)++f,k=L.index+L[0].length;else break}throw u={line:f,ab:i-k},l+=" ("+u.line+":"+u.ab+")",l=new SyntaxError(l),l.j=i,l.X=u,l.o=c,l}function o(i){i=i.split(" ");for(var l=Object.create(null),u=0;u<i.length;u++)l[i[u]]=!0;return function(f){return l[f]||!1}}function s(){this.line=ye,this.ab=c-re}function a(i,l){xe=c,O.C&&(xt=new s),w=i,g(),z=l,Ne=i.m}function p(){for(var i=c,l=O.va&&O.C&&new s,u=d.charCodeAt(c+=2);c<me&&u!==10&&u!==13&&u!==8232&&u!==8233;)++c,u=d.charCodeAt(c);O.va&&O.va(!1,d.slice(i+2,c),i,c,l,O.C&&new s)}function g(){for(;c<me;){var i=d.charCodeAt(c);if(i===32)++c;else if(i===13)++c,i=d.charCodeAt(c),i===10&&++c,O.C&&(++ye,re=c);else if(i===10||i===8232||i===8233)++c,O.C&&(++ye,re=c);else if(8<i&&14>i)++c;else if(i===47)if(i=d.charCodeAt(c+1),i===42){i=void 0;var l=O.va&&O.C&&new s,u=c,f=d.indexOf("*/",c+=2);if(f===-1&&n(c-2,"Unterminated comment"),c=f+2,O.C)for(ot.lastIndex=u;(i=ot.exec(d))&&i.index<c;)++ye,re=i.index+i[0].length;O.va&&O.va(!0,d.slice(u+2,f),u,c,l,O.C&&new s)}else if(i===47)p();else break;else if(i===160)++c;else if(5760<=i&&yn.test(String.fromCharCode(i)))++c;else break}}function y(i){switch(i){case 46:i=d.charCodeAt(c+1),48<=i&&57>=i?A(!0):(++c,a(wr));return;case 40:return++c,a(ne);case 41:return++c,a(q);case 59:return++c,a(oe);case 44:return++c,a(pe);case 91:return++c,a(bt);case 93:return++c,a(Tt);case 123:return++c,a(Me);case 125:return++c,a(ke);case 58:return++c,a(De);case 63:return++c,a(kr);case 48:if(i=d.charCodeAt(c+1),i===120||i===88){c+=2,i=T(16),i===null&&n(U+2,"Expected hexadecimal number"),r(d.charCodeAt(c))&&n(c,"Identifier directly after number"),a(Be,i);return}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return A(!1);case 34:case 39:c++;for(var l="";;){c>=me&&n(U,"Unterminated string constant");var u=d.charCodeAt(c);if(u===i){++c,a(et,l);break}if(u===92){u=d.charCodeAt(++c);var f=/^[0-7]+/.exec(d.slice(c,c+3));for(f&&(f=f[0]);f&&255<parseInt(f,8);)f=f.slice(0,-1);if(f==="0"&&(f=null),++c,f)J&&n(c-2,"Octal literal in strict mode"),l+=String.fromCharCode(parseInt(f,8)),c+=f.length-1;else switch(u){case 110:l+=`
|
|
2
|
+
`;break;case 114:l+="\r";break;case 120:l+=String.fromCharCode(D(2));break;case 117:l+=String.fromCharCode(D(4));break;case 85:l+=String.fromCharCode(D(8));break;case 116:l+=" ";break;case 98:l+="\b";break;case 118:l+="\v";break;case 102:l+="\f";break;case 48:l+="\0";break;case 13:d.charCodeAt(c)===10&&++c;case 10:O.C&&(re=c,++ye);break;default:l+=String.fromCharCode(u)}}else u!==13&&u!==10&&u!==8232&&u!==8233||n(U,"Unterminated string constant"),l+=String.fromCharCode(u),++c}return;case 47:i=d.charCodeAt(c+1),Ne?(++c,Y()):i===61?b(ve,2):b(Sr,1);return;case 37:case 42:d.charCodeAt(c+1)===61?b(ve,2):b(hn,1);return;case 124:case 38:l=d.charCodeAt(c+1),l===i?b(i===124?jr:Or,2):l===61?b(ve,2):b(i===124?sn:ln,1);return;case 94:d.charCodeAt(c+1)===61?b(ve,2):b(an,1);return;case 43:case 45:l=d.charCodeAt(c+1),l===i?l===45&&d.charCodeAt(c+2)===62&&nt.test(d.slice(fe,c))?(c+=3,p(),g(),j()):b(on,2):l===61?b(ve,2):b(pn,1);return;case 60:case 62:l=d.charCodeAt(c+1),u=1,l===i?(u=i===62&&d.charCodeAt(c+2)===62?3:2,d.charCodeAt(c+u)===61?b(ve,u+1):b(fn,u)):l===33&&i===60&&d.charCodeAt(c+2)===45&&d.charCodeAt(c+3)===45?(c+=4,p(),g(),j()):(l===61&&(u=d.charCodeAt(c+2)===61?3:2),b(cn,u));return;case 61:case 33:d.charCodeAt(c+1)===61?b(un,d.charCodeAt(c+2)===61?3:2):b(i===61?Er:Cr,1);return;case 126:return b(Cr,1)}return!1}function j(i){if(i?c=U+1:U=c,O.C&&(mt=new s),i)return Y();if(c>=me)return a(St);if(i=d.charCodeAt(c),r(i)||i===92)return K();if(y(i)===!1){if(i=String.fromCharCode(i),i==="\\"||Ir.test(i))return K();n(c,"Unexpected character '"+i+"'")}}function b(i,l){var u=d.slice(c,c+l);c+=l,a(i,u)}function Y(){for(var i,l,u=c;;){c>=me&&n(u,"Unterminated regexp");var f=d.charAt(c);if(nt.test(f)&&n(u,"Unterminated regexp"),i)i=!1;else{if(f==="[")l=!0;else if(f==="]"&&l)l=!1;else if(f==="/"&&!l)break;i=f==="\\"}++c}i=d.slice(u,c),++c,(l=R())&&!/^[gmi]*$/.test(l)&&n(u,"Invalid regexp flag");try{var k=new RegExp(i,l)}catch(L){throw L instanceof SyntaxError&&n(u,L.message),L}a(tr,k)}function T(i,l){for(var u=c,f=0,k=l===void 0?1/0:l,L=0;L<k;++L){var V=d.charCodeAt(c);if(V=97<=V?V-97+10:65<=V?V-65+10:48<=V&&57>=V?V-48:1/0,V>=i)break;++c,f=f*i+V}return c===u||l!==void 0&&c-u!==l?null:f}function A(i){var l=c,u=!1,f=d.charCodeAt(c)===48;i||T(10)!==null||n(l,"Invalid number"),d.charCodeAt(c)===46&&(++c,T(10),u=!0),i=d.charCodeAt(c),(i===69||i===101)&&(i=d.charCodeAt(++c),i!==43&&i!==45||++c,T(10)===null&&n(l,"Invalid number"),u=!0),r(d.charCodeAt(c))&&n(c,"Identifier directly after number"),i=d.slice(l,c);var k;u?k=parseFloat(i):f&&i.length!==1?/[89]/.test(i)||J?n(l,"Invalid number"):k=parseInt(i,8):k=parseInt(i,10),a(Be,k)}function D(i){return i=T(16,i),i===null&&n(U,"Bad character escape sequence"),i}function R(){Se=!1;for(var i,l=!0,u=c;;){var f=d.charCodeAt(c);if(t(f))Se&&(i+=d.charAt(c)),++c;else if(f===92){Se||(i=d.slice(u,c)),Se=!0,d.charCodeAt(++c)!==117&&n(c,"Expecting Unicode escape sequence \\uXXXX"),++c,f=D(4);var k=String.fromCharCode(f);k||n(c-1,"Invalid Unicode escape"),(l?r(f):t(f))||n(c-4,"Invalid Unicode escape"),i+=k}else break;l=!1}return Se?i:d.slice(u,c)}function K(){var i=R(),l=we;!Se&&dn(i)&&(l=nn[i]),a(l,i)}function S(){wt=U,fe=xe,kt=xt,j()}function Q(i){if(J=i,c=U,O.C)for(;c<re;)re=d.lastIndexOf(`
|
|
3
|
+
`,re-2)+1,--ye;g(),j()}function ze(){this.type=null,this.start=U,this.end=null}function Zt(){this.start=mt,this.end=null,vt&&(this.source=vt)}function W(){var i=new ze;return O.C&&(i.X=new Zt),O.vb&&(i.sourceFile=O.vb),O.Xa&&(i.j=[U,0]),i}function ce(i){var l=new ze;return l.start=i.start,O.C&&(l.X=new Zt,l.X.start=i.X.start),O.Xa&&(l.j=[i.j[0],0]),l}function E(i,l){return i.type=l,i.end=fe,O.C&&(i.X.end=kt),O.Xa&&(i.j[1]=fe),i}function ct(i){return i.type==="ExpressionStatement"&&i.la.type==="Literal"&&i.la.value==="use strict"}function N(i){return w===i?(S(),!0):!1}function Ze(){return!O.fc&&(w===St||w===ke||nt.test(d.slice(fe,U)))}function de(){N(oe)||Ze()||ee()}function B(i){w===i?S():ee()}function ee(){n(U,"Unexpected token")}function qe(i){i.type!=="Identifier"&&i.type!=="MemberExpression"&&n(i.start,"Assigning to rvalue"),J&&i.type==="Identifier"&&rt(i.name)&&n(i.start,"Assigning to "+i.name+" in strict mode")}function Z(){(w===Sr||w===ve&&z==="/=")&&j(!0);var i=w,l=W();switch(i){case Et:case nr:S();var u=i===Et;N(oe)||Ze()?l.label=null:w!==we?ee():(l.label=te(),de());for(var f=0;f<M.length;++f){var k=M[f];if((l.label===null||k.name===l.label.name)&&(k.kind!==null&&(u||k.kind==="loop")||l.label&&u))break}return f===M.length&&n(l.start,"Unsyntactic "+i.l),E(l,u?"BreakStatement":"ContinueStatement");case or:return S(),de(),E(l,"DebuggerStatement");case sr:return S(),M.push(Pt),l.body=Z(),M.pop(),B(It),l.test=be(),de(),E(l,"DoWhileStatement");case ur:return S(),M.push(Pt),B(ne),w===oe?ft(l,null):w===At?(i=W(),S(),Qt(i,!0),E(i,"VariableDeclaration"),i.fa.length===1&&N(tt)?qt(l,i):ft(l,i)):(i=G(!1,!0),N(tt)?(qe(i),qt(l,i)):ft(l,i));case jt:return S(),dt(l,!0);case cr:return S(),l.test=be(),l.da=Z(),l.alternate=N(ar)?Z():null,E(l,"IfStatement");case fr:return Re||O.Ib||n(U,"'return' outside of function"),S(),N(oe)||Ze()?l.K=null:(l.K=G(),de()),E(l,"ReturnStatement");case Ot:for(S(),l.Qb=be(),l.tb=[],B(Me),M.push(mn);w!==ke;)w===Ct||w===ir?(i=w===Ct,f&&E(f,"SwitchCase"),l.tb.push(f=W()),f.da=[],S(),i?f.test=G():(u&&n(wt,"Multiple default clauses"),u=!0,f.test=null),B(De)):(f||ee(),f.da.push(Z()));return f&&E(f,"SwitchCase"),S(),M.pop(),E(l,"SwitchStatement");case pr:return S(),nt.test(d.slice(fe,U))&&n(fe,"Illegal newline after throw"),l.K=G(),de(),E(l,"ThrowStatement");case hr:return S(),l.block=Te(),l.Ea=null,w===rr&&(i=W(),S(),B(ne),i.Ua=te(),J&&rt(i.Ua.name)&&n(i.Ua.start,"Binding "+i.Ua.name+" in strict mode"),B(q),i.body=Te(),l.Ea=E(i,"CatchClause")),l.fb=N(lr)?Te():null,l.Ea||l.fb||n(l.start,"Missing catch or finally clause"),E(l,"TryStatement");case At:return S(),Qt(l),de(),E(l,"VariableDeclaration");case It:return S(),l.test=be(),M.push(Pt),l.body=Z(),M.pop(),E(l,"WhileStatement");case gr:return J&&n(U,"'with' in strict mode"),S(),l.object=be(),l.body=Z(),E(l,"WithStatement");case Me:return Te();case oe:return S(),E(l,"EmptyStatement");default:if(u=z,k=G(),i===we&&k.type==="Identifier"&&N(De)){for(f=0;f<M.length;++f)M[f].name===u&&n(k.start,"Label '"+u+"' is already declared");return M.push({name:u,kind:w.W?"loop":w===Ot?"switch":null}),l.body=Z(),M.pop(),l.label=k,E(l,"LabeledStatement")}return l.la=k,de(),E(l,"ExpressionStatement")}}function be(){B(ne);var i=G();return B(q),i}function Te(i){var l=W(),u=!0,f=!1;for(l.body=[],B(Me);!N(ke);){var k=Z();if(l.body.push(k),u&&i&&ct(k)){var L=f;Q(f=!0)}u=!1}return f&&!L&&Q(!1),E(l,"BlockStatement")}function ft(i,l){return i.ua=l,B(oe),i.test=w===oe?null:G(),B(oe),i.update=w===q?null:G(),B(q),i.body=Z(),M.pop(),E(i,"ForStatement")}function qt(i,l){return i.left=l,i.right=G(),B(q),i.body=Z(),M.pop(),E(i,"ForInStatement")}function Qt(i,l){for(i.fa=[],i.kind="var";;){var u=W();if(u.id=te(),J&&rt(u.id.name)&&n(u.id.start,"Binding "+u.id.name+" in strict mode"),u.ua=N(Er)?G(!0,l):null,i.fa.push(E(u,"VariableDeclarator")),!N(pe))break}}function G(i,l){var u=pt(l);if(!i&&w===pe){for(i=ce(u),i.xb=[u];N(pe);)i.xb.push(pt(l));return E(i,"SequenceExpression")}return u}function pt(i){var l=ht(gt(),-1,i);if(N(kr)){var u=ce(l);u.test=l,u.da=G(!0),B(De),u.alternate=G(!0,i),l=E(u,"ConditionalExpression")}return w.Cb?(u=ce(l),u.operator=z,u.left=l,S(),u.right=pt(i),qe(l),E(u,"AssignmentExpression")):l}function ht(i,l,u){var f=w.L;if(f!==null&&(!u||w!==tt)&&f>l){var k=ce(i);return k.left=i,k.operator=z,i=w,S(),k.right=ht(gt(),f,u),f=E(k,i===jr||i===Or?"LogicalExpression":"BinaryExpression"),ht(f,l,u)}return i}function gt(){if(w.prefix){var i=W(),l=w.$b;return i.operator=z,Ne=i.prefix=!0,S(),i.K=gt(),l?qe(i.K):J&&i.operator==="delete"&&i.K.type==="Identifier"&&n(i.start,"Deleting local variable in strict mode"),E(i,l?"UpdateExpression":"UnaryExpression")}for(l=Pe(Qe());w.cc&&!Ze();)i=ce(l),i.operator=z,i.prefix=!1,i.K=l,qe(l),S(),l=E(i,"UpdateExpression");return l}function Pe(i,l){if(N(wr)){var u=ce(i);return u.object=i,u.Wa=te(!0),u.bb=!1,Pe(E(u,"MemberExpression"),l)}return N(bt)?(u=ce(i),u.object=i,u.Wa=G(),u.bb=!0,B(Tt),Pe(E(u,"MemberExpression"),l)):!l&&N(ne)?(u=ce(i),u.callee=i,u.arguments=yt(q,!1),Pe(E(u,"CallExpression"),l)):i}function Qe(){switch(w){case yr:var i=W();return S(),E(i,"ThisExpression");case we:return te();case Be:case et:case tr:return i=W(),i.value=z,i.raw=d.slice(U,xe),S(),E(i,"Literal");case vr:case mr:case xr:return i=W(),i.value=w.$a,i.raw=w.l,S(),E(i,"Literal");case ne:i=mt;var l=U;S();var u=G();return u.start=l,u.end=xe,O.C&&(u.X.start=i,u.X.end=xt),O.Xa&&(u.j=[l,xe]),B(q),u;case bt:return i=W(),S(),i.elements=yt(Tt,!0,!0),E(i,"ArrayExpression");case Me:for(i=W(),l=!0,u=!1,i.h=[],S();!N(ke);){if(l)l=!1;else if(B(pe),O.sb&&N(ke))break;var f={key:w===Be||w===et?Qe():te(!0)},k=!1;if(N(De)){f.value=G(!0);var L=f.kind="init"}else f.key.type!=="Identifier"||f.key.name!=="get"&&f.key.name!=="set"?ee():(k=u=!0,L=f.kind=f.key.name,f.key=w===Be||w===et?Qe():te(!0),w!==ne&&ee(),f.value=dt(W(),!1));if(f.key.type==="Identifier"&&(J||u))for(var V=0;V<i.h.length;++V){var Ee=i.h[V];if(Ee.key.name===f.key.name){var Nt=L===Ee.kind||k&&Ee.kind==="init"||L==="init"&&(Ee.kind==="get"||Ee.kind==="set");Nt&&!J&&L==="init"&&Ee.kind==="init"&&(Nt=!1),Nt&&n(f.key.start,"Redefinition of property")}}i.h.push(f)}return E(i,"ObjectExpression");case jt:return i=W(),S(),dt(i,!1);case dr:return i=W(),S(),i.callee=Pe(Qe(),!0),i.arguments=N(ne)?yt(q,!1):rn,E(i,"NewExpression")}ee()}function dt(i,l){w===we?i.id=te():l?ee():i.id=null,i.oa=[];var u=!0;for(B(ne);!N(q);)u?u=!1:B(pe),i.oa.push(te());u=Re;var f=M;if(Re=!0,M=[],i.body=Te(!0),Re=u,M=f,J||i.body.body.length&&ct(i.body.body[0])){for(u=i.id?-1:0;u<i.oa.length;++u)if(f=0>u?i.id:i.oa[u],(Ar(f.name)||rt(f.name))&&n(f.start,"Defining '"+f.name+"' in strict mode"),0<=u)for(var k=0;k<u;++k)f.name===i.oa[k].name&&n(f.start,"Argument name clash in strict mode")}return E(i,l?"FunctionDeclaration":"FunctionExpression")}function yt(i,l,u){for(var f=[],k=!0;!N(i);){if(k)k=!1;else if(B(pe),l&&O.sb&&N(i))break;f.push(u&&w===pe?null:G(!0))}return f}function te(i){var l=W();return i&&O.yb==="everywhere"&&(i=!1),w===we?(!i&&(O.yb&&gn(z)||J&&Ar(z))&&d.slice(U,xe).indexOf("\\")===-1&&n(U,"The keyword '"+z+"' is reserved"),l.name=z):i&&w.l?l.name=w.l:ee(),Ne=!1,S(),E(l,"Identifier")}e.version="0.5.0";var O,d="",me,vt;e.parse=function(i,l){d=String(i),me=d.length,O=l||{};for(var u in er)Object.prototype.hasOwnProperty.call(O,u)||(O[u]=er[u]);for(vt=O.sourceFile,ye=1,c=re=0,Ne=!0,g(),u=O.dc,wt=fe=c,O.C&&(kt=new s),Re=J=!1,M=[],j(),i=u||W(),l=!0,u||(i.body=[]);w!==St;)u=Z(),i.body.push(u),l&&ct(u)&&Q(!0),l=!1;return E(i,"Program")};var er={fc:!1,sb:!0,yb:!1,Ib:!1,C:!1,va:null,Xa:!1,dc:null,sourceFile:null,vb:null},c=0,U=0,xe=0,mt,xt,w,z,Ne,ye,re,wt=0,fe=0,kt,Re,M,J,rn=[],Be={type:"num"},tr={type:"regexp"},et={type:"string"},we={type:"name"},St={type:"eof"},Et={l:"break"},Ct={l:"case",m:!0},rr={l:"catch"},nr={l:"continue"},or={l:"debugger"},ir={l:"default"},sr={l:"do",W:!0},ar={l:"else",m:!0},lr={l:"finally"},ur={l:"for",W:!0},jt={l:"function"},cr={l:"if"},fr={l:"return",m:!0},Ot={l:"switch"},pr={l:"throw",m:!0},hr={l:"try"},At={l:"var"},It={l:"while",W:!0},gr={l:"with"},dr={l:"new",m:!0},yr={l:"this"},vr={l:"null",$a:null},mr={l:"true",$a:!0},xr={l:"false",$a:!1},tt={l:"in",L:7,m:!0},nn={break:Et,case:Ct,catch:rr,continue:nr,debugger:or,default:ir,do:sr,else:ar,finally:lr,for:ur,function:jt,if:cr,return:fr,switch:Ot,throw:pr,try:hr,var:At,while:It,with:gr,null:vr,true:mr,false:xr,new:dr,in:tt,instanceof:{l:"instanceof",L:7,m:!0},this:yr,typeof:{l:"typeof",prefix:!0,m:!0},void:{l:"void",prefix:!0,m:!0},delete:{l:"delete",prefix:!0,m:!0}},bt={type:"[",m:!0},Tt={type:"]"},Me={type:"{",m:!0},ke={type:"}"},ne={type:"(",m:!0},q={type:")"},pe={type:",",m:!0},oe={type:";",m:!0},De={type:":",m:!0},wr={type:"."},kr={type:"?",m:!0},Sr={L:10,m:!0},Er={Cb:!0,m:!0},ve={Cb:!0,m:!0},on={cc:!0,prefix:!0,$b:!0},Cr={prefix:!0,m:!0},jr={L:1,m:!0},Or={L:2,m:!0},sn={L:3,m:!0},an={L:4,m:!0},ln={L:5,m:!0},un={L:6,m:!0},cn={L:7,m:!0},fn={L:8,m:!0},pn={L:9,prefix:!0,m:!0},hn={L:10,m:!0},gn=o("class enum extends super const export import"),Ar=o("implements interface let package private protected public static yield"),rt=o("eval arguments"),dn=o("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),yn=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ir=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),vn=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),nt=/[\n\r\u2028\u2029]/,ot=/\r\n|[\n\r\u2028\u2029]/g,Se,Pt={kind:"loop"},mn={kind:"switch"}},Mt=Mt=typeof globalThis=="undefined"?void 0:globalThis;An(Mt.j||(Mt.j={}));function h(e,t){typeof e=="string"&&(e=Oe(e,"code"));var r=e.constructor;this.ya=function(){return new r({options:{}})};var n=this.ya(),o;for(o in e)n[o]=o==="body"?e[o].slice():e[o];this.ra=n,this.ca=[],this.qb=t,this.za=!1,this.ba=[],this.Ya=0,this.rb=Object.create(null),e=/^step([A-Z]\w*)$/;var s,a;for(a in this)typeof this[a]=="function"&&(s=a.match(e))&&(this.rb[s[1]]=this[a].bind(this));this.N=Ut(this,this.ra,null),this.Na=this.N.object,this.ra=Oe(this.ba.join(`
|
|
4
|
+
`),"polyfills"),this.ba=void 0,st(this.ra),s=new m(this.ra,this.N),s.done=!1,this.o=[s],this.Eb(),this.value=void 0,this.ra=n,s=new m(this.ra,this.N),s.done=!1,this.o.length=0,this.o[0]=s}var br={C:!0,kc:5},Lt={configurable:!0,enumerable:!0,writable:!1},v={configurable:!0,enumerable:!1,writable:!0},H={configurable:!0,enumerable:!1,writable:!1},Ue={configurable:!1,enumerable:!1,writable:!1},Tr={configurable:!1,enumerable:!0,writable:!0},Wr={STEP_ERROR:!0},Ie={SCOPE_REFERENCE:!0},Xe={VALUE_IN_DESCRIPTOR:!0},Ce={REGEXP_TIMEOUT:!0},Pr=[],ae=null,$e=null,ge=typeof globalThis=="undefined"?void 0:globalThis,In=["onmessage = function(e) {","var result;","var data = e.data;","switch (data[0]) {","case 'split':","result = data[1].split(data[2], data[3]);","break;","case 'match':","result = data[1].match(data[2]);","break;","case 'search':","result = data[1].search(data[2]);","break;","case 'replace':","result = data[1].replace(data[2], data[3]);","break;","case 'exec':","var regexp = data[1];","regexp.lastIndex = data[2];","result = [regexp.exec(data[3]), data[1].lastIndex];","break;","default:","throw Error('Unknown RegExp operation: ' + data[0]);","}","postMessage(result);","close();","};"];function _t(e){var t=e>>>0;return t===Number(e)?t:NaN}function Ge(e){var t=e>>>0;return String(t)===String(e)&&t!==4294967295?t:NaN}function st(e,t,r){t?e.start=t:delete e.start,r?e.end=r:delete e.end;for(var n in e)if(n!=="loc"&&e.hasOwnProperty(n)){var o=e[n];o&&typeof o=="object"&&st(o,t,r)}}h.prototype.REGEXP_MODE=2;h.prototype.REGEXP_THREAD_TIMEOUT=1e3;h.prototype.POLYFILL_TIMEOUT=1e3;P=h.prototype;P.P=!1;P.Ka=!1;P.Kb=0;P.ic=0;function Oe(e,t){var r={},n;for(n in br)r[n]=br[n];return r.sourceFile=t,ge.j.parse(e,r)}P.Jb=function(e){var t=this.o[0];if(!t||t.node.type!=="Program")throw Error("Expecting original AST to start with a Program node");if(typeof e=="string"&&(e=Oe(e,"appendCode"+this.Kb++)),!e||e.type!=="Program")throw Error("Expecting new AST to start with a Program node");He(this,e,t.scope),Array.prototype.push.apply(t.node.body,e.body),t.node.body.jb=null,t.done=!1};P.lb=function(){var e=this.o,t;do{var r=e[e.length-1];if(this.za)break;if(!r||r.node.type==="Program"&&r.done){if(!this.ca.length)return!1;if(r=this.ca[0],!r||r.time>Date.now())r=null;else{this.ca.shift(),0<=r.interval&&Vr(this,r,r.interval);var n=new m(r.node,r.scope);r.zb&&(n.ia=2,n.B=this.Na,n.U=r.zb,n.Qa=!0,n.F=r.Lb),r=n}if(!r)break}n=r.node;var o=$e;$e=this;try{var s=this.rb[n.type](e,r,n)}catch(a){if(a!==Wr)throw this.value!==a&&(this.value=void 0),a}finally{$e=o}if(s&&e.push(s),this.P)throw this.value=void 0,Error("Getter not supported in this context");if(this.Ka)throw this.value=void 0,Error("Setter not supported in this context");t||n.end||(t=Date.now()+this.POLYFILL_TIMEOUT)}while(!n.end&&t>Date.now());return!0};P.Eb=function(){for(;!this.za&&this.lb(););return this.za};function bn(e,t){e.g(t,"NaN",NaN,Ue),e.g(t,"Infinity",1/0,Ue),e.g(t,"undefined",void 0,Ue),e.g(t,"window",t,Lt),e.g(t,"this",t,Ue),e.g(t,"self",t),e.M=new I(null),e.Z=new I(e.M),Tn(e,t),Pn(e,t),t.xa=e.M,e.g(t,"constructor",e.v,v),Nn(e,t),Rn(e,t),Bn(e,t),Mn(e,t),Dn(e,t),Un(e,t),Fn(e,t),Ln(e,t),_n(e,t);var r=e.i(function(){throw EvalError("Can't happen")},!1);r.eval=!0,e.g(t,"eval",r,v),e.g(t,"parseInt",e.i(parseInt,!1),v),e.g(t,"parseFloat",e.i(parseFloat,!1),v),e.g(t,"isNaN",e.i(isNaN,!1),v),e.g(t,"isFinite",e.i(isFinite,!1),v);for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],o=0;o<n.length;o++)r=function(s){return function(a){try{return s(a)}catch(p){x(e,e.Gb,p.message)}}}(n[o][0]),e.g(t,n[o][1],e.i(r,!1),v);r=function(s){return Nr(e,!1,arguments)},e.g(t,"setTimeout",e.i(r,!1),v),r=function(s){return Nr(e,!0,arguments)},e.g(t,"setInterval",e.i(r,!1),v),r=function(s){Rr(e,s)},e.g(t,"clearTimeout",e.i(r,!1),v),r=function(s){Rr(e,s)},e.g(t,"clearInterval",e.i(r,!1),v),e.OBJECT=e.v,e.OBJECT_PROTO=e.M,e.FUNCTION=e.O,e.FUNCTION_PROTO=e.Z,e.ARRAY=e.qa,e.ARRAY_PROTO=e.La,e.REGEXP=e.I,e.REGEXP_PROTO=e.Ma,e.DATE=e.$,e.DATE_PROTO=e.nb,e.qb&&e.qb(e,t)}P.Wb=0;function Tn(e,t){var r=/^[A-Za-z_$][\w$]*$/,n=function(o){var s=arguments.length?String(arguments[arguments.length-1]):"",a=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(a){a=a.split(/\s*,\s*/);for(var p=0;p<a.length;p++){var g=a[p];r.test(g)||x(e,e.T,"Invalid function argument: "+g)}a=a.join(", ")}try{var y=Oe("(function("+a+") {"+s+"})","function"+e.Wb++)}catch(j){x(e,e.T,"Invalid code: "+j.message)}return y.body.length!==1&&x(e,e.T,"Invalid code in function body"),Gt(e,y.body[0].la,e.N,"anonymous")};e.O=e.i(n,!0),e.g(t,"Function",e.O,v),e.g(e.O,"prototype",e.Z,v),e.g(e.Z,"constructor",e.O,v),e.Z.Ta=function(){},e.Z.Ta.id=e.Ya++,e.Z.Ab=!0,e.g(e.Z,"length",0,H),e.Z.H="Function",n=function(o,s){var a=e.o[e.o.length-1];a.U=this,a.B=o,a.F=[],s!=null&&(s instanceof I?a.F=$r(e,s):x(e,e.j,"CreateListFromArrayLike called on non-object")),a.eb=!1},_(e,e.O,"apply",n),n=function(o){var s=e.o[e.o.length-1];s.U=this,s.B=o,s.F=[];for(var a=1;a<arguments.length;a++)s.F.push(arguments[a]);s.eb=!1},_(e,e.O,"call",n),e.ba.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function bind(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),n=function(){return String(this)},_(e,e.O,"toString",n),e.g(e.O,"toString",e.i(n,!1),v),n=function(){return this.valueOf()},_(e,e.O,"valueOf",n),e.g(e.O,"valueOf",e.i(n,!1),v)}function Pn(e,t){function r(o){o!=null||x(e,e.j,"Cannot convert '"+o+"' to object")}var n=function(o){if(o==null)return ue(e)?this:e.s(e.M);if(!(o instanceof I)){var s=e.s(le(e,o));return s.data=o,s}return o};e.v=e.i(n,!0),e.g(e.v,"prototype",e.M,v),e.g(e.M,"constructor",e.v,v),e.g(t,"Object",e.v,v),n=function(o){return r(o),se(e,Object.getOwnPropertyNames(o instanceof I?o.h:o))},e.g(e.v,"getOwnPropertyNames",e.i(n,!1),v),n=function(o){return r(o),o instanceof I&&(o=o.h),se(e,Object.keys(o))},e.g(e.v,"keys",e.i(n,!1),v),n=function(o){return o===null?e.s(null):(o instanceof I||x(e,e.j,"Object prototype may only be an Object or null, not "+o),e.s(o))},e.g(e.v,"create",e.i(n,!1),v),e.ba.push("(function() {","var create_ = Object.create;","Object.create = function create(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),n=function(o,s,a){return s=String(s),o instanceof I||x(e,e.j,"Object.defineProperty called on non-object: "+o),a instanceof I||x(e,e.j,"Property description must be an object"),!o.preventExtensions||s in o.h||x(e,e.j,"Can't define property '"+s+"', object is not extensible"),e.g(o,s,Xe,a.h),o},e.g(e.v,"defineProperty",e.i(n,!1),v),e.ba.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function defineProperty(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function defineProperties(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),n=function(o,s){if(o instanceof I||x(e,e.j,"Object.getOwnPropertyDescriptor called on non-object: "+o),s=String(s),s in o.h){var a=Object.getOwnPropertyDescriptor(o.h,s),p=o.V[s];return o=o.Y[s],s=e.s(e.M),p||o?(e.g(s,"get",p),e.g(s,"set",o)):(e.g(s,"value",a.value),e.g(s,"writable",a.writable)),e.g(s,"configurable",a.configurable),e.g(s,"enumerable",a.enumerable),s}},e.g(e.v,"getOwnPropertyDescriptor",e.i(n,!1),v),n=function(o){return r(o),le(e,o)},e.g(e.v,"getPrototypeOf",e.i(n,!1),v),n=function(o){return!!o&&!o.preventExtensions},e.g(e.v,"isExtensible",e.i(n,!1),v),n=function(o){return o instanceof I&&(o.preventExtensions=!0),o},e.g(e.v,"preventExtensions",e.i(n,!1),v),_(e,e.v,"toString",I.prototype.toString),_(e,e.v,"toLocaleString",I.prototype.toString),_(e,e.v,"valueOf",I.prototype.valueOf),n=function(o){return r(this),this instanceof I?String(o)in this.h:this.hasOwnProperty(o)},_(e,e.v,"hasOwnProperty",n),n=function(o){return r(this),this instanceof I?Object.prototype.propertyIsEnumerable.call(this.h,o):this.propertyIsEnumerable(o)},_(e,e.v,"propertyIsEnumerable",n),n=function(o){for(;;){if(o=le(e,o),!o)return!1;if(o===this)return!0}},_(e,e.v,"isPrototypeOf",n)}function Nn(e,t){var r=function(n){var o=ue(e)?this:Ae(e),s=arguments[0];if(arguments.length===1&&typeof s=="number")isNaN(_t(s))&&x(e,e.ob,"Invalid array length: "+s),o.h.length=s;else{for(s=0;s<arguments.length;s++)o.h[s]=arguments[s];o.h.length=s}return o};e.qa=e.i(r,!0),e.La=e.qa.h.prototype,e.g(t,"Array",e.qa,v),r=function(n){return n&&n.H==="Array"},e.g(e.qa,"isArray",e.i(r,!1),v),e.g(e.La,"length",0,{configurable:!1,enumerable:!1,writable:!0}),e.La.H="Array",e.ba.push("(function() {","function createArrayMethod_(f) {","Object.defineProperty(Array.prototype, f.name,","{configurable: true, writable: true, value: f});","}","createArrayMethod_(","function pop() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","len--;","var x = o[len];","delete o[len];","o.length = len;","return x;","}",");","createArrayMethod_(","function push(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","for (var i = 0; i < arguments.length; i++) {","o[len] = arguments[i];","len++;","}","o.length = len;","return len;","}",");","createArrayMethod_(","function shift() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","var value = o[0];","for (var i = 0; i < len - 1; i++) {","if ((i + 1) in o) {","o[i] = o[i + 1];","} else {","delete o[i];","}","}","delete o[i];","o.length = len - 1;","return value;","}",");","createArrayMethod_(","function unshift(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","len = 0;","}","for (var i = len - 1; i >= 0; i--) {","if (i in o) {","o[i + arguments.length] = o[i];","} else {","delete o[i + arguments.length];","}","}","for (var i = 0; i < arguments.length; i++) {","o[i] = arguments[i];","}","return (o.length = len + arguments.length);","}",");","createArrayMethod_(","function reverse() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 2) {","return o;","}","for (var i = 0; i < len / 2 - 0.5; i++) {","var x = o[i];","var hasX = i in o;","if ((len - i - 1) in o) {","o[i] = o[len - i - 1];","} else {","delete o[i];","}","if (hasX) {","o[len - i - 1] = x;","} else {","delete o[len - i - 1];","}","}","return o;","}",");","createArrayMethod_(","function indexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var n = fromIndex | 0;","if (!len || n >= len) {","return -1;","}","var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","while (i < len) {","if (i in o && o[i] === searchElement) {","return i;","}","i++;","}","return -1;","}",");","createArrayMethod_(","function lastIndexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len) {","return -1;","}","var n = len - 1;","if (arguments.length > 1) {","n = fromIndex | 0;","if (n) {","n = (n > 0 || -1) * Math.floor(Math.abs(n));","}","}","var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);","while (i >= 0) {","if (i in o && o[i] === searchElement) {","return i;","}","i--;","}","return -1;","}",");","createArrayMethod_(","function slice(start, end) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","start = (start >= 0) ? start : Math.max(0, len + start);","if (typeof end !== 'undefined') {","if (end !== Infinity) {","end |= 0;","}","if (end < 0) {","end = len + end;","} else {","end = Math.min(end, len);","}","} else {","end = len;","}","var size = end - start;","var cloned = new Array(size);","for (var i = 0; i < size; i++) {","if ((start + i) in o) {","cloned[i] = o[start + i];","}","}","return cloned;","}",");","createArrayMethod_(","function splice(start, deleteCount, var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","if (start < 0) {","start = Math.max(len + start, 0);","} else {","start = Math.min(start, len);","}","if (arguments.length < 1) {","deleteCount = len - start;","} else {","deleteCount |= 0;","deleteCount = Math.max(0, Math.min(deleteCount, len - start));","}","var removed = [];","for (var i = start; i < start + deleteCount; i++) {","if (i in o) {","removed.push(o[i]);","} else {","removed.length++;","}","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = start + deleteCount; i < len - deleteCount; i++) {","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = len - deleteCount; i < len; i++) {","delete o[i];","}","len -= deleteCount;","var arl = arguments.length - 2;","for (var i = len - 1; i >= start; i--) {","if (i in o) {","o[i + arl] = o[i];","} else {","delete o[i + arl];","}","}","len += arl;","for (var i = 2; i < arguments.length; i++) {","o[start + i - 2] = arguments[i];","}","o.length = len;","return removed;","}",");","createArrayMethod_(","function concat(var_args) {","if (!this) throw TypeError();","var o = Object(this);","var cloned = [];","for (var i = -1; i < arguments.length; i++) {","var value = (i === -1) ? o : arguments[i];","if (Array.isArray(value)) {","for (var j = 0, l = value.length; j < l; j++) {","if (j in value) {","cloned.push(value[j]);","} else {","cloned.length++;","}","}","} else {","cloned.push(value);","}","}","return cloned;","}",");","createArrayMethod_(","function join(opt_separator) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var sep = typeof opt_separator === 'undefined' ?","',' : ('' + opt_separator);","var str = '';","for (var i = 0; i < len; i++) {","if (i && sep) str += sep;","str += (o[i] === null || o[i] === undefined) ? '' : o[i];","}","return str;","}",");","createArrayMethod_(","function every(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o && !callbackfn.call(t, o[k], k, o)) return false;","k++;","}","return true;","}",");","createArrayMethod_(","function filter(fun, var_args) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o) {","var val = o[i];","if (fun.call(thisArg, val, i, o)) res.push(val);","}","}","return res;","}",");","createArrayMethod_(","function forEach(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o) callback.call(t, o[k], k, o);","k++;","}","}",");","createArrayMethod_(","function map(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","var a = new Array(len);","while (k < len) {","if (k in o) a[k] = callback.call(t, o[k], k, o);","k++;","}","return a;","}",");","createArrayMethod_(","function reduce(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in o)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k++];","}","for (; k < len; k++) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function reduceRight(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in o)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k--];","}","for (; k >= 0; k--) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function some(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o && fun.call(thisArg, o[i], i, o)) return true;","}","return false;","}",");","createArrayMethod_(","function sort(opt_comp) {","if (!this) throw TypeError();","if (typeof opt_comp !== 'function') {","opt_comp = undefined;","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :","(String(this[j]) > String(this[j + 1]))) {","var swap = this[j];","var hasSwap = j in this;","if ((j + 1) in this) {","this[j] = this[j + 1];","} else {","delete this[j];","}","if (hasSwap) {","this[j + 1] = swap;","} else {","delete this[j + 1];","}","changes++;","}","}","if (!changes) break;","}","return this;","}",");","createArrayMethod_(","function toLocaleString() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var out = [];","for (var i = 0; i < len; i++) {","out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();","}","return out.join(',');","}",");","})();","")}function Rn(e,t){var r=function(n){return n=arguments.length?ge.String(n):"",ue(e)?(this.data=n,this):n};for(e.J=e.i(r,!0),e.g(t,"String",e.J,v),e.g(e.J,"fromCharCode",e.i(String.fromCharCode,!1),v),t="charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "),r=0;r<t.length;r++)_(e,e.J,t[r],String.prototype[t[r]]);r=function(n,o,s){o=e.R(o),s=e.R(s);try{return String(this).localeCompare(n,o,s)}catch(a){x(e,e.D,"localeCompare: "+a.message)}},_(e,e.J,"localeCompare",r),r=function(n,o,s){var a=String(this);if(o=o?Number(o):void 0,$(e,n,e.I)&&(n=n.data,Le(e,n,s),e.REGEXP_MODE===2)){if(ae)n=Fe(e,"string.split(separator, limit)",{string:a,separator:n,limit:o},n,s),n!==Ce&&s(se(e,n));else{var p=e.ha(),g=_e(e,n,p,s);p.onmessage=function(y){clearTimeout(g),s(se(e,y.data))},p.postMessage(["split",a,n,o])}return}n=a.split(n,o),s(se(e,n))},We(e,e.J,"split",r),r=function(n,o){var s=String(this);if(n=$(e,n,e.I)?n.data:new RegExp(n),Le(e,n,o),e.REGEXP_MODE===2)if(ae)n=Fe(e,"string.match(regexp)",{string:s,regexp:n},n,o),n!==Ce&&o(n&&se(e,n));else{var a=e.ha(),p=_e(e,n,a,o);a.onmessage=function(g){clearTimeout(p),o(g.data&&se(e,g.data))},a.postMessage(["match",s,n])}else n=s.match(n),o(n&&se(e,n))},We(e,e.J,"match",r),r=function(n,o){var s=String(this);if($(e,n,e.I)?n=n.data:n=new RegExp(n),Le(e,n,o),e.REGEXP_MODE===2)if(ae)n=Fe(e,"string.search(regexp)",{string:s,regexp:n},n,o),n!==Ce&&o(n);else{var a=e.ha(),p=_e(e,n,a,o);a.onmessage=function(g){clearTimeout(p),o(g.data)},a.postMessage(["search",s,n])}else o(s.search(n))},We(e,e.J,"search",r),r=function(n,o,s){var a=String(this);if(o=String(o),$(e,n,e.I)&&(n=n.data,Le(e,n,s),e.REGEXP_MODE===2)){if(ae)n=Fe(e,"string.replace(substr, newSubstr)",{string:a,substr:n,newSubstr:o},n,s),n!==Ce&&s(n);else{var p=e.ha(),g=_e(e,n,p,s);p.onmessage=function(y){clearTimeout(g),s(y.data)},p.postMessage(["replace",a,n,o])}return}s(a.replace(n,o))},We(e,e.J,"replace",r),e.ba.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function replace(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")}function Bn(e,t){e.mb=e.i(function(r){return r=ge.Boolean(r),ue(e)?(this.data=r,this):r},!0),e.g(t,"Boolean",e.mb,v)}function Mn(e,t){var r=function(n){return n=arguments.length?ge.Number(n):0,ue(e)?(this.data=n,this):n};for(e.aa=e.i(r,!0),e.g(t,"Number",e.aa,v),t=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],r=0;r<t.length;r++)e.g(e.aa,t[r],Number[t[r]],Ue);r=function(n){try{return Number(this).toExponential(n)}catch(o){x(e,e.D,o.message)}},_(e,e.aa,"toExponential",r),r=function(n){try{return Number(this).toFixed(n)}catch(o){x(e,e.D,o.message)}},_(e,e.aa,"toFixed",r),r=function(n){try{return Number(this).toPrecision(n)}catch(o){x(e,e.D,o.message)}},_(e,e.aa,"toPrecision",r),r=function(n){try{return Number(this).toString(n)}catch(o){x(e,e.D,o.message)}},_(e,e.aa,"toString",r),r=function(n,o){n=n?e.R(n):void 0,o=o?e.R(o):void 0;try{return Number(this).toLocaleString(n,o)}catch(s){x(e,e.D,"toLocaleString: "+s.message)}},_(e,e.aa,"toLocaleString",r)}function Dn(e,t){var r=function(o,s){if(!ue(e))return ge.Date();var a=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(ge.Date,a)),this};e.$=e.i(r,!0),e.nb=e.$.h.prototype,e.g(t,"Date",e.$,v),e.g(e.$,"now",e.i(Date.now,!1),v),e.g(e.$,"parse",e.i(Date.parse,!1),v),e.g(e.$,"UTC",e.i(Date.UTC,!1),v),t="getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");for(var n=0;n<t.length;n++)r=function(o){return function(s){var a=this.data;a instanceof Date||x(e,e.j,o+" not called on a Date");for(var p=[],g=0;g<arguments.length;g++)p[g]=e.R(arguments[g]);return a[o].apply(a,p)}}(t[n]),_(e,e.$,t[n],r)}function Un(e,t){var r=function(n,o){if(ue(e))var s=this;else{if(o===void 0&&$(e,n,e.I))return n;s=e.s(e.Ma)}n=n===void 0?"":String(n),o=o?String(o):"",/^[gmi]*$/.test(o)||x(e,e.T,"Invalid regexp flag: "+o);try{var a=new ge.RegExp(n,o)}catch(p){x(e,e.T,p.message)}return Wt(e,s,a),s};e.I=e.i(r,!0),e.Ma=e.I.h.prototype,e.g(t,"RegExp",e.I,v),e.g(e.I.h.prototype,"global",void 0,H),e.g(e.I.h.prototype,"ignoreCase",void 0,H),e.g(e.I.h.prototype,"multiline",void 0,H),e.g(e.I.h.prototype,"source","(?:)",H),e.ba.push("Object.defineProperty(RegExp.prototype, 'test',","{configurable: true, writable: true, value:","function test(str) {","return !!this.exec(str);","}","});"),r=function(n,o){function s(j){if(j){var b=se(e,j);return e.g(b,"index",j.index),e.g(b,"input",j.input),b}return null}var a=this.data;if(n=String(n),a.lastIndex=Number(e.G(this,"lastIndex")),Le(e,a,o),e.REGEXP_MODE===2)if(ae)n=Fe(e,"regexp.exec(string)",{string:n,regexp:a},a,o),n!==Ce&&(e.g(this,"lastIndex",a.lastIndex),o(s(n)));else{var p=e.ha(),g=_e(e,a,p,o),y=this;p.onmessage=function(j){clearTimeout(g),e.g(y,"lastIndex",j.data[1]),o(s(j.data[0]))},p.postMessage(["exec",a,a.lastIndex,n])}else n=a.exec(n),e.g(this,"lastIndex",a.lastIndex),o(s(n))},We(e,e.I,"exec",r)}function Fn(e,t){function r(n){var o=e.i(function(s){var a=ue(e)?this:e.Aa(o);return Dt(e,a,s),a},!0);return e.g(o,"prototype",e.Aa(e.D),v),e.g(o.h.prototype,"name",n,v),e.g(t,n,o,v),o}e.D=e.i(function(n){var o=ue(e)?this:e.Aa(e.D);return Dt(e,o,n),o},!0),e.g(t,"Error",e.D,v),e.g(e.D.h.prototype,"message","",v),e.g(e.D.h.prototype,"name","Error",v),r("EvalError"),e.ob=r("RangeError"),e.pb=r("ReferenceError"),e.T=r("SyntaxError"),e.j=r("TypeError"),e.Gb=r("URIError")}function Ln(e,t){var r=e.s(e.M);e.g(t,"Math",r,v);var n="E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");for(t=0;t<n.length;t++)e.g(r,n[t],Math[n[t]],H);for(n="abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "),t=0;t<n.length;t++)e.g(r,n[t],e.i(Math[n[t]],!1),v)}function _n(e,t){var r=e.s(e.M);e.g(t,"JSON",r,v),t=function(n){try{var o=JSON.parse(String(n))}catch(s){x(e,e.T,s.message)}return e.Ia(o)},e.g(r,"parse",e.i(t,!1)),t=function(n,o,s){o&&o.H==="Function"?x(e,e.j,"Function replacer on JSON.stringify not supported"):o&&o.H==="Array"?(o=$r(e,o),o=o.filter(function(p){return typeof p=="string"||typeof p=="number"})):o=null,typeof s!="string"&&typeof s!="number"&&(s=void 0),n=e.R(n);try{var a=JSON.stringify(n,o,s)}catch(p){x(e,e.j,p.message)}return a},e.g(r,"stringify",e.i(t,!1))}function $(e,t,r){if(t==null||!r)return!1;if(r=r.h.prototype,t===r)return!0;for(t=le(e,t);t;){if(t===r)return!0;t=t.xa}return!1}function Wt(e,t,r){t.data=new RegExp(r.source,r.flags),e.g(t,"lastIndex",r.lastIndex,v),e.g(t,"source",r.source,H),e.g(t,"global",r.global,H),e.g(t,"ignoreCase",r.ignoreCase,H),e.g(t,"multiline",r.multiline,H)}function Dt(e,t,r){r&&e.g(t,"message",String(r),v),r=[];for(var n=e.o.length-1;0<=n;n--){var o=e.o[n],s=o.node;s.type==="CallExpression"&&(o=o.U)&&r.length&&(r[r.length-1].Ob=e.G(o,"name")),!s.X||r.length&&s.type!=="CallExpression"||r.push({Nb:s.X})}for(n=String(e.G(t,"name")),s=String(e.G(t,"message")),s=n+": "+s+`
|
|
5
|
+
`,n=0;n<r.length;n++){var a=r[n].Nb;o=r[n].Ob,a=a.source+":"+a.start.line+":"+a.start.ab,s=o?s+(" at "+o+" ("+a+`)
|
|
6
|
+
`):s+(" at "+a+`
|
|
7
|
+
`)}e.g(t,"stack",s.trim(),v)}P.ha=function(){var e=this.ha.Mb;return e||(e=new Blob([In.join(`
|
|
8
|
+
`)],{type:"application/javascript"}),this.ha.Mb=e),new Worker(URL.createObjectURL(e))};function Fe(e,t,r,n,o){var s={timeout:e.REGEXP_THREAD_TIMEOUT};try{return ae.runInNewContext(t,r,s)}catch{o(null),x(e,e.D,"RegExp Timeout: "+n)}return Ce}function Le(e,t,r){if(e.REGEXP_MODE===0)var n=!1;else if(e.REGEXP_MODE===1)n=!0;else if(ae)n=!0;else if(typeof Worker=="function"&&typeof URL=="function")n=!0;else if(typeof require=="function"){try{ae=require("vm")}catch{}n=!!ae}else n=!1;n||(r(null),x(e,e.D,"Regular expressions not supported: "+t))}function _e(e,t,r,n){return setTimeout(function(){r.terminate(),n(null);try{x(e,e.D,"RegExp Timeout: "+t)}catch{}},e.REGEXP_THREAD_TIMEOUT)}P.Aa=function(e){return this.s(e&&e.h.prototype)};P.s=function(e){if(typeof e!="object")throw Error("Non object prototype");return e=new I(e),$(this,e,this.D)&&(e.H="Error"),e};function Ae(e){var t=e.s(e.La);return e.g(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.H="Array",t}function $t(e,t,r){var n=e.s(e.Z);return r?(r=e.s(e.M),e.g(n,"prototype",r,v),e.g(r,"constructor",n,v)):n.Ab=!0,e.g(n,"length",t,H),n.H="Function",n}function Gt(e,t,r,n){var o=$t(e,t.oa.length,!0);return o.Va=r,o.node=t,e.g(o,"name",t.id?String(t.id.name):n||"",H),o}P.i=function(e,t){return t=$t(this,e.length,t),t.Ta=e,e.id=this.Ya++,this.g(t,"name",e.name,H),t};P.ub=function(e){var t=$t(this,e.length,!0);return t.Za=e,e.id=this.Ya++,this.g(t,"name",e.name,H),t};P.Ia=function(e){if(e instanceof I)throw Error("Object is already pseudo");if(e==null||e===!0||e===!1||typeof e=="string"||typeof e=="number")return e;if(e instanceof RegExp){var t=this.s(this.Ma);return Wt(this,t,e),t}if(e instanceof Date)return t=this.s(this.nb),t.data=new Date(e.valueOf()),t;if(typeof e=="function"){var r=this;return t=Object.getOwnPropertyDescriptor(e,"prototype"),this.i(function(){var o=Array.prototype.slice.call(arguments).map(function(s){return r.R(s)});return o=e.apply(r,o),r.Ia(o)},!!t)}if(Array.isArray(e)){t=Ae(this);for(var n=0;n<e.length;n++)n in e&&this.g(t,n,this.Ia(e[n]));return t}t=this.s(this.M);for(n in e)this.g(t,n,this.Ia(e[n]));return t};P.R=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)return e;if(!(e instanceof I))throw Error("Object is not pseudo");if($(this,e,this.I))return t=new RegExp(e.data.source,e.data.flags),t.lastIndex=e.data.lastIndex,t;if($(this,e,this.$))return new Date(e.data.valueOf());t=t||{hb:[],Sa:[]};var r=t.hb.indexOf(e);if(r!==-1)return t.Sa[r];if(t.hb.push(e),$(this,e,this.qa)){r=[],t.Sa.push(r);for(var n=this.G(e,"length"),o=0;o<n;o++)at(this,e,o)&&(r[o]=this.R(this.G(e,o),t))}else for(n in r={},t.Sa.push(r),e.h)o=this.R(e.h[n],t),Object.defineProperty(r,n,{value:o,writable:!0,enumerable:!0,configurable:!0});return t.hb.pop(),t.Sa.pop(),r};function se(e,t){for(var r=Ae(e),n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++)e.g(r,n[o],t[n[o]]);return r}function $r(e,t){var r=[],n;for(n in t.h)r[n]=e.G(t,n);return r.length=_t(e.G(t,"length"))||0,r}function le(e,t){switch(typeof t){case"number":return e.aa.h.prototype;case"boolean":return e.mb.h.prototype;case"string":return e.J.h.prototype}return t?t.xa:null}P.G=function(e,t){if(this.P)throw Error("Getter not supported in that context");if(t=String(t),e!=null||x(this,this.j,"Cannot read property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof I))throw TypeError("Expecting native value or pseudo object");if(t==="length"){if($(this,e,this.J))return String(e).length}else if(64>t.charCodeAt(0)&&$(this,e,this.J)){var r=Ge(t);if(!isNaN(r)&&r<String(e).length)return String(e)[r]}do if(e.h&&t in e.h)return(r=e.V[t])?(this.P=!0,r):e.h[t];while(e=le(this,e))};function at(e,t,r){if(!(t instanceof I))throw TypeError("Primitive data type has no properties");if(r=String(r),r==="length"&&$(e,t,e.J))return!0;if($(e,t,e.J)){var n=Ge(r);if(!isNaN(n)&&n<String(t).length)return!0}do if(t.h&&r in t.h)return!0;while(t=le(e,t));return!1}P.g=function(e,t,r,n){if(this.Ka)throw Error("Setter not supported in that context");if(t=String(t),e!=null||x(this,this.j,"Cannot set property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof I))throw TypeError("Expecting native value or pseudo object");n&&("get"in n||"set"in n)&&("value"in n||"writable"in n)&&x(this,this.j,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var o=!this.o||Vt(this).S;if(e instanceof I){if($(this,e,this.J)){var s=Ge(t);if(t==="length"||!isNaN(s)&&s<String(e).length){o&&x(this,this.j,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'");return}}if(e.H==="Array")if(s=e.h.length,t==="length"){if(n){if(!("value"in n))return;r=n.value}if(r=_t(r),isNaN(r)&&x(this,this.ob,"Invalid array length"),r<s)for(a in e.h){var a=Ge(a);!isNaN(a)&&r<=a&&delete e.h[a]}}else isNaN(a=Ge(t))||(e.h.length=Math.max(s,a+1));if(!e.preventExtensions||t in e.h)if(n){o={},"get"in n&&n.get&&(e.V[t]=n.get,o.get=this.g.ac),"set"in n&&n.set&&(e.Y[t]=n.set,o.set=this.g.bc),"configurable"in n&&(o.configurable=n.configurable),"enumerable"in n&&(o.enumerable=n.enumerable),"writable"in n&&(o.writable=n.writable,delete e.V[t],delete e.Y[t]),"value"in n?(o.value=n.value,delete e.V[t],delete e.Y[t]):r!==Xe&&(o.value=r,delete e.V[t],delete e.Y[t]);try{Object.defineProperty(e.h,t,o)}catch{x(this,this.j,"Cannot redefine property: "+t)}"get"in n&&!n.get&&delete e.V[t],"set"in n&&!n.set&&delete e.Y[t]}else{if(r===Xe)throw ReferenceError("Value not specified");for(n=e;!(t in n.h);)if(n=le(this,n),!n){n=e;break}if(n.Y&&n.Y[t])return this.Ka=!0,n.Y[t];if(n.V&&n.V[t])o&&x(this,this.j,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.h[t]=r}catch{o&&x(this,this.j,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else o&&x(this,this.j,"Can't add property '"+t+"', object is not extensible")}else o&&x(this,this.j,"Can't create property '"+t+"' on '"+e+"'")};P.g.ac=function(){throw Error("Placeholder getter")};P.g.bc=function(){throw Error("Placeholder setter")};function _(e,t,r,n){e.g(t.h.prototype,r,e.i(n,!1),v)}function We(e,t,r,n){e.g(t.h.prototype,r,e.ub(n),v)}function Vt(e){if(e=e.o[e.o.length-1].scope,!e)throw Error("No scope found");return e}function Ut(e,t,r){var n=!1;if(r&&r.S)n=!0;else{var o=t.body&&t.body[0];o&&o.la&&o.la.type==="Literal"&&o.la.value==="use strict"&&(n=!0)}return o=e.s(null),n=new Xr(r,n,o),r||bn(e,n.object),He(e,t,n),n}function Xt(e,t,r){if(!t)throw Error("parentScope required");return e=r||e.s(null),new Xr(t,t.S,e)}function Ht(e,t){for(var r=Vt(e);r&&r!==e.N;){if(t in r.object.h)return r.object.h[t];r=r.Va}if(r===e.N&&at(e,r.object,t))return e.G(r.object,t);r=e.o[e.o.length-1].node,r.type==="UnaryExpression"&&r.operator==="typeof"||x(e,e.pb,t+" is not defined")}function Gr(e,t,r){for(var n=Vt(e),o=n.S;n&&n!==e.N;){if(t in n.object.h){try{n.object.h[t]=r}catch{o&&x(e,e.j,"Cannot assign to read only variable '"+t+"'")}return}n=n.Va}if(n===e.N&&(!o||at(e,n.object,t)))return e.g(n.object,t,r);x(e,e.pb,t+" is not defined")}function He(e,t,r){if(t.jb)var n=t.jb;else{switch(n=Object.create(null),t.type){case"VariableDeclaration":for(var o=0;o<t.fa.length;o++)n[t.fa[o].id.name]=!0;break;case"FunctionDeclaration":n[t.id.name]=t;break;case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"Program":case"SwitchCase":case"SwitchStatement":case"TryStatement":case"WithStatement":case"WhileStatement":var s=t.constructor,a;for(a in t)if(a!=="loc"){var p=t[a];if(p&&typeof p=="object"){if(Array.isArray(p)){for(o=0;o<p.length;o++)if(p[o]&&p[o].constructor===s){var g=He(e,p[o],r);for(a in g)n[a]=g[a]}}else if(p.constructor===s)for(a in g=He(e,p,r),g)n[a]=g[a]}}}t.jb=n}for(a in n)n[a]===!0?e.g(r.object,a,void 0,Tr):e.g(r.object,a,Gt(e,n[a],r),Tr);return n}function ue(e){return e.o[e.o.length-1].isConstructor}function Kt(e,t){return t[0]===Ie?Ht(e,t[1]):e.G(t[0],t[1])}function Jt(e,t,r){return t[0]===Ie?Gr(e,t[1],r):e.g(t[0],t[1],r)}function x(e,t,r){throw e.N?(r!==void 0&&t instanceof I&&(t=e.Aa(t),Dt(e,t,r)),Ke(e,4,t),Wr):r===void 0?t:r}function Ke(e,t,r,n){if(t===0)throw TypeError("Should not unwind for NORMAL completions");var o=e.o;e:for(;0<o.length;o.pop()){var s=o[o.length-1];switch(s.node.type){case"TryStatement":s.ea={type:t,value:r,label:n};return;case"CallExpression":case"NewExpression":if(t===3){s.value=r;return}if(t!==4)throw Error("Unsynatctic break/continue not rejected by Acorn");break;case"Program":s.done=!0;break e}if(t===1){if(n?s.labels&&s.labels.indexOf(n)!==-1:s.W||s.Zb){o.pop();return}}else if(t===2&&(n?s.labels&&s.labels.indexOf(n)!==-1:s.W))return}throw $(e,r,e.D)?(t={EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},n=String(e.G(r,"name")),o=e.G(r,"message").valueOf(),t=(t[n]||Error)(o),t.stack=String(e.G(r,"stack"))):t=String(r),e.value=t,t}function X(e,t){switch(t.type){case"ArrayExpression":return"[...]";case"BinaryExpression":case"LogicalExpression":return X(e,t.left)+" "+t.operator+" "+X(e,t.right);case"CallExpression":return X(e,t.callee)+"(...)";case"ConditionalExpression":return X(e,t.test)+" ? "+X(e,t.da)+" : "+X(e,t.alternate);case"Identifier":return t.name;case"Literal":return t.raw;case"MemberExpression":var r=X(e,t.object);return e=X(e,t.Wa),t.bb?r+"["+e+"]":r+"."+e;case"NewExpression":return"new "+X(e,t.callee)+"(...)";case"ObjectExpression":return"{...}";case"ThisExpression":return"this";case"UnaryExpression":return t.operator+" "+X(e,t.K);case"UpdateExpression":return r=X(e,t.K),t.prefix?t.operator+r:r+t.operator}return"???"}function Nr(e,t,r){var n=e.o[e.o.length-1],o=Array.from(r),s=o.shift();r=Math.max(Number(o.shift()||0),0);var a=e.ya();if(s instanceof I&&s.H==="Function"){var p=s;a.type="CallExpression",n=n.scope}else{try{var g=Oe(String(s),"taskCode"+e.ic++)}catch(y){x(e,e.T,"Invalid code: "+y.message)}a.type="EvalProgram_",a.body=g.body,n=n.node.arguments[0],st(a,n?n.start:void 0,n?n.end:void 0),n=e.N,o.length=0}return t=new Wn(p,o,n,a,t?r:-1),Vr(e,t,r),t.Db}function Vr(e,t,r){t.time=Date.now()+r,e.ca.push(t),e.ca.sort(function(n,o){return n.time-o.time})}function Rr(e,t){for(var r=0;r<e.ca.length;r++)if(e.ca[r].Db==t){e.ca.splice(r,1);break}}function Je(e,t,r){if(!e.P)throw Error("Unexpected call to createGetter");e.P=!1,r=Array.isArray(r)?r[0]:r;var n=e.ya();return n.type="CallExpression",e=new m(n,e.o[e.o.length-1].scope),e.ia=2,e.B=r,e.U=t,e.Qa=!0,e.F=[],e}function Yt(e,t,r,n){if(!e.Ka)throw Error("Unexpected call to createSetter");e.Ka=!1,r=Array.isArray(r)?r[0]:e.Na;var o=e.ya();return o.type="CallExpression",e=new m(o,e.o[e.o.length-1].scope),e.ia=2,e.B=r,e.U=t,e.Qa=!0,e.F=[n],e}function Bt(e,t){return t==null?e.Na:t instanceof I?t:(e=e.s(le(e,t)),e.data=t,e)}P.Xb=function(){return this.N};P.Yb=function(){return this.o};P.ec=function(e){this.o=e};function m(e,t){this.node=e,this.scope=t}function Xr(e,t,r){this.Va=e,this.S=t,this.object=r}function I(e){this.V=Object.create(null),this.Y=Object.create(null),this.h=Object.create(null),this.xa=e}P=I.prototype;P.xa=null;P.H="Object";P.data=null;P.toString=function(){if(!$e)return"[object Interpreter.Object]";if(!(this instanceof I))return String(this);if(this.H==="Array"){var e=Pr;e.push(this);try{var t=[],r=this.h.length,n=!1;1024<r&&(r=1e3,n=!0);for(var o=0;o<r;o++){var s=this.h[o];t[o]=s instanceof I&&e.indexOf(s)!==-1?"...":s}n&&t.push("...")}finally{e.pop()}return t.join(",")}if(this.H==="Error"){if(e=Pr,e.indexOf(this)!==-1)return"[object Error]";r=this;do if("name"in r.h){t=r.h.name;break}while(r=r.xa);r=this;do if("message"in r.h){n=r.h.message;break}while(r=r.xa);e.push(this);try{t=t&&String(t),n=n&&String(n)}finally{e.pop()}return n?t+": "+n:String(t)}return this.data!==null?String(this.data):"[object "+this.H+"]"};P.valueOf=function(){return!$e||this.data===void 0||this.data===null||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data};function Wn(e,t,r,n,o){this.zb=e,this.Lb=t,this.scope=r,this.node=n,this.interval=o,this.Db=++$n,this.time=0}var $n=0;h.prototype.stepArrayExpression=function(e,t,r){r=r.elements;var n=t.A||0;for(t.Oa?(this.g(t.Oa,n,t.value),n++):(t.Oa=Ae(this),t.Oa.h.length=r.length);n<r.length;){if(r[n])return t.A=n,new m(r[n],t.scope);n++}e.pop(),e[e.length-1].value=t.Oa};h.prototype.stepAssignmentExpression=function(e,t,r){if(!t.ja)return t.ja=!0,t=new m(r.left,t.scope),t.sa=!0,t;if(!t.Da)return t.Fa||(t.Fa=t.value),t.Ba&&(t.ma=t.value),!t.Ba&&r.operator!=="="&&(e=Kt(this,t.Fa),t.ma=e,this.P)?(t.Ba=!0,Je(this,e,t.Fa)):(t.Da=!0,r.operator==="="&&r.left.type==="Identifier"&&(t.Pa=r.left.name),new m(r.right,t.scope));if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{var n=t.ma,o=t.value;switch(r.operator){case"=":n=o;break;case"+=":n+=o;break;case"-=":n-=o;break;case"*=":n*=o;break;case"/=":n/=o;break;case"%=":n%=o;break;case"<<=":n<<=o;break;case">>=":n>>=o;break;case">>>=":n>>>=o;break;case"&=":n&=o;break;case"^=":n^=o;break;case"|=":n|=o;break;default:throw SyntaxError("Unknown assignment expression: "+r.operator)}if(r=Jt(this,t.Fa,n))return t.ta=!0,t.ib=n,Yt(this,r,t.Fa,n);e.pop(),e[e.length-1].value=n}};h.prototype.stepBinaryExpression=function(e,t,r){if(!t.ja)return t.ja=!0,new m(r.left,t.scope);if(!t.Da)return t.Da=!0,t.ma=t.value,new m(r.right,t.scope);e.pop();var n=t.ma;switch(t=t.value,r.operator){case"==":r=n==t;break;case"!=":r=n!=t;break;case"===":r=n===t;break;case"!==":r=n!==t;break;case">":r=n>t;break;case">=":r=n>=t;break;case"<":r=n<t;break;case"<=":r=n<=t;break;case"+":r=n+t;break;case"-":r=n-t;break;case"*":r=n*t;break;case"/":r=n/t;break;case"%":r=n%t;break;case"&":r=n&t;break;case"|":r=n|t;break;case"^":r=n^t;break;case"<<":r=n<<t;break;case">>":r=n>>t;break;case">>>":r=n>>>t;break;case"in":t instanceof I||x(this,this.j,"'in' expects an object, not '"+t+"'"),r=at(this,t,n);break;case"instanceof":$(this,t,this.O)||x(this,this.j,"'instanceof' expects an object, not '"+t+"'"),r=n instanceof I?$(this,n,t):!1;break;default:throw SyntaxError("Unknown binary operator: "+r.operator)}e[e.length-1].value=r};h.prototype.stepBlockStatement=function(e,t,r){var n=t.A||0;if(r=r.body[n])return t.A=n+1,new m(r,t.scope);e.pop()};h.prototype.stepBreakStatement=function(e,t,r){Ke(this,1,void 0,r.label&&r.label.name)};h.prototype.Hb=0;h.prototype.stepCallExpression=function(e,t,r){if(!t.ia){t.ia=1;var n=new m(r.callee,t.scope);return n.sa=!0,n}if(t.ia===1){t.ia=2;var o=t.value;if(Array.isArray(o)){if(t.U=Kt(this,o),o[0]===Ie?t.Pb=o[1]==="eval":t.B=o[0],o=t.U,this.P)return t.ia=1,Je(this,o,t.value)}else t.U=o;t.F=[],t.A=0}if(o=t.U,!t.Qa){if(t.A!==0&&t.F.push(t.value),r.arguments[t.A])return new m(r.arguments[t.A++],t.scope);if(r.type==="NewExpression"){if(o instanceof I&&!o.Ab||x(this,this.j,X(this,r.callee)+" is not a constructor"),o===this.qa)t.B=Ae(this);else{var s=o.h.prototype;(typeof s!="object"||s===null)&&(s=this.M),t.B=this.s(s)}t.isConstructor=!0}t.Qa=!0}if(t.eb)e.pop(),e[e.length-1].value=t.isConstructor&&typeof t.value!="object"?t.B:t.value;else{if(t.eb=!0,o instanceof I||x(this,this.j,X(this,r.callee)+" is not a function"),e=o.node){for(r=Ut(this,e.body,o.Va),n=Ae(this),o=0;o<t.F.length;o++)this.g(n,o,t.F[o]);for(this.g(r.object,"arguments",n),o=0;o<e.oa.length;o++)this.g(r.object,e.oa[o].name,t.F.length>o?t.F[o]:void 0);return r.S||(t.B=Bt(this,t.B)),this.g(r.object,"this",t.B,Lt),t.value=void 0,new m(e.body,r)}if(o.eval)if(o=t.F[0],typeof o!="string")t.value=o;else{try{n=Oe(String(o),"eval"+this.Hb++)}catch(p){x(this,this.T,"Invalid code: "+p.message)}return o=this.ya(),o.type="EvalProgram_",o.body=n.body,st(o,r.start,r.end),r=t.Pb?t.scope:this.N,r.S?r=Ut(this,n,r):He(this,n,r),this.value=void 0,new m(o,r)}else if(o.Ta)t.scope.S||(t.B=Bt(this,t.B)),t.value=o.Ta.apply(t.B,t.F);else if(o.Za){var a=this;n=o.Za.length-1,n=t.F.concat(Array(n)).slice(0,n),n.push(function(p){t.value=p,a.za=!1}),this.za=!0,t.scope.S||(t.B=Bt(this,t.B)),o.Za.apply(t.B,n)}else x(this,this.j,X(this,r.callee)+" is not callable")}};h.prototype.stepConditionalExpression=function(e,t,r){var n=t.na||0;if(n===0)return t.na=1,new m(r.test,t.scope);if(n===1){if(t.na=2,(n=!!t.value)&&r.da)return new m(r.da,t.scope);if(!n&&r.alternate)return new m(r.alternate,t.scope);this.value=void 0}e.pop(),r.type==="ConditionalExpression"&&(e[e.length-1].value=t.value)};h.prototype.stepContinueStatement=function(e,t,r){Ke(this,2,void 0,r.label&&r.label.name)};h.prototype.stepDebuggerStatement=function(e){e.pop()};h.prototype.stepDoWhileStatement=function(e,t,r){if(r.type==="DoWhileStatement"&&t.ga===void 0&&(t.value=!0,t.ga=!0),!t.ga)return t.ga=!0,new m(r.test,t.scope);if(!t.value)e.pop();else if(r.body)return t.ga=!1,t.W=!0,new m(r.body,t.scope)};h.prototype.stepEmptyStatement=function(e){e.pop()};h.prototype.stepEvalProgram_=function(e,t,r){var n=t.A||0;if(r=r.body[n])return t.A=n+1,new m(r,t.scope);e.pop(),e[e.length-1].value=this.value};h.prototype.stepExpressionStatement=function(e,t,r){if(!t.ka)return this.value=void 0,t.ka=!0,new m(r.la,t.scope);e.pop(),this.value=t.value};h.prototype.stepForInStatement=function(e,t,r){if(!t.Ub&&(t.Ub=!0,r.left.fa&&r.left.fa[0].ua))return t.scope.S&&x(this,this.T,"for-in loop variable declaration may not have an initializer"),new m(r.left,t.scope);if(!t.Ca)return t.Ca=!0,t.pa||(t.pa=t.value),new m(r.right,t.scope);if(t.W||(t.W=!0,t.u=t.value,t.kb=Object.create(null)),t.Ra===void 0)e:for(;;){if(t.u instanceof I)for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u.h));;){var n=t.wa.shift();if(n===void 0)break;if(Object.prototype.hasOwnProperty.call(t.u.h,n)&&!t.kb[n]&&(t.kb[n]=!0,Object.prototype.propertyIsEnumerable.call(t.u.h,n))){t.Ra=n;break e}}else if(t.u!==null&&t.u!==void 0){for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u));n=t.wa.shift(),n!==void 0;)if(t.kb[n]=!0,Object.prototype.propertyIsEnumerable.call(t.u,n)){t.Ra=n;break e}}if(t.u=le(this,t.u),t.wa=null,t.u===null){e.pop();return}}if(!t.wb)if(t.wb=!0,e=r.left,e.type==="VariableDeclaration")t.pa=[Ie,e.fa[0].id.name];else return t.pa=null,t=new m(e,t.scope),t.sa=!0,t;if(t.pa||(t.pa=t.value),!t.ta&&(t.ta=!0,e=t.Ra,n=Jt(this,t.pa,e)))return Yt(this,n,t.pa,e);if(t.Ra=void 0,t.wb=!1,t.ta=!1,r.body)return new m(r.body,t.scope)};h.prototype.stepForStatement=function(e,t,r){switch(t.na){default:if(t.na=1,r.ua)return new m(r.ua,t.scope);break;case 1:if(t.na=2,r.test)return new m(r.test,t.scope);break;case 2:if(t.na=3,r.test&&!t.value)e.pop();else return t.W=!0,new m(r.body,t.scope);break;case 3:if(t.na=1,r.update)return new m(r.update,t.scope)}};h.prototype.stepFunctionDeclaration=function(e){e.pop()};h.prototype.stepFunctionExpression=function(e,t,r){e.pop(),t=e[e.length-1],e=t.scope,r.id&&(e=Xt(this,e)),t.value=Gt(this,r,e,t.Pa),r.id&&this.g(e.object,r.id.name,t.value,Lt)};h.prototype.stepIdentifier=function(e,t,r){if(e.pop(),t.sa)e[e.length-1].value=[Ie,r.name];else{if(t=Ht(this,r.name),this.P)return Je(this,t,this.Na);e[e.length-1].value=t}};h.prototype.stepIfStatement=h.prototype.stepConditionalExpression;h.prototype.stepLabeledStatement=function(e,t,r){return e.pop(),e=t.labels||[],e.push(r.label.name),t=new m(r.body,t.scope),t.labels=e,t};h.prototype.stepLiteral=function(e,t,r){e.pop(),t=r.value,t instanceof RegExp&&(r=this.s(this.Ma),Wt(this,r,t),t=r),e[e.length-1].value=t};h.prototype.stepLogicalExpression=function(e,t,r){if(r.operator!=="&&"&&r.operator!=="||")throw SyntaxError("Unknown logical operator: "+r.operator);if(!t.ja)return t.ja=!0,new m(r.left,t.scope);if(t.Da)e.pop(),e[e.length-1].value=t.value;else if(r.operator==="&&"&&!t.value||r.operator==="||"&&t.value)e.pop(),e[e.length-1].value=t.value;else return t.Da=!0,new m(r.right,t.scope)};h.prototype.stepMemberExpression=function(e,t,r){if(!t.Ca)return t.Ca=!0,new m(r.object,t.scope);if(r.bb)if(t.Vb)r=t.value;else return t.u=t.value,t.Vb=!0,new m(r.Wa,t.scope);else t.u=t.value,r=r.Wa.name;if(e.pop(),t.sa)e[e.length-1].value=[t.u,r];else{if(r=this.G(t.u,r),this.P)return Je(this,r,t.u);e[e.length-1].value=r}};h.prototype.stepNewExpression=h.prototype.stepCallExpression;h.prototype.stepObjectExpression=function(e,t,r){var n=t.A||0,o=r.h[n];if(t.u){var s=t.Pa;t.Ja[s]||(t.Ja[s]={}),t.Ja[s][o.kind]=t.value,t.A=++n,o=r.h[n]}else t.u=this.s(this.M),t.Ja=Object.create(null);if(o){var a=o.key;if(a.type==="Identifier")s=a.name;else if(a.type==="Literal")s=a.value;else throw SyntaxError("Unknown object structure: "+a.type);return t.Pa=s,new m(o.value,t.scope)}for(a in t.Ja)r=t.Ja[a],"get"in r||"set"in r?this.g(t.u,a,Xe,{configurable:!0,enumerable:!0,get:r.get,set:r.set}):this.g(t.u,a,r.init);e.pop(),e[e.length-1].value=t.u};h.prototype.stepProgram=function(e,t,r){if(e=r.body.shift())return t.done=!1,new m(e,t.scope);t.done=!0};h.prototype.stepReturnStatement=function(e,t,r){if(r.K&&!t.ka)return t.ka=!0,new m(r.K,t.scope);Ke(this,3,t.value)};h.prototype.stepSequenceExpression=function(e,t,r){var n=t.A||0;if(r=r.xb[n])return t.A=n+1,new m(r,t.scope);e.pop(),e[e.length-1].value=t.value};h.prototype.stepSwitchStatement=function(e,t,r){if(!t.ga)return t.ga=1,new m(r.Qb,t.scope);for(t.ga===1&&(t.ga=2,t.hc=t.value,t.cb=-1);;){var n=t.gb||0,o=r.tb[n];if(t.Ha||!o||o.test)if(o||t.Ha||t.cb===-1)if(o){if(!t.Ha&&!t.Fb&&o.test)return t.Fb=!0,new m(o.test,t.scope);if(t.Ha||t.value===t.hc){t.Ha=!0;var s=t.A||0;if(o.da[s])return t.Zb=!0,t.A=s+1,new m(o.da[s],t.scope)}t.Fb=!1,t.A=0,t.gb=n+1}else{e.pop();break}else t.Ha=!0,t.gb=t.cb;else t.cb=n,t.gb=n+1}};h.prototype.stepThisExpression=function(e){e.pop(),e[e.length-1].value=Ht(this,"this")};h.prototype.stepThrowStatement=function(e,t,r){if(t.ka)x(this,t.value);else return t.ka=!0,new m(r.K,t.scope)};h.prototype.stepTryStatement=function(e,t,r){if(!t.Rb)return t.Rb=!0,new m(r.block,t.scope);if(t.ea&&t.ea.type===4&&!t.Tb&&r.Ea)return t.Tb=!0,e=Xt(this,t.scope),this.g(e.object,r.Ea.Ua.name,t.ea.value),t.ea=void 0,new m(r.Ea.body,e);if(!t.Sb&&r.fb)return t.Sb=!0,new m(r.fb,t.scope);e.pop(),t.ea&&Ke(this,t.ea.type,t.ea.value,t.ea.label)};h.prototype.stepUnaryExpression=function(e,t,r){if(!t.ka)return t.ka=!0,e=new m(r.K,t.scope),e.sa=r.operator==="delete",e;e.pop();var n=t.value;switch(r.operator){case"-":n=-n;break;case"+":n=+n;break;case"!":n=!n;break;case"~":n=~n;break;case"delete":if(r=!0,Array.isArray(n)){var o=n[0];o===Ie&&(o=t.scope),n=String(n[1]);try{delete o.h[n]}catch{t.scope.S?x(this,this.j,"Cannot delete property '"+n+"' of '"+o+"'"):r=!1}}n=r;break;case"typeof":n=n&&n.H==="Function"?"function":typeof n;break;case"void":n=void 0;break;default:throw SyntaxError("Unknown unary operator: "+r.operator)}e[e.length-1].value=n};h.prototype.stepUpdateExpression=function(e,t,r){if(!t.ja)return t.ja=!0,e=new m(r.K,t.scope),e.sa=!0,e;if(t.Ga||(t.Ga=t.value),t.Ba&&(t.ma=t.value),!t.Ba){var n=Kt(this,t.Ga);if(t.ma=n,this.P)return t.Ba=!0,Je(this,n,t.Ga)}if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{if(n=Number(t.ma),r.operator==="++")var o=n+1;else if(r.operator==="--")o=n-1;else throw SyntaxError("Unknown update expression: "+r.operator);if(r=r.prefix?o:n,n=Jt(this,t.Ga,o))return t.ta=!0,t.ib=r,Yt(this,n,t.Ga,o);e.pop(),e[e.length-1].value=r}};h.prototype.stepVariableDeclaration=function(e,t,r){r=r.fa;var n=t.A||0,o=r[n];for(t.Bb&&o&&(Gr(this,o.id.name,t.value),t.Bb=!1,o=r[++n]);o;){if(o.ua)return t.A=n,t.Bb=!0,t.Pa=o.id.name,new m(o.ua,t.scope);o=r[++n]}e.pop()};h.prototype.stepWithStatement=function(e,t,r){return t.Ca?(e.pop(),e=Xt(this,t.scope,t.value),new m(r.body,e)):(t.Ca=!0,new m(r.object,t.scope))};h.prototype.stepWhileStatement=h.prototype.stepDoWhileStatement;ge.Interpreter=h;h.prototype.step=h.prototype.lb;h.prototype.run=h.prototype.Eb;h.prototype.appendCode=h.prototype.Jb;h.prototype.createObject=h.prototype.Aa;h.prototype.createObjectProto=h.prototype.s;h.prototype.createAsyncFunction=h.prototype.ub;h.prototype.createNativeFunction=h.prototype.i;h.prototype.getProperty=h.prototype.G;h.prototype.setProperty=h.prototype.g;h.prototype.nativeToPseudo=h.prototype.Ia;h.prototype.pseudoToNative=h.prototype.R;h.prototype.getGlobalScope=h.prototype.Xb;h.prototype.getStateStack=h.prototype.Yb;h.prototype.setStateStack=h.prototype.ec;h.VALUE_IN_DESCRIPTOR=Xe;const Gn=e=>e.split(`
|
|
9
|
+
`).map(t=>{const r=t.trim();if(t.includes("__awaiter"))return;if(!r.startsWith("state."))return t;const[o,s]=r.split("="),p=`setRootState('${o.replace("state.","").trim()}', ${s.trim()})`;return`
|
|
10
|
+
${t}
|
|
11
|
+
${p}
|
|
12
|
+
`}).filter(Boolean).join(`
|
|
13
|
+
`),Br=e=>e+"JSON",Vn=({builder:e,context:t,event:r,rootState:n,localState:o,rootSetState:s,code:a})=>{const p={...n,...o},g=Fr({builder:e,context:t,event:r,state:p}),y=g.map(([R])=>{const K=Br(R);return`var ${R} = ${K} === undefined ? undefined : JSON.parse(${K});`}).join(`
|
|
14
|
+
`),j=Gn(a);if(j===""){F.logger.warn("Skipping evaluation of empty code block.");return}const b=`
|
|
15
|
+
function theFunction() {
|
|
16
|
+
${y}
|
|
17
|
+
|
|
18
|
+
${j}
|
|
19
|
+
}
|
|
20
|
+
theFunction();
|
|
21
|
+
`,Y=(R,K)=>{const S=Ft(p,R,K);s==null||s(S)},T=function(R,K){g.forEach(([S,Q])=>{const ze=JSON.stringify(Q);R.setProperty(K,Br(S),ze)}),R.setProperty(K,"setRootState",R.createNativeFunction(Y))},A=new h(b,T);return A.run(),A.pseudoToNative(A.value)};function Xn(){var e;return typeof process!="undefined"&&F.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Hn=()=>{var n;if(!Xn())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),r=(n=process.env.NODE_OPTIONS)==null?void 0:n.includes("--no-node-snapshot");return e&&t&&!r?(F.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Kn=e=>F.isBrowser()||Hn()?On(e):Vn(e),ie=class ie{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return ie.cache.get(t)}static setCachedValue(t,r){ie.cache.size>20&&ie.cache.delete(ie.cache.keys().next().value),ie.cache.set(t,{value:r})}};Rt(ie,"cacheLimit",20),Rt(ie,"cache",new Map);let je=ie;function lt({code:e,context:t,localState:r,rootState:n,rootSetState:o,event:s,isExpression:a=!0,enableCache:p}){if(e==="")return;const g={code:Cn(e,{isExpression:a}),builder:En(),context:t,event:s,rootSetState:o,rootState:n,localState:r};if(p){const y=je.getCacheKey(g),j=je.getCachedValue(y);if(j)return j.value}try{const y=Kn(g);if(p){const j=je.getCacheKey(g);je.setCachedValue(j,y)}return y}catch(y){F.logger.error("Failed code evaluation: "+y.message,{code:e});return}}const Jn=({block:e,context:t,localState:r,rootState:n,rootSetState:o})=>{if(!e.bindings)return e;const s=F.fastClone(e),a={...s,properties:{...s.properties},actions:{...s.actions}};for(const p in e.bindings){const g=e.bindings[p],y=lt({code:g,localState:r,rootState:n,rootSetState:o,context:t,enableCache:!0});Ft(a,p,y)}return a};function Yn({block:e,context:t,shouldEvaluateBindings:r,localState:n,rootState:o,rootSetState:s}){const a=e;return r?Jn({block:a,localState:n,rootState:o,rootSetState:s,context:t}):a}const ut=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function zn(e,t,r={}){let n,o,s,a=null,p=0;const g=function(){p=r.leading===!1?0:Date.now(),a=null,s=e.apply(n,o),a||(n=o=null)};return function(){const y=Date.now();!p&&r.leading===!1&&(p=y);const j=t-(y-p);return n=this,o=arguments,j<=0||j>t?(a&&(clearTimeout(a),a=null),p=y,s=e.apply(n,o),a||(n=o=null)):!a&&r.trailing!==!1&&(a=setTimeout(g,j)),s}}function Ve(e,...t){const r=Object(e);for(let n=1;n<arguments.length;n++){const o=arguments[n];if(o!=null)for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r}function Zn(e){for(const t of e)switch(t.trigger){case"pageLoad":Jr(t);break;case"scrollInView":Qn(t);break}}function Hr(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Kr(e,t){const r=qn(e),n=getComputedStyle(t),o=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,a=[o,s];for(const p of a)for(const g of r)g in p||(p[g]=n[g])}function qn(e){const t=[];for(const r of e.steps)for(const n in r.styles)t.indexOf(n)===-1&&t.push(n);return t}function Jr(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Hr(e.elementId||e.id||"");return}Array.from(t).forEach(r=>{Kr(e,r),r.style.transition="none",r.style.transitionDelay="0",Ve(r.style,e.steps[0].styles),setTimeout(()=>{r.style.transition=`all ${e.duration}s ${ut(e.easing)}`,e.delay&&(r.style.transitionDelay=e.delay+"s"),Ve(r.style,e.steps[1].styles),setTimeout(()=>{r.style.transition="",r.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Qn(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Hr(e.elementId||e.id||"");return}Array.from(t).forEach(r=>{Kr(e,r);let n=!1,o=!1;function s(){!n&&p(r)?(n=!0,o=!0,setTimeout(()=>{Ve(r.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",a),setTimeout(()=>{o=!1,e.repeat||(r.style.transition="",r.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&n&&!o&&!p(r)&&(n=!1,Ve(r.style,e.steps[0].styles))}const a=zn(s,200,{leading:!1});function p(j){const b=j.getBoundingClientRect(),Y=window.innerHeight,A=(e.thresholdPercent||0)/100*Y;return b.bottom>A&&b.top<Y-A}const g=e.steps[0].styles;function y(){Ve(r.style,g)}y(),setTimeout(()=>{r.style.transition=`all ${e.duration}s ${ut(e.easing)}`,e.delay&&(r.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",a,{capture:!0,passive:!0}),s()})}const Yr=e=>Object.entries(e).map(([r,n])=>{if(typeof n=="string")return`${ut(r)}: ${n};`}).filter(F.checkIsDefined),eo=e=>Yr(e).join(`
|
|
22
|
+
`),it=({mediaQuery:e,className:t,styles:r})=>{const n=`.${t} {
|
|
23
|
+
${eo(r)}
|
|
24
|
+
}`;return e?`${e} {
|
|
25
|
+
${n}
|
|
26
|
+
}`:n};function to({style:e}){return e}const ro=({block:e,context:t})=>zr(to({style:e.style||{},context:t,block:e}));function zr(e){switch(F.TARGET){case"svelte":case"vue":case"solid":case"angular":return Yr(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const no=({block:e,registeredComponents:t})=>{var o;const r=(o=e.component)==null?void 0:o.name;if(!r)return null;const n=t[r];if(n)return n;console.warn(`
|
|
27
|
+
Could not find a registered component named "${r}".
|
|
28
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},oo=({block:e,context:t})=>{const{repeat:r,...n}=e;if(!(r!=null&&r.collection))return;const o=lt({code:r.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const s=r.collection.split(".").pop(),a=r.itemName||(s?s+"Item":"item");return o.map((g,y)=>({context:{...t,localState:{...t.localState,$index:y,$item:g,[a]:g,[`$${a}Index`]:y}},block:n}))},io=(e,t)=>{var r;return(r=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&r.builderLinkComponent?{builderLinkComponent:t}:{}},so=(e,t)=>{var r;return(r=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&r.builderComponents?{builderComponents:t}:{}},ao=(e,t)=>{var r;return(r=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&r.builderBlock?{builderBlock:t}:{}},lo=(e,t)=>{var r;return(r=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&r.builderContext?{builderContext:t}:{}},Zr={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},Mr=(e,t=Zr)=>`@media (max-width: ${t[e].max}px)`,qr=({small:e,medium:t})=>{const r=F.fastClone(Zr);if(!e||!t)return r;const n=Math.floor(e/2);r.small={max:e,min:n,default:n+1};const o=r.small.max+1;r.medium={max:t,min:o,default:o+1};const s=r.medium.max+1;return r.large={max:2e3,min:s,default:s+1},r};function Qr(e){return C.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function uo(e){function t(){const n=e.block;return F.checkIsDefined(n.hide)?!n.hide:F.checkIsDefined(n.show)?n.show:!0}function r(){var R,K,S;const n=e.block,o=n.responsiveStyles,s=e.context.content,a=qr(((R=s==null?void 0:s.meta)==null?void 0:R.breakpoints)||{}),p=o==null?void 0:o.large,g=o==null?void 0:o.medium,y=o==null?void 0:o.small,j=n.id;if(!j)return"";const b=p?it({className:j,styles:p}):"",Y=g?it({className:j,styles:g,mediaQuery:Mr("medium",a)}):"",T=y?it({className:j,styles:y,mediaQuery:Mr("small",a)}):"",A=n.animations&&n.animations.find(Q=>Q.trigger==="hover");let D="";if(A){const Q=((S=(K=A.steps)==null?void 0:K[1])==null?void 0:S.styles)||{};D=it({className:`${j}:hover`,styles:{...Q,transition:`all ${A.duration}s ${ut(A.easing)}`,transitionDelay:A.delay?`${A.delay}s`:"0s"}})||""}return[b,Y,T,D].join(" ")}return C.jsx(C.Fragment,{children:r()&&t()?C.jsx(C.Fragment,{children:C.jsx(Qr,{id:"builderio-block",styles:r(),nonce:e.context.nonce})}):null})}function co(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fo=e=>`on${co(e)}`,po=(e,t)=>r=>lt({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function en(e){var n;const t={},r=(n=e.block.actions)!=null?n:{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let a=fo(o);if(e.stripPrefix)switch(F.TARGET){case"vue":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=po(s,e)}return t}function ho({properties:e}){return e}const go=e=>({href:e.href});function zt({block:e,context:t}){var n;const r={...go(e),...e.properties,"builder-id":e.id,style:ro({block:e,context:t}),[kn.getClassPropName()]:[e.id,"builder-block",e.class,(n=e.properties)==null?void 0:n.class].filter(Boolean).join(" ")};return ho({properties:r,context:t,block:e})}function yo(e){return C.jsx(Sn.DynamicRenderer,{TagName:e.Wrapper,attributes:zt({block:e.block,context:e.context}),actionAttributes:en({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function vo(e){function t(){return e.includeBlockProps?{...zt({block:e.block,context:e.context}),...en({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return C.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const mo=({componentOptions:e,builderBlock:t,context:r,componentRef:n,includeBlockProps:o,isInteractive:s,contextValue:a})=>{const p={...e,...o?{attributes:zt({block:t,context:a})}:{}};return s?{Wrapper:n,block:t,context:r,wrapperProps:e,includeBlockProps:o}:p};function Dr(e){var n;const[t,r]=he.useState(()=>e.isInteractive?vo:e.componentRef);return C.jsx(C.Fragment,{children:e.componentRef?C.jsx(C.Fragment,{children:C.jsx(t,{...mo({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(n=e.blockChildren)==null?void 0:n.map(o=>C.jsx(Ye,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function xo(e){const[t,r]=he.useState(()=>e.repeatContext);return C.jsx(Ur.BuilderContext.Provider,{value:t,children:C.jsx(Ye,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function Ye(e){var j,b,Y;function t(){return no({block:s(),context:e.context,registeredComponents:e.registeredComponents})}function r(){return oo({block:e.block,context:e.context})}const[n,o]=he.useState(()=>({value:null,update:!1}));function s(){var A;if(n.value&&!n.update&&!F.isPreviewing())return n.value;const T=(A=e.block.repeat)!=null&&A.collection?e.block:Yn({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return n.value=T,n.update=!1,T}function a(){var A;return e.block.tagName==="a"||((A=s().properties)==null?void 0:A.href)||s().href?e.linkComponent||"a":e.block.tagName||"div"}function p(){var D,R;if((D=e.block.repeat)!=null&&D.collection)return!!((R=r==null?void 0:r())!=null&&R.length);const T="hide"in s()?s().hide:!1;return("show"in s()?s().show:!0)&&!T}function g(){var A,D;return!((A=t==null?void 0:t())!=null&&A.component)&&!r()?(D=s().children)!=null?D:[]:[]}function y(){var T,A,D,R;return{blockChildren:(T=s().children)!=null?T:[],componentRef:(A=t==null?void 0:t())==null?void 0:A.component,componentOptions:{...jn(s()),...ao(t(),s()),...lo(t(),e.context),...io(t(),e.linkComponent),...so(t(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:s(),includeBlockProps:((D=t==null?void 0:t())==null?void 0:D.noWrap)===!0,isInteractive:!((R=t==null?void 0:t())!=null&&R.isRSC)}}return he.useEffect(()=>{const T=s().id,A=s().animations;A&&T&&Zn(A.map(D=>({...D,elementId:T})))},[]),he.useEffect(()=>{n.update=!0}),C.jsx(C.Fragment,{children:p()?C.jsxs(C.Fragment,{children:[C.jsx(uo,{block:s(),context:e.context}),(j=t==null?void 0:t())!=null&&j.noWrap?C.jsx(C.Fragment,{children:C.jsx(Dr,{componentRef:y().componentRef,componentOptions:y().componentOptions,blockChildren:y().blockChildren,context:y().context,registeredComponents:y().registeredComponents,linkComponent:y().linkComponent,builderBlock:y().builderBlock,includeBlockProps:y().includeBlockProps,isInteractive:y().isInteractive})}):C.jsx(C.Fragment,{children:r()?C.jsx(C.Fragment,{children:(Y=r())==null?void 0:Y.map((T,A)=>C.jsx(xo,{repeatContext:T.context,block:T.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},A))}):C.jsxs(yo,{Wrapper:a(),block:s(),context:e.context,children:[C.jsx(Dr,{componentRef:y().componentRef,componentOptions:y().componentOptions,blockChildren:y().blockChildren,context:y().context,registeredComponents:y().registeredComponents,linkComponent:y().linkComponent,builderBlock:y().builderBlock,includeBlockProps:y().includeBlockProps,isInteractive:y().isInteractive}),(b=g())==null?void 0:b.map(T=>C.jsx(Ye,{block:T,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},T.id))]})})]}):null})}function wo(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function r(){var o,s;F.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function n(){var o,s;F.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return C.jsxs(C.Fragment,{children:[C.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>r(),onMouseEnter:o=>n(),onKeyPress:o=>r(),...e.BlocksWrapperProps,children:e.children}),C.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: stretch;
|
|
32
|
+
}`})]})}function tn(e){var n,o,s;const t=he.useContext(Ur.BuilderContext),r=he.useContext(Lr);return C.jsx(wo,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((n=e.context)==null?void 0:n.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?C.jsx(C.Fragment,{children:(s=e.blocks)==null?void 0:s.map(a=>C.jsx(Ye,{block:a,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||r.registeredComponents},a.id))}):null})}const ko=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"}));exports.Block=Ye;exports.Blocks=tn;exports.ComponentsContext=Lr;exports.InlinedStyles=Qr;exports.blocks=ko;exports.evaluate=lt;exports.getSizesForBreakpoints=qr;exports.mapStyleObjToStrIfNeeded=zr;exports.set=Ft;exports.triggerAnimation=Jr;
|