@tinkerlandai/indiana-sdk 0.1.0 → 0.3.0

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.
@@ -1 +0,0 @@
1
- import{a as o,b as E}from"./chunk-2HEB2TPD.js";import{Bj as D,Dj as N,Fh as m,Me as b,lj as O,ma as I,na as k,oa as x,pa as h,ra as v,wj as V}from"./chunk-FMAMDKAV.js";async function q(n,t){if(!/^gg_ct_[A-Za-z0-9_-]{43}$/.test(t.customerToken))throw new o("INVALID_TOKEN","A verified Customer credential is required");let a=E(n);a.identify(t.customerToken);let i=m.resolvePaywall.request.parse({selector:{type:"paywall",paywallId:t.paywallId},commerce:t.commerce,locale:t.locale,...t.requirement?{requirement:t.requirement}:{}}),e=null,s=null,u=null,r=null,c=null;async function d(){let l=m.resolvePaywall,y=l.response.parse(await a.request(l.path,l.request.parse({...i,selector:e?{type:"version",versionId:e.id}:i.selector})));if(y.paywall.paywallId!==t.paywallId)throw new o("INVALID_RESPONSE","The requested Paywall changed");if(e&&(y.paywall.id!==e.id||y.paywall.paywallId!==e.paywallId||y.paywall.offering.id!==e.offering.id))throw new o("INVALID_RESPONSE","The pinned Paywall or Offering Version changed");return e=y.paywall,structuredClone(e)}async function p(l){if(!s)throw new o("INVALID_REQUEST","A quoted purchase is required");let y=l==="read"?m.readSubscriptionOperation:m.attach,w=y.response.parse(await a.request(y.path,y.request.parse({operationId:s.operationId,...l==="read"?{}:{intent:l}})));if(w.operation.operationId!==s.operationId||w.operation.currency!==i.commerce.currency)throw new o("INVALID_RESPONSE","The purchase operation changed");return u?.status==="complete"&&w.operation.status!=="complete"||u&&u.status!=="pending"&&w.operation.status==="pending"||(u=w.operation),structuredClone(u)}let f={get view(){return e?structuredClone(e):null},get quote(){return s?structuredClone(s):null},get operation(){return u?structuredClone(u):null},get webViewUrl(){return a.webViewUrl()},refresh:d,async preview(l){if(!e)throw new o("INVALID_REQUEST","Load the Paywall first");let y=e.document.buttons[l.actionId];if(y?.type!=="checkout")throw new o("INVALID_REQUEST","Choose an authored purchase action");let w=b(y.product,l.selection,e.capabilities);if(!w)throw new o("PRODUCT_UNAVAILABLE","Choose an available Product");let C=m.previewAttach.request.parse({requestId:l.requestId,plans:[{productVersionId:w}],provider:i.commerce.provider,currency:i.commerce.currency,...l.offerId?{offerId:l.offerId}:{},...l.nativeOffer?{nativeOffer:l.nativeOffer}:{}}),A=JSON.stringify(C);if(r&&r!==A&&(!u||u.status==="pending"))throw new o("COMMAND_PENDING","Finish or cancel the original purchase before changing it");if(r===A){if(c)return c;if(s)return structuredClone(s)}r=A;let P=(async()=>{let F=m.previewAttach,g=F.response.parse(await a.request(F.path,C));if(g.quote.currency!==i.commerce.currency||g.quote.provider!==i.commerce.provider||g.quote.lines.length!==1||g.quote.lines[0].productVersionId!==w)throw new o("INVALID_RESPONSE","The purchase quote changed its selected Product or presentment");return s=g.quote,u=null,structuredClone(s)})();c=P;try{return await P}finally{c===P&&(c=null)}},confirm:()=>p("confirm"),cancel:()=>p("cancel"),read:()=>p("read"),destroy(){a.reset(),e=null,s=null,u=null,r=null}};return await d(),f}function L(n){let t=null,a=null,i=0,e={attributes:v.parse(n.attributes??{}),onFeatureUsage:n.onFeatureUsage?(r,c)=>n.onFeatureUsage(r,structuredClone(c)):void 0,onExperimentViewed:n.onExperimentViewed?(r,c)=>n.onExperimentViewed(structuredClone(r),structuredClone(c)):void 0,stickyBucketAssignmentDocs:structuredClone(n.stickyBucketAssignmentDocs),saveStickyBucketAssignmentDoc:n.saveStickyBucketAssignmentDoc?r=>n.saveStickyBucketAssignmentDoc(structuredClone(r)):void 0,trackedFeatureUsage:{},trackedExperiments:new Set},s=r=>{if(!t)throw new Error("Initialize the Feature client before evaluation");if(t.expiresAt&&Date.parse(t.expiresAt)<=Date.now())throw new Error("Feature configuration expired; refresh before evaluation");return structuredClone(h(r,e))};async function u(){if(a)return a;let r=i,c=(async()=>{let d=D.parse(await n.load());if(d.scope.projectId!==n.scope.projectId||d.scope.environment!==n.scope.environment)throw new Error("Feature payload scope changed");if(r!==i)throw new Error("Feature client was reset");return t=structuredClone(d),e.features=t.features,e.savedGroups=I(t.savedGroups),e.trackedFeatureUsage={},structuredClone(t)})();a=c;try{return await c}finally{a===c&&(a=null)}}return{init:u,refresh:u,get generation(){return t?.generation??null},setAttributes(r){e.attributes=v.parse(r)},evalFeature:s,getFeatureValue(r,c){let d=s(r).value;return d===null?structuredClone(c):structuredClone(d)},reset(){i++,a=null,t=null,e.features={},e.savedGroups={},e.stickyBucketAssignmentDocs={},e.attributes={},e.trackedFeatureUsage={},e.trackedExperiments?.clear()}}}function Q(n,t,a){let i=N.parse(n);if(i.evaluationMode!=="local")throw new o("EVALUATION_MODE","Remote nodes are evaluated by Grow");if(i.expiresAt&&Date.parse(i.expiresAt)<=Date.now())throw new o("CONFIGURATION_EXPIRED","Refresh local rules at the scheduled transition");let e=i.topology.nodes.find(p=>p.id===t);if(!e)throw new o("NOT_FOUND","Funnel node is unavailable");let s=v.parse(a.attributes??{}),u={attributes:s,saveStickyBucketAssignmentDoc:a.saveStickyBucketAssignmentDoc?p=>a.saveStickyBucketAssignmentDoc(structuredClone(p)):void 0,onFeatureUsage:a.onFeatureUsage?(p,f)=>a.onFeatureUsage(p,structuredClone(f)):void 0,onExperimentViewed:a.onExperimentViewed?(p,f)=>a.onExperimentViewed(structuredClone(p),structuredClone(f)):void 0,features:structuredClone(i.growth.features),savedGroups:I(i.growth.savedGroups),stickyBucketAssignmentDocs:structuredClone(a.stickyBucketAssignmentDocs)},r,c;if(e.type==="condition"){let p=i.conditions[e.id];if(!p)throw new o("INVALID_RESPONSE","Local condition rules are unavailable");r=p.find(f=>k(s,f.condition,u.savedGroups))?.port??"default"}else if(e.type==="feature"){if(!e.resources.featureKey)throw new o("INVALID_RESPONSE","Feature reference is unavailable");c=h(e.resources.featureKey,u).value,r="next"}else if(e.type==="split"){let p=e.resources.experimentId,f=p?i.growth.experiments[p]:null;if(!f||!p)throw new o("INVALID_RESPONSE","Experiment reference is unavailable");let l=x(f,u);c=l.value,r=l.inExperiment&&!l.passthrough&&typeof l.value=="string"?l.value:"notParticipating"}else throw new o("SERVER_REQUIRED","This node is driven by the authoritative Funnel runtime");let d=e.outputs[r];if(!d)throw new o("INVALID_RESPONSE","Evaluated node exit is unavailable");return{nodeId:t,port:r,target:d,...c===void 0?{}:{value:c}}}function S(n,t){if(n===t)return!0;if(Array.isArray(n)||Array.isArray(t))return Array.isArray(n)&&Array.isArray(t)&&n.length===t.length&&n.every((e,s)=>S(e,t[s]));if(!n||!t||typeof n!="object"||typeof t!="object")return!1;let a=Object.entries(n),i=Object.entries(t);return a.length===i.length&&a.every(([e,s])=>Object.hasOwn(t,e)&&S(s,Reflect.get(t,e)))}function $(n){let t=/^gg_ct_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey);if(typeof window<"u"&&!t)throw new o("SERVER_ONLY","Funnel starts are issued by your backend");if(!t&&!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new o("INVALID_TOKEN","A customer credential or server API key is required");let a=E({...n,timeoutMs:n.timeoutMs??35e3});return a.identify(n.apiKey),{async start(i){let e=O.safeParse({...i,operation:"start"});if(!e.success||e.data.operation!=="start")throw new o("INVALID_REQUEST","Invalid current Funnel start");let s=e.data,u=V.safeParse(await a.request("funnels",s));if(!u.success||!u.data.runToken)throw new o("INVALID_RESPONSE","Funnel start credentials are missing");let r=u.data;if(r.run.source.id!==s.funnelId||r.run.locale!==(s.locale??"en")||!S(r.run.parameters,s.parameters??{}))throw new o("INVALID_RESPONSE","Funnel start contract changed");return{...r,runToken:r.runToken}}}}export{S as a,q as b,L as c,Q as d,$ as e};
@@ -1 +0,0 @@
1
- import{a as $}from"./chunk-6X42DWOM.js";import{a}from"./chunk-2HEB2TPD.js";import{Me as Z,dg as K}from"./chunk-FMAMDKAV.js";function ee(I){let n=I.view;if(!n?.paywall)throw new a("INVALID_REQUEST","The current node is not a Paywall");let T=n.paywall.receiptId,Q=n.nodeId,w=n.visit,v=n.paywall.resolution,r=n.paywall.quote,c=n.paywall.operation,_=!1,R=n.paywall.purchaseRequestId,h=null,D=new Map,S=new Map;function E(t){let s=t.run.paywall;if(s?.receiptId===T){if(s.resolution.id!==v.id||s.resolution.offering.id!==v.offering.id)throw new a("INVALID_RESPONSE","The pinned Paywall binding changed");v=s.resolution}if(t.purchase&&t.purchase.receiptId!==T)throw new a("INVALID_RESPONSE","Purchase receipt changed");let l=t.purchase??(s?.receiptId===T?s:null),i=l?.quote??r,u=l?.operation??(i?.operationId===r?.operationId?c:null);if(i&&u&&i.operationId!==u.operationId)throw new a("INVALID_RESPONSE","Purchase operation changed");r=i,(c?.operationId!==u?.operationId||c?.status==="pending"||u?.status==="complete")&&(c=u)}async function m(t,s){if(_)throw new a("IDENTITY_CHANGED","Paywall presentation has closed");let l=D.get(t);if(l){if(JSON.stringify(l.input)!==JSON.stringify(s))throw new a("CONFLICT","A purchase request cannot change its input")}else{let P=I.view;if(!P||P.nodeId!==Q||P.visit!==w||P.paywall?.receiptId!==T)throw new a("PRECONDITION_FAILED","The Paywall visit has changed");l={operation:"submit",requestId:t,nodeId:Q,visit:w,revision:P.revision,input:s},D.set(t,l)}let i=await I.submit(l),u=Date.now()+3e4;for(;i.run.pendingRequest?.requestId===t&&Date.now()<u&&!_;)await new Promise(P=>setTimeout(P,1e3)),i=await I.resume(t);if(i.run.pendingRequest?.requestId===t)throw new a("COMMAND_PENDING","The purchase command is still pending; retry the original request",202);E(i)}async function C(t){if(!r)throw new a("INVALID_REQUEST","A quoted purchase is required");let s=`${t}:${r.operationId}`,l=S.get(s);if(l||(l=crypto.randomUUID(),S.set(s,l)),await m(l,{type:t==="confirm"?"paywall_confirm":"paywall_cancel",operationId:r.operationId}),!c)throw new a("INVALID_RESPONSE","The accepted purchase result is missing");return structuredClone(c)}return{get view(){return structuredClone(v)},get quote(){return r?structuredClone(r):null},get operation(){return c?structuredClone(c):null},get webViewUrl(){return I.webViewUrl},async refresh(){return E(await I.get()),structuredClone(v)},preview(t){if(R&&R!==t.requestId&&(!c||c.status==="pending"))return Promise.reject(new a("COMMAND_PENDING","Retry the original purchase before starting another"));if(R===t.requestId&&h)return h;let s=v.document.buttons[t.actionId],l=s?.type==="checkout"?Z(s.product,t.selection,v.capabilities):null;if(!l)return Promise.reject(new a("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));R=t.requestId;let i=(async()=>{if(await m(t.requestId,{type:"paywall_quote",actionId:t.actionId,productVersionId:l,...t.offerId?{offerId:t.offerId}:{},...t.nativeOffer?{nativeOffer:t.nativeOffer}:{}}),!r)throw new a("INVALID_RESPONSE","The accepted quote is missing");return structuredClone(r)})();return h=i,i.then(()=>{h===i&&(h=null)},u=>{h===i&&(h=null),u instanceof a&&u.status!==void 0&&u.status<500&&![401,425].includes(u.status)&&(R=null)}),i},confirm:()=>C("confirm"),cancel:()=>C("cancel"),async read(){if(!r)throw new a("INVALID_REQUEST","A quoted purchase is required");if(E(await I.get(void 0,{receiptId:T,operationId:r.operationId})),!c)throw new a("INVALID_RESPONSE","The current purchase result is missing");return structuredClone(c)},destroy(){_=!0,D.clear(),S.clear()}}}async function we(I,n){let{mountScreenPreview:T}=await import("./popup.js"),{showPaywall:Q}=await import("./paywall-6HHA4OJV.js"),w=I.ownerDocument,v=w.activeElement,r=w.createElement("section"),c=w.createElement("div"),_=w.createElement("div"),R=w.createElement("p"),h=w.createElement("p"),D=w.createElement("button"),S=w.createElement("button"),E=w.createElement("button"),m=w.createElement("dialog");r.dataset.indianaFunnel="",r.setAttribute("aria-busy","false"),r.style.cssText="box-sizing:border-box;width:100%;min-width:0;font:14px/1.5 system-ui,sans-serif;color:#172033;background:#fff",_.style.cssText="display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 20px",R.setAttribute("role","status"),h.setAttribute("role","alert"),h.hidden=!0,D.type=S.type=E.type="button",_.append(D,R,h,E,S),r.append(c,_),I.append(r);let C=null,t=null,s=null,l="",i=!1,u=0,P="",O=null,G=Promise.resolve(),q=null,V={},j=new Map,J=new Set,H=new Set,M=new Set,A={},k=e=>{i||(h.textContent=e instanceof Error?e.message:"Request failed",h.hidden=!1,E.hidden=n.client.pendingCommand===null,$(n.onError,e))};function U(){let e=n.client.view;if(!e)throw new a("INVALID_REQUEST","No current Run is available");return{requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision}}async function N(e,o=!1){if(!(u&&!o||i)){u++,r.setAttribute("aria-busy","true"),h.hidden=!0;try{let d=await e();i||await z(n.client.view??d.run)}catch(d){k(d)}finally{u=Math.max(0,u-1),r.setAttribute("aria-busy",String(u>0)),i||(E.hidden=n.client.pendingCommand===null)}}}function Y(e){if(J.has(e)||H.has(e)||i)return;H.add(e);let o=async()=>{if(i||l!==e){H.delete(e);return}if(u||n.client.pendingCommand){setTimeout(()=>{o()},250);return}try{await n.client.submit({operation:"shown",...U()}),J.add(e)}catch(d){k(d)}finally{H.delete(e)}};o()}function X(){O&&clearTimeout(O),!(i||!s||!["running","waiting"].includes(s.status))&&(O=setTimeout(()=>{O=null,N(()=>n.client.get()).finally(X)},s.pendingRequest?1500:5e3))}async function ne(e){let o=n.client.view,d=o?.screen,y=d?.customerData.nodes[e.nodeId];if(!o||!d||!y)return;if(!["refresh","next","previous","filter","sources_next","sources_previous"].includes(e.action)){let g=K(d.document,e.nodeId),F=g?.type==="customer_data"?g.data.outputs?.[e.action]:void 0;F&&d.outputs.includes(F)?await N(()=>n.client.submit({operation:"submit",...U(),input:{type:"screen",output:F,answers:A,selection:e.value?{[e.nodeId]:e.value}:{}}})):await n.onCustomerDataIntent?.(e,o);return}let p=e.action.startsWith("sources_")?y.resources.find(g=>g.key===e.value):null;if(e.action.startsWith("sources_")&&!p)throw new a("INVALID_REQUEST","Choose a current resource");let x=`${o.visit}:${e.nodeId}:${p?.key??""}`,L=j.get(x)??[null],b=V[e.nodeId]??{page:1,after:null,filter:"all",...p?{resourceKey:p.key}:{}};if(e.action==="filter"){let g=e.value;if(!g||!["all","purchase","refund","source","usage","debt","settlement"].includes(g))throw new a("INVALID_REQUEST","Unknown data filter");b={page:1,after:null,filter:g},L.splice(0,L.length,null)}else if(e.action==="next"||e.action==="sources_next"){let g=p?.sources.at(-1),F=p?g?{kind:"ledger",cursor:{at:g.detail[0],id:g.id,type:"source"}}:null:d.dataCursors[e.nodeId];if(!F||!p&&!y.hasNext)return;L[b.page]=F,b={...b,page:b.page+1,after:F}}else if(e.action==="previous"||e.action==="sources_previous"){if(b.page<=1)return;b={...b,page:b.page-1,after:L[b.page-2]??null}}j.set(x,L),V={...V,[e.nodeId]:b},await N(()=>n.client.get({nodeId:o.nodeId,visit:o.visit,revision:o.revision,components:V}))}function te(e){let o=e.screen?.presentation;if(!o||o.type==="inline"){m.open&&m.close(),r.parentElement!==I&&I.append(r);return}r.parentElement!==m&&(m.append(r),I.append(m));let d={sm:420,md:640,lg:900};m.style.cssText=`padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;width:${"size"in o?d[o.size]+"px":"100vw"}`,m.setAttribute("aria-label",e.screen?.document.name??"Funnel"),m.open||m.showModal()}async function ie(e){if(i)return;s=e;let o=e.locale.startsWith("zh");D.textContent=o?"\u8FD4\u56DE":"Back",S.textContent=o?"\u5173\u95ED":"Close",E.textContent=o?"\u91CD\u8BD5":"Retry",D.disabled=u>0||!!n.client.pendingCommand||!e.canBack,E.hidden=n.client.pendingCommand===null,R.textContent=e.pendingRequest?o?"\u6B63\u5728\u5904\u7406":"Processing":e.instruction?.type==="wait"?o?"\u7B49\u5F85\u4E2D":"Waiting":"",P!==`${e.revision}:${e.visit}:${e.status}`&&(P=`${e.revision}:${e.visit}:${e.status}`,$(n.onState,structuredClone(e)));let d=e.screen||e.paywall?`${e.id}:${e.nodeId}:${e.visit}`:"";if(d!==l&&(C?.destroy(),C=null,t?.destroy(),t=null,c.replaceChildren(),l=d,A={...e.answers},V={},j.clear()),te(e),e.screen)C||(C=T(c,{mode:"live",rendererUrl:n.client.webViewUrl,title:e.screen.document.name,onAction(f,p={},x={}){A={...A,...x},N(()=>n.client.submit({operation:"submit",...U(),input:{type:"screen",output:f,answers:A,selection:p}}))},onAnswers:f=>{A={...A,...f}},onCustomerDataIntent:f=>{ne(f).catch(k)},onEscape:()=>{W()},onError:f=>k(new Error(f)),onRendered:()=>Y(d)})),C.update(e.screen.document,e.locale,{capabilities:e.screen.capabilities,customerData:e.screen.customerData,parameters:e.parameters,serverInput:{bindings:e.screen.inputs,answers:A}}),await C.ready;else if(e.paywall&&!t){let f=await Q(c,{start:async()=>ee(n.client),onPurchase:n.onPurchase,onCheckoutUrl:n.onCheckoutUrl,onEvent:n.onEvent,onOpenUrl:p=>n.onOpenUrl?n.onOpenUrl({receiptId:e.paywall.receiptId,url:p}):w.defaultView?.location.assign(p),onAction:async p=>{let x=await n.client.submit({operation:"submit",requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision,input:{type:"screen",output:p,answers:{}}});await z(n.client.view??x.run)},onError:k,onDismiss:()=>{!i&&n.client.view?.visit===e.visit&&W()}});i?f.host?.destroy():t=f.host,Y(d)}let y=e.instruction;if(y&&["open_url","event"].includes(y.type)&&!M.has(y.receiptId)){let f=w.createElement("button");f.type="button",f.textContent=o?"\u7EE7\u7EED":"Continue",f.onclick=()=>{let p=U();N(async()=>{if(y.type==="open_url"&&(n.onOpenUrl?await n.onOpenUrl({receiptId:y.receiptId,url:y.url}):w.defaultView?.location.assign(y.url)),y.type==="event"){if(!n.onEvent)throw new a("EVENT_HANDLER_REQUIRED","Provide the event handler");await n.onEvent(y.event)}if(i||n.client.view?.nodeId!==p.nodeId||n.client.view.visit!==p.visit)throw new a("PRECONDITION_FAILED","The client action visit changed");let x=await n.client.submit({operation:"submit",...p,input:{type:"client_action",receiptId:y.receiptId,outcome:"success"}});return M.add(y.receiptId),x})},c.replaceChildren(f)}!e.pendingRequest&&e.status==="completed"&&!M.has(`complete:${e.id}`)&&(M.add(`complete:${e.id}`),$(n.onComplete,structuredClone(e))),X()}function z(e){return G=G.catch(()=>{}).then(()=>ie(e)),G}let re=n.client.subscribe(e=>{z(e).catch(k)});function W(){return q||(i?Promise.resolve():n.client.view&&!["running","waiting"].includes(n.client.view.status)?(B(),Promise.resolve()):(q=N(()=>n.client.submit({operation:"close",...U()}),!0).then(()=>{n.client.view?.status==="closed"&&B()}).finally(()=>{q=null}),q))}function B(){i||(i=!0,O&&clearTimeout(O),re(),C?.destroy(),t?.destroy(),m.close(),m.remove(),r.remove(),v instanceof HTMLElement&&v.isConnected&&v.focus(),$(n.onDismiss,s?structuredClone(s):null))}D.onclick=()=>{N(()=>n.client.submit({operation:"back",...U()}))},S.onclick=()=>{W()},E.onclick=()=>{N(()=>n.client.retry())},m.addEventListener("cancel",e=>{e.preventDefault(),W()});try{let e=await n.client.get();await z(n.client.view??e.run)}catch(e){throw B(),e}return{destroy:B,refresh:()=>N(()=>n.client.get())}}export{we as showFunnelRun};
@@ -1 +0,0 @@
1
- import{a as T}from"./chunk-6X42DWOM.js";import{a as p}from"./chunk-2HEB2TPD.js";import{Me as q,Vk as G,le as D,y as M}from"./chunk-FMAMDKAV.js";async function B(f,t,l){if(t.status!=="complete")throw new p("INVALID_RESPONSE","A verified completed purchase is required");if(await l.onComplete?.(t),!f||!l.check)return;let r=D.parse(await l.check());if(r.internal_feature_id!==f.internal_feature_id||r.quantity!==f.quantity)throw new p("INVALID_RESPONSE","The access requirement changed");r.allowed&&await l.onAccessGranted?.(r)}async function ne(f,t){let l=t.check?D.parse(await t.check()):null;if(l?.allowed)return await t.onAccessGranted?.(l),{check:l,host:null};let r=await t.start(),d=r.view;if(!d)throw new p("INVALID_RESPONSE","Paywall presentation is missing");let{mountScreenPreview:F}=await import("./popup.js"),n=f.ownerDocument,A=new AbortController,h=n.createElement("section"),H=n.createElement("div"),R=n.createElement("div"),C=n.createElement("p"),y=n.createElement("button"),N=n.createElement("button"),m=n.createElement("dialog"),I=n.activeElement,w=d.document.screen.strings.defaultLocale.startsWith("zh");h.dataset.indianaPaywall="",h.setAttribute("aria-label",d.document.name),h.style.cssText="width:100%;box-sizing:border-box;background:#fff;color:#172033;font:14px/1.5 system-ui,sans-serif",R.style.cssText="display:flex;gap:12px;padding:12px 20px;align-items:center;flex-wrap:wrap",C.setAttribute("role","status"),N.textContent=w?"\u5173\u95ED":"Close",y.textContent=w?"\u91CD\u8BD5":"Retry",y.hidden=!0,R.append(C,y,N),h.append(H,R);let L=d.document.presentation;if(L.type==="inline")f.append(h);else{let e={sm:420,md:640,lg:900};m.style.cssText=`padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;width:${"size"in L?e[L.size]+"px":"100vw"}`,m.setAttribute("aria-label",d.document.name),m.append(h),f.append(m),m.showModal()}let u=!1,_=!1,E=null,a=null,P=null,S=e=>{C.textContent=e instanceof Error?e.message:w?"\u8BF7\u6C42\u5931\u8D25":"Request failed",T(t.onError,e),y.hidden=a===null};async function v(e){if(!(_||u)){_=!0,y.hidden=!0,C.textContent="";try{await e()}catch(c){u||S(c)}finally{_=!1}}}async function j(e){await B(l,e,t)}async function O(e){if(u)return;if(C.textContent=e.status,e.status==="complete"){a=null,await j(e);return}if(e.status!=="pending"){a=null,E=null;return}let c=Date.now()+6e5,s=2e3;for(;!u&&Date.now()<c;){if(await new Promise(g=>{let x=()=>{clearTimeout(b),g()},b=setTimeout(()=>{A.signal.removeEventListener("abort",x),g()},s);A.signal.addEventListener("abort",x,{once:!0})}),u)return;let i=await r.read();if(i.status!=="pending"){await O(i);return}s=Math.min(s*1.5,3e4)}a=async()=>O(await r.read()),y.hidden=!1}async function V(){P?.remove(),P=null,a=V;let e=await r.confirm();if(e.status==="pending"){if(e.checkoutUrl)t.onCheckoutUrl?await t.onCheckoutUrl(e.checkoutUrl):n.defaultView?.location.assign(e.checkoutUrl);else if(e.execution||e.nativePurchase){if(!t.onPurchase)throw new p("PURCHASE_HANDLER_REQUIRED","Provide the merchant or native purchase handler");await t.onPurchase({operation:e,signal:A.signal})}}a=async()=>O(await r.read()),await O(e)}function W(e){P?.remove();let c=n.createElement("div"),s=n.createElement("button"),i=n.createElement("button"),g=n.createElement("p");g.textContent=e.lines.map(o=>o.productName).join(", ")+" \xB7 "+M(e.charge?.totalMinor??e.catalogAmountMinor-(e.discount?.amountMinor??0),e.currency),s.textContent=w?"\u786E\u8BA4\u8D2D\u4E70":"Confirm purchase",i.textContent=w?"\u53D6\u6D88":"Cancel",s.onclick=()=>{v(V)};let x=async()=>{await r.cancel(),!u&&(E=null,a=null,c.remove(),P=null)};i.onclick=()=>{a=x,v(x)};let b=n.createElement("div");for(let o of e.lines){let z=n.createElement("p");if(z.textContent=`${o.productName} \xB7 ${M(o.catalogAmountMinor,e.currency)}${G(o.interval,w?"zh-CN":"en",o.intervalCount??1)}`,b.append(z),o.trial){let Q=n.createElement("p");Q.textContent=w?`\u8BD5\u7528 ${o.trial.days} \u5929\uFF1B${o.trial.cardRequired?"\u9700\u8981\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F":"\u65E0\u9700\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F"}`:`Trial days: ${o.trial.days}; ${o.trial.cardRequired?"a payment method is required":"no payment method is required"}`,b.append(Q)}}if(!e.charge){let o=n.createElement("p");o.textContent=w?"\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.",b.append(o)}c.append(g,b,s,i),R.prepend(c),P=c,a=null}async function $(){if(!E)return;a=$;let e=await r.preview(E);u||W(e)}let U=F(H,{mode:"live",rendererUrl:r.webViewUrl,title:d.document.name,onAction(e,c={}){let s=r.view,i=s?.document.buttons[e];if(i){if(i.type==="close"){v(async()=>{await t.onAction?.(e),k(t.onAction?"action":"dismiss")});return}if(i.type==="action"){a=async()=>{if(i.action.type==="event"){if(!t.onEvent)throw new p("EVENT_HANDLER_REQUIRED","Provide the event handler");await t.onEvent(i.action.event)}else t.onOpenUrl?await t.onOpenUrl(i.action.url):n.defaultView?.location.assign(i.action.url);await t.onAction?.(e),a=null},v(a);return}if(!s||!q(i.product,c,s.capabilities)){S(new p("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));return}if(E&&E.actionId!==e){S(new p("COMMAND_PENDING","Finish the current purchase"));return}E??={requestId:crypto.randomUUID(),actionId:e,selection:c},v($)}},onEscape:()=>k("dismiss"),onError:e=>S(new Error(e))});U.update(d.document.screen,d.document.screen.strings.defaultLocale,{capabilities:d.capabilities,serverInput:{bindings:[],answers:{}}});try{await U.ready}catch(e){throw k(),e}function k(e="destroy"){u||(u=!0,A.abort(),U.destroy(),r.destroy(),m.open&&m.close(),m.remove(),h.remove(),I instanceof HTMLElement&&I.isConnected&&I.focus(),e==="dismiss"&&T(t.onDismiss))}return N.onclick=()=>k("dismiss"),m.addEventListener("cancel",e=>{e.preventDefault(),k("dismiss")}),y.onclick=()=>{a&&v(a)},{check:l,host:{destroy:k,refresh:async()=>{let e=await r.refresh();return u||U.updateCapabilities(e.capabilities),e}}}}export{ne as showPaywall};
@@ -1 +0,0 @@
1
- import{$,$a,$b,$c,$d,$e,$f as ag,$g as ah,$h as ai,$i as aj,$j as ak,$k as al,A,Aa,Ab,Ac,Ad,Ae,Af as Bf,Ag as Bg,Ah as Bh,Ai as Bi,Aj as Bj,Ak as Bk,B,Ba,Bb,Bc,Bd,Be,Bf as Cf,Bg as Cg,Bh as Ch,Bi as Ci,Bj as Cj,Bk as Ck,C,Ca,Cb,Cc,Cd,Ce,Cf as Df,Cg as Dg,Ch as Dh,Ci as Di,Cj as Dj,Ck as Dk,D,Da,Db,Dc,Dd,De,Df as Ef,Dg as Eg,Dh as Eh,Di as Ei,Dj as Ej,Dk as Ek,E,Ea,Eb,Ec,Ed,Ee,Ef as Ff,Eg as Fg,Eh as Fh,Ei as Fi,Ej as Fj,Ek as Fk,F,Fa,Fb,Fc,Fd,Fe,Ff as Gf,Fg as Gg,Fh as Gh,Fi as Gi,Fj as Gj,Fk as Gk,G,Ga,Gb,Gc,Gd,Ge,Gf as Hf,Gg as Hg,Gh as Hh,Gi as Hi,Gj as Hj,Gk as Hk,H,Ha,Hb,Hc,Hd,He,Hf as If,Hg as Ig,Hh as Ih,Hi as Ii,Hj as Ij,Hk as Ik,I,Ia,Ib,Ic,Id,Ie,If as Jf,Ig as Jg,Ih as Jh,Ii as Ji,Ij as Jj,Ik as Jk,J,Ja,Jb,Jc,Jd,Je,Jf as Kf,Jg as Kg,Jh as Kh,Ji as Ki,Jj as Kj,Jk as Kk,K,Ka,Kb,Kc,Kd,Ke,Kf as Lf,Kg as Lg,Kh as Lh,Ki as Li,Kj as Lj,Kk as Lk,L,La,Lb,Lc,Ld,Le,Lf as Mf,Lg as Mg,Lh as Mh,Li as Mi,Lj as Mj,Lk as Mk,M,Ma,Mb,Mc,Md,Me,Mf as Nf,Mg as Ng,Mh as Nh,Mi as Ni,Mj as Nj,Mk as Nk,N,Na,Nb,Nc,Nd,Ne,Nf as Of,Ng as Og,Nh as Oh,Ni as Oi,Nj as Oj,Nk as Ok,O,Oa,Ob,Oc,Od,Oe,Of as Pf,Og as Pg,Oh as Ph,Oi as Pi,Oj as Pj,Ok as Pk,P,Pa,Pb,Pc,Pd,Pe,Pf as Qf,Pg as Qg,Ph as Qh,Pi as Qi,Pj as Qj,Pk as Qk,Q,Qa,Qb,Qc,Qd,Qe,Qf as Rf,Qg as Rg,Qh as Rh,Qi as Ri,Qj as Rj,Qk as Rk,R,Ra,Rb,Rc,Rd,Re,Rf as Sf,Rg as Sg,Rh as Sh,Ri as Si,Rj as Sj,Rk as Sk,S,Sa,Sb,Sc,Sd,Se,Sf as Tf,Sg as Tg,Sh as Th,Si as Ti,Sj as Tj,Sk as Tk,T,Ta,Tb,Tc,Td,Te,Tf as Uf,Tg as Ug,Th as Uh,Ti as Ui,Tj as Uj,Tk as Uk,U,Ua,Ub,Uc,Ud,Ue,Uf as Vf,Ug as Vg,Uh as Vh,Ui as Vi,Uj as Vj,Uk as Vk,V,Va,Vb,Vc,Vd,Ve,Vf as Wf,Vg as Wg,Vh as Wh,Vi as Wi,Vj as Wj,Vk as Wk,W,Wa,Wb,Wc,Wd,We,Wf as Xf,Wg as Xg,Wh as Xh,Wi as Xi,Wj as Xj,Wk as Xk,X,Xa,Xb,Xc,Xd,Xe,Xf as Yf,Xg as Yg,Xh as Yh,Xi as Yi,Xj as Yj,Xk as Yk,Y,Ya,Yb,Yc,Yd,Ye,Yf as Zf,Yg as Zg,Yh as Zh,Yi as Zi,Yj as Zj,Yk as Zk,Z,Za,Zb,Zc,Zd,Ze,Zf as _f,Zg as _g,Zh as _h,Zi as _i,Zj as _j,Zk as _k,_,_a,_b,_c,_d,_e,_f as $f,_g as $g,_h as $h,_i as $i,_j as $j,_k as $k,a,aa,ab,ac,ad,ae,af,ag as bg,ah as bh,ai as bi,aj as bj,ak as bk,al as bl,b,ba,bb,bc,bd,be,bf,bg as cg,bh as ch,bi as ci,bj as cj,bk as ck,bl as cl,c,ca,cb,cc,cd,ce,cf,cg as dg,ch as dh,ci as di,cj as dj,ck as dk,cl as dl,d,da,db,dc,dd,de,df,dg as eg,dh as eh,di as ei,dj as ej,dk as ek,dl as el,e,ea,eb,ec,ed,ee,ef,eg as fg,eh as fh,ei as fi,ej as fj,ek as fk,el as fl,f,fa,fb,fc,fd,fe,ff,fg as gg,fh as gh,fi as gi,fj as gj,fk as gk,fl as gl,g,ga,gb,gc,gd,ge,gf,gg as hg,gh as hh,gi as hi,gj as hj,gk as hk,gl as hl,h,ha,hb,hc,hd,he,hf,hg as ig,hh as ih,hi as ii,hj as ij,hk as ik,hl as il,i,ia,ib,ic,id,ie,if as jf,ig as jg,ih as jh,ii as ji,ij as jj,ik as jk,il as jl,j,ja,jb,jc,jd,je,jf as kf,jg as kg,jh as kh,ji as ki,jj as kj,jk as kk,jl as kl,k,ka,kb,kc,kd,ke,kf as lf,kg as lg,kh as lh,ki as li,kj as lj,kk as lk,kl as ll,l,la,lb,lc,ld,le,lf as mf,lg as mg,lh as mh,li as mi,lj as mj,lk as mk,ll as ml,m,ma,mb,mc,md,me,mf as nf,mg as ng,mh as nh,mi as ni,mj as nj,mk as nk,ml as nl,n,na,nb,nc,nd,ne,nf as of,ng as og,nh as oh,ni as oi,nj as oj,nk as ok,nl as ol,o,oa,ob,oc,od,oe,of as pf,og as pg,oh as ph,oi as pi,oj as pj,ok as pk,ol as pl,p,pa,pb,pc,pd,pe,pf as qf,pg as qg,ph as qh,pi as qi,pj as qj,pk as qk,pl as ql,q,qa,qb,qc,qd,qe,qf as rf,qg as rg,qh as rh,qi as ri,qj as rj,qk as rk,ql as rl,r,ra,rb,rc,rd,re,rf as sf,rg as sg,rh as sh,ri as si,rj as sj,rk as sk,s,sa,sb,sc,sd,se,sf as tf,sg as tg,sh as th,si as ti,sj as tj,sk as tk,t,ta,tb,tc,td,te,tf as uf,tg as ug,th as uh,ti as ui,tj as uj,tk as uk,u,ua,ub,uc,ud,ue,uf as vf,ug as vg,uh as vh,ui as vi,uj as vj,uk as vk,v,va,vb,vc,vd,ve,vf as wf,vg as wg,vh as wh,vi as wi,vj as wj,vk as wk,w,wa,wb,wc,wd,we,wf as xf,wg as xg,wh as xh,wi as xi,wj as xj,wk as xk,x,xa,xb,xc,xd,xe,xf as yf,xg as yg,xh as yh,xi as yi,xj as yj,xk as yk,y,ya,yb,yc,yd,ye,yf as zf,yg as zg,yh as zh,yi as zi,yj as zj,yk as zk,z,za,zb,zc,zd,ze,zf as Af,zg as Ag,zh as Ah,zi as Ai,zj as Aj,zk as Ak}from"./chunk-FMAMDKAV.js";export{Ma as COMMON_LOCALES,Oa as COUPON_TERM_LOCALES,Ye as CUSTOMER_DATA_SOURCES,ok as DEFAULT_AUDIENCE_GROUP,Ai as DEFAULT_FUNNEL_EXECUTION_POLICY,Ni as FUNNEL_API_CAPABILITIES,Ih as FUNNEL_LIMITS,Jj as FUNNEL_PREVIEW_LIMITS,pe as OFFERING_MAX_DEPTH,re as OFFERING_MAX_ITEMS,qe as OFFERING_MAX_PRODUCTS,Tf as POPUP_WIDTHS,hf as SCREEN_LIMITS,gf as SCREEN_SCHEMA_VERSION,Lh as SCREEN_TEMPLATES,Rf as SURFACE_PATHS,Qe as SURFACE_VARIABLES,Jh as UNBOUND_PRODUCT_VERSION_ID,j as aiCreditSystemConfigSchema,Bg as aiMarkupSchema,Ag as aiModelIdSchema,Cg as aiModelRatesSchema,Dg as aiPricingConfigurationSchema,zg as aiTokenPools,w as amountToMinor,Fh as apiErrorCodeSchema,Gh as apiOperations,yh as apiPermissionSchema,Ik as appResultsSchema,Hk as appRevenueSchema,Rk as appendScreenTemplate,il as applyGrowthReleasePlan,ki as archiveSurfaceTemplateSchema,rk as audienceCustomerSchema,Ak as audienceFunnelUsageSchema,Bk as audienceFunnelUsagesSchema,sk as audienceMembersSchema,cc as audienceSchema,qk as audienceWriteSchema,jk as auditFieldSchema,mk as auditHistoryCursorSchema,nk as auditHistorySchema,ik as auditResourceSchema,nb as autoTopupPurchaseLimitsSchema,zb as autoTopupStateSchema,pl as autumnAmountToMinor,Zj as autumnCustomerAutoTopupSchema,ck as autumnCustomerControlsSchema,ek as autumnCustomerMetadataSchema,bk as autumnCustomerOverageAllowedSchema,gk as autumnCustomerProductSummarySchema,fk as autumnCustomerProfileRecordSchema,_j as autumnCustomerSpendLimitSchema,ak as autumnCustomerUsageAlertSchema,$j as autumnCustomerUsageLimitSchema,dk as autumnEntityControlsSchema,ql as autumnMinorToAmount,rl as autumnUsageUnitAmountDecimal,ug as balanceAdjustmentCommandSchema,vg as balanceAdjustmentStateSchema,uc as balanceAllocationSchema,rc as balanceCommandSchema,zc as balanceGrantCommandSchema,yc as balanceGrantCreateSchema,Cc as balanceGrantPageSchema,Bc as balanceGrantReadSchema,Ac as balanceGrantSchema,xc as balanceOperationSchema,sc as balancePricingSegmentSchema,wc as balanceQuoteSchema,tc as balanceReceiptUnitsSchema,vc as balanceRejectionReasonSchema,Xk as balanceSourceReasonSchema,wg as balanceSourceStateSchema,Yk as balanceSourceStatusSchema,_k as balanceSourcesPageSchema,Zk as balanceSourcesQuerySchema,gb as billingAccruedMinorSchema,fb as billingAmountMinorSchema,qb as billingAuthorizationSchema,pb as billingAuthorizationTermsSchema,hb as billingBudgetMinorSchema,Ab as billingControlInputSchema,Bb as billingControlsSchema,Ib as billingCouponsSchema,z as billingCurrencies,Cb as billingInvoiceLineSchema,Db as billingInvoiceSchema,Gb as billingInvoicesSchema,ub as billingLimitSchema,gi as billingPortalInputSchema,hi as billingPortalSchema,D as billingSettingsMutationSchema,B as billingSettingsSchema,C as billingSettingsScopeSchema,yb as billingUsageWindowSchema,wf as borderSchema,Cf as buttonNodeSchema,fc as campaignInputSchema,dc as campaignOfferSchema,gc as campaignSchema,Ka as canonicalLocale,Re as capabilityBindingSchema,lb as cashPriceSchema,jb as cashPricingSchema,ib as cashPricingTiersSchema,eb as cashUnitAmountMinorSchema,ch as claimRewardProductRequestSchema,cd as commerceAccessSchema,ge as commerceContextSchema,Vd as commerceCursorSchema,Wd as commerceListQuerySchema,dd as commerceMoneySchema,Tk as commerceProductKind,bd as commerceProductKindSchema,ad as commerceProviderSchema,Ba as compileGrowthFeatures,Eb as confirmBillingAdjustmentInputSchema,sb as confirmBillingAuthorizationInputSchema,ml as consoleHasPermission,Fd as consoleRefundRequestSchema,kl as consoleResources,ll as consoleRolePermissions,jl as consoleRoleSchema,Jf as countdownNodeSchema,Va as couponAppliesToSchema,_a as couponChangeErrors,If as couponCodeNodeSchema,Ta as couponDiscountSchema,tk as couponDisplaySchema,Qh as couponDistributionBatchSchema,Sh as couponDistributionDetailSchema,Ph as couponDistributionPreviewSchema,Rh as couponDistributionRecipientSchema,Th as couponDistributionWriteSchema,Ua as couponDurationSchema,Wa as couponEligibilitySchema,Xa as couponInputSchema,Sa as couponStatusSchema,Yj as couponTemplateExample,Wj as couponTemplateKey,bb as couponWindow,wk as createAccountOverviewPage,vk as createCreditCenterPage,yk as createCustomerPageTemplates,Bh as createCustomerRequestSchema,Ch as createCustomerResponseSchema,xk as createMembershipPage,eh as createReferralCodeRequestSchema,F as creditAmountSchema,Gg as creditAnalyticsFilterSchema,Ig as creditAnalyticsPageSchema,Hg as creditAnalyticsQuerySchema,Eg as creditAnalyticsRangeSchema,Fg as creditAnalyticsTimezoneSchema,L as creditDimensionSchema,M as creditMultiplierSchema,H as creditPriceAdjustmentSchema,N as creditPricingSchema,J as creditPropertiesSchema,G as creditQuantitySchema,O as creditRateSchema,Kb as creditResetCountSchema,Jb as creditResetSchema,I as creditResourceKeySchema,Lb as creditRolloverSchema,c as creditSchemaItemSchema,Gc as creditStatementInputSchema,Hc as creditStatementSchema,i as creditSystemConfigSchema,K as creditTiersSchema,t as currencies,A as currencyAmountOptionsSchema,v as currencyDecimals,u as currencySchema,Hh as currentApiOperations,Ic as currentNotificationEventTypeSchema,Gf as customHtmlNodeSchema,ka as customerActivitySchema,nh as customerAttributesSchema,pk as customerAudienceSchema,_e as customerDataConfigSchema,bf as customerDataIntentSchema,Ef as customerDataNodeSchema,Ze as customerDataSourceSchema,Eh as customerEntitlementsSchema,wh as customerFiltersSchema,oh as customerFingerprintSchema,Jk as customerFunnelDecisionsSchema,uh as customerGetSchema,Qc as customerHoldingsSchema,ph as customerInputSchema,Uc as customerLedgerEntrySchema,Vc as customerLedgerPageSchema,Tc as customerLedgerQuerySchema,sh as customerLookupSchema,rh as customerMutationSchema,af as customerPageDataSchema,$e as customerPageNodeStateSchema,hk as customerPageSampleData,xh as customerPageSchema,th as customerPatchSchema,ac as customerPlanCreateSchema,bc as customerPlanCreatedSchema,ja as customerPlanSchema,qh as customerProfileSchema,fi as customerScheduledChangeCancelSchema,di as customerScheduledChangeSchema,ei as customerScheduledChangesSchema,hc as customerSchema,mh as customerTagsSchema,vh as customerUpdateRequestSchema,Kh as defaultScreenTheme,$a as describeCoupon,Wb as diffProductVariant,Df as dividerNodeSchema,cf as emptyCustomerPageNode,ie as entitlementCheckInputSchema,je as entitlementCheckReasonSchema,le as entitlementCheckResultSchema,he as entitlementRequirementSchema,ga as entitlementSnapshotSchema,Dh as entitlementStatusSchema,X as environmentSchema,_c as environmentSettingsSchema,ic as errorResponseSchema,ef as escapeHtmlText,na as evalCondition,pa as evalFeature,vj as executionSourceSchema,Aa as experimentConfigurationSchema,za as experimentPhaseSchema,Ea as experimentSnapshotSchema,n as featureCollectionSchema,g as featureConfigOverrideSchema,k as featureDefinitionSchema,a as featureIdSchema,$ as featureInputSchema,f as featureMarkupsOverrideSchema,o as featureOptionsSchema,Cj as featurePayloadSchema,m as featureRecordSchema,aa as featureSchema,nl as featureTypes,ol as featureUpdateBlockers,l as featureUpdateRulesSchema,Mc as featureUsageReadSchema,Nc as featureUsageSetSchema,Oc as featureUsageStateSchema,b as featureUsageTypeSchema,p as featureWriteSchema,Zf as fieldValue,uf as fillSchema,Pc as financialAmountSchema,Sc as financialCursorSchema,Rc as financialEntryTypeSchema,eg as findDocumentNode,dg as findNode,Vj as formatCouponConditions,Qa as formatCouponDiscount,Pa as formatCouponMoney,Ra as formatCouponTerms,y as formatCurrencyMinor,Wk as formatProductBillingPeriod,ab as formatUsd,Oi as funnelApiBindingSchema,Pi as funnelCapabilitySchema,qj as funnelCollectionSchema,mj as funnelCommandSchema,Ej as funnelConfigurationSchema,Yi as funnelConsumedVariables,Hj as funnelCredentialCommandSchema,Ij as funnelCredentialResponseSchema,lj as funnelDataQueriesSchema,Ki as funnelDecisionCommandSchema,Ii as funnelDecisionOutputSchema,Li as funnelDecisionResponseSchema,Ji as funnelDecisionSchema,Mi as funnelDecisionUsedResponseSchema,gj as funnelDocumentDraftSchema,ij as funnelDocumentSchema,mi as funnelEvaluationAttributes,oj as funnelEvaluationModeSchema,zi as funnelExecutionPolicySchema,cj as funnelExecutionStateSchema,yi as funnelExternalTaskSchema,Si as funnelGraphDraftSchema,Ri as funnelGraphNodeSchema,Ti as funnelGraphSchema,Ui as funnelGraphTargets,zk as funnelGroupReferenceSchema,uj as funnelInstructionSchema,aj as funnelNodeInputSchema,_i as funnelNodeKindSchema,bj as funnelNodeResultSchema,Ei as funnelOrchestrationCommandSchema,si as funnelParametersFromUrl,kj as funnelPresentationSubmissionSchema,Kj as funnelPreviewCommandSchema,Nj as funnelPreviewDependencySchema,Oj as funnelPreviewJournalSchema,Lj as funnelPreviewOutcomeSchema,Qj as funnelPreviewRequestSchema,Rj as funnelPreviewResponseSchema,Mj as funnelPreviewScenarioSchema,Tj as funnelPreviewShareWriteSchema,Sj as funnelPreviewSnapshotSchema,Pj as funnelPreviewSourceSchema,hj as funnelPublishableDraftSchema,pj as funnelRecordSchema,$i as funnelResourceReferenceSchema,Ck as funnelResultsCursorSchema,Dk as funnelResultsQuerySchema,Hi as funnelResultsResponseSchema,Ek as funnelResultsSchema,wj as funnelRunViewSchema,xj as funnelRuntimeResponseSchema,tj as funnelRuntimeStatusSchema,Fi as funnelSignalResponseSchema,Uj as funnelStatisticsSchema,xi as funnelTaskBindingSchema,vi as funnelTaskDataSchema,wi as funnelTaskOutputsSchema,Bi as funnelTaskResponseSchema,Gi as funnelTaskResultsSchema,Qk as funnelTemplateDraft,Ok as funnelTemplateSchema,Fj as funnelTopology,Dj as funnelTopologySchema,dj as funnelTraceEventSchema,fj as funnelValueDeclarationSchema,jj as funnelValueMatches,li as funnelValueSchema,Zi as funnelWaitKindSchema,rj as funnelWriteSchema,yj as gbRuntimeExperimentSchema,zj as gbRuntimeFeatureRuleSchema,Aj as gbRuntimeFeatureSchema,Bj as gbRuntimeSavedGroupsSchema,hl as getRecommendedRolloutData,$k as growthAttributeSchema,ra as growthAttributesSchema,bl as growthCatalogSchema,ua as growthConditionGroupIds,oi as growthConditionPaths,sa as growthConditionSchema,dl as growthDryRunSchema,el as growthExperimentInspectionSchema,Ca as growthExperimentStop,Da as growthFeatureExpiry,wa as growthFeatureRuleSchema,xa as growthFeatureSchema,ya as growthFeaturesSchema,fl as growthGroupReferenceCursorSchema,gl as growthGroupReferencesSchema,ta as growthGroupSchema,al as growthNamespaceSchema,cl as growthResourceWriteSchema,Ha as growthRuleContextSchema,va as growthSavedGroupsSchema,Fa as growthSnapshotSchema,Ia as growthSplitResultSchema,df as htmlVariableErrors,kf as identifierSchema,Bf as imageNodeSchema,tf as imagePositionSchema,rf as insetsSchema,Dc as invoiceDetailInputSchema,Fc as invoiceDetailSchema,Ec as invoiceProductItemSchema,Ed as invoiceRefundsSchema,mb as isInvoiceCreditPrice,Ne as isProductGroup,Sk as isRecurringMembership,fg as isRtlLocale,kb as itemBillingCycleSchema,qa as jsonValueSchema,E as licenseOfferSchema,Fb as listBillingInvoicesInputSchema,Na as localeLabel,Ja as localeSchema,_f as localeStatuses,cg as localizeScreen,wb as manageBillingLimitsInputSchema,vb as manageOveragePolicyInputSchema,sf as marginSchema,La as matchLocale,ni as matchesGrowthCondition,T as membershipActionSchema,Uk as membershipBillingCount,U as membershipChangeSchema,V as membershipHoldingSchema,R as membershipRulesSchema,W as membershipStateSchema,S as membershipTimingSchema,kk as mergeAuditSchema,_ as metadataSchema,h as meteredConfigSchema,x as minorToAmount,e as modelMarkupsSchema,Lk as nativeCompletionSchema,ed as nativeCouponStoreOfferLinkWriteSchema,fd as nativeCouponStoreOfferLinksSchema,nc as nativeProductBindingSchema,pc as nativeProductBindingWriteSchema,oc as nativeProductBindingsPageSchema,Kk as nativeProofSchema,kd as nativePurchaseInstructionSchema,Mk as nativeReceiptCommandSchema,Nk as nativeReceiptResponseSchema,ee as nativeRestoreCommandSchema,fe as nativeRestoreResultSchema,id as nativeStoreOfferForProduct,gd as nativeStoreOfferSelectionSchema,hd as nativeStoreOfferSelectionsSchema,jd as nativeStoreSelectionMatches,wd as nativeSubscriptionUpdatePreviewSchema,xd as nativeSubscriptionUpdateResultSchema,Oh as newBlankSurface,Za as newCouponInput,sj as newFunnelDocument,Mh as newScreenFromTemplate,Nh as newSurfaceFromTemplate,jf as nodeIdSchema,lk as objectAuditSchema,Fk as offerFlowInputSchema,Gk as offerFlowResultSchema,cb as offerSchema,db as offerUnavailableReasonSchema,xe as offeringAuthorSchema,Be as offeringCollectionSchema,we as offeringDocumentSchema,se as offeringItemSchema,te as offeringItemsSchema,oe as offeringMetadataSchema,ye as offeringProductEvidenceSchema,ne as offeringProductIdSchema,ue as offeringProductIds,Fe as offeringProductOptionSchema,ve as offeringProductPaths,He as offeringPublicationIssues,ze as offeringRecordSchema,Ee as offeringSelectorSchema,Ie as offeringValueSchema,Ae as offeringVersionSchema,Ge as offeringWorkspaceSchema,De as offeringWriteResultSchema,Ce as offeringWriteSchema,qc as overageBehaviorSchema,xb as overagePolicySchema,ej as ownedFunnelScreenSchema,pf as paintColorSchema,Pd as paymentSetupCommandSchema,Qd as paymentSetupReadSchema,Sd as paymentSetupSchema,ke as paywallCandidateSchema,jg as paywallClientActionSchema,pg as paywallCollectionSchema,kg as paywallDocumentDraftSchema,lg as paywallDocumentSchema,ng as paywallFlowIssues,rg as paywallLibrarySchema,mg as paywallProductIssues,Le as paywallProductsSchema,og as paywallRecordSchema,me as paywallRequestSchema,tg as paywallResolutionSchema,sg as paywallResolveInputSchema,qg as paywallWriteSchema,da as planConfigSchema,ea as planInputSchema,ca as planItemSchema,Kf as planPickerNodeSchema,fa as planSchema,ha as planVersionSchema,ec as popupSchema,$b as prepaidAllowanceAmount,r as prepaidPriceAmount,s as prepaidQuantityAmount,jc as prepaidQuantitySchema,q as prepaidTierPricingSchema,ob as prepareBillingAuthorizationInputSchema,Xj as prepareCouponTemplate,ma as prepareSavedGroups,rb as preparedBillingAuthorizationSchema,Sf as presentationSchema,Hf as priceNodeSchema,ba as priceSchema,Ob as productAllowanceSchema,kc as productBindingSchema,mc as productBindingWriteSchema,lc as productBindingsPageSchema,Zb as productCollectionSchema,Rb as productConfigurationSchema,Ub as productDefinitionSchema,_b as productEditorOptionsSchema,Ke as productGroupingMatches,Je as productGroupingSchema,Qb as productLicenseSchema,Uh as productMigrationBlockReasonSchema,$h as productMigrationDetailSchema,Vh as productMigrationErrorCodeSchema,_h as productMigrationItemSchema,Yh as productMigrationItemStatusSchema,ai as productMigrationListSchema,Wh as productMigrationPreviewSchema,ci as productMigrationQuerySchema,Xh as productMigrationRunStatusSchema,Zh as productMigrationSchema,bi as productMigrationWriteSchema,Xb as productOptionsSchema,Nb as productPrepaidPriceSchema,Mb as productPricesSchema,Yb as productRecordSchema,hg as productSelectionSchema,Pb as productTrialSchema,Sb as productVariantOverridesSchema,Tb as productVariantSchema,Gj as projectFunnelConfiguration,Zc as projectSettingsSchema,Ya as promotionCodeInputSchema,d as providerMarkupsSchema,$f as publishChecks,Yd as purchaseListItemSchema,ce as purchaseListPageSchema,mf as radiusSchema,bh as redeemRewardRequestSchema,fh as referralCodeSchema,hh as referralProgramCollectionSchema,Wg as referralProgramInputSchema,Yg as referralProgramRecordSchema,$g as referralProgramWriteSchema,Vf as replaceFirstPageRoot,uk as resolveCouponDisplay,Qi as resolveFunnelCapabilityInputs,Di as resolveFunnelTaskInputs,Vb as resolveProductVariant,bg as resolveScreenLocale,Ah as responseMetaSchema,tb as revokeBillingAuthorizationInputSchema,jh as rewardActivityRedemptionSchema,kh as rewardActivitySchema,Vg as rewardCodeInputSchema,ih as rewardCodeSchema,lh as rewardCodeWriteSchema,gh as rewardCollectionSchema,Sg as rewardConfigurationSchema,Qg as rewardGrantExpirySchema,Rg as rewardGrantSchema,Ug as rewardInputSchema,Tg as rewardKeySchema,Zg as rewardOptionSchema,dh as rewardProductCheckoutSchema,Xg as rewardRecordSchema,ah as rewardRedemptionSchema,Pg as rewardStatusSchema,Og as rewardTypeSchema,_g as rewardWriteSchema,oa as runExperiment,Vk as sameMembershipBillingCycle,ji as saveSurfaceTemplateSchema,Y as scopeSchema,Of as screenActionSchema,qi as screenAnswersSchema,pi as screenDataCursorSchema,Wf as screenDocumentSchema,nf as screenImageSourceSchema,ti as screenInputBindingsSchema,Nf as screenNodeSchema,ri as screenParametersSchema,ig as screenPresentationSchema,Oe as screenProductScopes,Pe as screenProductSelections,ui as screenRendererInputSchema,gg as screenSelections,Pf as screenStringsSchema,Xc as seatCommandSchema,Wc as seatReadSchema,Yc as seatsStateSchema,Wi as selectFunnelCondition,Me as selectedPaywallProduct,Xe as selectedSurfaceValue,ag as servableLocales,Hb as setBillingCouponsInputSchema,xf as shadowSchema,vf as shapeSchema,qf as sizeSchema,lf as spaceSchema,Ff as spacerNodeSchema,Z as stableKeySchema,Lf as stackInteractionSchema,Mf as stackNodeSchema,Ga as stickyAssignmentDocumentSchema,nd as stripeCouponTermsSchema,od as stripePurchaseExecutionSchema,Bd as stripeRefundExecutionSchema,Rd as stripeSetupExecutionSchema,td as stripeSubscriptionUpdateExecutionSchema,ud as stripeSubscriptionUpdatePreviewSchema,vd as stripeSubscriptionUpdateResultSchema,Md as stripeTrialExecutionSchema,zf as styleSchema,ld as subscriptionAttachCommandSchema,pd as subscriptionAttachQuoteSchema,Gd as subscriptionBatchCommandSchema,Id as subscriptionBatchGroupSchema,Hd as subscriptionBatchReadSchema,Jd as subscriptionBatchSchema,rd as subscriptionCarryOptionsSchema,de as subscriptionConflictPageSchema,_d as subscriptionConflictQuerySchema,ae as subscriptionConflictRetryResultSchema,$d as subscriptionConflictRetrySchema,Zd as subscriptionConflictSchema,Xd as subscriptionListItemSchema,be as subscriptionListPageSchema,md as subscriptionOperationInputSchema,qd as subscriptionOperationSchema,Ad as subscriptionRefundCommandSchema,Cd as subscriptionRefundPreviewSchema,Dd as subscriptionRefundResultSchema,Kd as subscriptionTrialCommandSchema,Od as subscriptionTrialPolicySchema,Ld as subscriptionTrialReadSchema,Nd as subscriptionTrialResultSchema,sd as subscriptionUpdateCommandSchema,yd as subscriptionUpdatePreviewSchema,zd as subscriptionUpdateResultSchema,Td as subscriptionVerificationInputSchema,Ud as subscriptionVerificationSchema,ff as substituteHtmlVariables,We as substituteSurfaceVariables,Te as surfaceDataSchema,Qf as surfaceSchema,ii as surfaceTemplateSchema,Se as surfaceValueSchema,Ue as surfaceVariableNames,Pk as templateScreen,Af as textNodeSchema,yf as textStyleSchema,of as themeSchema,la as toAttributeString,Xi as transitionFunnelGraph,Yf as translatableFields,P as trialPolicySchema,Q as trialRecordSchema,Ve as unknownSurfaceVariables,Kc as usageAlertNotificationDataSchema,Lc as usageAllowanceNotificationDataSchema,Kg as usageAnalyticsPageSchema,Jg as usageAnalyticsQuerySchema,Ng as usageBatchPageSchema,Mg as usageBatchReadSchema,Lg as usageBatchSubmitSchema,xg as usageEntityCommandSchema,yg as usageEntitySchema,Jc as usageLimitNotificationDataSchema,Vi as validateFunnelGraph,Ci as validateFunnelTaskData,nj as validateScreenAnswers,ia as validitySchema,zh as verifiedPrincipalSchema,Uf as walkDocument,Xf as walkScreen,$c as workspaceSettingsSchema};
@@ -401,9 +401,9 @@ type ScreenStyle = z.infer<typeof styleSchema>;
401
401
  declare const textNodeSchema: z.ZodObject<{
402
402
  type: z.ZodLiteral<"text">;
403
403
  productField: z.ZodOptional<z.ZodEnum<{
404
+ name: "name";
404
405
  price: "price";
405
406
  trial: "trial";
406
- name: "name";
407
407
  period: "period";
408
408
  }>>;
409
409
  feature: z.ZodOptional<z.ZodObject<{