@whop/checkout 0.0.34 → 0.0.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 +62 -0
- package/dist/static/checkout/chunk-EAN646K5.mjs +1 -0
- package/dist/static/checkout/index.cjs +1 -1
- package/dist/static/checkout/index.js +1 -1
- package/dist/static/checkout/index.mjs +1 -1
- package/dist/static/checkout/loader.cjs +1 -1
- package/dist/static/checkout/loader.js +1 -1
- package/dist/static/checkout/loader.mjs +1 -1
- package/dist/static/checkout/util.cjs +1 -1
- package/dist/static/checkout/util.d.mts +31 -2
- package/dist/static/checkout/util.d.ts +31 -2
- package/dist/static/checkout/util.js +1 -1
- package/dist/static/checkout/util.mjs +1 -1
- package/package.json +1 -1
- package/dist/static/checkout/chunk-E7SFKHWN.mjs +0 -1
package/README.md
CHANGED
|
@@ -28,6 +28,24 @@ This will now mount an iframe inside of the element with the plan id you provide
|
|
|
28
28
|
|
|
29
29
|
You can configure the redirect url in your [whop's settings](https://whop.com/dashboard/whops/) or in your [company's settings](https://whop.com/dashboard/settings/checkout/) on the dashboard. If both are specified, the redirect url specified in the whop's settings will take precedence.
|
|
30
30
|
|
|
31
|
+
## Available methods
|
|
32
|
+
|
|
33
|
+
### **`submit`**
|
|
34
|
+
|
|
35
|
+
To submit checkout programmatically, you can use the `submit` method on the checkout element.
|
|
36
|
+
First, attach an `id` to the checkout container:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
<div id="whop-embedded-checkout" data-whop-checkout-plan-id="plan_XXXXXXXXX"></div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then, you can submit the checkout by calling `wco.submit` with the id:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
wco.submit("whop-embedded-checkout");
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
31
49
|
## Available attributes
|
|
32
50
|
|
|
33
51
|
### **`data-whop-checkout-plan-id`**
|
|
@@ -104,6 +122,31 @@ Defaults to `false`
|
|
|
104
122
|
<div data-whop-checkout-hide-price="true" data-whop-checkout-plan-id="plan_XXXXXXXXX"></div>
|
|
105
123
|
```
|
|
106
124
|
|
|
125
|
+
### **`data-whop-checkout-hide-submit-button`**
|
|
126
|
+
|
|
127
|
+
**Optional** - Set to `true` to hide the submit button in the embedded checkout form.
|
|
128
|
+
|
|
129
|
+
Defaults to `false`
|
|
130
|
+
|
|
131
|
+
<Note>
|
|
132
|
+
When using this Option, you will need to [programmatically submit](#submit)
|
|
133
|
+
the checkout form.
|
|
134
|
+
</Note>
|
|
135
|
+
|
|
136
|
+
```md
|
|
137
|
+
<div data-whop-checkout-hide-submit-button="true" data-whop-checkout-plan-id="plan_XXXXXXXXX"></div>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### **`data-whop-checkout-hide-tos`**
|
|
141
|
+
|
|
142
|
+
**Optional** - Set to `true` to hide the terms and conditions in the embedded checkout form.
|
|
143
|
+
|
|
144
|
+
Defaults to `false`
|
|
145
|
+
|
|
146
|
+
```md
|
|
147
|
+
<div data-whop-checkout-hide-tos="true" data-whop-checkout-plan-id="plan_XXXXXXXXX"></div>
|
|
148
|
+
```
|
|
149
|
+
|
|
107
150
|
### **`data-whop-checkout-skip-redirect`**
|
|
108
151
|
|
|
109
152
|
**Optional** - Set to `true` to skip the final redirect and keep the top frame loaded.
|
|
@@ -126,6 +169,25 @@ Defaults to `false`
|
|
|
126
169
|
<div data-whop-checkout-on-complete="onCheckoutComplete" data-whop-checkout-plan-id="plan_XXXXXXXXX"></div>
|
|
127
170
|
```
|
|
128
171
|
|
|
172
|
+
### **`data-whop-checkout-on-state-change`**
|
|
173
|
+
|
|
174
|
+
**Optional** - The callback to call when state of the checkout changes
|
|
175
|
+
|
|
176
|
+
This can be used when programmatically controlling the submit of the checkout embed.
|
|
177
|
+
|
|
178
|
+
```html
|
|
179
|
+
<script>
|
|
180
|
+
window.onCheckoutStateChange = (state) => {
|
|
181
|
+
console.log(state);
|
|
182
|
+
};
|
|
183
|
+
</script>
|
|
184
|
+
|
|
185
|
+
<div
|
|
186
|
+
data-whop-checkout-on-state-change="onCheckoutStateChange"
|
|
187
|
+
data-whop-checkout-plan-id="plan_XXXXXXXXX"
|
|
188
|
+
></div>
|
|
189
|
+
```
|
|
190
|
+
|
|
129
191
|
### **`data-whop-checkout-skip-utm`**
|
|
130
192
|
|
|
131
193
|
By default any utm params from the main page will be forwarded to the checkout embed.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var l=["resize","center","complete","state"];function u(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&l.includes(e.data.event)}function s(e,t){function r(r){r.source===e.contentWindow&&u(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function c(e,t){var r;var n=new URL(e.src).origin;(r=e.contentWindow)===null||r===void 0?void 0:r.postMessage({__scope:"whop-embedded-checkout",event:"submit"},n)}function f(e,t,r,n,o,i,l,u,s,c,f,d){var y=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(y.searchParams.set("h",window.location.origin),t&&y.searchParams.set("theme",t),r&&y.searchParams.set("session",r),o&&y.searchParams.set("hide_price","true"),i&&y.searchParams.set("skip_redirect","true"),f&&y.searchParams.set("hide_submit_button","true"),d&&y.searchParams.set("hide_tos","true"),l){var m=true,v=false,h=undefined,w=true,p=false,b=undefined;try{for(var g=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),S;!(w=(S=g.next()).done);w=true){var P=a(S.value,2),x=P[0],_=P[1];if(x.startsWith("utm_"))if(Array.isArray(_))try{for(var j=_[Symbol.iterator](),A;!(m=(A=j.next()).done);m=true){var k=A.value;y.searchParams.append(x,k)}}catch(e){v=true;h=e}finally{try{if(!m&&j.return!=null){j.return()}}finally{if(v){throw h}}}else y.searchParams.set(x,_)}}catch(e){p=true;b=e}finally{try{if(!w&&g.return!=null){g.return()}}finally{if(p){throw b}}}}if(u){var O=true,L=false,W=undefined,E=true,I=false,R=undefined;try{for(var U=Object.entries(u)[Symbol.iterator](),C;!(E=(C=U.next()).done);E=true){var M=a(C.value,2),q=M[0],z=M[1];if(z)try{for(var T=Object.entries(z)[Symbol.iterator](),$;!(O=($=T.next()).done);O=true){var B=a($.value,2),D=B[0],F=B[1];y.searchParams.set("style.".concat(q,".").concat(D),F.toString())}}catch(e){L=true;W=e}finally{try{if(!O&&T.return!=null){T.return()}}finally{if(L){throw W}}}}}catch(e){I=true;R=e}finally{try{if(!E&&U.return!=null){U.return()}}finally{if(I){throw R}}}}var G=true,H=false,J=undefined;if((s===null||s===void 0?void 0:s.email)&&y.searchParams.set("email",s.email),c)try{for(var K=Object.entries(c)[Symbol.iterator](),N;!(G=(N=K.next()).done);G=true){var Q=a(N.value,2),V=Q[0],X=Q[1];X&&y.searchParams.set("theme.".concat(V),X)}}catch(e){H=true;J=e}finally{try{if(!G&&K.return!=null){K.return()}}finally{if(H){throw J}}}return y.toString()}var d=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],y="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";export{u as a,s as b,c as c,f as d,d as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||f(e,r)||i()}function c(e){return t(e)||a(e)||f(e)||i()}function s(e){return r(e)||a(e)||f(e)||l()}function d(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function f(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var h=["resize","center","complete","state"];function v(e){return d(e.data)=="object"&&e.data!==null&&"event"in e.data&&h.includes(e.data.event)}function w(e,t){function r(r){r.source===e.contentWindow&&v(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function y(e,t){var r;var n=new URL(e.src).origin;(r=e.contentWindow)===null||r===void 0?void 0:r.postMessage({__scope:"whop-embedded-checkout",event:"submit"},n)}function m(e,t,r,n,a,o,i,l,c,s,d,f){var h=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(h.searchParams.set("h",window.location.origin),t&&h.searchParams.set("theme",t),r&&h.searchParams.set("session",r),a&&h.searchParams.set("hide_price","true"),o&&h.searchParams.set("skip_redirect","true"),d&&h.searchParams.set("hide_submit_button","true"),f&&h.searchParams.set("hide_tos","true"),i){var v=true,w=false,y=undefined,m=true,p=false,b=undefined;try{for(var k=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),C;!(m=(C=k.next()).done);m=true){var S=u(C.value,2),g=S[0],A=S[1];if(g.startsWith("utm_"))if(Array.isArray(A))try{for(var P=A[Symbol.iterator](),x;!(v=(x=P.next()).done);v=true){var I=x.value;h.searchParams.append(g,I)}}catch(e){w=true;y=e}finally{try{if(!v&&P.return!=null){P.return()}}finally{if(w){throw y}}}else h.searchParams.set(g,A)}}catch(e){p=true;b=e}finally{try{if(!m&&k.return!=null){k.return()}}finally{if(p){throw b}}}}if(l){var O=true,_=false,j=undefined,E=true,L=false,T=undefined;try{for(var M=Object.entries(l)[Symbol.iterator](),U;!(E=(U=M.next()).done);E=true){var H=u(U.value,2),R=H[0],W=H[1];if(W)try{for(var q=Object.entries(W)[Symbol.iterator](),z;!(O=(z=q.next()).done);O=true){var F=u(z.value,2),N=F[0],B=F[1];h.searchParams.set("style.".concat(R,".").concat(N),B.toString())}}catch(e){_=true;j=e}finally{try{if(!O&&q.return!=null){q.return()}}finally{if(_){throw j}}}}}catch(e){L=true;T=e}finally{try{if(!E&&M.return!=null){M.return()}}finally{if(L){throw T}}}}var V=true,$=false,D=undefined;if((c===null||c===void 0?void 0:c.email)&&h.searchParams.set("email",c.email),s)try{for(var G=Object.entries(s)[Symbol.iterator](),J;!(V=(J=G.next()).done);V=true){var K=u(J.value,2),Q=K[0],X=K[1];X&&h.searchParams.set("theme.".concat(Q),X)}}catch(e){$=true;D=e}finally{try{if(!V&&G.return!=null){G.return()}}finally{if($){throw D}}}return h.toString()}var p=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],b="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";function k(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}if(!e)return;var a=window[e];a===null||a===void 0?void 0:a.apply(void 0,s(r))}function C(e,t){var r;e.addEventListener("checkout:submit",function(t){y(e,t.detail)}),(r=window.wco)===null||r===void 0?void 0:r.frames.set(e,w(e,function(r){switch(r.event){case"resize":{e.style.height="".concat(r.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{k(t.dataset.whopCheckoutOnComplete,r.plan_id,r.receipt_id);break}case"state":{k(t.dataset.whopCheckoutOnStateChange,r.state);break}}}))}function S(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}var g="data-whop-checkout-style-";function A(e){var t={};var r=true,n=false,a=undefined;try{for(var o=e.attributes[Symbol.iterator](),i;!(r=(i=o.next()).done);r=true){var l=i.value;if(l.name.startsWith(g)){var u=l.name.slice(g.length),s=l.value,d=c(u.split("-")),f=d[0],h=d.slice(1);if(f&&h.length>0){var v=h.reduce(function(e,t,r){if(r===0)return t;var n=c(t),a=n[0],o=n.slice(1);return"".concat(e).concat(a.toUpperCase()).concat(o.join(""))},"");var w;(w=t[f])!==null&&w!==void 0?w:t[f]={},t[f][v]=s}}}}catch(e){n=true;a=e}finally{try{if(!r&&o.return!=null){o.return()}}finally{if(n){throw a}}}return t}function P(e){var t={};return e.dataset.whopCheckoutThemeAccentColor&&(t.accentColor=e.dataset.whopCheckoutThemeAccentColor),t}function x(e){var t={};return e.dataset.whopCheckoutPrefillEmail&&(t.email=e.dataset.whopCheckoutPrefillEmail),t}function I(e){var t;var r;if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var a=m(n,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:S(),A(e),x(e),P(e),e.dataset.whopCheckoutHideSubmitButton==="true",e.dataset.whopCheckoutHideTos==="true"),o=document.createElement("iframe");o.src=a,o.style.width="100%",o.style.height="480px",o.style.border="none",o.style.overflow="hidden",(t=o.sandbox).add.apply(t,s(p)),o.allow=b,e.dataset.whopCheckoutMounted="true",e.appendChild(o);var i=e.id;i&&((r=window.wco)===null||r===void 0?void 0:r.identifiedFrames.set(i,o),o.dataset.whopCheckoutIdentifier=i),C(o,e)}if((typeof window==="undefined"?"undefined":d(window))<"u"&&window.wco&&!window.wco.listening){var O=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var l=i.value;var c,s,d;var f=true,h=false,v=undefined;try{for(var w=l.addedNodes[Symbol.iterator](),y;!(f=(y=w.next()).done);f=true){var m=y.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&I(m)}}catch(e){h=true;v=e}finally{try{if(!f&&w.return!=null){w.return()}}finally{if(h){throw v}}}var p=Array.from(l.removedNodes);var b;var k=true,C=false,S=undefined;try{for(var g=((b=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),A;!(k=(A=g.next()).done);k=true){var P=u(A.value,2),x=P[0],O=P[1];p.includes(x)&&(x.dataset.whopCheckoutIdentifier&&((s=window.wco)===null||s===void 0?void 0:s.identifiedFrames.delete(x.dataset.whopCheckoutIdentifier)),O(),(d=window.wco)===null||d===void 0?void 0:d.frames.delete(x))}}catch(e){C=true;S=e}finally{try{if(!k&&g.return!=null){g.return()}}finally{if(C){throw S}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var _=true,j=false,E=undefined;try{for(var L=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),T;!(_=(T=L.next()).done);_=true){var M=T.value;n(M,HTMLElement)&&I(M)}}catch(e){j=true;E=e}finally{try{if(!_&&L.return!=null){L.return()}}finally{if(j){throw E}}}O.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||f(e,r)||i()}function c(e){return t(e)||a(e)||f(e)||i()}function s(e){return r(e)||a(e)||f(e)||l()}function d(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function f(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(function(){var e=function e(e){return d(e.data)=="object"&&e.data!==null&&"event"in e.data&&y.includes(e.data.event)};var t=function t(t,r){function n(n){n.source===t.contentWindow&&e(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function e(e,t){var r;var n=new URL(e.src).origin;(r=e.contentWindow)===null||r===void 0?void 0:r.postMessage({__scope:"whop-embedded-checkout",event:"submit"},n)};var a=function e(e,t,r,n,a,o,i,l,c,s,d,f){var h=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(h.searchParams.set("h",window.location.origin),t&&h.searchParams.set("theme",t),r&&h.searchParams.set("session",r),a&&h.searchParams.set("hide_price","true"),o&&h.searchParams.set("skip_redirect","true"),d&&h.searchParams.set("hide_submit_button","true"),f&&h.searchParams.set("hide_tos","true"),i){var v=true,w=false,y=undefined,m=true,p=false,b=undefined;try{for(var k=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),C;!(m=(C=k.next()).done);m=true){var S=u(C.value,2),g=S[0],A=S[1];if(g.startsWith("utm_"))if(Array.isArray(A))try{for(var P=A[Symbol.iterator](),x;!(v=(x=P.next()).done);v=true){var I=x.value;h.searchParams.append(g,I)}}catch(e){w=true;y=e}finally{try{if(!v&&P.return!=null){P.return()}}finally{if(w){throw y}}}else h.searchParams.set(g,A)}}catch(e){p=true;b=e}finally{try{if(!m&&k.return!=null){k.return()}}finally{if(p){throw b}}}}if(l){var O=true,_=false,j=undefined,E=true,L=false,T=undefined;try{for(var M=Object.entries(l)[Symbol.iterator](),U;!(E=(U=M.next()).done);E=true){var H=u(U.value,2),R=H[0],W=H[1];if(W)try{for(var q=Object.entries(W)[Symbol.iterator](),z;!(O=(z=q.next()).done);O=true){var F=u(z.value,2),N=F[0],B=F[1];h.searchParams.set("style.".concat(R,".").concat(N),B.toString())}}catch(e){_=true;j=e}finally{try{if(!O&&q.return!=null){q.return()}}finally{if(_){throw j}}}}}catch(e){L=true;T=e}finally{try{if(!E&&M.return!=null){M.return()}}finally{if(L){throw T}}}}var V=true,$=false,D=undefined;if((c===null||c===void 0?void 0:c.email)&&h.searchParams.set("email",c.email),s)try{for(var G=Object.entries(s)[Symbol.iterator](),J;!(V=(J=G.next()).done);V=true){var K=u(J.value,2),Q=K[0],X=K[1];X&&h.searchParams.set("theme.".concat(Q),X)}}catch(e){$=true;D=e}finally{try{if(!V&&G.return!=null){G.return()}}finally{if($){throw D}}}return h.toString()};var o=function e(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}if(!e)return;var a=window[e];a===null||a===void 0?void 0:a.apply(void 0,s(r))};var i=function e(e,n){var a;e.addEventListener("checkout:submit",function(t){r(e,t.detail)}),(a=window.wco)===null||a===void 0?void 0:a.frames.set(e,t(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{o(n.dataset.whopCheckoutOnComplete,t.plan_id,t.receipt_id);break}case"state":{o(n.dataset.whopCheckoutOnStateChange,t.state);break}}}))};var l=function e(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})};var f=function e(e){var t={};var r=true,n=false,a=undefined;try{for(var o=e.attributes[Symbol.iterator](),i;!(r=(i=o.next()).done);r=true){var l=i.value;if(l.name.startsWith(b)){var u=l.name.slice(b.length),s=l.value,d=c(u.split("-")),f=d[0],h=d.slice(1);if(f&&h.length>0){var v=h.reduce(function(e,t,r){if(r===0)return t;var n=c(t),a=n[0],o=n.slice(1);return"".concat(e).concat(a.toUpperCase()).concat(o.join(""))},"");var w;(w=t[f])!==null&&w!==void 0?w:t[f]={},t[f][v]=s}}}}catch(e){n=true;a=e}finally{try{if(!r&&o.return!=null){o.return()}}finally{if(n){throw a}}}return t};var h=function e(e){var t={};return e.dataset.whopCheckoutThemeAccentColor&&(t.accentColor=e.dataset.whopCheckoutThemeAccentColor),t};var v=function e(e){var t={};return e.dataset.whopCheckoutPrefillEmail&&(t.email=e.dataset.whopCheckoutPrefillEmail),t};var w=function e(e){var t;var r;if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var o=a(n,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:l(),f(e),v(e),h(e),e.dataset.whopCheckoutHideSubmitButton==="true",e.dataset.whopCheckoutHideTos==="true"),u=document.createElement("iframe");u.src=o,u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",(t=u.sandbox).add.apply(t,s(m)),u.allow=p,e.dataset.whopCheckoutMounted="true",e.appendChild(u);var c=e.id;c&&((r=window.wco)===null||r===void 0?void 0:r.identifiedFrames.set(c,u),u.dataset.whopCheckoutIdentifier=c),i(u,e)};var y=["resize","center","complete","state"];var m=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],p="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";var b="data-whop-checkout-style-";if((typeof window==="undefined"?"undefined":d(window))<"u"&&window.wco&&!window.wco.listening){var k=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var l=i.value;var c,s,d;var f=true,h=false,v=undefined;try{for(var y=l.addedNodes[Symbol.iterator](),m;!(f=(m=y.next()).done);f=true){var p=m.value;n(p,HTMLElement)&&p.dataset.whopCheckoutPlanId&&w(p)}}catch(e){h=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(h){throw v}}}var b=Array.from(l.removedNodes);var k;var C=true,S=false,g=undefined;try{for(var A=((k=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&k!==void 0?k:[])[Symbol.iterator](),P;!(C=(P=A.next()).done);C=true){var x=u(P.value,2),I=x[0],O=x[1];b.includes(I)&&(I.dataset.whopCheckoutIdentifier&&((s=window.wco)===null||s===void 0?void 0:s.identifiedFrames.delete(I.dataset.whopCheckoutIdentifier)),O(),(d=window.wco)===null||d===void 0?void 0:d.frames.delete(I))}}catch(e){S=true;g=e}finally{try{if(!C&&A.return!=null){A.return()}}finally{if(S){throw g}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var C=true,S=false,g=undefined;try{for(var A=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),P;!(C=(P=A.next()).done);C=true){var x=P.value;n(x,HTMLElement)&&w(x)}}catch(e){S=true;g=e}finally{try{if(!C&&A.return!=null){A.return()}}finally{if(S){throw g}}}k.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var i,u;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){a=true;u=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,r){return t(e)||a(e,r)||s(e,r)||i()}function c(e){return t(e)||o(e)||s(e)||i()}function
|
|
1
|
+
function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var i,u;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){a=true;u=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,r){return t(e)||a(e,r)||s(e,r)||i()}function c(e){return t(e)||o(e)||s(e)||i()}function d(e){return r(e)||o(e)||s(e)||u()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function s(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}import{b as h,c as v,d as w,e as y,f as p}from"./chunk-EAN646K5.mjs";function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}if(!e)return;var o=window[e];o===null||o===void 0?void 0:o.apply(void 0,d(r))}function b(e,t){var r;e.addEventListener("checkout:submit",function(t){v(e,t.detail)}),(r=window.wco)===null||r===void 0?void 0:r.frames.set(e,h(e,function(r){switch(r.event){case"resize":{e.style.height="".concat(r.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{m(t.dataset.whopCheckoutOnComplete,r.plan_id,r.receipt_id);break}case"state":{m(t.dataset.whopCheckoutOnStateChange,r.state);break}}}))}function k(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}var C="data-whop-checkout-style-";function S(e){var t={};var r=true,n=false,o=undefined;try{for(var a=e.attributes[Symbol.iterator](),i;!(r=(i=a.next()).done);r=true){var u=i.value;if(u.name.startsWith(C)){var l=u.name.slice(C.length),d=u.value,f=c(l.split("-")),s=f[0],h=f.slice(1);if(s&&h.length>0){var v=h.reduce(function(e,t,r){if(r===0)return t;var n=c(t),o=n[0],a=n.slice(1);return"".concat(e).concat(o.toUpperCase()).concat(a.join(""))},"");var w;(w=t[s])!==null&&w!==void 0?w:t[s]={},t[s][v]=d}}}}catch(e){n=true;o=e}finally{try{if(!r&&a.return!=null){a.return()}}finally{if(n){throw o}}}return t}function g(e){var t={};return e.dataset.whopCheckoutThemeAccentColor&&(t.accentColor=e.dataset.whopCheckoutThemeAccentColor),t}function A(e){var t={};return e.dataset.whopCheckoutPrefillEmail&&(t.email=e.dataset.whopCheckoutPrefillEmail),t}function I(e){var t;var r;if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var o=w(n,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:k(),S(e),A(e),g(e),e.dataset.whopCheckoutHideSubmitButton==="true",e.dataset.whopCheckoutHideTos==="true"),a=document.createElement("iframe");a.src=o,a.style.width="100%",a.style.height="480px",a.style.border="none",a.style.overflow="hidden",(t=a.sandbox).add.apply(t,d(y)),a.allow=p,e.dataset.whopCheckoutMounted="true",e.appendChild(a);var i=e.id;i&&((r=window.wco)===null||r===void 0?void 0:r.identifiedFrames.set(i,a),a.dataset.whopCheckoutIdentifier=i),b(a,e)}if((typeof window==="undefined"?"undefined":f(window))<"u"&&window.wco&&!window.wco.listening){var x=new MutationObserver(function(e){var t=true,r=false,o=undefined;try{for(var a=e[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var u=i.value;var c,d,f;var s=true,h=false,v=undefined;try{for(var w=u.addedNodes[Symbol.iterator](),y;!(s=(y=w.next()).done);s=true){var p=y.value;n(p,HTMLElement)&&p.dataset.whopCheckoutPlanId&&I(p)}}catch(e){h=true;v=e}finally{try{if(!s&&w.return!=null){w.return()}}finally{if(h){throw v}}}var m=Array.from(u.removedNodes);var b;var k=true,C=false,S=undefined;try{for(var g=((b=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),A;!(k=(A=g.next()).done);k=true){var x=l(A.value,2),E=x[0],T=x[1];m.includes(E)&&(E.dataset.whopCheckoutIdentifier&&((d=window.wco)===null||d===void 0?void 0:d.identifiedFrames.delete(E.dataset.whopCheckoutIdentifier)),T(),(f=window.wco)===null||f===void 0?void 0:f.frames.delete(E))}}catch(e){C=true;S=e}finally{try{if(!k&&g.return!=null){g.return()}}finally{if(C){throw S}}}}}catch(e){r=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(r){throw o}}}});var E=true,T=false,O=undefined;try{for(var j=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),M;!(E=(M=j.next()).done);E=true){var P=M.value;n(P,HTMLElement)&&I(P)}}catch(e){T=true;O=e}finally{try{if(!E&&j.return!=null){j.return()}}finally{if(T){throw O}}}x.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,
|
|
1
|
+
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,i=n===null||n===void 0?void 0:n.src;var o;(typeof window==="undefined"?"undefined":e(window))<"u"&&i&&((o=window.wco)!==null&&o!==void 0?o:window.wco=function(){var e=document.createElement("script");return e.src=i.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map,identifiedFrames:new Map,submit:function(e,n){var i;var o=(i=window.wco)===null||i===void 0?void 0:i.identifiedFrames.get(e);if(!o)throw new Error("Failed to submit Whop embedded checkout. No frame with identifier ".concat(e," found."));o.dispatchEvent(new CustomEvent("checkout:submit",{detail:n,cancelable:!0,bubbles:!1,composed:!0}))}}}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}(function(){var n=document.currentScript,
|
|
1
|
+
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}(function(){var n=document.currentScript,i=n===null||n===void 0?void 0:n.src;var o;(typeof window==="undefined"?"undefined":e(window))<"u"&&i&&((o=window.wco)!==null&&o!==void 0?o:window.wco=function(){var e=document.createElement("script");return e.src=i.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map,identifiedFrames:new Map,submit:function(e,n){var i;var o=(i=window.wco)===null||i===void 0?void 0:i.identifiedFrames.get(e);if(!o)throw new Error("Failed to submit Whop embedded checkout. No frame with identifier ".concat(e," found."));o.dispatchEvent(new CustomEvent("checkout:submit",{detail:n,cancelable:!0,bubbles:!1,composed:!0}))}}}())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var
|
|
1
|
+
function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var i;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((i=window.wco)!==null&&i!==void 0?i:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map,identifiedFrames:new Map,submit:function(e,n){var o;var i=(o=window.wco)===null||o===void 0?void 0:o.identifiedFrames.get(e);if(!i)throw new Error("Failed to submit Whop embedded checkout. No frame with identifier ".concat(e," found."));i.dispatchEvent(new CustomEvent("checkout:submit",{detail:n,cancelable:!0,bubbles:!1,composed:!0}))}}}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,u;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;u=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw u}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,u;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;u=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw u}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=function(e,t){for(var r in t)u(e,r,{get:t[r],enumerable:!0})},d=function(e,t,r,n){var a=true,i=false,f=undefined;if(t&&(typeof t==="undefined"?"undefined":o(t))=="object"||typeof t=="function")try{var d=function(){var a=h.value;!c.call(e,a)&&a!==r&&u(e,a,{get:function(){return t[a]},enumerable:!(n=l(t,a))||n.enumerable})};for(var m=s(t)[Symbol.iterator](),h;!(a=(h=m.next()).done);a=true)d()}catch(e){i=true;f=e}finally{try{if(!a&&m.return!=null){m.return()}}finally{if(i){throw f}}}return e};var m=function(e){return d(u({},"__esModule",{value:!0}),e)};var h={};f(h,{EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:function(){return _},EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:function(){return E},getEmbeddedCheckoutIframeUrl:function(){return w},isWhopCheckoutMessage:function(){return v},onWhopCheckoutMessage:function(){return p},submitCheckoutFrame:function(){return b}});module.exports=m(h);var y=["resize","center","complete","state"];function v(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&y.includes(e.data.event)}function p(e,t){function r(r){r.source===e.contentWindow&&v(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function b(e,t){var r;var n=new URL(e.src).origin;(r=e.contentWindow)===null||r===void 0?void 0:r.postMessage({__scope:"whop-embedded-checkout",event:"submit"},n)}function w(e,t,r,n,o,i,u,l,s,c,f,d){var m=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(m.searchParams.set("h",window.location.origin),t&&m.searchParams.set("theme",t),r&&m.searchParams.set("session",r),o&&m.searchParams.set("hide_price","true"),i&&m.searchParams.set("skip_redirect","true"),f&&m.searchParams.set("hide_submit_button","true"),d&&m.searchParams.set("hide_tos","true"),u){var h=true,y=false,v=undefined,p=true,b=false,w=undefined;try{for(var E=Object.entries(u).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),_;!(p=(_=E.next()).done);p=true){var g=a(_.value,2),C=g[0],O=g[1];if(C.startsWith("utm_"))if(Array.isArray(O))try{for(var S=O[Symbol.iterator](),D;!(h=(D=S.next()).done);h=true){var M=D.value;m.searchParams.append(C,M)}}catch(e){y=true;v=e}finally{try{if(!h&&S.return!=null){S.return()}}finally{if(y){throw v}}}else m.searchParams.set(C,O)}}catch(e){b=true;w=e}finally{try{if(!p&&E.return!=null){E.return()}}finally{if(b){throw w}}}}if(l){var A=true,k=false,I=undefined,P=true,j=false,L=undefined;try{for(var T=Object.entries(l)[Symbol.iterator](),R;!(P=(R=T.next()).done);P=true){var U=a(R.value,2),W=U[0],x=U[1];if(x)try{for(var B=Object.entries(x)[Symbol.iterator](),F;!(A=(F=B.next()).done);A=true){var N=a(F.value,2),H=N[0],K=N[1];m.searchParams.set("style.".concat(W,".").concat(H),K.toString())}}catch(e){k=true;I=e}finally{try{if(!A&&B.return!=null){B.return()}}finally{if(k){throw I}}}}}catch(e){j=true;L=e}finally{try{if(!P&&T.return!=null){T.return()}}finally{if(j){throw L}}}}var G=true,X=false,q=undefined;if((s===null||s===void 0?void 0:s.email)&&m.searchParams.set("email",s.email),c)try{for(var z=Object.entries(c)[Symbol.iterator](),$;!(G=($=z.next()).done);G=true){var J=a($.value,2),Q=J[0],V=J[1];V&&m.searchParams.set("theme.".concat(Q),V)}}catch(e){X=true;q=e}finally{try{if(!G&&z.return!=null){z.return()}}finally{if(X){throw q}}}return m.toString()}var E=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],_="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";0&&(module.exports={EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,getEmbeddedCheckoutIframeUrl:getEmbeddedCheckoutIframeUrl,isWhopCheckoutMessage:isWhopCheckoutMessage,onWhopCheckoutMessage:onWhopCheckoutMessage,submitCheckoutFrame:submitCheckoutFrame});
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
wco?: {
|
|
4
|
+
injected: true;
|
|
5
|
+
listening: boolean;
|
|
6
|
+
frames: Map<HTMLIFrameElement, () => void>;
|
|
7
|
+
identifiedFrames: Map<string, HTMLIFrameElement>;
|
|
8
|
+
submit: (
|
|
9
|
+
identifier: string,
|
|
10
|
+
data?: {
|
|
11
|
+
email?: string;
|
|
12
|
+
},
|
|
13
|
+
) => void;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface HTMLElementEventMap {
|
|
18
|
+
"checkout:submit": CustomEvent<WhopCheckoutSubmitDetails>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type WhopCheckoutSubmitDetails = Record<never, never>;
|
|
23
|
+
|
|
24
|
+
type WhopCheckoutState = "loading" | "ready" | "disabled";
|
|
1
25
|
type WhopCheckoutMessage = {
|
|
2
26
|
event: "resize";
|
|
3
27
|
height: number;
|
|
@@ -7,9 +31,14 @@ type WhopCheckoutMessage = {
|
|
|
7
31
|
event: "complete";
|
|
8
32
|
receipt_id?: string;
|
|
9
33
|
plan_id: string;
|
|
34
|
+
} | {
|
|
35
|
+
event: "state";
|
|
36
|
+
state: WhopCheckoutState;
|
|
10
37
|
};
|
|
11
38
|
declare function isWhopCheckoutMessage(event: MessageEvent<unknown>): event is MessageEvent<WhopCheckoutMessage>;
|
|
12
39
|
declare function onWhopCheckoutMessage(iframe: HTMLIFrameElement, callback: (message: WhopCheckoutMessage) => void): () => void;
|
|
40
|
+
declare function submitCheckoutFrame(frame: HTMLIFrameElement, _data?: WhopCheckoutSubmitDetails): void;
|
|
41
|
+
|
|
13
42
|
interface WhopEmbeddedCheckoutStyleOptions {
|
|
14
43
|
container?: {
|
|
15
44
|
paddingTop?: number | string;
|
|
@@ -23,8 +52,8 @@ interface WhopEmbeddedCheckoutPrefillOptions {
|
|
|
23
52
|
interface WhopEmbeddedCheckoutThemeOptions {
|
|
24
53
|
accentColor?: string;
|
|
25
54
|
}
|
|
26
|
-
declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions, prefill?: WhopEmbeddedCheckoutPrefillOptions, themeOptions?: WhopEmbeddedCheckoutThemeOptions): string;
|
|
55
|
+
declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions, prefill?: WhopEmbeddedCheckoutPrefillOptions, themeOptions?: WhopEmbeddedCheckoutThemeOptions, hideSubmitButton?: boolean, hideTermsAndConditions?: boolean): string;
|
|
27
56
|
declare const EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST: string[];
|
|
28
57
|
declare const EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING = "document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";
|
|
29
58
|
|
|
30
|
-
export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopEmbeddedCheckoutPrefillOptions, type WhopEmbeddedCheckoutStyleOptions, type WhopEmbeddedCheckoutThemeOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
|
|
59
|
+
export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopCheckoutState, type WhopCheckoutSubmitDetails, type WhopEmbeddedCheckoutPrefillOptions, type WhopEmbeddedCheckoutStyleOptions, type WhopEmbeddedCheckoutThemeOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage, submitCheckoutFrame };
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
wco?: {
|
|
4
|
+
injected: true;
|
|
5
|
+
listening: boolean;
|
|
6
|
+
frames: Map<HTMLIFrameElement, () => void>;
|
|
7
|
+
identifiedFrames: Map<string, HTMLIFrameElement>;
|
|
8
|
+
submit: (
|
|
9
|
+
identifier: string,
|
|
10
|
+
data?: {
|
|
11
|
+
email?: string;
|
|
12
|
+
},
|
|
13
|
+
) => void;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface HTMLElementEventMap {
|
|
18
|
+
"checkout:submit": CustomEvent<WhopCheckoutSubmitDetails>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type WhopCheckoutSubmitDetails = Record<never, never>;
|
|
23
|
+
|
|
24
|
+
type WhopCheckoutState = "loading" | "ready" | "disabled";
|
|
1
25
|
type WhopCheckoutMessage = {
|
|
2
26
|
event: "resize";
|
|
3
27
|
height: number;
|
|
@@ -7,9 +31,14 @@ type WhopCheckoutMessage = {
|
|
|
7
31
|
event: "complete";
|
|
8
32
|
receipt_id?: string;
|
|
9
33
|
plan_id: string;
|
|
34
|
+
} | {
|
|
35
|
+
event: "state";
|
|
36
|
+
state: WhopCheckoutState;
|
|
10
37
|
};
|
|
11
38
|
declare function isWhopCheckoutMessage(event: MessageEvent<unknown>): event is MessageEvent<WhopCheckoutMessage>;
|
|
12
39
|
declare function onWhopCheckoutMessage(iframe: HTMLIFrameElement, callback: (message: WhopCheckoutMessage) => void): () => void;
|
|
40
|
+
declare function submitCheckoutFrame(frame: HTMLIFrameElement, _data?: WhopCheckoutSubmitDetails): void;
|
|
41
|
+
|
|
13
42
|
interface WhopEmbeddedCheckoutStyleOptions {
|
|
14
43
|
container?: {
|
|
15
44
|
paddingTop?: number | string;
|
|
@@ -23,8 +52,8 @@ interface WhopEmbeddedCheckoutPrefillOptions {
|
|
|
23
52
|
interface WhopEmbeddedCheckoutThemeOptions {
|
|
24
53
|
accentColor?: string;
|
|
25
54
|
}
|
|
26
|
-
declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions, prefill?: WhopEmbeddedCheckoutPrefillOptions, themeOptions?: WhopEmbeddedCheckoutThemeOptions): string;
|
|
55
|
+
declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions, prefill?: WhopEmbeddedCheckoutPrefillOptions, themeOptions?: WhopEmbeddedCheckoutThemeOptions, hideSubmitButton?: boolean, hideTermsAndConditions?: boolean): string;
|
|
27
56
|
declare const EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST: string[];
|
|
28
57
|
declare const EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING = "document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";
|
|
29
58
|
|
|
30
|
-
export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopEmbeddedCheckoutPrefillOptions, type WhopEmbeddedCheckoutStyleOptions, type WhopEmbeddedCheckoutThemeOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
|
|
59
|
+
export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopCheckoutState, type WhopCheckoutSubmitDetails, type WhopEmbeddedCheckoutPrefillOptions, type WhopEmbeddedCheckoutStyleOptions, type WhopEmbeddedCheckoutThemeOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage, submitCheckoutFrame };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(function(){var e=function e(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&i.includes(e.data.event)};var t=function t(t,r){function n(n){n.source===t.contentWindow&&e(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function e(e,t){var r;var n=new URL(e.src).origin;(r=e.contentWindow)===null||r===void 0?void 0:r.postMessage({__scope:"whop-embedded-checkout",event:"submit"},n)};var n=function e(e,t,r,n,o,i,l,u,s,c,f,d){var y=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(y.searchParams.set("h",window.location.origin),t&&y.searchParams.set("theme",t),r&&y.searchParams.set("session",r),o&&y.searchParams.set("hide_price","true"),i&&y.searchParams.set("skip_redirect","true"),f&&y.searchParams.set("hide_submit_button","true"),d&&y.searchParams.set("hide_tos","true"),l){var m=true,v=false,h=undefined,w=true,p=false,b=undefined;try{for(var g=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),S;!(w=(S=g.next()).done);w=true){var P=a(S.value,2),j=P[0],x=P[1];if(j.startsWith("utm_"))if(Array.isArray(x))try{for(var A=x[Symbol.iterator](),_;!(m=(_=A.next()).done);m=true){var k=_.value;y.searchParams.append(j,k)}}catch(e){v=true;h=e}finally{try{if(!m&&A.return!=null){A.return()}}finally{if(v){throw h}}}else y.searchParams.set(j,x)}}catch(e){p=true;b=e}finally{try{if(!w&&g.return!=null){g.return()}}finally{if(p){throw b}}}}if(u){var O=true,L=false,E=undefined,I=true,R=false,U=undefined;try{for(var W=Object.entries(u)[Symbol.iterator](),C;!(I=(C=W.next()).done);I=true){var M=a(C.value,2),q=M[0],z=M[1];if(z)try{for(var T=Object.entries(z)[Symbol.iterator](),$;!(O=($=T.next()).done);O=true){var B=a($.value,2),D=B[0],F=B[1];y.searchParams.set("style.".concat(q,".").concat(D),F.toString())}}catch(e){L=true;E=e}finally{try{if(!O&&T.return!=null){T.return()}}finally{if(L){throw E}}}}}catch(e){R=true;U=e}finally{try{if(!I&&W.return!=null){W.return()}}finally{if(R){throw U}}}}var G=true,H=false,J=undefined;if((s===null||s===void 0?void 0:s.email)&&y.searchParams.set("email",s.email),c)try{for(var K=Object.entries(c)[Symbol.iterator](),N;!(G=(N=K.next()).done);G=true){var Q=a(N.value,2),V=Q[0],X=Q[1];X&&y.searchParams.set("theme.".concat(V),X)}}catch(e){H=true;J=e}finally{try{if(!G&&K.return!=null){K.return()}}finally{if(H){throw J}}}return y.toString()};var i=["resize","center","complete","state"];var l=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],u="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;"})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as
|
|
1
|
+
import{a as e,b as s,c as E,d as a,e as o,f as t}from"./chunk-EAN646K5.mjs";export{t as EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,o as EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,a as getEmbeddedCheckoutIframeUrl,e as isWhopCheckoutMessage,s as onWhopCheckoutMessage,E as submitCheckoutFrame};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function l(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function u(e,t){function r(r){r.source===e.contentWindow&&l(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function s(e,t,r,n,o,i,l,u,s,c){var f=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(f.searchParams.set("h",window.location.origin),t&&f.searchParams.set("theme",t),r&&f.searchParams.set("session",r),o&&f.searchParams.set("hide_price","true"),i&&f.searchParams.set("skip_redirect","true"),l){var d=true,y=false,m=undefined,v=true,h=false,p=undefined;try{for(var w=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),b;!(v=(b=w.next()).done);v=true){var g=a(b.value,2),S=g[0],P=g[1];if(S.startsWith("utm_"))if(Array.isArray(P))try{for(var x=P[Symbol.iterator](),j;!(d=(j=x.next()).done);d=true){var A=j.value;f.searchParams.append(S,A)}}catch(e){y=true;m=e}finally{try{if(!d&&x.return!=null){x.return()}}finally{if(y){throw m}}}else f.searchParams.set(S,P)}}catch(e){h=true;p=e}finally{try{if(!v&&w.return!=null){w.return()}}finally{if(h){throw p}}}}if(u){var k=true,O=false,E=undefined,C=true,I=false,L=undefined;try{for(var _=Object.entries(u)[Symbol.iterator](),R;!(C=(R=_.next()).done);C=true){var U=a(R.value,2),W=U[0],q=U[1];if(q)try{for(var z=Object.entries(q)[Symbol.iterator](),M;!(k=(M=z.next()).done);k=true){var T=a(M.value,2),$=T[0],B=T[1];f.searchParams.set("style.".concat(W,".").concat($),B.toString())}}catch(e){O=true;E=e}finally{try{if(!k&&z.return!=null){z.return()}}finally{if(O){throw E}}}}}catch(e){I=true;L=e}finally{try{if(!C&&_.return!=null){_.return()}}finally{if(I){throw L}}}}var D=true,F=false,G=undefined;if((s===null||s===void 0?void 0:s.email)&&f.searchParams.set("email",s.email),c)try{for(var H=Object.entries(c)[Symbol.iterator](),J;!(D=(J=H.next()).done);D=true){var K=a(J.value,2),N=K[0],Q=K[1];Q&&f.searchParams.set("theme.".concat(N),Q)}}catch(e){F=true;G=e}finally{try{if(!D&&H.return!=null){H.return()}}finally{if(F){throw G}}}return f.toString()}var c=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],f="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";export{l as a,u as b,s as c,c as d,f as e};
|