subscriptions.super-simple.co
Open in
urlscan Pro
34.199.10.75
Public Scan
URL:
https://subscriptions.super-simple.co/assets/Modal-DddOdRAb.js
Submission: On November 02 via api from US — Scanned from US
Submission: On November 02 via api from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
import{r as d,R as c}from"./index-BEwlhiRH.js";import{N as A,E as Te,X as z,R as X,$ as De,a0 as Pe,a1 as Oe,a2 as Ie,a3 as _e,H as Le,a as we,d as ie,w as Re,a4 as Ae,n as Be,p as Ue}from"./ButtonGroup-CDfFQwRa.js";import{M as pe,c as g,d as x,v as $e,T as me,b as Ee,I as _,W as He}from"./BlockStack-BTbdzvrd.js";import{S as je,F as We}from"./context-B1nA-z-t.js";import{a as L}from"./index-uSCF9Zne.js";import{S as Ge}from"./XIcon.svg-D4Qme5bL.js";import{I as Ve}from"./InlineGrid-DgcYQxhx.js";var W={Backdrop:"Polaris-Backdrop",transparent:"Polaris-Backdrop--transparent",belowNavigation:"Polaris-Backdrop--belowNavigation"};function ze(){const n=d.useContext(je);if(!n)throw new pe("No ScrollLockManager was provided.");return n}function Xe(n){const a=ze();return d.useEffect(()=>(a.registerScrollLock(),()=>{a.unregisterScrollLock()}),[a]),null}function Ke(n){const{onClick:a,onTouchStart:l,belowNavigation:e,transparent:r,setClosing:t}=n,s=g(W.Backdrop,e&&W.belowNavigation,r&&W.transparent),i=()=>{t&&t(!0)},o=()=>{t&&t(!1),a&&a()};return c.createElement(c.Fragment,null,c.createElement(Xe,null),c.createElement("div",{className:s,onClick:o,onTouchStart:l,onMouseDown:i}))}const qe=d.createContext(void 0),Ye=d.memo(function({children:a,disabled:l,root:e}){return d.useEffect(()=>{if(l||!e)return;const r=Je(e)?e.current:e;!r||r.querySelector("[autofocus]")||A(r,!1)},[l,e]),c.createElement(c.Fragment,null,a)});function Je(n){return n.current!==void 0}function w(){return w=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var e in l)({}).hasOwnProperty.call(l,e)&&(n[e]=l[e])}return n},w.apply(null,arguments)}function Y(n,a){if(n==null)return{};var l={};for(var e in n)if({}.hasOwnProperty.call(n,e)){if(a.includes(e))continue;l[e]=n[e]}return l}function K(n,a){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,e){return l.__proto__=e,l},K(n,a)}function J(n,a){n.prototype=Object.create(a.prototype),n.prototype.constructor=n,K(n,a)}function Qe(n,a){return n.classList?!!a&&n.classList.contains(a):(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+a+" ")!==-1}function Ze(n,a){n.classList?n.classList.add(a):Qe(n,a)||(typeof n.className=="string"?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a))}function oe(n,a){return n.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function et(n,a){n.classList?n.classList.remove(a):typeof n.className=="string"?n.className=oe(n.className,a):n.setAttribute("class",oe(n.className&&n.className.baseVal||"",a))}const le={disabled:!1},R=c.createContext(null);var he=function(a){return a.scrollTop},I="unmounted",N="exited",S="entering",T="entered",q="exiting",v=function(n){J(a,n);function a(e,r){var t;t=n.call(this,e,r)||this;var s=r,i=s&&!s.isMounting?e.enter:e.appear,o;return t.appearStatus=null,e.in?i?(o=N,t.appearStatus=S):o=T:e.unmountOnExit||e.mountOnEnter?o=I:o=N,t.state={status:o},t.nextCallback=null,t}a.getDerivedStateFromProps=function(r,t){var s=r.in;return s&&t.status===I?{status:N}:null};var l=a.prototype;return l.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},l.componentDidUpdate=function(r){var t=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==S&&s!==T&&(t=S):(s===S||s===T)&&(t=q)}this.updateStatus(!1,t)},l.componentWillUnmount=function(){this.cancelNextCallback()},l.getTimeouts=function(){var r=this.props.timeout,t,s,i;return t=s=i=r,r!=null&&typeof r!="number"&&(t=r.exit,s=r.enter,i=r.appear!==void 0?r.appear:s),{exit:t,enter:s,appear:i}},l.updateStatus=function(r,t){if(r===void 0&&(r=!1),t!==null)if(this.cancelNextCallback(),t===S){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:L.findDOMNode(this);s&&he(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===N&&this.setState({status:I})},l.performEnter=function(r){var t=this,s=this.props.enter,i=this.context?this.context.isMounting:r,o=this.props.nodeRef?[i]:[L.findDOMNode(this),i],u=o[0],f=o[1],E=this.getTimeouts(),p=i?E.appear:E.enter;if(!r&&!s||le.disabled){this.safeSetState({status:T},function(){t.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:S},function(){t.props.onEntering(u,f),t.onTransitionEnd(p,function(){t.safeSetState({status:T},function(){t.props.onEntered(u,f)})})})},l.performExit=function(){var r=this,t=this.props.exit,s=this.getTimeouts(),i=this.props.nodeRef?void 0:L.findDOMNode(this);if(!t||le.disabled){this.safeSetState({status:N},function(){r.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:q},function(){r.props.onExiting(i),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:N},function(){r.props.onExited(i)})})})},l.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},l.safeSetState=function(r,t){t=this.setNextCallback(t),this.setState(r,t)},l.setNextCallback=function(r){var t=this,s=!0;return this.nextCallback=function(i){s&&(s=!1,t.nextCallback=null,r(i))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},l.onTransitionEnd=function(r,t){this.setNextCallback(t);var s=this.props.nodeRef?this.props.nodeRef.current:L.findDOMNode(this),i=r==null&&!this.props.addEndListener;if(!s||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=o[0],f=o[1];this.props.addEndListener(u,f)}r!=null&&setTimeout(this.nextCallback,r)},l.render=function(){var r=this.state.status;if(r===I)return null;var t=this.props,s=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var i=Y(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return c.createElement(R.Provider,{value:null},typeof s=="function"?s(r,i):c.cloneElement(c.Children.only(s),i))},a}(c.Component);v.contextType=R;v.propTypes={};function y(){}v.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:y,onEntering:y,onEntered:y,onExit:y,onExiting:y,onExited:y};v.UNMOUNTED=I;v.EXITED=N;v.ENTERING=S;v.ENTERED=T;v.EXITING=q;var tt=function(a,l){return a&&l&&l.split(" ").forEach(function(e){return Ze(a,e)})},G=function(a,l){return a&&l&&l.split(" ").forEach(function(e){return et(a,e)})},Q=function(n){J(a,n);function a(){for(var e,r=arguments.length,t=new Array(r),s=0;s<r;s++)t[s]=arguments[s];return e=n.call.apply(n,[this].concat(t))||this,e.appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(i,o){var u=e.resolveArguments(i,o),f=u[0],E=u[1];e.removeClasses(f,"exit"),e.addClass(f,E?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(i,o)},e.onEntering=function(i,o){var u=e.resolveArguments(i,o),f=u[0],E=u[1],p=E?"appear":"enter";e.addClass(f,p,"active"),e.props.onEntering&&e.props.onEntering(i,o)},e.onEntered=function(i,o){var u=e.resolveArguments(i,o),f=u[0],E=u[1],p=E?"appear":"enter";e.removeClasses(f,p),e.addClass(f,p,"done"),e.props.onEntered&&e.props.onEntered(i,o)},e.onExit=function(i){var o=e.resolveArguments(i),u=o[0];e.removeClasses(u,"appear"),e.removeClasses(u,"enter"),e.addClass(u,"exit","base"),e.props.onExit&&e.props.onExit(i)},e.onExiting=function(i){var o=e.resolveArguments(i),u=o[0];e.addClass(u,"exit","active"),e.props.onExiting&&e.props.onExiting(i)},e.onExited=function(i){var o=e.resolveArguments(i),u=o[0];e.removeClasses(u,"exit"),e.addClass(u,"exit","done"),e.props.onExited&&e.props.onExited(i)},e.resolveArguments=function(i,o){return e.props.nodeRef?[e.props.nodeRef.current,i]:[i,o]},e.getClassNames=function(i){var o=e.props.classNames,u=typeof o=="string",f=u&&o?o+"-":"",E=u?""+f+i:o[i],p=u?E+"-active":o[i+"Active"],C=u?E+"-done":o[i+"Done"];return{baseClassName:E,activeClassName:p,doneClassName:C}},e}var l=a.prototype;return l.addClass=function(r,t,s){var i=this.getClassNames(t)[s+"ClassName"],o=this.getClassNames("enter"),u=o.doneClassName;t==="appear"&&s==="done"&&u&&(i+=" "+u),s==="active"&&r&&he(r),i&&(this.appliedClasses[t][s]=i,tt(r,i))},l.removeClasses=function(r,t){var s=this.appliedClasses[t],i=s.base,o=s.active,u=s.done;this.appliedClasses[t]={},i&&G(r,i),o&&G(r,o),u&&G(r,u)},l.render=function(){var r=this.props;r.classNames;var t=Y(r,["classNames"]);return c.createElement(v,w({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},a}(c.Component);Q.defaultProps={classNames:""};Q.propTypes={};function nt(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Z(n,a){var l=function(t){return a&&d.isValidElement(t)?a(t):t},e=Object.create(null);return n&&d.Children.map(n,function(r){return r}).forEach(function(r){e[r.key]=l(r)}),e}function rt(n,a){n=n||{},a=a||{};function l(f){return f in a?a[f]:n[f]}var e=Object.create(null),r=[];for(var t in n)t in a?r.length&&(e[t]=r,r=[]):r.push(t);var s,i={};for(var o in a){if(e[o])for(s=0;s<e[o].length;s++){var u=e[o][s];i[e[o][s]]=l(u)}i[o]=l(o)}for(s=0;s<r.length;s++)i[r[s]]=l(r[s]);return i}function M(n,a,l){return l[a]!=null?l[a]:n.props[a]}function at(n,a){return Z(n.children,function(l){return d.cloneElement(l,{onExited:a.bind(null,l),in:!0,appear:M(l,"appear",n),enter:M(l,"enter",n),exit:M(l,"exit",n)})})}function st(n,a,l){var e=Z(n.children),r=rt(a,e);return Object.keys(r).forEach(function(t){var s=r[t];if(d.isValidElement(s)){var i=t in a,o=t in e,u=a[t],f=d.isValidElement(u)&&!u.props.in;o&&(!i||f)?r[t]=d.cloneElement(s,{onExited:l.bind(null,s),in:!0,exit:M(s,"exit",n),enter:M(s,"enter",n)}):!o&&i&&!f?r[t]=d.cloneElement(s,{in:!1}):o&&i&&d.isValidElement(u)&&(r[t]=d.cloneElement(s,{onExited:l.bind(null,s),in:u.props.in,exit:M(s,"exit",n),enter:M(s,"enter",n)}))}}),r}var it=Object.values||function(n){return Object.keys(n).map(function(a){return n[a]})},ot={component:"div",childFactory:function(a){return a}},ee=function(n){J(a,n);function a(e,r){var t;t=n.call(this,e,r)||this;var s=t.handleExited.bind(nt(t));return t.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},t}var l=a.prototype;return l.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},l.componentWillUnmount=function(){this.mounted=!1},a.getDerivedStateFromProps=function(r,t){var s=t.children,i=t.handleExited,o=t.firstRender;return{children:o?at(r,i):st(r,s,i),firstRender:!1}},l.handleExited=function(r,t){var s=Z(this.props.children);r.key in s||(r.props.onExited&&r.props.onExited(t),this.mounted&&this.setState(function(i){var o=w({},i.children);return delete o[r.key],{children:o}}))},l.render=function(){var r=this.props,t=r.component,s=r.childFactory,i=Y(r,["component","childFactory"]),o=this.state.contextValue,u=it(this.state.children).map(s);return delete i.appear,delete i.enter,delete i.exit,t===null?c.createElement(R.Provider,{value:o},u):c.createElement(R.Provider,{value:o},c.createElement(t,i,u))},a}(c.Component);ee.propTypes={};ee.defaultProps=ot;var V={Body:"Polaris-Modal__Body",NoScrollBody:"Polaris-Modal__NoScrollBody",IFrame:"Polaris-Modal__IFrame"},ce={Section:"Polaris-Modal-Section",titleHidden:"Polaris-Modal-Section--titleHidden"};function ve({children:n,flush:a=!1,subdued:l=!1,titleHidden:e=!1}){const r=g(ce.Section,e&&ce.titleHidden);return c.createElement("div",{className:r},c.createElement(x,Object.assign({as:"section",padding:a?"0":"400"},e&&{paddingInlineEnd:"0"},l&&{background:"bg-surface-tertiary"}),n))}var m={Container:"Polaris-Modal-Dialog__Container",Dialog:"Polaris-Modal-Dialog",Modal:"Polaris-Modal-Dialog__Modal",limitHeight:"Polaris-Modal-Dialog--limitHeight",sizeSmall:"Polaris-Modal-Dialog--sizeSmall",sizeLarge:"Polaris-Modal-Dialog--sizeLarge",sizeFullScreen:"Polaris-Modal-Dialog--sizeFullScreen",animateFadeUp:"Polaris-Modal-Dialog--animateFadeUp",entering:"Polaris-Modal-Dialog--entering",exiting:"Polaris-Modal-Dialog--exiting",exited:"Polaris-Modal-Dialog--exited",entered:"Polaris-Modal-Dialog--entered"};function lt({trapping:n}){const a=d.useContext(We),l=d.useId();if(!a)throw new pe("No FocusManager was provided.");const{trapFocusList:e,add:r,remove:t}=a,s=e[0]===l,i=d.useMemo(()=>({canSafelyFocus:s}),[s]);return d.useEffect(()=>{if(n)return r(l),()=>{t(l)}},[r,l,t,n]),i}function ct({trapping:n=!0,children:a}){const{canSafelyFocus:l}=lt({trapping:n}),e=d.useRef(null),[r,t]=d.useState(!0);d.useEffect(()=>{const o=l&&!(e.current&&e.current.contains(document.activeElement))?!n:!0;t(o)},[l,n]);const s=o=>{const u=e.current&&e.current.contains(document.activeElement);n===!1||!e.current||u||o.target instanceof Element&&o.target.matches(`${De.selector} *`)||l&&o.target instanceof HTMLElement&&e.current!==o.target&&!e.current.contains(o.target)&&A(e.current)},i=o=>{if(n===!1||!e.current)return;const u=Pe(e.current),f=Oe(e.current);o.target===f&&!o.shiftKey&&(o.preventDefault(),Ie(e.current)),o.target===u&&o.shiftKey&&(o.preventDefault(),_e(e.current))};return c.createElement(Ye,{disabled:r,root:e.current},c.createElement("div",{ref:e},c.createElement(Te,{event:"focusin",handler:s}),c.createElement(z,{keyCode:X.Tab,keyEvent:"keydown",handler:i}),a))}function ut({instant:n,labelledBy:a,children:l,limitHeight:e,size:r,onClose:t,onExited:s,onEntered:i,setClosing:o,hasToasts:u,...f}){const E=Le(),p=d.useRef(null),C=d.useContext(qe);let k;C&&(k=C.toastMessages);const B=g(m.Modal,r&&m[$e("size",r)],e&&m.limitHeight),h=n?v:ft;d.useEffect(()=>{p.current&&!p.current.contains(document.activeElement)&&A(p.current)},[]);const U=()=>{o&&o(!0)},D=()=>{o&&o(!1),t()},P=c.createElement("div",{"aria-live":"assertive"},k?k.map(F=>c.createElement(me,{visuallyHidden:!0,as:"p",key:F.id},F.content)):null);return c.createElement(h,Object.assign({},f,{nodeRef:p,mountOnEnter:!0,unmountOnExit:!0,timeout:parseInt(E.motion["motion-duration-200"],10),onEntered:i,onExited:s}),c.createElement("div",{className:m.Container,"data-polaris-layer":!0,"data-polaris-overlay":!0,ref:p},c.createElement(ct,null,c.createElement("div",{role:"dialog","aria-modal":!0,"aria-label":a,"aria-labelledby":a,tabIndex:-1,className:m.Dialog},c.createElement("div",{className:B},c.createElement(z,{keyCode:X.Escape,keyEvent:"keydown",handler:U}),c.createElement(z,{keyCode:X.Escape,handler:D}),l),P))))}const dt={appear:g(m.animateFadeUp,m.entering),appearActive:g(m.animateFadeUp,m.entered),enter:g(m.animateFadeUp,m.entering),enterActive:g(m.animateFadeUp,m.entered),exit:g(m.animateFadeUp,m.exiting),exitActive:g(m.animateFadeUp,m.exited)};function ft({children:n,...a}){return c.createElement(Q,Object.assign({},a,{classNames:dt}),n)}function ue({pressed:n,onClick:a}){const l=Ee();return c.createElement(we,{variant:"tertiary",pressed:n,icon:Ge,onClick:a,accessibilityLabel:l.translate("Polaris.Common.close")})}function pt({id:n,children:a,closing:l,titleHidden:e,onClose:r}){const t="400",s="400";return e||!a?c.createElement(x,{position:"absolute",insetInlineEnd:t,insetBlockStart:s,zIndex:"1"},c.createElement(ue,{onClick:r})):c.createElement(x,{paddingBlockStart:"400",paddingBlockEnd:"400",paddingInlineStart:t,paddingInlineEnd:t,borderBlockEndWidth:"025",borderColor:"border",background:"bg-surface-tertiary"},c.createElement(Ve,{columns:{xs:"1fr auto"},gap:"400"},c.createElement(_,{gap:"400",blockAlign:"center"},c.createElement(me,{id:n,as:"h2",variant:"headingMd",breakWord:!0},a)),c.createElement(ue,{pressed:l,onClick:r})))}function mt({primaryAction:n,secondaryActions:a,children:l}){const e=n&&ie(n,{variant:"primary"})||null,r=a&&ie(a)||null,t=e||r?c.createElement(_,{gap:"200"},r,e):null;return c.createElement(_,{gap:"400",blockAlign:"center"},c.createElement(x,{borderColor:"border",borderBlockStartWidth:"025",padding:"400",width:"100%"},c.createElement(_,{gap:"400",blockAlign:"center",align:"space-between"},c.createElement(x,null,l),t)))}const de=200,Et=400,ht=function({children:a,title:l,titleHidden:e=!1,src:r,iFrameName:t,open:s,instant:i,sectioned:o,loading:u,size:f,limitHeight:E,footer:p,primaryAction:C,secondaryActions:k,onScrolledToBottom:B,activator:h,activatorWrapper:U="div",onClose:D,onIFrameLoad:P,onTransitionEnd:F,noScroll:ge}){const[xe,$]=d.useState(de),[Ce,te]=d.useState(!1),ne=d.useId(),re=d.useRef(null),be=Ee().translate("Polaris.Modal.iFrameTitle");let ae,se;const Ne=d.useCallback(()=>{F&&F()},[F]),Se=d.useCallback(()=>{$(de);const b=h&&fe(h)?h&&h.current:re.current;b&&requestAnimationFrame(()=>A(b))},[h]),Me=d.useCallback(b=>{const O=b.target;if(O&&O.contentWindow)try{$(O.contentWindow.document.body.scrollHeight)}catch{$(Et)}P!=null&&P(b)},[P]);if(s){const b=!p&&!C&&!k?null:c.createElement(mt,{primaryAction:C,secondaryActions:k},p),O=o?Re(a,ve,{titleHidden:e}):a,j=u?c.createElement(x,{padding:"400"},c.createElement(_,{gap:"400",align:"center",blockAlign:"center"},c.createElement(Ue,null))):O,Fe=ge?c.createElement("div",{className:V.NoScrollBody},c.createElement(x,{width:"100%",overflowX:"hidden",overflowY:"hidden"},j)):c.createElement(Be,{shadow:!0,className:V.Body,onScrolledToBottom:B},j),ye=r?c.createElement("iframe",{name:t,title:be,src:r,className:V.IFrame,onLoad:Me,style:{height:`${xe}px`}}):Fe;ae=c.createElement(ut,{instant:i,labelledBy:ne,onClose:D,onEntered:Ne,onExited:Se,size:f,limitHeight:E,setClosing:te},c.createElement(pt,{titleHidden:e,id:ne,closing:Ce,onClose:D},l),ye,b),se=c.createElement(Ke,{setClosing:te,onClick:D})}const H=!i,ke=h&&!fe(h)?c.createElement(x,{ref:re,as:U},h):null;return c.createElement(He.Provider,{value:!0},ke,c.createElement(Ae,{idPrefix:"modal"},c.createElement(ee,{appear:H,enter:H,exit:H},ae),se))};function fe(n){return Object.prototype.hasOwnProperty.call(n,"current")}ht.Section=ve;export{Q as C,qe as F,ht as M,v as T,Y as _,w as a};