@tinkerlandai/longplay-sdk 0.10.35 → 0.10.36
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/README.md +34 -3
- package/README.zh-CN.md +6 -0
- package/dist/{ai-usage-T62xehqa.d.ts → ai-usage-DXwAGTxT.d.ts} +1 -1
- package/dist/{api-Do-6AyWa.d.ts → api-r6FfVQpg.d.ts} +6 -1
- package/dist/check-response-DHY6T5Z2.js +1 -0
- package/dist/{chunk-7MNJH5GB.js → chunk-2HSD2SEU.js} +1 -1
- package/dist/{chunk-CKKIB2HC.js → chunk-2KKLY323.js} +1 -1
- package/dist/{chunk-VEX2FOFZ.js → chunk-35VG2IYD.js} +1 -1
- package/dist/{chunk-SXBM3DWK.js → chunk-5XIKN35D.js} +1 -1
- package/dist/{chunk-CIP5SQ5Y.js → chunk-5XKFUFXK.js} +1 -1
- package/dist/{chunk-V7MMTILA.js → chunk-7ZEXY4GC.js} +1 -1
- package/dist/chunk-BL7E4RZ2.js +1 -0
- package/dist/{chunk-LF2UIJYD.js → chunk-BTPEXSNY.js} +1 -1
- package/dist/{chunk-TOTRALYQ.js → chunk-C4GBV32U.js} +1 -1
- package/dist/{chunk-V7PFLFHE.js → chunk-CGXNU5BC.js} +1 -1
- package/dist/{chunk-YVXLCQGM.js → chunk-DB4EO3JG.js} +1 -1
- package/dist/{chunk-TJGIT5CU.js → chunk-DHT3AWJQ.js} +1 -1
- package/dist/{chunk-TAFALMQN.js → chunk-GLYFT5WW.js} +1 -1
- package/dist/chunk-HS56A4IK.js +1 -0
- package/dist/{chunk-56BYGPQ6.js → chunk-HVVJGLYZ.js} +1 -1
- package/dist/chunk-HYE2YQYM.js +1 -0
- package/dist/chunk-I6D25FWU.js +1 -0
- package/dist/{chunk-FMDC6N4W.js → chunk-IOBB6KFK.js} +1 -1
- package/dist/{chunk-PUR5CYWX.js → chunk-JOIPLLHK.js} +1 -1
- package/dist/{chunk-KE26KWIU.js → chunk-LAGGWYH3.js} +1 -1
- package/dist/{chunk-TLZP7BW6.js → chunk-LVG5ED52.js} +1 -1
- package/dist/{chunk-KPDHY76A.js → chunk-M3GGR53D.js} +1 -1
- package/dist/{chunk-EUTWY7A2.js → chunk-MHWPEMX7.js} +1 -1
- package/dist/chunk-MYBUQFTC.js +1 -0
- package/dist/{chunk-7QL4GF4C.js → chunk-O4KXODTJ.js} +1 -1
- package/dist/chunk-OL2AI6DA.js +1 -0
- package/dist/chunk-QHJWVLJC.js +1 -0
- package/dist/{chunk-W6OQTXLL.js → chunk-R3YVDRTB.js} +1 -1
- package/dist/{chunk-EM3MGDPG.js → chunk-RHF4NFCZ.js} +1 -1
- package/dist/{chunk-5HJYR6Z4.js → chunk-RHWZRHK7.js} +1 -1
- package/dist/{chunk-OX7PA64E.js → chunk-TIQS5DUF.js} +1 -1
- package/dist/{chunk-BOVN2BE3.js → chunk-U4WUX3WB.js} +1 -1
- package/dist/{chunk-44U3FOBB.js → chunk-UHTTCVSL.js} +1 -1
- package/dist/{chunk-MSK3VZ3A.js → chunk-UVUFJO2V.js} +1 -1
- package/dist/{chunk-RML52BOR.js → chunk-VKG6BB3Z.js} +1 -1
- package/dist/{chunk-73NP72FV.js → chunk-VWMFR22O.js} +1 -1
- package/dist/chunk-W3K5ARMY.js +1 -0
- package/dist/chunk-WRLVPHPE.js +1 -0
- package/dist/{chunk-U4RSRFZY.js → chunk-XE7GU6FZ.js} +1 -1
- package/dist/{chunk-WZR2XCSJ.js → chunk-XQTCEQXI.js} +1 -1
- package/dist/chunk-YQX27SBG.js +1 -0
- package/dist/{chunk-VYFSRHXM.js → chunk-ZYF6TRJ3.js} +1 -1
- package/dist/{configuration-sync-DdTRUv7A.d.ts → configuration-sync-BHrAf-ql.d.ts} +10 -1
- package/dist/{content-AJDTSI7A.js → content-RGKTEV23.js} +1 -1
- package/dist/{funnel-host-purchase-Z7FCJ5CX.js → funnel-host-purchase-M7MM33EC.js} +1 -1
- package/dist/{funnel-local-client-Dz1dTgES.d.ts → funnel-local-client-DR8OpKGU.d.ts} +145 -3
- package/dist/funnel-paywall-prerender-OSBI4VMY.js +1 -0
- package/dist/{funnel-process-client-D6qjStm2.d.ts → funnel-process-client-C87U4r_G.d.ts} +17 -3
- package/dist/funnel-runtime-host-AMJXEASH.js +1 -0
- package/dist/index.d.ts +26 -9
- package/dist/index.js +1 -1
- package/dist/merchant-bridge-contracts-GJQVKEAG.js +1 -0
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +3 -3
- package/dist/openrouter.js +1 -1
- package/dist/operation-contracts-MFK2KORK.js +1 -0
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/paywall-ATZ2IZPS.js +1 -0
- package/dist/paywall-content-XERXGNND.js +1 -0
- package/dist/paywall-session-EMMF6IYS.js +1 -0
- package/dist/popup.d.ts +3 -3
- package/dist/popup.js +1 -1
- package/dist/{presentation-loading-CFSiS0VX.d.ts → presentation-loading-B_v5XZtM.d.ts} +11 -1
- package/dist/react-native.d.ts +7 -7
- package/dist/react-native.js +1 -1
- package/dist/{screen-CGCJ46b1.d.ts → screen-qUBRsUi9.d.ts} +26 -21
- package/dist/screen-renderer-B7LUTPTJ.js +1 -0
- package/dist/server.d.ts +37 -7
- package/dist/server.js +1 -1
- package/dist/{visual-dom-6DCUZGPB.js → visual-dom-5LUN4AHO.js} +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/check-response-GZZRWBEA.js +0 -1
- package/dist/chunk-2FE4FTPH.js +0 -1
- package/dist/chunk-BLVBUN2R.js +0 -1
- package/dist/chunk-BQRS7Y4K.js +0 -1
- package/dist/chunk-ETK6GC5P.js +0 -1
- package/dist/chunk-GZRRVHYK.js +0 -1
- package/dist/chunk-RNEF4MZW.js +0 -1
- package/dist/chunk-SFHIFCXG.js +0 -1
- package/dist/chunk-UVRT4MY6.js +0 -1
- package/dist/chunk-XUGEOELU.js +0 -1
- package/dist/chunk-ZGCKQWQ5.js +0 -1
- package/dist/funnel-paywall-prerender-QHCUZZY3.js +0 -1
- package/dist/funnel-runtime-host-UKSOOA4H.js +0 -1
- package/dist/merchant-bridge-contracts-EAE4HQE4.js +0 -1
- package/dist/operation-contracts-HS4M2UXN.js +0 -1
- package/dist/paywall-VYUBYBUI.js +0 -1
- package/dist/paywall-content-YQAVSO2T.js +0 -1
- package/dist/paywall-session-E5V42XUT.js +0 -1
- package/dist/screen-renderer-R5GH7XLV.js +0 -1
- /package/dist/{chunk-BID4UGWB.js → chunk-CILM5XMH.js} +0 -0
- /package/dist/{chunk-UKMEW5I7.js → chunk-OJM6ORHE.js} +0 -0
- /package/dist/{chunk-VF6QMMEA.js → chunk-ZYN4CRHS.js} +0 -0
package/dist/openrouter.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OpenRouter } from '@openrouter/sdk';
|
|
2
2
|
import { ChatUsage } from '@openrouter/sdk/models';
|
|
3
|
-
import { F as FoundationApi } from './api-
|
|
4
|
-
import { c as createAiPricing, A as AiUsageContext, a as AiTokenUsage, b as AiTokenQuote } from './ai-usage-
|
|
5
|
-
import './screen-
|
|
3
|
+
import { F as FoundationApi } from './api-r6FfVQpg.js';
|
|
4
|
+
import { c as createAiPricing, A as AiUsageContext, a as AiTokenUsage, b as AiTokenQuote } from './ai-usage-DXwAGTxT.js';
|
|
5
|
+
import './screen-qUBRsUi9.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'zod/v4';
|
|
8
8
|
import '@ai-sdk/provider';
|
package/dist/openrouter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-5XIKN35D.js";import"./chunk-RHWZRHK7.js";import"./chunk-HVVJGLYZ.js";import"./chunk-ZYF6TRJ3.js";import"./chunk-DHT3AWJQ.js";import{a as i}from"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-RHF4NFCZ.js";import{b as A}from"./chunk-ZYN4CRHS.js";import"./chunk-WOT6VMZA.js";var c=A.number().int().min(0).max(1e9);function R(e,o){let a=c.parse(e.promptTokens),p=c.parse(e.completionTokens),s=c.parse(e.promptTokensDetails?.cachedTokens??0),t=c.parse(e.promptTokensDetails?.cacheWriteTokens??0),r=c.parse(e.promptTokensDetails?.audioTokens??0),l=c.parse(e.completionTokensDetails?.audioTokens??0),n=c.parse(e.completionTokensDetails?.reasoningTokens??0);if(c.parse(e.totalTokens)!==a+p||s+t+r>a||n+l>p||(e.promptTokensDetails?.videoTokens??0)>0)throw new i("AI_USAGE_UNAVAILABLE","Token pools must conserve usage; video needs an explicit token mapper");return{input:a-s-t-r,output:p-l-(o==="separate"?n:0),cache_read:s,cache_write:t,input_audio:r,output_audio:l,reasoning:o==="separate"?n:0}}function I(e){if(!Number.isFinite(e)||e<0)throw new i("AI_USAGE_UNAVAILABLE","Provider cost must be a nonnegative USD amount");let o=String(e),a=o.includes("e")?e.toFixed(18).replace(/0+$/,"").replace(/\.$/,""):o;if(!/^(0|[1-9]\d{0,11})(\.\d{1,18})?$/.test(a)||Number(a)!==e)throw new i("AI_USAGE_UNAVAILABLE","Provider cost exceeds the supported precision");return a}async function f(e){if(typeof window<"u")throw new i("SERVER_ONLY","OpenRouter accounting requires your backend");if(!["output","separate"].includes(e.reasoning)||!e.modelId||!e.generationId)throw new i("INVALID_REQUEST","Actual model, generation ID and reasoning pricing are required");let o={context:e.context,generationId:e.generationId,modelId:`openrouter/${e.modelId}`,usage:e.usage,tokens:null,quote:null,receipt:null,phase:"captured"};await e.persist(o);let a=e.mapTokens?e.mapTokens(e.usage):R(e.usage,e.reasoning),p=e.usage.cost==null?void 0:I(e.usage.cost),s=e.quote??await e.pricing.quoteTokens({modelId:o.modelId,tokens:a});if(s.pricing.modelId!==o.modelId||Object.keys(a).some(l=>a[l]!==s.tokens[l]))throw new i("INVALID_REQUEST","Saved quote must match the provider model and token pools");await e.persist({...o,tokens:a,quote:s,phase:"quoted"});let t=await e.pricing.trackTokens(e.client,{...e.context,quote:s,providerCostUsd:p,generationId:e.generationId});if(!t.receipt.accepted)throw new i("AI_BALANCE_REJECTED","OpenRouter usage was saved but the balance request was rejected");let r={...o,tokens:a,quote:s,receipt:t,phase:"settled"};return await e.persist(r),r}function T(e){if(typeof window<"u")throw new i("SERVER_ONLY","OpenRouter accounting requires your backend");if(!["output","separate"].includes(e.reasoning))throw new i("INVALID_REQUEST","Reasoning pricing is required");let o=e.openRouter.chat;async function a(t){if(!t.usage||!t.modelId||!t.generationId)throw new i("AI_USAGE_UNAVAILABLE","OpenRouter did not return final usage and the actual model");await f({...e,context:t.context,generationId:t.generationId,modelId:t.modelId.slice(11),usage:t.usage})}let p=async(t,r)=>{let n={context:await e.context(),generationId:null,modelId:null,usage:null,tokens:null,quote:null,receipt:null,phase:"incomplete"},d;try{d=await o.send(t,r)}catch(g){throw await e.persist(n),g}if(!(d instanceof ReadableStream)){if(n={...n,generationId:d.id,modelId:d.model?`openrouter/${d.model}`:null,usage:d.usage??null},!n.usage||!n.modelId)throw await e.persist(n),new i("AI_USAGE_UNAVAILABLE","OpenRouter omitted final accounting");return await a(n),d}let w=d.getReader(),m=!1;return new ReadableStream({async pull(g){try{let{value:u,done:k}=await w.read();if(k){if(m=!0,!n.usage||!n.modelId)throw await e.persist(n),new i("AI_USAGE_UNAVAILABLE","OpenRouter stream ended without final accounting");await a(n),g.close();return}if(u.error)throw new i("AI_PROVIDER_ERROR",u.error.message);u.usage&&(n={...n,generationId:u.id,modelId:u.model?`openrouter/${u.model}`:null,usage:u.usage}),g.enqueue(u)}catch(u){m||(m=!0,await e.persist(n)),await w.cancel(u),g.error(u)}},async cancel(g){m||(m=!0,await e.persist(n)),await w.cancel(g)}})},s=new Proxy(o,{get(t,r){return r==="send"?p:Reflect.get(t,r,t)}});return new Proxy(e.openRouter,{get(t,r){return r==="chat"?s:Reflect.get(t,r,t)}})}export{T as createOpenRouterUsageClient,f as trackOpenRouterUsage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as o}from"./chunk-UHTTCVSL.js";import"./chunk-XQTCEQXI.js";import"./chunk-2HSD2SEU.js";import"./chunk-5XKFUFXK.js";import"./chunk-2KKLY323.js";import"./chunk-U4WUX3WB.js";import"./chunk-JOIPLLHK.js";import"./chunk-GLYFT5WW.js";import"./chunk-WRLVPHPE.js";import"./chunk-35VG2IYD.js";import"./chunk-RHWZRHK7.js";import"./chunk-ZYF6TRJ3.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import"./chunk-7ZEXY4GC.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-WOT6VMZA.js";export{o as apiOperations};
|
package/dist/page.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as ConfigurationSync } from './configuration-sync-
|
|
1
|
+
import { a as ConfigurationSync } from './configuration-sync-BHrAf-ql.js';
|
|
2
2
|
import { J as JsonValue, R as Result } from './growth-rules-B4YYy64R.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import './screen-
|
|
4
|
+
import './screen-qUBRsUi9.js';
|
|
5
5
|
|
|
6
6
|
/** GET /api/v1/page-experiments/{environmentId}: page experiments and the saved groups they reference only. */
|
|
7
7
|
declare const pageExperimentPayloadSchema: z.ZodObject<{
|
package/dist/page.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,e as r,f as e,g as f}from"./chunk-
|
|
1
|
+
import{d as o,e as r,f as e,g as f}from"./chunk-IOBB6KFK.js";import"./chunk-LVG5ED52.js";import"./chunk-3VUPVXAV.js";import"./chunk-RHF4NFCZ.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";export{f as createPageExperiments,o as mergeQueryStrings,r as pageAttributes,e as readPayload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Pt,c as kt,d as Qe,f as Ge,g as Et,k as xt}from"./chunk-I6D25FWU.js";import{b as je}from"./chunk-W32FI2A2.js";import{d as yt,e as wt,f as bt,h as Fe,i as Ae,j as gt,k as vt,l as Ct}from"./chunk-YQX27SBG.js";import{a as dt,c as He,d as ft,e as pt}from"./chunk-3NCMYTNG.js";import{b as ne}from"./chunk-35VG2IYD.js";import{b as Be,d as mt,g as ht}from"./chunk-CGXNU5BC.js";import"./chunk-HVVJGLYZ.js";import"./chunk-ZYF6TRJ3.js";import{ba as ye,da as we}from"./chunk-QHJWVLJC.js";import{c as ce,j as he}from"./chunk-XE7GU6FZ.js";import{c as Ve}from"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import{a as v}from"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-RHF4NFCZ.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import{a as j}from"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";async function It(T,a,A){if(a.status!=="complete")throw new v("INVALID_RESPONSE","A verified completed purchase is required");let g=T?he.parse(T):null;if(await A.onComplete?.(a),!g||!A.check)return;let D=he.parse(await A.check());if(D.internal_feature_id!==g.internal_feature_id||D.quantity!==g.quantity||g.observation!==void 0&&(D.observation===void 0||D.observation.requirementDigest!==g.observation.requirementDigest||D.observation.authority!==g.observation.authority||Ve(D.observation.subject)!==Ve(g.observation.subject)))throw new v("INVALID_RESPONSE","The access requirement changed");D.allowed&&await A.onAccessGranted?.(D)}function We(T){return Object.entries(T.document.buttons).filter(([,a])=>a.type==="checkout"&&a.product.type==="fixed"&&!ne(a.product,{},T.capabilities)).map(([a])=>a)}function At(T,a){let A=a.lines[0];if(a.lines.length!==1||!A)return;let g=A.productVersionId,{screen:D,buttons:F}=T.document,E=new Map((A.prepaid??[]).map(f=>[f.internal_feature_id,f.quantity]));function Q(f,m){if(f.hidden)return!1;if(f.type==="plan_picker"&&T.capabilities.pickers[f.id]?.options.includes(g))return m[f.id]=g,!0;if(f.type==="quantity_picker"){let V=E.get(f.internalFeatureId);return V!==void 0&&(!f.bind?.plan||f.bind.plan===g)&&(m[f.id]=V),!1}if(f.type==="button"&&f.action){let V=F[f.action];return V?.type==="checkout"&&V.product.type==="fixed"&&V.product.productVersionId===g}if(f.type!=="stack")return!1;let $=f.interaction,r=f.bind?.plan===g;for(let[V,p]of f.children.entries()){let J={},R=Q(p,J);if($?.type==="toggle"||$?.type==="tabs"){if(!R)continue;return m[f.id]=$.type==="toggle"?V===0:p.id,Object.assign(m,J),!0}Object.assign(m,J),R&&(r=!0,$?.type==="select"&&$.purpose==="product"&&$.pickerId&&p.type==="stack"&&p.bind?.plan===g&&(m[f.id]=p.id,m[$.pickerId]=g))}return r}for(let f of D.pages){let m={__page:f.id};if(Q(f.root,m))return m}}async function mn(T,a,A){let g=a.focusAtReveal?()=>{}:Fe(T.ownerDocument),D=()=>{E.finish("dismissed"),g()},F=()=>D(),E=gt(T,a,"paywall",()=>{D(),j(a.onDismiss)},Pt);a.signal?.throwIfAborted(),a.signal?.addEventListener("abort",F,{once:!0});let Q=null,f,m,$;try{if(E.start(!0,a.loadingDocument?.screen.strings.defaultLocale,a.loadingDocument??null),E.cancelled)throw new DOMException("Presentation cancelled","AbortError");if(Q=a.check?he.parse(await E.wait(a.check(),Ae)):null,Q?.allowed)return E.finish("skipped"),a.signal?.removeEventListener("abort",F),g(),await a.onAccessGranted?.(Q),{check:Q,host:null};let[e,t]=await Promise.allSettled([E.wait(import("./screen-renderer-B7LUTPTJ.js")),E.wait(a.start().then(i=>(E.cancelled&&i.destroy(),i)),Ae)]);if(e.status==="rejected")throw t.status==="fulfilled"&&t.value.destroy(),e.reason;if(t.status==="rejected")throw t.reason;$=e.value,f=t.value,a.signal?.throwIfAborted(),f.signal?.throwIfAborted(),f.signal?.addEventListener("abort",F,{once:!0});let n=f.view??await E.wait(f.refresh(),Ae);if(!n)throw new v("INVALID_RESPONSE","Paywall presentation is missing");f.signal?.throwIfAborted(),m=n}catch(e){throw E.finish("error",e),a.signal?.removeEventListener("abort",F),f?.signal?.removeEventListener("abort",F),f?.destroy(),g(),e}let r=f,{mountScreenPreview:V}=$,p=T.ownerDocument,J=new AbortController,R=p.createElement("section"),re=p.createElement("div"),G=p.createElement("div"),c=p.createElement("p"),y=p.createElement("button"),C=p.createElement("button"),x=p.createElement("dialog"),ze=r.locale||m.document.screen.strings.defaultLocale,s=ze.toLowerCase().startsWith("zh"),Rt=s?"\u6B63\u5728\u5904\u7406\u2026":"Processing\u2026",St=s?"\u6B63\u5728\u51C6\u5907\u62A5\u4EF7\u2026":"Preparing your price\u2026",O=kt(m.document.screen.theme);R.dataset.indianaPaywall="",R.setAttribute("aria-label",m.document.name),R.style.cssText=O.root,G.style.cssText=O.controls,c.style.cssText=O.message,c.setAttribute("role","status"),C.style.cssText=O.link,C.textContent=s?"\u5173\u95ED":"Close",y.style.cssText=O.secondary,y.textContent=s?"\u91CD\u8BD5":"Retry",y.hidden=!0,G.append(c,y,C),R.append(re,G);let Ye=()=>{let e=K??G,t=[...e.children].every(i=>i===c?!c.textContent:i.hidden),n=[...e.children].some(i=>i===C?!1:i===c?!!c.textContent:!i.hidden);e.style.cssText=t?O.controls.replace(/padding:[^;]+/,"padding:0"):n?`${O.controls};${O.pinned}`:O.controls,Oe()},Je=typeof MutationObserver>"u"?void 0:new MutationObserver(Ye);Je?.observe(R,{attributes:!0,attributeFilter:["hidden"],characterData:!0,childList:!0,subtree:!0});let be=m.document.presentation,Tt=Object.entries(m.document.buttons).filter(([,e])=>e.type==="close").map(([e])=>e),U,Ke,Re=!1,Xe=JSON.stringify(m.capabilities),Ze=e=>Z&&!ue?Object.entries(e.document.buttons).filter(([,t])=>t.type==="checkout").map(([t])=>t):We(e);function Se(e){if(h)return;m=e;let t=JSON.stringify(e.capabilities);t!==Xe&&(U?.updateCapabilities(e.capabilities,Ze(e)),Xe=t),Nt(e),de()}let P,Te=0;function Oe(){let e=p.defaultView;if(!P?.responsive||!e)return;let t=K??G,n=e.innerHeight-(P.type==="modal"?32:0);t.style.maxHeight=`${Math.max(1,n)}px`,t.style.overflowY="auto",t.style.flexShrink="0",Te=Math.max(1,n-t.getBoundingClientRect().height),U?.resizeViewport?.(Te,e.innerWidth)}let h=!1,Z=!1,k=null,ge=!1,et=!1,ee=!1,De,Ne=!1,W,K;function Ot(){return Z||h||W||Ne?{type:"recover",operationId:r.operation?.operationId??r.quote?.operationId??null,requestId:null}:He(r)}let I=()=>!h&&!ge&&!W&&a.canInteract?.()!==!1,ie=!1,u=null,z=null,_e="",te=()=>a.checkoutNavigation==="after_confirmation"&&!!(a.terminateCheckout||a.resumeCheckout),le={},ue,H=null;function de(){if(!te()||!U?.updateCheckoutControls)return;let e=r.quote,t=!H&&!!e&&!!r.operation&&M(r.operation).type==="checkout",n=Object.entries(m.document.buttons).flatMap(([i,o])=>o.type==="checkout"?[{actionId:i,policy:o}]:[]);U.updateCheckoutControls({actions:n.map(({actionId:i})=>i),resume:t?n.filter(({policy:i})=>Pe(e,m,i.product,le)).map(({actionId:i})=>i):[],resumeLabel:s?"\u7EE7\u7EED\u4ED8\u6B3E":"Continue checkout",busy:ue})}function tt(){z?.remove(),z=null}async function Le(){if(H)return;if(a.resumeCheckout&&r.operation){await a.resumeCheckout(r.operation.operationId);return}let e=await r.read();if(M(e).type!=="checkout")return N(e,!1);I()&&(ve.delete(e.operationId),await ke(e))}function nt(){c.textContent=s?"\u6682\u65F6\u65E0\u6CD5\u6253\u5F00\u4ED8\u6B3E\u9875\u9762\u3002\u8BF7\u91CD\u8BD5\u3002":"Couldn\u2019t open checkout. Try again.",y.hidden=!0}async function rt(e=!1){let t=H;if(!t)return;y.hidden=!0;let n=Date.now()+2e4;for(;I();){let i=await r.read();if(i.operationId!==t.operationId)throw new v("PURCHASE_PENDING","The original Checkout changed");if(!I())break;let o=M(i);if(o.type==="native"){H=null,tt(),k=t.selection,ie=!1,await pe();return}if(o.type==="complete"||o.type==="fulfillment"||o.type==="recording"){H=null,await N(i,!1);return}if(e&&o.type==="checkout"){e=!1;try{await a.terminateCheckout(t.operationId)}catch(d){j(a.onError,d)}}if(Date.now()>=n)break;await je(1e3,p,J.signal)}h||nt()}async function Dt(e,t){H={operationId:e,selection:t};let n=!1;try{await a.terminateCheckout(e)}catch(i){if(i instanceof v&&["CAPABILITY_UNAVAILABLE","NOT_CONFIGURED"].includes(i.code)){H=null,c.textContent=s?"\u8BF7\u7EE7\u7EED\u539F\u8BA2\u5355\uFF0C\u6216\u7B49\u5F85\u5B83\u8FC7\u671F\u540E\u518D\u66F4\u6362\u65B9\u6848\u3002":"Continue your original checkout, or wait for it to expire before changing plans.",j(a.onError,i);return}n=i instanceof v&&(i.status??0)>=500,j(a.onError,i)}I()&&await rt(n)}function Nt(e){Z||k||r.quote||r.operation||_e&&c.textContent===_e||(c.textContent=Object.values(e.capabilities.plans).some(t=>t.available)?"":s?"\u5F53\u524D\u8D26\u53F7\u6682\u65E0\u53EF\u8D2D\u4E70\u7684\u65B9\u6848\u3002":"No plans are currently available for this account.")}let ve=new Map,Ce=!1;function Pe(e,t,n,i){let o=e.lines.length===1?e.lines[0]:void 0,d=ne(n,i,t.capabilities);if(!o||!d||o.productVersionId!==d)return!1;let _;try{_=we(t.document.screen,d,i,t.capabilities)}catch{return!1}let b=Object.fromEntries((o.prepaid??[]).map(Y=>[Y.internal_feature_id,Y.quantity]));return[...new Set([...Object.keys(_),...Object.keys(b)])].every(Y=>(_[Y]??0)===(b[Y]??0))}let M=e=>dt({quote:r.quote,operation:e,requestId:null,pending:!1,destroyed:h,canReselect:r.canReselect});async function ke(e){let t=e.merchantExecution;if(!(!I()||!e.checkoutUrl||a.checkoutNavigation==="after_confirmation"&&M(e).type!=="checkout"||t?.type==="purchase"&&!["not_started","pending"].includes(t.paymentStatus)||ve.get(e.operationId)===e.checkoutUrl)){ve.set(e.operationId,e.checkoutUrl);try{a.onCheckoutUrl?await a.onCheckoutUrl(e.checkoutUrl):p.defaultView?.location.assign(e.checkoutUrl)}catch(n){throw ve.delete(e.operationId),n}}}let X=(e,t=!1)=>{if(e instanceof Be)u=null,c.textContent=e.customerMessage(s);else if(Et(e))u=null,c.textContent=t?s?"\u5F53\u524D\u65E0\u6CD5\u5728\u6B64\u8D2D\u4E70\uFF0C\u4ED8\u6B3E\u5C1A\u672A\u5F00\u59CB\u3002\u8BF7\u8054\u7CFB\u5546\u6237\u3002":"Purchases aren\u2019t available here right now. Payment hasn\u2019t started. Contact the merchant for help.":Ge(e,s);else if(t){let n=e instanceof v?e.code:void 0;n==="CAPABILITY_UNAVAILABLE"||n==="NOT_CONFIGURED"?(u=null,c.textContent=s?"\u6682\u65F6\u65E0\u6CD5\u4E3A\u6B64\u5957\u9910\u62A5\u4EF7\uFF0C\u4ED8\u6B3E\u5C1A\u672A\u5F00\u59CB\u3002":"Pricing for this plan is unavailable. Payment hasn\u2019t started."):r.canReselect===!0&&!k?c.textContent=s?"\u672A\u80FD\u53D6\u5F97\u62A5\u4EF7\uFF0C\u4ED8\u6B3E\u5C1A\u672A\u5F00\u59CB\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5957\u9910\u3002":"We couldn\u2019t prepare your price. Payment hasn\u2019t started. Choose a plan again.":n==="COMMAND_PENDING"?c.textContent=s?"\u4ECD\u5728\u51C6\u5907\u62A5\u4EF7\uFF0C\u8BF7\u91CD\u8BD5\u4EE5\u67E5\u770B\u7ED3\u679C\u3002":"Your price is still being prepared. Retry to check the result.":c.textContent=s?"\u672A\u80FD\u53D6\u5F97\u62A5\u4EF7\uFF0C\u4ED8\u6B3E\u5C1A\u672A\u5F00\u59CB\u3002\u8BF7\u91CD\u8BD5\u3002":"We couldn\u2019t prepare your price. Payment hasn\u2019t started. Try again."}else c.textContent=e instanceof v&&(e.code==="NETWORK_ERROR"||e.code==="TIMEOUT")?Ge(e,s):e instanceof v?e.message:s?"\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002":"This action couldn\u2019t be completed. Try again.";y.hidden=u===null,_e=c.textContent,t&&!P?.responsive&&c.scrollIntoView?.({block:"nearest"}),j(t&&A?.quoteError?A.quoteError:a.onError,e)},Ee=new WeakMap;function xe(e){Z=e,y.disabled=e,U?.updateCapabilities?.(m.capabilities,Ze(m));for(let t of z?.querySelectorAll("button")??[])e?(Ee.set(t,t.disabled),t.disabled=!0):Ee.has(t)&&(t.disabled=Ee.get(t),Ee.delete(t)),Qe(t)}function Ue(){c.textContent=s?"\u6682\u65F6\u65E0\u6CD5\u64CD\u4F5C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"This action is unavailable right now. Try again in a moment."}async function _t(e){if(a.beforeAction)try{await a.beforeAction()}catch(t){throw t instanceof Be?(k=null,ie=!1,u=null):u=e,t}}async function L(e,t){if(Z||h)return;if(!I()){Ue();return}let n=e===pe,i=n?St:Rt,o=te()&&t!==void 0;ue=o?t:void 0,xe(!0),de(),y.hidden=!0,c.textContent=o?"":i;try{if((e!==Le||!a.resumeCheckout)&&await _t(e),h)return;if(!I()){u=e,y.hidden=!1,Ue();return}await e()}catch(d){h||X(d,n&&!o)}finally{ue=void 0,xe(!1),de(),c.textContent===i&&(c.textContent="")}}async function Lt(e){await It(Q,e,a)}function it(e){return He(r).type==="recording"||M(e).type==="recording"}function at(e){let t=e.merchantTerms,n=t?.subscriptionTerms?.items??[],i=t?t.totalMinor:e.charge?.totalMinor??e.catalogAmountMinor-(e.discount?.amountMinor??0),o=t?n.length===1&&n[0]?.amountMinor===i&&n[0]:e.lines.length===1&&e.lines[0]?.catalogAmountMinor===i&&e.lines[0],d=i===null?ce(t.subtotalMinor-t.discountMinor,e.currency)+(s?" + \u5F85\u786E\u8BA4\u7A0E\u8D39":" + tax confirmed at checkout"):ce(i,e.currency)+(o?ye(o.interval,s?"zh-CN":"en",o.intervalCount??1):""),_=e.lines.map(b=>b.productName).join(", ");return{label:_?`${_} \xB7 ${d}`:d,recurring:o}}async function N(e,t=a.checkoutNavigation!=="after_confirmation"){if(h)return;if(!I()){u=async()=>N(await r.read()),y.hidden=!1;return}if(c.textContent=xt(e.status,s),it(e)){let o=e.merchantExecution?.type==="purchase"&&e.merchantExecution.recordingStatus==="failed";c.textContent=o?s?"\u4ED8\u6B3E\u548C\u5546\u6237\u5904\u7406\u5DF2\u5B8C\u6210\uFF0C\u4F46\u4EA4\u6613\u8BB0\u5F55\u5931\u8D25\u3002\u8BF7\u8054\u7CFB\u5546\u6237\u4FEE\u590D\uFF0C\u52FF\u91CD\u590D\u8D2D\u4E70\u3002":"Payment and fulfillment succeeded, but recording failed. Contact the merchant to repair this purchase; do not buy again.":s?"\u4ED8\u6B3E\u548C\u5546\u6237\u5904\u7406\u5DF2\u5B8C\u6210\uFF0C\u6B63\u5728\u786E\u8BA4\u4EA4\u6613\u8BB0\u5F55\u3002\u8BF7\u52FF\u91CD\u590D\u8D2D\u4E70\u3002":"Payment and merchant fulfillment are complete. Recording is pending confirmation; do not purchase again.",y.textContent=s?"\u67E5\u8BE2\u8BB0\u5F55":"Check recording",u=async()=>N(await r.read()),y.hidden=!1;return}if(e.problem){let o=e.problem;u=fe,y.textContent=s?"\u68C0\u67E5\u5E76\u6062\u590D\u539F\u64CD\u4F5C":"Check and recover original purchase",X(new v(o.code,o.reason==="RESULT_UNKNOWN"?s?"\u4ED8\u6B3E\u7ED3\u679C\u5C1A\u672A\u786E\u5B9A\uFF0C\u8BF7\u6062\u590D\u539F\u64CD\u4F5C\uFF0C\u6682\u52FF\u91CD\u590D\u8D2D\u4E70\u3002":"The payment result is unknown. Recover the original purchase before buying again.":o.phase==="fulfillment"?s?"\u4ED8\u6B3E\u5DF2\u8BB0\u5F55\uFF0C\u5546\u6237\u6743\u76CA\u5904\u7406\u9700\u8981\u6838\u5BF9\u3002":"Payment was recorded. Access fulfillment needs attention.":o.code==="CAPABILITY_UNAVAILABLE"?s?"\u5546\u6237\u5C1A\u4E0D\u652F\u6301\u672C\u6B21\u8D2D\u4E70\u6240\u9700\u7684\u5B8C\u6574\u80FD\u529B\uFF0C\u8BF7\u5904\u7406\u540E\u6062\u590D\u539F\u64CD\u4F5C\u3002":"The merchant does not currently support all actions required by this purchase. Recover the original purchase after this is resolved.":o.code==="NOT_CONFIGURED"?s?"\u4ED8\u6B3E\u670D\u52A1\u8FDE\u63A5\u9700\u8981\u5904\u7406\uFF0C\u8BF7\u8054\u7CFB\u5546\u6237\u540E\u6062\u590D\u539F\u64CD\u4F5C\u3002":"The payment connection needs attention. Contact the merchant, then recover the original purchase.":s?"\u539F\u8D2D\u4E70\u64CD\u4F5C\u9700\u8981\u5904\u7406\uFF0C\u8BF7\u67E5\u8BE2\u6216\u6062\u590D\u6B64\u64CD\u4F5C\u3002":"The original purchase needs attention. Check or recover this operation.",void 0,void 0,o));return}if(e.merchantExecution?.type==="purchase"&&e.merchantExecution.paymentStatus==="succeeded"&&!["applied","not_applicable"].includes(e.merchantExecution.fulfillmentStatus)&&(c.textContent=s?"\u4ED8\u6B3E\u5DF2\u8BB0\u5F55\uFF0C\u6B63\u5728\u7B49\u5F85\u5546\u6237\u5B8C\u6210\u5904\u7406\u3002":"Payment was recorded. Waiting for merchant fulfillment."),e.status==="complete"){u=null,await Lt(e);return}if(e.status!=="pending"){if(r.canReselect===!1){c.textContent=s?"\u6B63\u5728\u6838\u5BF9\u539F\u8D2D\u4E70\u7ED3\u679C":"Checking the original purchase result",y.textContent=s?"\u67E5\u8BE2\u7ED3\u679C":"Check result",u=async()=>N(await r.read()),y.hidden=!1;return}e.status==="cancelled"?c.textContent=s?"\u8FD9\u7B14\u8D2D\u4E70\u5DF2\u53D6\u6D88\uFF0C\u53EF\u4EE5\u91CD\u65B0\u9009\u62E9\u65B9\u6848\u3002":"This purchase was cancelled. Choose a plan to start again.":e.status==="failed"&&(c.textContent=s?"\u8FD9\u7B14\u8D2D\u4E70\u672A\u80FD\u5B8C\u6210\uFF0C\u53EF\u4EE5\u91CD\u65B0\u9009\u62E9\u65B9\u6848\u3002":"This purchase didn\u2019t go through. Choose a plan to try again."),y.textContent=s?"\u91CD\u8BD5":"Retry",u=null,k=null;return}if(!t&&M(e).type==="checkout"){if(H){nt();return}if(te()){c.textContent="",Ce=!1,u=null,de();return}let o=r.quote,d=o?.operationId===e.operationId?at(o).label:"";c.textContent=Ce?d?s?`${d} \u5C1A\u672A\u4ED8\u6B3E\u3002\u518D\u6B21\u9009\u62E9\u8BE5\u65B9\u6848\u5373\u53EF\u7EE7\u7EED\u4ED8\u6B3E\u3002`:`${d} is still unpaid. Choose it again to continue paying.`:s?"\u4E4B\u524D\u7684\u8D2D\u4E70\u5C1A\u672A\u4ED8\u6B3E\u3002\u518D\u6B21\u9009\u62E9\u8BE5\u65B9\u6848\u5373\u53EF\u7EE7\u7EED\u4ED8\u6B3E\u3002":"Your earlier purchase is still unpaid. Choose that plan again to continue paying.":"",Ce=!1,u=null;return}await ke(e);let n=Date.now()+6e5,i=2e3;Re=!0,j(a.onObservationChange,!0);try{for(;!h&&Date.now()<n;){if(await je(i,p,J.signal),h)return;if(!I()){u=async()=>N(await r.read()),y.hidden=!1;return}let o=await r.read();if(!t&&M(o).type==="checkout"){await N(o,!1);return}if(!o.problem&&o.status==="pending"&&await ke(o),o.status!=="pending"||o.problem||it(o)){await N(o);return}i=Math.min(i*1.5,3e4)}}finally{Re=!1,j(a.onObservationChange,!1)}u=async()=>N(await r.read()),y.hidden=!1}async function Me(e=!1){let t=await r.read();if(h)return;if(!I()){u=()=>Me(e),y.hidden=!1;return}let n=r.quote;if(n&&mt(t,{operationId:n.operationId,currency:n.currency},"The original purchase operation changed"),n&&t.status==="pending"&&t.quoteFinalized===!1&&!t.confirmedAt&&!t.checkoutUrl&&!t.nativePurchase&&!t.merchantExecution&&!t.problem&&!r.pendingCancellation){ot(n);return}await N(t,e||void 0)}async function fe(){tt(),u=fe;let e=await r.confirm();if(!I()){u=fe,y.hidden=!1;return}if(e.problem){await N(e);return}if(e.status==="pending"){if(e.checkoutUrl)await ke(e);else if(e.execution&&e.execution.provider!=="merchant"||e.nativePurchase){if(!a.onPurchase)throw new v("PURCHASE_HANDLER_REQUIRED","Provide the merchant or native purchase handler");await a.onPurchase({operation:e,signal:J.signal})}}u=async()=>N(await r.read()),await N(e,!0)}function ot(e){z?.remove();let t=!(Date.parse(e.expiresAt)>Date.now());c.textContent=t?s?"\u6B64\u62A5\u4EF7\u5DF2\u8FC7\u671F\u3002\u8BF7\u5148\u53D6\u6D88\uFF0C\u518D\u91CD\u65B0\u9009\u62E9\u3002":"This quote has expired. Cancel it, then choose again.":"";let n=p.createElement("div"),i=p.createElement("button"),o=p.createElement("button"),d=p.createElement("div"),_=p.createElement("p"),b=e.merchantTerms,oe=s?"zh-CN":"en",Y=b?.subscriptionTerms?.items??[],me=b?b.subscriptionTerms?.trial?.days:e.lines.find(l=>l.trial)?.trial?.days,se=me===void 0?null:b?b.totalMinor:e.charge?e.charge.totalMinor:e.lines.every(l=>l.trial)?0:null,st=(l,w)=>s?`${w} \u5929\u8BD5\u7528\u7ED3\u675F\u540E ${l}`:`Then ${l} after the ${w}-day trial`,{label:Ut,recurring:ct}=at(e),Mt=e.lines.map(l=>l.productName).join(", "),lt=se===null?"":`${s?"\u4ECA\u5929\u5E94\u4ED8":"Due today"} ${ce(se,e.currency)}`;_.textContent=lt?[Mt,lt].filter(Boolean).join(" \xB7 "):Ut,i.textContent=s?"\u786E\u8BA4\u8D2D\u4E70":"Confirm purchase",i.disabled=t,o.textContent=s?"\u53D6\u6D88":"Cancel",n.style.cssText=O.panel,_.style.cssText=O.summary,d.style.cssText=O.actions,i.style.cssText=O.primary,o.style.cssText=O.secondary,Qe(i),i.onclick=()=>{L(fe)};let ut=async()=>{let l=await r.cancel();h||(n.remove(),z=null,await N(l))};o.onclick=()=>{u=ut,L(ut)};let q=p.createElement("div");if(q.style.cssText=O.terms,b){for(let w of Y){if(se===null&&w===ct)continue;let S=p.createElement("p"),B=ce(w.amountMinor,e.currency)+ye(w.interval,oe,w.intervalCount);S.textContent=se!==null&&me!==void 0?st(B,me):B,q.append(S)}let l=b.subscriptionTerms?.trial;if(l){let w=p.createElement("p");w.textContent=s?`\u8BD5\u7528 ${l.days} \u5929\uFF1B${l.cardRequired?"\u9700\u8981\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F":"\u65E0\u9700\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F"}`:`Trial days: ${l.days}; ${l.cardRequired?"a payment method is required":"no payment method is required"}`,q.append(w)}for(let w of[...b.expectedEffects.map(S=>S.description),...b.requiredConsents.map(S=>S.summary)]){let S=p.createElement("p");S.textContent=w,q.append(S)}}else{for(let l of e.lines){if(se!==null||l!==ct){let w=p.createElement("p"),S=`${ce(l.catalogAmountMinor,e.currency)}${ye(l.interval,oe,l.intervalCount??1)}`;w.textContent=se!==null&&l.trial?(e.lines.length>1?`${l.productName} \xB7 `:"")+st(S,l.trial.days):`${l.productName} \xB7 ${S}`,q.append(w)}for(let w of l.prepaid??[]){let S=p.createElement("p"),B=r.view?.capabilities.plans[l.productVersionId]?.prepaid?.find(qt=>qt.internalFeatureId===w.internal_feature_id);S.textContent=`${B?.name??w.internal_feature_id} \xB7 ${w.quantity} ${s?"\u4EFD":"packs"} \xD7 ${w.terms.units}`,B&&(S.textContent+=ye(B.reset==="week"||B.reset==="month"||B.reset==="year"?B.reset:"one_time",oe,B.resetCount)),q.append(S)}if(l.trial){let w=p.createElement("p");w.textContent=s?`\u8BD5\u7528 ${l.trial.days} \u5929\uFF1B${l.trial.cardRequired?"\u9700\u8981\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F":"\u65E0\u9700\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F"}`:`Trial days: ${l.trial.days}; ${l.trial.cardRequired?"a payment method is required":"no payment method is required"}`,q.append(w)}}if(!e.charge){let l=p.createElement("p");l.textContent=s?"\u76EE\u5F55\u4EF7\u683C\uFF1B\u6700\u7EC8\u91D1\u989D\u4EE5\u7ED3\u8D26\u65F6\u7A0E\u8D39\u548C\u8BD5\u7528\u89C4\u5219\u4E3A\u51C6\u3002":"Catalog price; the final charge depends on checkout taxes and trial terms.",q.append(l)}}for(let l of q.children)l.style.margin="0";d.append(i,o),n.append(_,...q.childElementCount?[q]:[],d),G.prepend(n),P?.responsive||n.scrollIntoView?.({block:"nearest"}),i.focus({preventScroll:!0}),z=n,u=null}async function pe(){if(!k)return;if(u=pe,!ie){let n=r.view,i=n?.document.buttons[k.actionId],o=n&&i?.type==="checkout"?ne(i.product,k.selection,n.capabilities):null;if(!n||!o)throw new v("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area");let d=await a.resolveOfferId?.({actionId:k.actionId,productVersionId:o,featureQuantities:we(n.document.screen,o,k.selection,n.capabilities)});if(h)return;d!==void 0&&(k.offerId=d),ie=!0}if(!I()){y.hidden=!1;return}let e;try{e=await r.preview(k)}catch(n){throw r.canReselect===!0&&(k=null,ie=!1,u=null),n}if(h)return;let t=e.merchantTerms;if(a.confirmOnHostedCheckout&&I()&&e.provider==="merchant"&&e.billingSubscriptionId===null&&t?.request.action==="purchase"&&t.request.mode==="subscription"&&t.subscriptionTerms?.trial===null&&t.requiredConsents.length===0&&Date.parse(e.expiresAt)>Date.now()){let n=ue?"":s?"\u6B63\u5728\u6253\u5F00\u6536\u94F6\u53F0\u2026":"Opening checkout\u2026";c.textContent=n;try{await fe()}catch(i){h||X(i)}finally{c.textContent===n&&(c.textContent="")}return}ot(e)}function ae(e="destroy"){h||(h=!0,a.signal?.removeEventListener("abort",F),r.signal?.removeEventListener("abort",F),E.finish("dismissed"),Ke?.(),J.abort(),Je?.disconnect(),P?.destroy(),U?.destroy(),r.destroy(),x.open&&x.close(),x.remove(),R.remove(),g(),e==="dismiss"&&j(a.onDismiss))}D=ae;async function Ie(){if(!ee||h||ge||W==="closing"||!W&&!I())return;if(!A){ae("dismiss");return}let e=p.createElement("p");e.setAttribute("role","status"),e.textContent=s?"\u6B63\u5728\u5173\u95ED\u2026":"Closing\u2026",K||(K=p.createElement("div"),K.style.cssText=G.style.cssText,G.replaceWith(K),re.inert=!0),C.hidden=!1,K.replaceChildren(e,C),W="closing",C.setAttribute("aria-disabled","true"),C.focus({preventScroll:!0});try{await A.dismiss()}catch(t){h||j(a.onError,t)}h||(W="retry",e.textContent=s?"\u672A\u80FD\u786E\u8BA4\u5173\u95ED\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not confirm closure. Try again.",C.textContent=s?"\u91CD\u8BD5\u5173\u95ED":"Retry closing",C.removeAttribute("aria-label"),C.removeAttribute("aria-disabled"))}C.onclick=()=>{Ie()},x.addEventListener("cancel",e=>{e.preventDefault(),Ie()}),y.onclick=()=>{u&&L(u)};function qe(e){E.finish("error",e),ae()}function $e(){if(!(!et||ee||h||ge||P&&!I()))try{let e=t=>{a.focusAtReveal&&(g=Fe(p)),U?.setHidden?.(!1),De?.(),P&&(x.showModal(),P.responsive&&x.focus({preventScroll:!0}),!t&&a.loading!=="host"&&wt(x,P.type,P.responsive)),ee=!0};A?A.present(()=>E.present(()=>e(!0))):E.present(e)}catch(e){qe(e),X(e)}}try{be.type==="inline"?(Ye(),De=Ct(R,T),T.append(R)):(x.setAttribute("aria-label",m.document.name),C.textContent="\xD7",C.setAttribute("aria-label",s?"\u5173\u95ED":"Close"),bt(C,m.document.screen.theme),C.hidden=ht(m.document),x.append(C,R),T.append(x),P=yt(x,{...m.document.screen,presentation:be},Oe),P.latch(),P.responsive&&(R.style.display="flex",R.style.flexDirection="column",R.style.maxHeight="100%",re.style.overflow="clip",re.style.minHeight="0"),De=vt(x)),U=V(re,{mode:"live",rendererUrl:r.webViewUrl,title:m.document.name,closeActions:Tt,onAuthoredClose(n){W||h||(C.hidden=n)},hostPresentation:()=>P?.type??be.type,reportContentHeight:P?.responsive,onResize:n=>{if(!P?.responsive)return;let i=Math.min(n,Te);re.style.height=`${i}px`,P.setContentHeight(i+(K??G).getBoundingClientRect().height)},onSelection(n){le=n,de()},onAction(n,i={}){if(!ee||h||W)return;let o=r.view,d=o?.document.buttons[n];if(!d)return;if(d.type==="close"&&A&&a.resumeCheckout&&r.operation&&ft(M(r.operation))){Ie();return}if(Z)return;if(!I()){Ue();return}if(d.type==="close"){L(async()=>{await a.onAction?.(n),ae(a.onAction?"action":"dismiss")});return}if(d.type==="action"){u=async()=>{if(d.action.type==="event"){if(!a.onEvent)throw new v("EVENT_HANDLER_REQUIRED","Provide the event handler");await a.onEvent(d.action.event)}else a.onOpenUrl?await a.onOpenUrl(d.action.url):p.defaultView?.location.assign(d.action.url);await a.onAction?.(n),u=null},L(u);return}if(a.allowNewPurchase===!1){te()&&o&&r.quote&&r.operation&&M(r.operation).type==="checkout"&&Pe(r.quote,o,d.product,i)?L(Le,n):c.textContent=s?"\u5F53\u524D\u53EA\u80FD\u7EE7\u7EED\u539F\u8BA2\u5355\u3002":"Only your original checkout is available.";return}if(z&&r.canReselect===!1){c.textContent=s?"\u8BF7\u5148\u786E\u8BA4\u6216\u53D6\u6D88\u5F53\u524D\u8D2D\u4E70\u3002":"Confirm or cancel the current purchase first.",P?.responsive||z.scrollIntoView?.({block:"nearest"}),z.querySelector("button")?.focus({preventScroll:!0});return}if(te()&&H){H.selection.actionId===n&&L(()=>rt(!0),n);return}if(te()&&a.terminateCheckout&&o&&r.quote&&r.operation&&r.canReselect===!1&&M(r.operation).type==="checkout"){if(Pe(r.quote,o,d.product,i)){L(Le,n);return}let b=ne(d.product,i,o.capabilities);try{if(!b)throw new v("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area");we(o.document.screen,b,i,o.capabilities)}catch(me){X(me);return}let oe=r.operation.operationId,Y={actionId:n,requestId:crypto.randomUUID(),selection:structuredClone(i)};L(()=>Dt(oe,Y),n);return}if((r.quote||k)&&r.canReselect===!1){let b=!!o&&!!r.quote&&Pe(r.quote,o,d.product,i);Ce=!!r.quote&&!b,u=r.quote?()=>Me(b):pe,L(u);return}let _=o&&ne(d.product,i,o.capabilities);if(!o||!_){X(new v("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));return}if(a.onPurchaseIntent){u=null,L(async()=>{let b={actionId:n,productVersionId:_,selection:structuredClone(i),featureQuantities:we(o.document.screen,_,i,o.capabilities)};Ne=!0,await a.onPurchaseIntent(b)});return}if(k&&k.actionId!==n){X(new v("COMMAND_PENDING","Finish the current purchase"));return}k||(k={requestId:crypto.randomUUID(),actionId:n,selection:structuredClone(i)},ie=!1),L(pe,n)},onEscape:()=>{Ie()},onError:n=>{let i=new Error(n);!ee&&!h&&qe(i),X(i)},onRendered:n=>{n&&x.setAttribute("aria-label",n),et=!0,$e()}}),U.setHidden?.(!0),Oe();let e=te()&&!!r.quote&&!!r.operation&&M(r.operation).type==="checkout";le=e?At(m,r.quote)??{}:{},U.update(m.document.screen,ze,{capabilities:m.capabilities,unavailableActions:We(m),serverInput:{bindings:[],answers:{}},...Object.keys(le).length?{selection:le}:{}}),Ke=r.subscribe?.(Se),Se(r.view??m),await E.wait(U.ready);let t=r.operation;!e&&(r.quote||t&&(t.confirmedAt||t.checkoutUrl||t.status==="complete"))&&(u=()=>Me(),L(u))}catch(e){throw qe(e),e}return{check:Q,host:{get observing(){return Re},get recovery(){return Ot()},async prepareFallback(){if(Z||h||W||Ne)return{type:"recover",operationId:r.operation?.operationId??r.quote?.operationId??null,requestId:null};xe(!0);try{let e=await pt(r);return e.type==="native"&&ae(),e}finally{xe(!1)}},setSuspended(e){ge=e,R.hidden=e,e&&x.open?x.close():!e&&!ee?$e():!e&&!h&&ee&&be.type!=="inline"&&!x.open&&x.showModal()},destroy:ae,refresh:async()=>{if(!I()){if(r.view)return r.view;throw new v("PRECONDITION_FAILED","Paywall presentation is suspended")}let e=await r.refresh();return Se(e),$e(),e}}}}export{mn as showPaywall};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-R3YVDRTB.js";import"./chunk-U4WUX3WB.js";import"./chunk-JOIPLLHK.js";import"./chunk-GLYFT5WW.js";import"./chunk-WRLVPHPE.js";import"./chunk-35VG2IYD.js";import"./chunk-HVVJGLYZ.js";import"./chunk-ZYF6TRJ3.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-3VUPVXAV.js";import"./chunk-RHF4NFCZ.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-WOT6VMZA.js";export{a as readPaywallContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MYBUQFTC.js";import"./chunk-UHTTCVSL.js";import"./chunk-XQTCEQXI.js";import"./chunk-MHWPEMX7.js";import"./chunk-2HSD2SEU.js";import"./chunk-5XKFUFXK.js";import"./chunk-BTPEXSNY.js";import"./chunk-2KKLY323.js";import"./chunk-R3YVDRTB.js";import"./chunk-U4WUX3WB.js";import"./chunk-JOIPLLHK.js";import"./chunk-GLYFT5WW.js";import"./chunk-WRLVPHPE.js";import"./chunk-3NCMYTNG.js";import"./chunk-35VG2IYD.js";import"./chunk-CGXNU5BC.js";import"./chunk-RHWZRHK7.js";import"./chunk-HVVJGLYZ.js";import"./chunk-ZYF6TRJ3.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-3VUPVXAV.js";import"./chunk-RHF4NFCZ.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";export{a as createPaywallSession};
|
package/dist/popup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as ScreenAction, c as ScreenNode, d as ScreenInteractivity, e as ScreenDocument } from './screen-
|
|
1
|
+
import { b as ScreenAction, c as ScreenNode, d as ScreenInteractivity, e as ScreenDocument } from './screen-qUBRsUi9.js';
|
|
2
2
|
import { O as Offer, a as OfferUnavailableReason } from './coupon-kfkIVf9n.js';
|
|
3
|
-
import { e as CustomerPageData, a as SurfaceData, P as PresentationLoadingOptions, f as ScreenParameters, g as ScreenRendererInput, S as ScreenAnswers, C as CustomerDataIntent } from './presentation-loading-
|
|
4
|
-
export { d as PresentationState } from './presentation-loading-
|
|
3
|
+
import { e as CustomerPageData, a as SurfaceData, P as PresentationLoadingOptions, f as ScreenParameters, g as ScreenRendererInput, S as ScreenAnswers, C as CustomerDataIntent } from './presentation-loading-B_v5XZtM.js';
|
|
4
|
+
export { d as PresentationState } from './presentation-loading-B_v5XZtM.js';
|
|
5
5
|
import { WindowLike } from 'dompurify';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a}from"./chunk-
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a}from"./chunk-C4GBV32U.js";import"./chunk-YQX27SBG.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";export{p as formatCustomerDecimal,r as hostedRendererScript,o as hostedRendererShell,f as inspectCustomHtml,a as mountScreenPreview,x as preparePopup,m as prepareScreen,e as sanitizeCustomHtml,t as showPopup};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { S as StackNode, e as ScreenDocument } from './screen-
|
|
2
|
+
import { S as StackNode, e as ScreenDocument } from './screen-qUBRsUi9.js';
|
|
3
3
|
|
|
4
4
|
declare const surfaceDataSchema: z.ZodObject<{
|
|
5
5
|
paywall: z.ZodOptional<z.ZodObject<{
|
|
@@ -521,6 +521,11 @@ declare const publicPaywallSchema: z.ZodObject<{
|
|
|
521
521
|
blur: "blur";
|
|
522
522
|
}>>;
|
|
523
523
|
type: z.ZodLiteral<"modal">;
|
|
524
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
525
|
+
center: "center";
|
|
526
|
+
top: "top";
|
|
527
|
+
bottom: "bottom";
|
|
528
|
+
}>>;
|
|
524
529
|
size: z.ZodEnum<{
|
|
525
530
|
sm: "sm";
|
|
526
531
|
md: "md";
|
|
@@ -584,6 +589,11 @@ declare const publicPaywallSchema: z.ZodObject<{
|
|
|
584
589
|
blur: "blur";
|
|
585
590
|
}>>;
|
|
586
591
|
type: z.ZodLiteral<"modal">;
|
|
592
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
593
|
+
center: "center";
|
|
594
|
+
top: "top";
|
|
595
|
+
bottom: "bottom";
|
|
596
|
+
}>>;
|
|
587
597
|
size: z.ZodEnum<{
|
|
588
598
|
sm: "sm";
|
|
589
599
|
md: "md";
|
package/dist/react-native.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { f as createCustomerClient, d as createFunnelClient } from './funnel-process-client-
|
|
2
|
-
export { F as FunnelProcessAdapter, a as FunnelProcessOptions, c as createFunnelProcess } from './funnel-process-client-
|
|
3
|
-
import { I as IndianaOptions, b as SessionCredentials, G as Scope, A as createFunnelRunController, w as PaywallStartInput, k as createPaywallSession } from './funnel-local-client-
|
|
4
|
-
export { F as FunnelCommandStorage, f as FunnelRunController, t as LocalFunnelClientOptions, u as LongplayError, v as PaywallPurchaseInput, P as PaywallSession, x as PushHost, y as PushJournal, z as createFeatureClient, B as createLocalFunnelClient } from './funnel-local-client-
|
|
1
|
+
import { f as createCustomerClient, d as createFunnelClient } from './funnel-process-client-C87U4r_G.js';
|
|
2
|
+
export { F as FunnelProcessAdapter, a as FunnelProcessOptions, c as createFunnelProcess } from './funnel-process-client-C87U4r_G.js';
|
|
3
|
+
import { I as IndianaOptions, b as SessionCredentials, G as Scope, A as createFunnelRunController, w as PaywallStartInput, k as createPaywallSession } from './funnel-local-client-DR8OpKGU.js';
|
|
4
|
+
export { F as FunnelCommandStorage, f as FunnelRunController, t as LocalFunnelClientOptions, u as LongplayError, v as PaywallPurchaseInput, P as PaywallSession, x as PushHost, y as PushJournal, z as createFeatureClient, B as createLocalFunnelClient } from './funnel-local-client-DR8OpKGU.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { J as JsonValue } from './growth-rules-B4YYy64R.js';
|
|
7
|
-
export { C as ConfigurationStorage, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-
|
|
8
|
-
import './api-
|
|
9
|
-
import './screen-
|
|
7
|
+
export { C as ConfigurationStorage, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-BHrAf-ql.js';
|
|
8
|
+
import './api-r6FfVQpg.js';
|
|
9
|
+
import './screen-qUBRsUi9.js';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import './coupon-kfkIVf9n.js';
|
|
12
12
|
|
package/dist/react-native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as S,c as E,d as T}from"./chunk-
|
|
1
|
+
import{b as S,c as E,d as T}from"./chunk-VKG6BB3Z.js";import"./chunk-M3GGR53D.js";import{a as A}from"./chunk-MYBUQFTC.js";import{e as P}from"./chunk-UHTTCVSL.js";import"./chunk-XQTCEQXI.js";import{h as b,i as x,k as L}from"./chunk-HS56A4IK.js";import{F as C}from"./chunk-HYE2YQYM.js";import"./chunk-MHWPEMX7.js";import"./chunk-2HSD2SEU.js";import"./chunk-5XKFUFXK.js";import"./chunk-BTPEXSNY.js";import"./chunk-2KKLY323.js";import"./chunk-R3YVDRTB.js";import"./chunk-U4WUX3WB.js";import"./chunk-JOIPLLHK.js";import"./chunk-GLYFT5WW.js";import"./chunk-WRLVPHPE.js";import"./chunk-3NCMYTNG.js";import"./chunk-35VG2IYD.js";import"./chunk-CGXNU5BC.js";import"./chunk-RHWZRHK7.js";import"./chunk-HVVJGLYZ.js";import"./chunk-ZYF6TRJ3.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import{b as R}from"./chunk-DHT3AWJQ.js";import{a as r}from"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-3VUPVXAV.js";import"./chunk-RHF4NFCZ.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";function k(t,d){let n,a=0,m=-1,l,i=!1,y=()=>{if(i)throw new r("CLOSED","Native host was destroyed");if(!t.nativeModule)throw new r("CAPABILITY_UNAVAILABLE","Link IndianaBridge and supply nativeModule");return t.nativeModule},o=()=>new r("IDENTITY_CHANGED","Customer identity changed during the native operation"),h=d.subscribeIdentity(()=>{a++,m=-1;let e=a;n&&t.nativeModule&&n.then(c=>t.nativeModule.reset(c,e)).catch(()=>{})}),I=t.nativeEvents?.(e=>{!n||!t.nativeModule||typeof e?.requestId!="string"||(async()=>{let c=await n;if(e.instanceId!==c)return;if(e.kind==="credential"){let w=a,f=null;try{if(!i&&e.revision===w){let N=await d.access();!i&&a===w&&(f=N)}}finally{await t.nativeModule.provideCredential(c,e.requestId,f)}return}let s=!1,u=a;try{if(i||e.revision!==u||!t.onNativeAction)throw o();await t.onNativeAction(e.action),s=!i&&a===u}finally{await t.nativeModule.acknowledge(c,e.requestId,s)}})().catch(()=>{})});async function p(e,c={}){let s=y();if(d.snapshot()&&!t.nativeEvents)throw new r("CAPABILITY_UNAVAILABLE","Supply nativeEvents to share credential refresh with the native host");let u=a,w=await d.access();if(i||a!==u)throw o();if(!n){let v=s.create(JSON.stringify({baseUrl:t.baseUrl??"https://api.longplayai.com",scope:t.scope,timeout:(t.timeoutMs??15e3)/1e3,credentialEvents:!!t.nativeEvents}));n=v,v.catch(()=>{n===v&&(n=void 0)})}let f=await n;if(i||a!==u)throw o();if(m!==u){if(!l||l.epoch!==u){let O=(async()=>{if(await s.identify(f,JSON.stringify({revision:u,credentials:w})),i||a!==u)throw await s.reset(f,u),o();m=u})();l={epoch:u,task:O}}let v=l;try{await v.task}finally{l===v&&(l=void 0)}}let N=await s.invoke(f,e,JSON.stringify(c));if(i||a!==u)throw o();try{return JSON.parse(N)}catch{throw new r("INVALID_RESPONSE","Native host returned invalid JSON")}}async function g(e,c){let s=await p(e,c);if(!s||typeof s!="object"||Array.isArray(s)||s.status!=="complete"&&s.status!=="dismissed")throw new r("INVALID_RESPONSE","Native presentation returned an invalid result");return s}return{showFunnel(e){return g("showFunnel",{runToken:e})},showPaywall(e){return g("showPaywall",e)},showContent(e){return g("showContent",e)},purchaseSubscription(e,c){return p("purchaseSubscription",{operationId:e,accepted:c})},switchSubscription(e,c){return p("switchSubscription",{operationId:e,accepted:c})},restorePurchases(){return p("restorePurchases")},manageSubscriptions(e){return p("manageSubscriptions",e?{productId:e}:{})},async dismiss(){a++,m=-1,n&&await y().reset(await n,a)},async destroy(){i||(i=!0,a++,h(),I?.(),n&&t.nativeModule&&await t.nativeModule.destroy(await n))}}}var M=P.trackUsage.request.shape.command,U=P.trackUsage.response;function F(t){let d=R.parse(t.scope),n=S({...t,scope:d}),a={...t,scope:d,session:n.session},m=k(t,n.session),l=0,i=!1;n.subscribeIdentity(()=>{l++});let y=()=>{if(i)throw new r("CLOSED","SDK client was destroyed");let o=n.session.peek();if(!o)throw new r("UNAUTHENTICATED","Identify the Customer first");return o};return{...n,native:m,async destroy(){i||(i=!0,l++,n.destroy(),await m.destroy())},funnel(){return E({...a,customerToken:y()})},resumeFunnel(o){return y(),C({...a,runToken:o})},paywall(o){return A(a,{...o,customerToken:y()})},async trackUsage(o){if(y(),!t.usageReporter)throw new r("INVALID_REQUEST","Configure your authenticated backend usageReporter");let h=M.parse(o),I=l,p;try{p=await t.usageReporter(h)}catch(e){throw I!==l?new r("IDENTITY_CHANGED","Customer identity changed during usage reporting"):e}if(I!==l)throw new r("IDENTITY_CHANGED","Customer identity changed during usage reporting");let g=U.parse(p);if(g.scope.projectId!==d.projectId||g.scope.environment!==d.environment)throw new r("INVALID_RESPONSE","Usage response scope differs");return g}}}export{r as LongplayError,x as createConfigurationSync,b as createFeatureClient,T as createFunnelProcess,L as createLocalFunnelClient,F as createLongplayReactNative};
|
|
@@ -251,8 +251,8 @@ declare const textNodeSchema: z.ZodObject<{
|
|
|
251
251
|
muted: "muted";
|
|
252
252
|
}>, z.ZodString]>>;
|
|
253
253
|
align: z.ZodOptional<z.ZodEnum<{
|
|
254
|
-
start: "start";
|
|
255
254
|
center: "center";
|
|
255
|
+
start: "start";
|
|
256
256
|
end: "end";
|
|
257
257
|
}>>;
|
|
258
258
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -408,8 +408,8 @@ declare const imageNodeSchema: z.ZodObject<{
|
|
|
408
408
|
muted: "muted";
|
|
409
409
|
}>, z.ZodString]>>;
|
|
410
410
|
align: z.ZodOptional<z.ZodEnum<{
|
|
411
|
-
start: "start";
|
|
412
411
|
center: "center";
|
|
412
|
+
start: "start";
|
|
413
413
|
end: "end";
|
|
414
414
|
}>>;
|
|
415
415
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -565,8 +565,8 @@ declare const buttonNodeSchema: z.ZodObject<{
|
|
|
565
565
|
muted: "muted";
|
|
566
566
|
}>, z.ZodString]>>;
|
|
567
567
|
align: z.ZodOptional<z.ZodEnum<{
|
|
568
|
-
start: "start";
|
|
569
568
|
center: "center";
|
|
569
|
+
start: "start";
|
|
570
570
|
end: "end";
|
|
571
571
|
}>>;
|
|
572
572
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -704,8 +704,8 @@ declare const dividerNodeSchema: z.ZodObject<{
|
|
|
704
704
|
muted: "muted";
|
|
705
705
|
}>, z.ZodString]>>;
|
|
706
706
|
align: z.ZodOptional<z.ZodEnum<{
|
|
707
|
-
start: "start";
|
|
708
707
|
center: "center";
|
|
708
|
+
start: "start";
|
|
709
709
|
end: "end";
|
|
710
710
|
}>>;
|
|
711
711
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -873,8 +873,8 @@ declare const customerDataNodeSchema: z.ZodObject<{
|
|
|
873
873
|
muted: "muted";
|
|
874
874
|
}>, z.ZodString]>>;
|
|
875
875
|
align: z.ZodOptional<z.ZodEnum<{
|
|
876
|
-
start: "start";
|
|
877
876
|
center: "center";
|
|
877
|
+
start: "start";
|
|
878
878
|
end: "end";
|
|
879
879
|
}>>;
|
|
880
880
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1021,8 +1021,8 @@ declare const spacerNodeSchema: z.ZodObject<{
|
|
|
1021
1021
|
muted: "muted";
|
|
1022
1022
|
}>, z.ZodString]>>;
|
|
1023
1023
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1024
|
-
start: "start";
|
|
1025
1024
|
center: "center";
|
|
1025
|
+
start: "start";
|
|
1026
1026
|
end: "end";
|
|
1027
1027
|
}>>;
|
|
1028
1028
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1261,8 +1261,8 @@ declare const customHtmlNodeSchema: z.ZodObject<{
|
|
|
1261
1261
|
muted: "muted";
|
|
1262
1262
|
}>, z.ZodString]>>;
|
|
1263
1263
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1264
|
-
start: "start";
|
|
1265
1264
|
center: "center";
|
|
1265
|
+
start: "start";
|
|
1266
1266
|
end: "end";
|
|
1267
1267
|
}>>;
|
|
1268
1268
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1399,8 +1399,8 @@ declare const priceNodeSchema: z.ZodObject<{
|
|
|
1399
1399
|
muted: "muted";
|
|
1400
1400
|
}>, z.ZodString]>>;
|
|
1401
1401
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1402
|
-
start: "start";
|
|
1403
1402
|
center: "center";
|
|
1403
|
+
start: "start";
|
|
1404
1404
|
end: "end";
|
|
1405
1405
|
}>>;
|
|
1406
1406
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1531,8 +1531,8 @@ declare const priceNodeSchema: z.ZodObject<{
|
|
|
1531
1531
|
muted: "muted";
|
|
1532
1532
|
}>, z.ZodString]>>;
|
|
1533
1533
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1534
|
-
start: "start";
|
|
1535
1534
|
center: "center";
|
|
1535
|
+
start: "start";
|
|
1536
1536
|
end: "end";
|
|
1537
1537
|
}>>;
|
|
1538
1538
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1663,8 +1663,8 @@ declare const priceNodeSchema: z.ZodObject<{
|
|
|
1663
1663
|
muted: "muted";
|
|
1664
1664
|
}>, z.ZodString]>>;
|
|
1665
1665
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1666
|
-
start: "start";
|
|
1667
1666
|
center: "center";
|
|
1667
|
+
start: "start";
|
|
1668
1668
|
end: "end";
|
|
1669
1669
|
}>>;
|
|
1670
1670
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1799,8 +1799,8 @@ declare const priceNodeSchema: z.ZodObject<{
|
|
|
1799
1799
|
muted: "muted";
|
|
1800
1800
|
}>, z.ZodString]>>;
|
|
1801
1801
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1802
|
-
start: "start";
|
|
1803
1802
|
center: "center";
|
|
1803
|
+
start: "start";
|
|
1804
1804
|
end: "end";
|
|
1805
1805
|
}>>;
|
|
1806
1806
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1939,8 +1939,8 @@ declare const couponCodeNodeSchema: z.ZodObject<{
|
|
|
1939
1939
|
muted: "muted";
|
|
1940
1940
|
}>, z.ZodString]>>;
|
|
1941
1941
|
align: z.ZodOptional<z.ZodEnum<{
|
|
1942
|
-
start: "start";
|
|
1943
1942
|
center: "center";
|
|
1943
|
+
start: "start";
|
|
1944
1944
|
end: "end";
|
|
1945
1945
|
}>>;
|
|
1946
1946
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2091,8 +2091,8 @@ declare const countdownNodeSchema: z.ZodObject<{
|
|
|
2091
2091
|
muted: "muted";
|
|
2092
2092
|
}>, z.ZodString]>>;
|
|
2093
2093
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2094
|
-
start: "start";
|
|
2095
2094
|
center: "center";
|
|
2095
|
+
start: "start";
|
|
2096
2096
|
end: "end";
|
|
2097
2097
|
}>>;
|
|
2098
2098
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2248,8 +2248,8 @@ declare const planPickerNodeSchema: z.ZodObject<{
|
|
|
2248
2248
|
muted: "muted";
|
|
2249
2249
|
}>, z.ZodString]>>;
|
|
2250
2250
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2251
|
-
start: "start";
|
|
2252
2251
|
center: "center";
|
|
2252
|
+
start: "start";
|
|
2253
2253
|
end: "end";
|
|
2254
2254
|
}>>;
|
|
2255
2255
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2384,8 +2384,8 @@ declare const planPickerNodeSchema: z.ZodObject<{
|
|
|
2384
2384
|
muted: "muted";
|
|
2385
2385
|
}>, z.ZodString]>>;
|
|
2386
2386
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2387
|
-
start: "start";
|
|
2388
2387
|
center: "center";
|
|
2388
|
+
start: "start";
|
|
2389
2389
|
end: "end";
|
|
2390
2390
|
}>>;
|
|
2391
2391
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2536,8 +2536,8 @@ declare const quantityPickerNodeSchema: z.ZodObject<{
|
|
|
2536
2536
|
muted: "muted";
|
|
2537
2537
|
}>, z.ZodString]>>;
|
|
2538
2538
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2539
|
-
start: "start";
|
|
2540
2539
|
center: "center";
|
|
2540
|
+
start: "start";
|
|
2541
2541
|
end: "end";
|
|
2542
2542
|
}>>;
|
|
2543
2543
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2574,14 +2574,14 @@ declare const stackNodeFields: {
|
|
|
2574
2574
|
overlay: "overlay";
|
|
2575
2575
|
}>;
|
|
2576
2576
|
align: z.ZodEnum<{
|
|
2577
|
-
start: "start";
|
|
2578
2577
|
center: "center";
|
|
2578
|
+
start: "start";
|
|
2579
2579
|
end: "end";
|
|
2580
2580
|
stretch: "stretch";
|
|
2581
2581
|
}>;
|
|
2582
2582
|
justify: z.ZodEnum<{
|
|
2583
|
-
start: "start";
|
|
2584
2583
|
center: "center";
|
|
2584
|
+
start: "start";
|
|
2585
2585
|
end: "end";
|
|
2586
2586
|
between: "between";
|
|
2587
2587
|
}>;
|
|
@@ -2734,8 +2734,8 @@ declare const stackNodeFields: {
|
|
|
2734
2734
|
muted: "muted";
|
|
2735
2735
|
}>, z.ZodString]>>;
|
|
2736
2736
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2737
|
-
start: "start";
|
|
2738
2737
|
center: "center";
|
|
2738
|
+
start: "start";
|
|
2739
2739
|
end: "end";
|
|
2740
2740
|
}>>;
|
|
2741
2741
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2880,8 +2880,8 @@ declare const stackNodeFields: {
|
|
|
2880
2880
|
muted: "muted";
|
|
2881
2881
|
}>, z.ZodString]>>;
|
|
2882
2882
|
align: z.ZodOptional<z.ZodEnum<{
|
|
2883
|
-
start: "start";
|
|
2884
2883
|
center: "center";
|
|
2884
|
+
start: "start";
|
|
2885
2885
|
end: "end";
|
|
2886
2886
|
}>>;
|
|
2887
2887
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3031,8 +3031,8 @@ declare const stackNodeFields: {
|
|
|
3031
3031
|
muted: "muted";
|
|
3032
3032
|
}>, z.ZodString]>>;
|
|
3033
3033
|
align: z.ZodOptional<z.ZodEnum<{
|
|
3034
|
-
start: "start";
|
|
3035
3034
|
center: "center";
|
|
3035
|
+
start: "start";
|
|
3036
3036
|
end: "end";
|
|
3037
3037
|
}>>;
|
|
3038
3038
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3118,6 +3118,11 @@ declare const screenDocumentShape: z.ZodObject<{
|
|
|
3118
3118
|
blur: "blur";
|
|
3119
3119
|
}>>;
|
|
3120
3120
|
type: z.ZodLiteral<"modal">;
|
|
3121
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
3122
|
+
center: "center";
|
|
3123
|
+
top: "top";
|
|
3124
|
+
bottom: "bottom";
|
|
3125
|
+
}>>;
|
|
3121
3126
|
size: z.ZodEnum<{
|
|
3122
3127
|
sm: "sm";
|
|
3123
3128
|
md: "md";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-C4GBV32U.js";import"./chunk-YQX27SBG.js";import"./chunk-QHJWVLJC.js";import"./chunk-XE7GU6FZ.js";import"./chunk-LAGGWYH3.js";import"./chunk-DHT3AWJQ.js";import"./chunk-TIQS5DUF.js";import"./chunk-7ZEXY4GC.js";import"./chunk-ZYN4CRHS.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-DSPLGTQI.js";import"./chunk-WOT6VMZA.js";export{f as formatCustomerDecimal,b as hostedRendererScript,a as hostedRendererShell,d as inspectCustomHtml,i as mountScreenPreview,h as preparePopup,e as prepareScreen,c as sanitizeCustomHtml,g as showPopup};
|