芝麻web文件管理V1.00
编辑当前文件:/home/felaukpo/public_html/wp-content/plugins/suretriggers/app/build/main.js
!function(){var e,t={813:function(e,t,n){"use strict";var r=window.wp.element,a=n(196),o=n.n(a),i=window.ReactDOM,s=n.n(i);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,d,m,f,p,g=["type"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t
=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var L;function R(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in
and the router will parse it for you.'}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(L||(L={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class A extends Error{}const M=["post","put","patch","delete"],D=(new Set(M),["get",...M]);function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t
{n.current=!0})),a.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,I({fromRouteId:t},a)))}),[e,t])}():function(){z()||C(!1);let{basename:e,navigator:t}=a.useContext(U),{matches:n}=a.useContext(W),{pathname:r}=(z()||C(!1),a.useContext(F).location),o=JSON.stringify(function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(n).map((e=>e.pathnameBase))),i=a.useRef(!1);return H((()=>{i.current=!0})),a.useCallback((function(n,a){if(void 0===a&&(a={}),!i.current)return;if("number"==typeof n)return void t.go(n);let s=function(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=S(e):(a=k({},e),C(!a.pathname||!a.pathname.includes("?"),R("?","pathname","search",a)),C(!a.pathname||!a.pathname.includes("#"),R("#","pathname","hash",a)),C(!a.search||!a.search.includes("#"),R("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(r||null==s)o=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?S(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:P(r),hash:j(a)}}(a,o),c=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}(n,JSON.parse(o),r,"path"===a.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:[e,s.pathname].join("/").replace(/\/\/+/g,"/")),(a.replace?t.replace:t.push)(s,a.state,a)}),[e,t,o,r])}()}class q extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?React.createElement(W.Provider,{value:this.props.routeContext},React.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}var G,$,V,Y,Z;function Q(e){let{basename:t="/",children:n=null,location:r,navigationType:o=y.Pop,navigator:i,static:s=!1}=e;z()&&C(!1);let l=t.replace(/^\/*/,"/"),c=a.useMemo((()=>({basename:l,navigator:i,static:s})),[l,i,s]);"string"==typeof r&&(r=S(r));let{pathname:u="/",search:d="",hash:m="",state:f=null,key:p="default"}=r,g=a.useMemo((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(u,l);return null==e?null:{location:{pathname:e,search:d,hash:m,state:f,key:p},navigationType:o}}),[l,u,d,m,f,p,o]);return null==g?null:a.createElement(U.Provider,{value:c},a.createElement(F.Provider,{children:n,value:g}))}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(G||(G={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}($||($={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(V||(V={})),new Promise((()=>{}));class X extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("
caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,a=V.pending;if(n instanceof Promise)if(this.state.error){V.error;let e=this.state.error;Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?void 0!==r._error?V.error:void 0!==r._data?V.success:V.pending:(V.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else V.success,Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(a===V.error&&r._error instanceof AbortedDeferredError)throw neverSettledPromise;if(a===V.error&&!t)throw r._error;if(a===V.error)return React.createElement(AwaitContext.Provider,{value:r,children:t});if(a===V.success)return React.createElement(AwaitContext.Provider,{value:r,children:e});throw r}}function J(e){let{basename:t,children:n,window:r}=e,o=a.useRef();var i;null==o.current&&(o.current=(void 0===(i={window:r,v5Compat:!0})&&(i={}),function(e,t,n,r){void 0===r&&(r={});let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,s=y.Pop,l=null,c=u();function u(){return(i.state||{idx:null}).idx}function d(){s=y.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function m(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:T(e);return C(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,i.replaceState(k({},i.state,{idx:c}),""));let f={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(N,d),l=e,()=>{a.removeEventListener(N,d),l=null}},createHref(e){return t(a,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=y.Push;let r=_(f.location,e,t);n&&n(r,e),c=u()+1;let d=O(r,c),m=f.createHref(r);try{i.pushState(d,"",m)}catch(e){a.location.assign(m)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s=y.Replace;let r=_(f.location,e,t);n&&n(r,e),c=u();let a=O(r,c),d=f.createHref(r);i.replaceState(a,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go(e){return i.go(e)}};return f}((function(e,t){let{pathname:n,search:r,hash:a}=e.location;return _("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:T(t)}),null,i)));let s=o.current,[l,c]=a.useState({action:s.action,location:s.location});return a.useLayoutEffect((()=>s.listen(c)),[s]),a.createElement(Q,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s})}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n
=0||(a[n]=e[n]);return a}function se(e){return"number"==typeof e&&!isNaN(e)}function le(e){return"boolean"==typeof e}function ce(e){return"string"==typeof e}function ue(e){return"function"==typeof e}function de(e){return ce(e)||ue(e)?e:null}function me(e){return 0===e||e}var fe=!("undefined"==typeof window||!window.document||!window.document.createElement);function pe(e){return(0,a.isValidElement)(e)||ce(e)||ue(e)||se(e)}var ge={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},he={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function ve(e){var t=e.enter,n=e.exit,r=e.appendPosition,i=void 0!==r&&r,s=e.collapse,l=void 0===s||s,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,s=e.position,c=e.preventExitTransition,d=e.done,m=e.nodeRef,f=e.isIn,p=i?t+"--"+s:t,g=i?n+"--"+s:n,h=(0,a.useRef)(),v=(0,a.useRef)(0);function y(e){if(e.target===m.current){var t=m.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",y),t.removeEventListener("animationcancel",y),0===v.current&&(t.className=h.current)}}function b(){var e=m.current;e.removeEventListener("animationend",b),l?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=r+"px",a.transition="all "+n+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)}))}))}(e,d,u):d()}return(0,a.useLayoutEffect)((function(){var e;e=m.current,h.current=e.className,e.className+=" "+p,e.addEventListener("animationend",y),e.addEventListener("animationcancel",y)}),[]),(0,a.useEffect)((function(){f||(c?b():function(){v.current=1;var e=m.current;e.className+=" "+g,e.addEventListener("animationend",b)}())}),[f]),o().createElement(o().Fragment,null,r)}}var ye={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a
=1?e.targetTouches[0].clientX:e.clientX}function Ee(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function xe(e){var t=e.closeToast,n=e.theme,r=e.ariaLabel,o=void 0===r?"close":r;return(0,a.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},(0,a.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function ke(e){var t,n,r=e.delay,o=e.isRunning,i=e.closeToast,s=e.type,l=e.hide,c=e.className,u=e.style,d=e.controlledProgress,m=e.progress,f=e.rtl,p=e.isIn,g=e.theme,h=oe({},u,{animationDuration:r+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(h.transform="scaleX("+m+")");var v=ae("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+g,"Toastify__progress-bar--"+s,((t={})["Toastify__progress-bar--rtl"]=f,t)),y=ue(c)?c({rtl:f,type:s,defaultClassName:v}):ae(v,c),b=((n={})[d&&m>=1?"onTransitionEnd":"onAnimationEnd"]=d&&m<1?null:function(){p&&i()},n);return(0,a.createElement)("div",Object.assign({role:"progressbar","aria-hidden":l?"true":"false","aria-label":"notification timer",className:y,style:h},b))}ke.defaultProps={type:he.DEFAULT,hide:!1};var Ne=["theme","type"],Ce=function(e){var t=e.theme,n=e.type,r=ie(e,Ne);return(0,a.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+n+")"},r))},Oe={info:function(e){return(0,a.createElement)(Ce,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,a.createElement)(Ce,Object.assign({},e),(0,a.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,a.createElement)(Ce,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return(0,a.createElement)(Ce,Object.assign({},e),(0,a.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return(0,a.createElement)("div",{className:"Toastify__spinner"})}},_e=function(e){var t,n,r=function(e){var t=(0,a.useState)(!1),n=t[0],r=t[1],o=(0,a.useState)(!1),i=o[0],s=o[1],l=(0,a.useRef)(null),c=(0,a.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=(0,a.useRef)(e),d=e.autoClose,m=e.pauseOnHover,f=e.closeToast,p=e.onClick,g=e.closeOnClick;function h(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",w),document.addEventListener("mouseup",E),document.addEventListener("touchmove",w),document.addEventListener("touchend",E);var n=l.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=we(t.nativeEvent),c.y=Ee(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function v(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,a=t.left,o=t.right;e.pauseOnHover&&c.x>=a&&c.x<=o&&c.y>=n&&c.y<=r?b():y()}}function y(){r(!0)}function b(){r(!1)}function w(t){var r=l.current;c.canDrag&&r&&(c.didMove=!0,n&&b(),c.x=we(t),c.y=Ee(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),r.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",r.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function E(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",E);var t=l.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,a.useEffect)((function(){u.current=e})),(0,a.useEffect)((function(){return l.current&&l.current.addEventListener("d",y,{once:!0}),ue(e.onOpen)&&e.onOpen((0,a.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;ue(e.onClose)&&e.onClose((0,a.isValidElement)(e.children)&&e.children.props)}}),[]),(0,a.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",b))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:h,onTouchStart:h,onMouseUp:v,onTouchEnd:v};return d&&m&&(x.onMouseEnter=b,x.onMouseLeave=y),g&&(x.onClick=function(e){p&&p(e),c.canCloseOnClick&&f()}),{playToast:y,pauseToast:b,isRunning:n,preventExitTransition:i,toastRef:l,eventHandlers:x}}(e),o=r.isRunning,i=r.preventExitTransition,s=r.toastRef,l=r.eventHandlers,c=e.closeButton,u=e.children,d=e.autoClose,m=e.onClick,f=e.type,p=e.hideProgressBar,g=e.closeToast,h=e.transition,v=e.position,y=e.className,b=e.style,w=e.bodyClassName,E=e.bodyStyle,x=e.progressClassName,k=e.progressStyle,N=e.updateId,C=e.role,O=e.progress,_=e.rtl,T=e.toastId,S=e.deleteToast,L=e.isIn,R=e.isLoading,P=e.icon,j=e.theme,A=ae("Toastify__toast","Toastify__toast-theme--"+j,"Toastify__toast--"+f,((t={})["Toastify__toast--rtl"]=_,t)),M=ue(y)?y({rtl:_,position:v,type:f,defaultClassName:A}):ae(A,y),D=!!O,I=Oe[f],B={theme:j,type:f},U=I&&I(B);return!1===P?U=void 0:ue(P)?U=P(B):(0,a.isValidElement)(P)?U=(0,a.cloneElement)(P,B):ce(P)?U=P:R&&(U=Oe.spinner()),(0,a.createElement)(h,{isIn:L,done:S,position:v,preventExitTransition:i,nodeRef:s},(0,a.createElement)("div",Object.assign({id:T,onClick:m,className:M},l,{style:b,ref:s}),(0,a.createElement)("div",Object.assign({},L&&{role:C},{className:ue(w)?w({type:f}):ae("Toastify__toast-body",w),style:E}),U&&(0,a.createElement)("div",{className:ae("Toastify__toast-icon",(n={},n["Toastify--animate-icon Toastify__zoom-enter"]=!R,n))},U),(0,a.createElement)("div",null,u)),function(e){if(e){var t={closeToast:g,type:f,theme:j};return ue(e)?e(t):(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t):void 0}}(c),(d||D)&&(0,a.createElement)(ke,Object.assign({},N&&!D?{key:"pb-"+N}:{},{rtl:_,theme:j,delay:d,isRunning:o,isIn:L,closeToast:g,hide:p,type:f,style:k,className:x,controlledProgress:D,progress:O}))))},Te=ve({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),Se=function(e){var t=function(e){var t=(0,a.useReducer)((function(e){return e+1}),0)[1],n=(0,a.useState)([]),r=n[0],o=n[1],i=(0,a.useRef)(null),s=(0,a.useRef)(new Map).current,l=function(e){return-1!==r.indexOf(e)},c=(0,a.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:function(e){return s.get(e)}}).current;function u(e){var t=e.containerId;!c.props.limit||t&&c.containerId!==t||(c.count-=c.queue.length,c.queue=[])}function d(e){o((function(t){return me(e)?t.filter((function(t){return t!==e})):[]}))}function m(){var e=c.queue.shift();p(e.toastContent,e.toastProps,e.staleId)}function f(e,n){var r=n.delay,o=n.staleId,l=ie(n,be);if(pe(e)&&!function(e){return!i.current||c.props.enableMultiContainer&&e.containerId!==c.props.containerId||s.has(e.toastId)&&null==e.updateId}(l)){var u=l.toastId,f=l.updateId,g=l.data,h=c.props,v=function(){return d(u)},y=null==f;y&&c.count++;var b,w,E={toastId:u,updateId:f,isLoading:l.isLoading,theme:l.theme||h.theme,icon:null!=l.icon?l.icon:h.icon,isIn:!1,key:l.key||c.toastKey++,type:l.type,closeToast:v,closeButton:l.closeButton,rtl:h.rtl,position:l.position||h.position,transition:l.transition||h.transition,className:de(l.className||h.toastClassName),bodyClassName:de(l.bodyClassName||h.bodyClassName),style:l.style||h.toastStyle,bodyStyle:l.bodyStyle||h.bodyStyle,onClick:l.onClick||h.onClick,pauseOnHover:le(l.pauseOnHover)?l.pauseOnHover:h.pauseOnHover,pauseOnFocusLoss:le(l.pauseOnFocusLoss)?l.pauseOnFocusLoss:h.pauseOnFocusLoss,draggable:le(l.draggable)?l.draggable:h.draggable,draggablePercent:l.draggablePercent||h.draggablePercent,draggableDirection:l.draggableDirection||h.draggableDirection,closeOnClick:le(l.closeOnClick)?l.closeOnClick:h.closeOnClick,progressClassName:de(l.progressClassName||h.progressClassName),progressStyle:l.progressStyle||h.progressStyle,autoClose:!l.isLoading&&(b=l.autoClose,w=h.autoClose,!1===b||se(b)&&b>0?b:w),hideProgressBar:le(l.hideProgressBar)?l.hideProgressBar:h.hideProgressBar,progress:l.progress,role:l.role||h.role,deleteToast:function(){s.delete(u);var e=c.queue.length;if(c.count=me(u)?c.count-1:c.count-c.displayedToast,c.count<0&&(c.count=0),e>0){var n=me(u)?1:c.props.limit;if(1===e||1===n)c.displayedToast++,m();else{var r=n>e?e:n;c.displayedToast=r;for(var a=0;a
0&&c.count>h.limit&&y?c.queue.push({toastContent:x,toastProps:E,staleId:o}):se(r)&&r>0?setTimeout((function(){p(x,E,o)}),r):p(x,E,o)}}function p(e,t,n){var r=t.toastId;n&&s.delete(n),s.set(r,{content:e,props:t}),o((function(e){return[].concat(e,[r]).filter((function(e){return e!==n}))}))}return(0,a.useEffect)((function(){return c.containerId=e.containerId,ye.cancelEmit(3).on(0,f).on(1,(function(e){return i.current&&d(e)})).on(5,u).emit(2,c),function(){return ye.emit(3,c)}}),[]),(0,a.useEffect)((function(){c.isToastActive=l,c.displayedToast=r.length,ye.emit(4,r.length,e.containerId)}),[r]),(0,a.useEffect)((function(){c.props=e})),{getToastToRender:function(t){var n=new Map,r=Array.from(s.values());return e.newestOnTop&&r.reverse(),r.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:i,isToastActive:l}}(e),n=t.getToastToRender,r=t.containerRef,o=t.isToastActive,i=e.className,s=e.style,l=e.rtl,c=e.containerId;function u(e){var t,n=ae("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return ue(i)?i({position:e,rtl:l,defaultClassName:n}):ae(n,de(i))}return(0,a.createElement)("div",{ref:r,className:"Toastify",id:c},n((function(e,t){var n=t.length?oe({},s):oe({},s,{pointerEvents:"none"});return(0,a.createElement)("div",{className:u(e),style:n,key:"container-"+e},t.map((function(e){var t=e.content,n=e.props;return(0,a.createElement)(_e,Object.assign({},n,{isIn:o(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?xe:n.closeButton}),t)})))})))};Se.defaultProps={position:ge.TOP_RIGHT,transition:Te,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:xe,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Le,Re,Pe,je=new Map,Ae=[],Me=!1;function De(){return Math.random().toString(36).substring(2,9)}function Ie(e){return e&&(ce(e.toastId)||se(e.toastId))?e.toastId:De()}function Be(e,t){return je.size>0?ye.emit(0,e,t):(Ae.push({content:e,options:t}),Me&&fe&&(Me=!1,Re=document.createElement("div"),document.body.appendChild(Re),(0,i.render)((0,a.createElement)(Se,Object.assign({},Pe)),Re))),t.toastId}function Ue(e,t){return oe({},t,{type:t&&t.type||e,toastId:Ie(t)})}function Fe(e){return function(t,n){return Be(t,Ue(e,n))}}function We(e,t){return Be(e,Ue(he.DEFAULT,t))}We.loading=function(e,t){return Be(e,Ue(he.DEFAULT,oe({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},We.promise=function(e,t,n){var r,a=t.pending,o=t.error,i=t.success;a&&(r=ce(a)?We.loading(a,n):We.loading(a.render,oe({},n,a)));var s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=function(e,t,a){if(null!=t){var o=oe({type:e},s,n,{data:a}),i=ce(t)?{render:t}:t;return r?We.update(r,oe({},o,i)):We(i.render,oe({},o,i)),a}We.dismiss(r)},c=ue(e)?e():e;return c.then((function(e){return l("success",i,e)})).catch((function(e){return l("error",o,e)})),c},We.success=Fe(he.SUCCESS),We.info=Fe(he.INFO),We.error=Fe(he.ERROR),We.warning=Fe(he.WARNING),We.warn=We.warning,We.dark=function(e,t){return Be(e,Ue(he.DEFAULT,oe({theme:"dark"},t)))},We.dismiss=function(e){return ye.emit(1,e)},We.clearWaitingQueue=function(e){return void 0===e&&(e={}),ye.emit(5,e)},We.isActive=function(e){var t=!1;return je.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},We.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=je.get(n||Le);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,a=n.content,o=oe({},r,t,{toastId:t.toastId||e,updateId:De()});o.toastId!==e&&(o.staleId=e);var i=o.render||a;delete o.render,Be(i,o)}}),0)},We.done=function(e){We.update(e,{progress:1})},We.onChange=function(e){return ue(e)&&ye.on(4,e),function(){ue(e)&&ye.off(4,e)}},We.configure=function(e){void 0===e&&(e={}),Me=!0,Pe=e},We.POSITION=ge,We.TYPE=he,ye.on(2,(function(e){Le=e.containerId||e,je.set(Le,e),Ae.forEach((function(e){ye.emit(0,e.content,e.options)})),Ae=[]})).on(3,(function(e){je.delete(e.containerId||e),0===je.size&&ye.off(0).off(1).off(5),fe&&Re&&document.body.removeChild(Re)}));var ze=window.wp.apiFetch,He=n.n(ze),Ke=window.wp.i18n;function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n
=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(a.s();!(n=a.n()).done;){var o=ne(n.value,2),i=o[0],s=o[1];if("page"===i){var l="".concat(i,"=").concat(s);r.push(l)}}}catch(e){a.e(e)}finally{a.f()}return r.toString()}(0,t);e(window.location.pathname+"?"+r)}),[]);var s=sureTriggerData.siteContent,l=s.connectUrl,c=s.connectNonce,u=s.siteUrl,d=s.siteTitle,m=s.sourceType,f=(s.adminLanguage,(sureTriggerData.stSaasURL?new URL(sureTriggerData.stSaasURL):{}).origin);return window.addEventListener("message",(function(e){var t,n,r,a;if(e.origin===f){var o,i;if("changeAccount"===(null===(t=e.data)||void 0===t?void 0:t.playload)&&(!1,(o=new URLSearchParams).set("url",u),o.set("redirect",window.location.href),o.set("connectNonce",c),o.set("sc-authorize",!0),o.set("site-title",d),o.set("source_type",m),window.open("".concat(l,"?").concat(o.toString()),"_self")),"accountDisconnect"===(null===(n=e.data)||void 0===n?void 0:n.playload)&&(i=He()({method:"POST",headers:{"ST-Authorization":"Bearer "+sureTriggerData.siteContent.accessKey},data:{testData:"TestData"},path:sureTriggerData.apiSlug+"/connection/disconnect"}).then((function(e){We.dismiss(),e.success?(We.success("Connection disconnected",{delay:650}),location.reload()):We.error("Request was not success",{delay:650})})),We.promise(i,{pending:(0,Ke.__)("Disconnecting","suretriggers"),error:(0,Ke.__)("Something went wrong! please try again later","suretriggers")})),"resetURL"===(null===(r=e.data)||void 0===r?void 0:r.playload)){var s,p=null===(s=e.data)||void 0===s?void 0:s.resetURL,g=new URL(p,window.location.origin);g.origin===window.location.origin&&g.pathname.startsWith("/")&&(window.location.href=g.pathname+g.search+g.hash)}"windowReload"===(null===(a=e.data)||void 0===a?void 0:a.playload)&&location.reload()}}),!1),(0,r.createElement)("div",null,(0,r.createElement)("iframe",{id:i?"st-iframe-rtl":"st-iframe",title:"SAAS Dashboard",name:"saas_dashboard",allow:"clipboard-write",frameborder:"0",src:"".concat(sureTriggerData.stSaasURL,"?path=dashboard&st-code=").concat(t[0].siteContentAccessKey,"&base_url=").concat(sureTriggerData.siteContent.siteUrl,"&reset_url=").concat(sureTriggerData.siteContent.resetUrl,"&admin_lang=").concat(sureTriggerData.siteContent.adminLanguage)}),(0,r.createElement)(Se,{position:"bottom-right"}))};function $e(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ve=function(){var e=sureTriggerData.siteContent,t=e.connectUrl,n=e.connectNonce,r=e.siteUrl,a=e.siteTitle,o=e.sourceType,i=new URLSearchParams;i.set("url",r),i.set("redirect",window.location.href),i.set("connectNonce",n),i.set("sc-authorize",!0),i.set("site-title",a),i.set("source_type",o),window.open("".concat(t,"?").concat(i.toString()),"_self")},Ye=n(5),Ze=[{path:"assets/images/prestro-player-logo.svg",alt:"Presto player"},{path:"assets/images/astra-logo.svg",alt:"Astra"},{path:"assets/images/starter-templates-logo.svg",alt:"Starter templates"},{path:"assets/images/spectra-logo.svg",alt:"Spectra"},{path:"assets/images/surecart-logo.svg",alt:"SureCart"},{path:"assets/images/zipwp-logo.svg",alt:"ZipWP"},{path:"assets/images/wp-crafter-logo.svg",alt:"WPCrafter"},{path:"assets/images/sureforms-logo.svg",alt:"SureForms"},{path:"assets/images/surefeedback-logo.svg",alt:"SureFeedback"}],Qe=o().memo((function(){return(0,r.createElement)("div",{className:"relative mt-12 overflow-hidden w-full mx-auto"},(0,r.createElement)("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-20 bg-gradient-to-r from-white to-transparent z-10"}),(0,r.createElement)(Ye.Z,{loop:0,speed:50,autoFill:!0},Array.isArray(Ze)&&Ze.map((function(e,t){return(0,r.createElement)("span",{className:"mx-16 inline-block",key:t},(0,r.createElement)("img",{src:"".concat(sureTriggerData.stPluginURL).concat(null==e?void 0:e.path),alt:null==e?void 0:e.alt,className:"max-w-none w-auto h-9"}))}))),(0,r.createElement)("div",{className:"pointer-events-none absolute right-0 top-0 h-full w-20 bg-gradient-to-l from-white to-transparent z-10"}))})),Xe=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,r.createElement)("path",{d:"M3 3v5h5"}),(0,r.createElement)("path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}),(0,r.createElement)("path",{d:"M16 16h5v5"})))},Je=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2",ry:"2"}),(0,r.createElement)("path",{d:"M18 12h.01"}),(0,r.createElement)("path",{d:"M6 12h.01"}),(0,r.createElement)("circle",{cx:"12",cy:"12",r:"2"})))},et=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),(0,r.createElement)("path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}),(0,r.createElement)("path",{d:"M3 12A9 3 0 0 0 21 12"})))},tt=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"M12 2v20"}),(0,r.createElement)("path",{d:"m15 19-3 3-3-3"}),(0,r.createElement)("path",{d:"m19 9 3 3-3 3"}),(0,r.createElement)("path",{d:"M2 12h20"}),(0,r.createElement)("path",{d:"m5 9-3 3 3 3"}),(0,r.createElement)("path",{d:"m9 5 3-3 3 3"})))},nt=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("path",{d:"M9 12l2 2 4-4",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},rt=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-purple-50 border border-purple-100 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M22 10v6M2 10l10-5 10 5-10 5z",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("path",{d:"M6 12v5c3 3 9 3 12 0v-5",stroke:"#8B5CF6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},at=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("circle",{cx:"12",cy:"6",r:"2"}),(0,r.createElement)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.createElement)("rect",{x:"4",y:"12",width:"16",height:"8",rx:"2",ry:"2"})))},ot=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"m18 16 4-4-4-4"}),(0,r.createElement)("path",{d:"m6 8-4 4 4 4"}),(0,r.createElement)("path",{d:"m14.5 4-5 16"})))},it=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("polyline",{points:"22,4 12,14.01 9,11.01",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},st=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"m16 11 2 2 4-4"}),(0,r.createElement)("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),(0,r.createElement)("circle",{cx:"9",cy:"7",r:"4"})))},lt=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3"})))},ct=function(){return(0,r.createElement)("div",{className:"w-12 h-12 bg-gray-100 border border-gray-200 rounded-lg flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2",stroke:"#666",strokeWidth:"2"}),(0,r.createElement)("circle",{cx:"9",cy:"7",r:"4",stroke:"#666",strokeWidth:"2"}),(0,r.createElement)("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87",stroke:"#666",strokeWidth:"2"}),(0,r.createElement)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75",stroke:"#666",strokeWidth:"2"})))},ut=function(){var e=[{name:"Automate Repetitive Tasks",description:"Turn everyday actions, like form fills, email replies, or CRM updates, into smart, self-running workflows.",icon:Xe},{name:"Grow Without Hiring More People",description:"OttoKit saves 10+ hours per week per teammate. That's like adding an extra person for free.",icon:Je},{name:"Centralize & Control Your Data",description:"Keep every tool in sync, Google Sheets, Slack, WordPress, CRMs and 1,250+ apps.",icon:et},{name:"Drag. Drop. Done.",description:"Build workflows visually. No coding, no tutorials, no stress. Just results.",icon:tt},{name:"Stay Reliable",description:"OttoKit is built for business continuity with stable runs, error recovery, and human-first support when you need it.",icon:nt},{name:"OttoKit Learn",description:"A free course designed to help you master automation and build workflows that actually grow your business.",icon:rt},{name:"Deploy AI Agents",description:"Add unlimited digital teammates that think, decide, and act for you 24/7.",icon:at,isPremium:!0},{name:"Custom Code",description:"Add Python logic for advanced workflows and data handling with full control.",icon:ot,isPremium:!0},{name:"Premium Apps",description:"Use tools like our Email Parser, Path and API Module, no extra subscriptions needed.",icon:it,isPremium:!0},{name:"Human-in-the-Loop",description:"Add approvals, reviews, or custom decision steps to make AI workflows smarter.",icon:st,isPremium:!0},{name:"Priority Support",description:"Skip the queue. Fast, human help when you need it most.",icon:lt,isPremium:!0},{name:"Onboard Unlimited Clients",description:"Create secure workspaces for clients or teams, keeping data safe, organized and isolated.",icon:ct,isPremium:!0}];return(0,a.useEffect)((function(){var e=document.querySelector("#wpadminbar ");e&&(e.style.display="none");var t=document.querySelector("html.wp-toolbar");t&&(t.style.padding="0");var n=document.querySelector("#wpbody-content");n&&(n.style.paddingBottom="0");var r=document.querySelector("#wpcontent");r&&(r.style.marginLeft="0");var a=document.querySelector("#adminmenuwrap");a&&(a.style.display="none");var o=document.querySelector("#adminmenuback");o&&(o.style.display="none");var i=document.querySelector("#wpfooter");i&&(i.style.display="none",i.style.marginLeft="0")}),[]),(0,r.createElement)("div",{className:"w-full bg-gray-50 flex"},(0,r.createElement)("div",{className:"w-[800px] shadow-xl rounded mx-auto mt-8 mb-4 bg-white text-center py-8"},(0,r.createElement)("img",{className:"block h-12 w-auto mx-auto mb-8",src:"".concat(sureTriggerData.stPluginURL,"assets/images/OttoKitLogoDarkLightBG.svg"),alt:"OttoKit"}),(0,r.createElement)("div",{className:"max-w-[560px] m-auto mb-6"},sureTriggerData.reConnectSorryMsg&&(0,r.createElement)("div",{className:"bg-teal-100 rounded-b text-teal-900 px-4 py-3 shadow-md",role:"alert"},(0,r.createElement)("p",{className:"font-bold"}," ","We have recently updated our Authorization process."," "),(0,r.createElement)("p",{className:"text-sm"},(0,r.createElement)("p",null,"Your all previous work is safe with us."),(0,r.createElement)("p",null," You need to re-connect this site."))),(0,r.createElement)("div",{className:"flex flex-col mb-6"},(0,r.createElement)("h1",{className:"text-app-heading text-xl lg:text-2xl leading-tight font-bold mb-4 whitespace-nowrap"},"Welcome to OttoKit — Automations Made Effortless"),(0,r.createElement)("p",{className:"text-base text-app-text leading-normal text-center mx-auto"},"You're moments away from seeing what it feels like when work runs",(0,r.createElement)("br",null),"itself. OttoKit connects your favorite tools, plugins and 1,250+ other",(0,r.createElement)("br",null),"apps so you can focus on growing your business, not managing it."))),(0,r.createElement)("div",{className:"flex flex-col items-center justify-center"},(0,r.createElement)("div",{className:"flex gap-4 mb-8"},(0,r.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-6 py-3 gap-3 rounded-lg justify-center border border-transparent text-base font-medium text-white bg-black hover:bg-gray-800 focus:outline-none transition-colors",onClick:function(){Ve()}},(0,r.createElement)("span",null,"Get Started")),(0,r.createElement)("a",{href:"https://app.ottokit.com/pricing-plans",target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer inline-flex items-center px-6 py-3 gap-3 rounded-lg justify-center border border-gray-300 text-base font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none transition-colors"},(0,r.createElement)("span",null,"Upgrade Plan"))),(0,r.createElement)("div",{className:"mx-auto mt-6 mb-12"},(0,r.createElement)("iframe",{width:"450",height:"225",className:"rounded-lg shadow-lg",src:"https://www.youtube-nocookie.com/embed/MpxE2p8piSw?controls=0",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}))),(0,r.createElement)("div",{className:"bg-[#FAFAFA] py-10 px-12 mb-10"},(0,r.createElement)("div",{className:"mx-auto max-w-7xl"},(0,r.createElement)("div",{className:"grid grid-cols-1 gap-x-5 gap-y-6 md:grid-cols-3 lg:grid-cols-3 "},e.map((function(e){return(0,r.createElement)("div",{key:e.name,className:"relative flex flex-col gap-3 text-left p-6"},e.isPremium&&(0,r.createElement)("div",{className:"absolute top-4 right-4"},(0,r.createElement)("svg",{className:"w-4 h-4 text-gray-400",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2",ry:"2",stroke:"currentColor",strokeWidth:"2"}),(0,r.createElement)("circle",{cx:"12",cy:"7",r:"4",stroke:"currentColor",strokeWidth:"2"}))),(0,r.createElement)("div",{className:"mb-4"},(0,r.createElement)(e.icon,{className:"h-12 w-12 text-app-heading","aria-hidden":"true"})),(0,r.createElement)("div",{className:"space-y-2"},(0,r.createElement)("p",{className:"text-lg font-semibold text-app-heading"},e.name),(0,r.createElement)("p",{className:"text-sm leading-6 text-app-text"},e.description)))}))))),(0,r.createElement)("div",{className:"bg-white pt-4 pb-8 px-12 mb-10"},(0,r.createElement)("div",{className:"mx-auto max-w-4xl text-center"},(0,r.createElement)("h2",{className:"text-app-heading text-xl lg:text-2xl leading-tight font-bold mb-4 whitespace-nowrap"},"Why the Right WordPress",(0,r.createElement)("br",null),"Automation Tool Matters"),(0,r.createElement)("p",{className:"text-base text-app-text leading-normal text-center mx-auto mb-12"},"Most tools treat WordPress like an afterthought. OttoKit doesn't. It connects",(0,r.createElement)("br",null),"your plugins, store and 1,250+ apps with a reliable native plugin. The result?"),(0,r.createElement)("div",{className:"space-y-6 max-w-sm mx-auto"},(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)("div",{className:"flex-shrink-0"},(0,r.createElement)("div",{className:"w-4 h-4 bg-green-600 rounded-full flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),(0,r.createElement)("span",{className:"text-base text-black font-medium"},"WordPress-first automation")),(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)("div",{className:"flex-shrink-0"},(0,r.createElement)("div",{className:"w-4 h-4 bg-green-600 rounded-full flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),(0,r.createElement)("span",{className:"text-base text-black font-medium"},"Native plugin with 150+ WordPress integrations")),(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)("div",{className:"flex-shrink-0"},(0,r.createElement)("div",{className:"w-4 h-4 bg-green-600 rounded-full flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),(0,r.createElement)("span",{className:"text-base text-black font-medium"},"Lifetime access with no subscriptions")),(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)("div",{className:"flex-shrink-0"},(0,r.createElement)("div",{className:"w-4 h-4 bg-green-600 rounded-full flex items-center justify-center"},(0,r.createElement)("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),(0,r.createElement)("span",{className:"text-base text-black font-medium"},"Full support from human experts"))),(0,r.createElement)("div",{className:"mt-12"},(0,r.createElement)("a",{href:"https://app.ottokit.com/pricing-plans",target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer inline-flex items-center px-6 py-3 gap-3 rounded-lg justify-center border border-transparent text-base font-medium text-white bg-black hover:bg-gray-800 focus:outline-none transition-colors"},(0,r.createElement)("span",null,"Own Your Automations")),(0,r.createElement)("p",{className:"text-base text-gray-500 mt-4"},"Skip subscriptions. Keep control.")))),(0,r.createElement)("div",{className:"text-center mb-8"},(0,r.createElement)("h3",{className:"text-gray-400 text-sm font-medium uppercase",style:{letterSpacing:"0.25em"}},"TRUSTED BY 100K BUSINESSES")),(0,r.createElement)(Qe,null),(0,r.createElement)("div",{className:"bg-white py-8 px-12 mb-8 mt-12"},(0,r.createElement)("div",{className:"mx-auto max-w-4xl text-center"},(0,r.createElement)("div",{className:"flex justify-center mb-8"},$e(Array(5)).map((function(e,t){return(0,r.createElement)("svg",{key:t,className:"w-8 h-8 text-yellow-400 mx-1",fill:"currentColor",viewBox:"0 0 20 20"},(0,r.createElement)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}))}))),(0,r.createElement)("div",{className:"mb-8"},(0,r.createElement)("p",{className:"text-xl lg:text-2xl font-normal text-gray-800 leading-relaxed"},"Finished ",(0,r.createElement)("span",{className:"px-2 py-1 rounded",style:{backgroundColor:"#D2F05960"}},"migrating my Zapier automations to OttoKit")," and saving over $4k/year. Zapier was great, but OttoKit does everything my Zaps did at a fraction of the cost.")),(0,r.createElement)("div",{className:"flex items-center justify-center mb-6"},(0,r.createElement)("div",{className:"flex items-center"},(0,r.createElement)("img",{className:"w-16 h-16 rounded-full mr-4",src:"".concat(sureTriggerData.stPluginURL,"assets/images/pic2.png"),alt:"Reuben Hochstetler"}),(0,r.createElement)("div",{className:"text-left"},(0,r.createElement)("div",{className:"font-semibold text-lg text-gray-900"},"Reuben Hochstetler"),(0,r.createElement)("div",{className:"text-gray-500"},"Touchdown Tech")))))),(0,r.createElement)("div",{className:"text-center mt-8 mb-4"},(0,r.createElement)("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8"},(0,r.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-6 py-3 gap-3 rounded-lg justify-center border border-transparent text-base font-medium text-white bg-black hover:bg-gray-800 focus:outline-none transition-colors",onClick:function(){Ve()}},(0,r.createElement)("span",null,"Get Started")),(0,r.createElement)("a",{href:"https://app.ottokit.com/pricing-plans",target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer inline-flex items-center px-6 py-3 gap-3 rounded-lg justify-center border border-gray-300 text-base font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none transition-colors"},(0,r.createElement)("span",null,"Upgrade Plan"))),(0,r.createElement)("div",{className:"text-center"},(0,r.createElement)("a",{href:"".concat(window.origin,"/wp-admin"),className:"inline-flex items-center text-gray-500 hover:text-gray-700 transition-colors"},(0,r.createElement)("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})),"Back to Dashboard")))))};function dt(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function mt(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){dt(o,r,a,i,s,"next",e)}function s(e){dt(o,r,a,i,s,"throw",e)}i(void 0)}))}}var ft=window.regeneratorRuntime,pt=n.n(ft);const gt=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,t,n)=>n?n.toUpperCase():t.toLowerCase())))(e);return t.charAt(0).toUpperCase()+t.slice(1)},ht=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim(),vt=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var yt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bt=(0,a.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},c)=>(0,a.createElement)("svg",{ref:c,...yt,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ht("lucide",o),...!i&&!vt(l)&&{"aria-hidden":"true"},...l},[...s.map((([e,t])=>(0,a.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),wt=(e,t)=>{const n=(0,a.forwardRef)((({className:n,...r},o)=>{return(0,a.createElement)(bt,{ref:o,iconNode:t,className:ht(`lucide-${i=gt(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i}));return n.displayName=gt(e),n},Et=wt("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),xt=wt("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var kt=function(){var e,t,n=(0,a.useRef)(null),o=(0,a.useRef)(null),i=ne((0,a.useState)(""),2),s=i[0],l=i[1],c=ne((0,a.useState)(""),2),u=c[0],d=c[1],m=(0,a.useMemo)((function(){var e,t=new Map;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersList)||[]).forEach((function(e){t.set(String(e.ID||e.id),e)})),t}),[]),f=(0,a.useMemo)((function(){var e,t=new Map;return Object.entries((null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersRoles)||{}).forEach((function(e){var n=ne(e,2),r=n[0],a=n[1];t.set(r,a)})),t}),[]),p=(0,a.useMemo)((function(){var e;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.enabledUsers)||[]).map((function(e){var t=m.get(String(e));return t?t.display_name:""})).filter((function(e){return""!==e}))}),[m]),g=(0,a.useMemo)((function(){var e;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.enabledUserRoles)||[]).map((function(e){return f.get(e)||""})).filter((function(e){return""!==e}))}),[f]),h=ne((0,a.useState)(p),2),v=h[0],y=h[1],b=ne((0,a.useState)(g),2),w=b[0],E=b[1],x=ne((0,a.useState)(!1),2),k=x[0],N=x[1],C=ne((0,a.useState)(!1),2),O=C[0],_=C[1],T=ne((0,a.useState)(""),2),S=T[0],L=T[1],R=ne((0,a.useState)(!1),2),P=R[0],j=R[1],A=ne((0,a.useState)(!1),2),M=A[0],D=A[1],I=ne((0,a.useState)(!1),2),B=I[0],U=I[1],F=(null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersList)||[],W=(null===(t=window.sureTriggerData)||void 0===t?void 0:t.usersRoles)||{},z=(0,a.useMemo)((function(){return F.filter((function(e){return!v.includes(e.display_name)}))}),[F,v]),H=(0,a.useMemo)((function(){return Object.entries(W).filter((function(e){var t=ne(e,2),n=(t[0],t[1]);return!w.includes(n)}))}),[W,w]),K=(0,a.useMemo)((function(){return z.filter((function(e){return e.display_name.toLowerCase().includes(s.toLowerCase())}))}),[z,s]),q=(0,a.useMemo)((function(){return H.filter((function(e){var t=ne(e,2);return t[0],t[1].toLowerCase().includes(u.toLowerCase())}))}),[H,u]),G=(0,a.useCallback)((function(e){y((function(t){return[].concat($e(t),[e.display_name])})),j(!1)}),[]),$=(0,a.useCallback)((function(e){y((function(t){return t.filter((function(t){return t!==e}))}))}),[]),V=(0,a.useCallback)((function(e){var t=ne(e,2),n=(t[0],t[1]);E((function(e){return[].concat($e(e),[n])})),D(!1)}),[]),Y=(0,a.useCallback)((function(e){E((function(t){return t.filter((function(t){return t!==e}))}))}),[]),Z=(0,a.useCallback)((function(e){return"string"!=typeof e?"":e.replace(/[<>]/g,"")}),[]),Q=(0,a.useCallback)((function(){var e,t=new FormData;t.append("action","suretriggers_save_settings");var n=new Map;F.forEach((function(e){n.set(e.display_name,String(e.ID||e.id))}));var r=new Map;return Object.entries(W).forEach((function(e){var t=ne(e,2),n=t[0],a=t[1];r.set(a,n)})),v.length>0?v.forEach((function(e){var r=n.get(e);r&&t.append("st_selected_users[]",Z(r))})):t.append("st_selected_users",""),w.length>0?w.forEach((function(e){var n=r.get(e);n&&t.append("st_selected_user_roles[]",Z(n))})):t.append("st_selected_user_roles",""),t.append("st_submit_user_roles",!0),t.append("suretriggers_settings_nonce",(null===(e=window.sureTriggerData)||void 0===e?void 0:e.settingsNonce)||""),t}),[F,W,v,w,Z]),X=(0,a.useCallback)((function(){U(!0)}),[]),J=(0,a.useCallback)(mt(pt().mark((function e(){var t,n,r,a,o,i;return pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),L(""),U(!1),e.prev=3,n=Q(),r=(null===(t=window.sureTriggerData)||void 0===t?void 0:t.ajaxurl)||("undefined"!=typeof ajaxurl?ajaxurl:"/wp-admin/admin-ajax.php"),e.next=8,fetch(r,{method:"POST",body:n,credentials:"same-origin"});case 8:if((a=e.sent).ok){e.next=11;break}throw new Error("HTTP error! Status: ".concat(a.status));case 11:return e.next=13,a.json();case 13:(o=e.sent).success?(L((0,Ke.__)("Settings saved successfully!","suretriggers")),_(!0)):L((null===(i=o.data)||void 0===i?void 0:i.message)||(0,Ke.__)("Failed to save settings. Please try again.","suretriggers")),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),L((0,Ke.__)("Network error. Please check your connection and try again.","suretriggers"));case 20:return e.prev=20,N(!1),setTimeout((function(){return _(!1)}),3e3),setTimeout((function(){return L("")}),3e3),e.finish(20);case 25:case"end":return e.stop()}}),e,null,[[3,17,20,25]])}))),[Q]),ee=(0,a.useCallback)((function(e){n.current&&!n.current.contains(e.target)&&j(!1),o.current&&!o.current.contains(e.target)&&D(!1)}),[]),te=0===v.length?(0,Ke.__)("no users","suretriggers"):1===v.length?(0,Ke.__)("user","suretriggers"):(0,Ke.__)("users","suretriggers"),re=0===w.length?(0,Ke.__)("no roles","suretriggers"):1===w.length?(0,Ke.__)("role","suretriggers"):(0,Ke.__)("roles","suretriggers");return(0,a.useEffect)((function(){return document.addEventListener("mousedown",ee),function(){document.removeEventListener("mousedown",ee)}}),[ee]),(0,a.useEffect)((function(){P||l("")}),[P]),(0,a.useEffect)((function(){M||d("")}),[M]),(0,r.createElement)("div",{className:"p-12 bg-gray-50 min-h-screen"},(0,r.createElement)("div",{className:" bg-white p-6 rounded-lg border border-gray-200 w-full"},(0,r.createElement)("h1",{className:"text-2xl font-semibold mb-6"},(0,Ke.__)("Control who can access the OttoKit Interface","suretriggers")),(0,r.createElement)("div",{className:"mb-6"},(0,r.createElement)("p",{className:"text-gray-600"},(0,Ke.__)("Only administrators can access OttoKit by default. Use the options below to grant access to other users or roles. Anyone not added here won’t see OttoKit in their WordPress admin menu.","suretriggers"))),(0,r.createElement)("div",{className:"mb-4"},(0,r.createElement)("label",{className:"block text-sm font-semibold text-gray-700 mb-2"},(0,Ke.__)("Select Users","suretriggers")),(0,r.createElement)("div",{className:"relative",ref:n},(0,r.createElement)("input",{type:"text",placeholder:(0,Ke.__)("Select users who can view and access the OttoKit interface.","suretriggers"),className:"w-full lg:w-1/2 max-w-full px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1e3b8a] placeholder:text-xs placeholder:font-medium placeholder:text-slate-400",onFocus:function(){return j(!0)},onChange:function(e){return l(e.target.value)},value:s}),P&&(0,r.createElement)("ul",{className:"absolute z-10 w-full lg:w-1/2 max-w-full bg-white border border-gray-300 rounded-md mt-1 shadow-lg max-h-40 overflow-y-auto"},K.length>0?K.map((function(e){return(0,r.createElement)("li",{key:e.id,className:"p-2 hover:bg-blue-100 cursor-pointer flex items-center",onMouseDown:function(){return G(e)}},e.display_name)})):(0,r.createElement)("li",{className:"p-2 text-gray-500 text-center"},(0,Ke.__)("No options","suretriggers")))),(0,r.createElement)("div",{className:"mt-2 flex flex-wrap gap-2"},v.map((function(e){return(0,r.createElement)("div",{key:e,className:"flex items-center bg-gray-100 px-3 py-1 rounded-full"},(0,r.createElement)("span",null,e),(0,r.createElement)("button",{onClick:function(){return $(e)},className:"ml-1 aspect-square px-1 text-gray-500 hover:text-gray-700 hover:rounded-full hover:bg-red-200"},"✕"))})))),(0,r.createElement)("div",{className:"mb-4"},(0,r.createElement)("label",{className:"block text-sm font-semibold text-gray-700 mb-2"},(0,Ke.__)("Select Roles","suretriggers")),(0,r.createElement)("div",{className:"relative",ref:o},(0,r.createElement)("input",{type:"text",placeholder:(0,Ke.__)("Select user roles who can view and access the OttoKit interface.","suretriggers"),className:"w-full lg:w-1/2 max-w-full px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1e3b8a] placeholder:text-xs placeholder:font-medium placeholder:text-slate-400",onFocus:function(){return D(!0)},onChange:function(e){return d(e.target.value)},value:u}),M&&(0,r.createElement)("ul",{className:"absolute z-10 w-full lg:w-1/2 max-w-full bg-white border border-gray-300 rounded-md mt-1 shadow-lg max-h-40 overflow-y-auto"},q.length>0?q.map((function(e){var t=ne(e,2),n=t[0],a=t[1];return(0,r.createElement)("li",{key:n,className:"p-2 hover:bg-blue-100 cursor-pointer flex items-center",onMouseDown:function(){return V([n,a])}},a)})):(0,r.createElement)("li",{className:"p-2 text-gray-500 text-center"},(0,Ke.__)("No options","suretriggers")))),(0,r.createElement)("div",{className:"mt-2 flex flex-wrap gap-2"},w.map((function(e){return(0,r.createElement)("div",{key:e,className:"flex items-center bg-gray-100 px-3 py-1 rounded-full"},(0,r.createElement)("span",null,e),(0,r.createElement)("button",{onClick:function(){return Y(e)},className:"ml-1 aspect-square px-1 text-gray-500 hover:text-gray-700 hover:rounded-full hover:bg-red-200"},"✕"))})))),(0,r.createElement)("div",null,(0,r.createElement)("button",{className:"bg-[#145384] disabled:cursor-not-allowed disabled:opacity-50 text-white px-4 py-2 text-base font-medium rounded-md hover:bg-[#0f4c6b]/90 h-10 w-21 flex justify-center items-center",onClick:X,disabled:k},k?(0,r.createElement)(Et,{className:"h-4 w-4 animate-spin"}):O?(0,r.createElement)(xt,{className:"w-5 h-4 text-white","aria-hidden":"true"}):(0,Ke.__)("Save","suretriggers")),S&&(0,r.createElement)("p",{className:"mt-2 text-sm ".concat(S.includes("success")?"text-green-600":"text-red-600")},S)),(0,r.createElement)("p",{className:"text-sm text-[#64748b] mt-4 font-normal"},(0,r.createElement)("strong",null,(0,Ke.__)("Note:","suretriggers"))," ",(0,Ke.__)("Administrators already have full access by default - you don’t need to add them here.","suretriggers")),B&&(0,r.createElement)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},(0,r.createElement)("div",{className:"bg-white p-6 rounded-lg shadow-lg max-w-md w-full"},(0,r.createElement)("h3",{className:"text-lg font-medium mb-4",style:{color:0===v.length&&0===w.length?"#d32f2f":"#2e7d32"}},0===v.length&&0===w.length?(0,Ke.__)("Confirm Access Removal","suretriggers"):(0,Ke.__)("Confirm Access Grant","suretriggers")),(0,r.createElement)("p",{className:"text-sm text-gray-600 mb-4"},0===v.length&&0===w.length?(0,Ke.__)("You are about to remove all non-administrator access to the OttoKit Interface. After this change, only administrators will be able to access OttoKit from their WordPress dashboard. Are you sure you want to restrict access to administrators only?","suretriggers"):(0,Ke.__)("By continuing, the selected","suretriggers")+" "+te+" "+(0,Ke.__)("and","suretriggers")+" "+re+" "+(0,Ke.__)("will be able to access and view the OttoKit Interface from their WordPress dashboard. Are you sure you want to allow this?","suretriggers")),(0,r.createElement)("div",{className:"flex justify-end gap-3"},(0,r.createElement)("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200",onClick:function(){return U(!1)}},(0,Ke.__)("Cancel","suretriggers")),(0,r.createElement)("button",{className:"px-4 py-2 text-sm font-medium text-white rounded-md ".concat(0===v.length&&0===w.length?"bg-[#d32f2f] hover:bg-[#b71c1c]":"bg-[#145384] hover:bg-[#0f4c6b]"),onClick:J},0===v.length&&0===w.length?(0,Ke.__)("Remove Access","suretriggers"):(0,Ke.__)("Grant Access","suretriggers")))))))},Nt=("page",new URL(window.location.href).searchParams.get("page"));document.getElementById("sure-triggger-entry")&&s().render((0,r.createElement)((function(e){var t=e.reducer,n=e.initialState,o=e.children;return(0,r.createElement)(E.Provider,{value:(0,a.useReducer)(t,n)},o)}),{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r
=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r
=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,g);return"set"===n?v(v({},e),r):e},initialState:w},(0,r.createElement)((function(){var e,t;return"suretriggers"===Nt&&(e=""!==(t=ne(x(),1)[0].siteContentAccessKey)&&null!==t&&!1!==t&&"connection-denied"!==t?(0,r.createElement)("div",{className:"dashboard-container"},(0,r.createElement)(Ge,null)):(0,r.createElement)(ut,null)),"ottokit-settings"===Nt&&(e=(0,r.createElement)(kt,null)),(0,r.createElement)(J,null,e)}),null)),document.getElementById("sure-triggger-entry"));var Ct=document.getElementById("ottokit-settings-page");Ct&&s().render((0,r.createElement)(kt,null),Ct)},5:function(e,t,n){var r=n(196);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(r);!function(e){if("undefined"==typeof window)return;const t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}('.rfm-marquee-container {\n overflow-x: hidden;\n display: flex;\n flex-direction: row;\n position: relative;\n width: var(--width);\n transform: var(--transform);\n}\n.rfm-marquee-container:hover div {\n animation-play-state: var(--pause-on-hover);\n}\n.rfm-marquee-container:active div {\n animation-play-state: var(--pause-on-click);\n}\n\n.rfm-overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.rfm-overlay::before, .rfm-overlay::after {\n background: linear-gradient(to right, var(--gradient-color), rgba(255, 255, 255, 0));\n content: "";\n height: 100%;\n position: absolute;\n width: var(--gradient-width);\n z-index: 2;\n pointer-events: none;\n touch-action: none;\n}\n.rfm-overlay::after {\n right: 0;\n top: 0;\n transform: rotateZ(180deg);\n}\n.rfm-overlay::before {\n left: 0;\n top: 0;\n}\n\n.rfm-marquee {\n flex: 0 0 auto;\n min-width: var(--min-width);\n z-index: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n animation: scroll var(--duration) linear var(--delay) var(--iteration-count);\n animation-play-state: var(--play);\n animation-delay: var(--delay);\n animation-direction: var(--direction);\n}\n@keyframes scroll {\n 0% {\n transform: translateX(0%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n\n.rfm-initial-child-container {\n flex: 0 0 auto;\n display: flex;\n min-width: auto;\n flex-direction: row;\n align-items: center;\n}\n\n.rfm-child {\n transform: var(--transform);\n}');const i=r.forwardRef((function({style:e={},className:t="",autoFill:n=!1,play:a=!0,pauseOnHover:i=!1,pauseOnClick:s=!1,direction:l="left",speed:c=50,delay:u=0,loop:d=0,gradient:m=!1,gradientColor:f="white",gradientWidth:p=200,onFinish:g,onCycleComplete:h,onMount:v,children:y},b){const[w,E]=r.useState(0),[x,k]=r.useState(0),[N,C]=r.useState(1),[O,_]=r.useState(!1),T=r.useRef(null),S=b||T,L=r.useRef(null),R=r.useCallback((()=>{if(L.current&&S.current){const e=S.current.getBoundingClientRect(),t=L.current.getBoundingClientRect();let r=e.width,a=t.width;"up"!==l&&"down"!==l||(r=e.height,a=t.height),C(n&&r&&a&&a
{if(O&&(R(),L.current&&S.current)){const e=new ResizeObserver((()=>R()));return e.observe(S.current),e.observe(L.current),()=>{e&&e.disconnect()}}}),[R,S,O]),r.useEffect((()=>{R()}),[R,y]),r.useEffect((()=>{_(!0)}),[]),r.useEffect((()=>{"function"==typeof v&&v()}),[]);const P=r.useMemo((()=>n?x*N/c:x
Object.assign(Object.assign({},e),{"--pause-on-hover":!a||i?"paused":"running","--pause-on-click":!a||i&&!s||s?"paused":"running","--width":"up"===l||"down"===l?"100vh":"100%","--transform":"up"===l?"rotate(-90deg)":"down"===l?"rotate(90deg)":"none"})),[e,a,i,s,l]),A=r.useMemo((()=>({"--gradient-color":f,"--gradient-width":"number"==typeof p?`${p}px`:p})),[f,p]),M=r.useMemo((()=>({"--play":a?"running":"paused","--direction":"left"===l?"normal":"reverse","--duration":`${P}s`,"--delay":`${u}s`,"--iteration-count":d?`${d}`:"infinite","--min-width":n?"auto":"100%"})),[a,l,P,u,d,n]),D=r.useMemo((()=>({"--transform":"up"===l?"rotate(90deg)":"down"===l?"rotate(-90deg)":"none"})),[l]),I=r.useCallback((e=>[...Array(Number.isFinite(e)&&e>=0?e:0)].map(((e,t)=>o.default.createElement(r.Fragment,{key:t},r.Children.map(y,(e=>o.default.createElement("div",{style:D,className:"rfm-child"},e))))))),[D,y]);return O?o.default.createElement("div",{ref:S,style:j,className:"rfm-marquee-container "+t},m&&o.default.createElement("div",{style:A,className:"rfm-overlay"}),o.default.createElement("div",{className:"rfm-marquee",style:M,onAnimationIteration:h,onAnimationEnd:g},o.default.createElement("div",{className:"rfm-initial-child-container",ref:L},r.Children.map(y,(e=>o.default.createElement("div",{style:D,className:"rfm-child"},e)))),I(N-1)),o.default.createElement("div",{className:"rfm-marquee",style:M},I(N))):null}));t.Z=i},196:function(e){"use strict";e.exports=window.React}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=function(t,n,a,o){if(!n){var i=1/0;for(u=0;u
=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(s=!1,o
0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,a,o]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={179:0,278:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,o,i=n[0],s=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(l)var u=l(r)}for(t&&t(n);c