Sindbad~EG File Manager
(()=>{"use strict";var e={22:(e,t)=>{Object.prototype.toString},635:e=>{var t={decodeValues:!0,map:!1,silent:!1};function a(e){return"string"==typeof e&&!!e.trim()}function r(e,r){var n=e.split(";").filter(a),o=function(e){var t="",a="",r=e.split("=");return r.length>1?(t=r.shift(),a=r.join("=")):a=e,{name:t,value:a}}(n.shift()),i=o.name,l=o.value;r=r?Object.assign({},t,r):t;try{l=r.decodeValues?decodeURIComponent(l):l}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+l+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:i,value:l};return n.forEach(function(e){var t=e.split("="),a=t.shift().trimLeft().toLowerCase(),r=t.join("=");"expires"===a?s.expires=new Date(r):"max-age"===a?s.maxAge=parseInt(r,10):"secure"===a?s.secure=!0:"httponly"===a?s.httpOnly=!0:"samesite"===a?s.sameSite=r:"partitioned"===a?s.partitioned=!0:s[a]=r}),s}function n(e,n){if(n=n?Object.assign({},t,n):t,!e)return n.map?{}:[];if(e.headers)if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var o=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];o||!e.headers.cookie||n.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=o}return Array.isArray(e)||(e=[e]),n.map?e.filter(a).reduce(function(e,t){var a=r(t,n);return e[a.name]=a,e},{}):e.filter(a).map(function(e){return r(e,n)})}e.exports=n,e.exports.parse=n,e.exports.parseString=r,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,a,r,n,o,i=[],l=0;function s(){for(;l<e.length&&/\s/.test(e.charAt(l));)l+=1;return l<e.length}function u(){return"="!==(a=e.charAt(l))&&";"!==a&&","!==a}for(;l<e.length;){for(t=l,o=!1;s();)if(","===(a=e.charAt(l))){for(r=l,l+=1,s(),n=l;l<e.length&&u();)l+=1;l<e.length&&"="===e.charAt(l)?(o=!0,l=n,i.push(e.substring(t,r)),t=l):l=r+1}else l+=1;(!o||l>=e.length)&&i.push(e.substring(t,e.length))}return i}}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};a.r(r),a.d(r,{ListBulkActionsRegistry:()=>wt,ListConsumer:()=>Pt,ListFiltersRegistry:()=>Et,ListOptionsRegistry:()=>Dt,ListProvider:()=>xt,ListQuickActionsRegistry:()=>jt,getGlobalVars:()=>Kt,getListBulkActions:()=>Ct,getListFilters:()=>Bt,getListOptions:()=>It,getListQuickActions:()=>Rt,init:()=>da,registerListBulkAction:()=>bt,registerListBulkActionGroup:()=>kt,registerListFilter:()=>Mt,registerListFilterGroup:()=>Nt,registerListOption:()=>$t,registerListOptionGroup:()=>Ot,registerListQuickAction:()=>At,registerListQuickActionGroup:()=>Tt,useList:()=>yt,useListBulkActions:()=>Gt,useListFilters:()=>Lt,useListOptions:()=>Ft,useListQuickActions:()=>_t});var n={};a.r(n),a.d(n,{deleteBulkAction:()=>ra,disableBulkAction:()=>ta,enableBulkAction:()=>ea,exportBulkAction:()=>na,trashBulkAction:()=>aa});var o={};a.r(o),a.d(o,{statusFilter:()=>ia,typeFilter:()=>la});var i={};a.r(i),a.d(i,{exportListOption:()=>ua,importListOption:()=>sa});var l={};a.r(l),a.d(l,{deleteQuickAction:()=>pa,editQuickAction:()=>ca,trashQuickAction:()=>ha});const s=window.React;Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,a(22),a(635);var u="popstate";function c(e={}){return function(e,t,a,r={}){let{window:n=document.defaultView,v5Compat:o=!1}=r,i=n.history,l="POP",s=null,c=p();function p(){return(i.state||{idx:null}).idx}function g(){l="POP";let e=p(),t=null==e?null:e-c;c=e,s&&s({action:l,location:v.location,delta:t})}function S(e){let t="null"!==n.location.origin?n.location.origin:n.location.href,a="string"==typeof e?e:f(e);return a=a.replace(/ $/,"%20"),h(t,`No window.location.(origin|href) available to create URL for href: ${a}`),new URL(a,t)}null==c&&(c=0,i.replaceState({...i.state,idx:c},""));let v={get action(){return l},get location(){return e(n,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(u,g),s=e,()=>{n.removeEventListener(u,g),s=null}},createHref:e=>t(n,e),createURL:S,encodeLocation(e){let t=S(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l="PUSH";let r=m(v.location,e,t);a&&a(r,e),c=p()+1;let u=d(r,c),h=v.createHref(r);try{i.pushState(u,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;n.location.assign(h)}o&&s&&s({action:l,location:v.location,delta:1})},replace:function(e,t){l="REPLACE";let r=m(v.location,e,t);a&&a(r,e),c=p();let n=d(r,c),u=v.createHref(r);i.replaceState(n,"",u),o&&s&&s({action:l,location:v.location,delta:0})},go:e=>i.go(e)};return v}(function(e,t){let{pathname:a,search:r,hash:n}=e.location;return m("",{pathname:a,search:r,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:f(t)},null,e)}function h(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,a=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?g(t):t,state:a,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function f({pathname:e="/",search:t="",hash:a=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function g(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function S(e,t,a="/"){return function(e,t,a,r){let n=T(("string"==typeof t?g(t):t).pathname||"/",a);if(null==n)return null;let o=v(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,a)=>e===t[a])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e){let t=A(n);i=j(o[e],t,r)}return i}(e,t,a,!1)}function v(e,t=[],a=[],r=""){let n=(e,n,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};i.relativePath.startsWith("/")&&(h(i.relativePath.startsWith(r),`Absolute route path "${i.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(r.length));let l=M([r,i.relativePath]),s=a.concat(i);e.children&&e.children.length>0&&(h(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),v(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:C(l,e.index),routesMeta:s})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let a of P(e.path))n(e,t,a);else n(e,t)}),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[a,...r]=t,n=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===r.length)return n?[o,""]:[o];let i=P(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),n&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var x=/^:[\w-]+$/,y=3,V=2,w=1,G=10,b=-2,k=e=>"*"===e;function C(e,t){let a=e.split("/"),r=a.length;return a.some(k)&&(r+=b),t&&(r+=V),a.filter(e=>!k(e)).reduce((e,t)=>e+(x.test(t)?y:""===t?w:G),r)}function j(e,t,a=!1){let{routesMeta:r}=e,n={},o="/",i=[];for(let e=0;e<r.length;++e){let l=r[e],s=e===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=_({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u),h=l.route;if(!c&&s&&a&&!r[r.length-1].route.index&&(c=_({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:M([o,c.pathname]),pathnameBase:N(M([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=M([o,c.pathnameBase]))}return i}function _(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[a,r]=function(e,t=!1,a=!0){p("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,a)=>(r.push({paramName:t,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),n+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?n+="\\/*$":""!==e&&"/"!==e&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),n=t.match(a);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:a},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const n=l[r];return e[t]=a&&!n?void 0:(n||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function A(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function T(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,r=e.charAt(a);return r&&"/"!==r?null:e.slice(a)||"/"}function R(e,t,a,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function E(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)}function L(e,t,a,r=!1){let n;"string"==typeof e?n=g(e):(n={...e},h(!n.pathname||!n.pathname.includes("?"),R("?","pathname","search",n)),h(!n.pathname||!n.pathname.includes("#"),R("#","pathname","hash",n)),h(!n.search||!n.search.includes("#"),R("#","search","hash",n)));let o,i=""===e||""===n.pathname,l=i?"/":n.pathname;if(null==l)o=a;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:a,search:r="",hash:n=""}="string"==typeof e?g(e):e,o=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)}),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:o,search:B(r),hash:D(n)}}(n,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var M=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function F(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var $=["POST","PUT","PATCH","DELETE"],O=(new Set($),["GET",...$]);new Set(O),Symbol("ResetLoaderData");var I=s.createContext(null);I.displayName="DataRouter";var H=s.createContext(null);H.displayName="DataRouterState";var U=s.createContext({isTransitioning:!1});U.displayName="ViewTransition",s.createContext(new Map).displayName="Fetchers",s.createContext(null).displayName="Await";var W=s.createContext(null);W.displayName="Navigation";var z=s.createContext(null);z.displayName="Location";var Q=s.createContext({outlet:null,matches:[],isDataRoute:!1});Q.displayName="Route";var Z=s.createContext(null);function J(){return null!=s.useContext(z)}function Y(){return h(J(),"useLocation() may be used only in the context of a <Router> component."),s.useContext(z).location}Z.displayName="RouteError";var K="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function q(e){s.useContext(W).static||s.useLayoutEffect(e)}function X(){let{isDataRoute:e}=s.useContext(Q);return e?function(){let{router:e}=function(e){let t=s.useContext(I);return h(t,ie(e)),t}("useNavigate"),t=le("useNavigate"),a=s.useRef(!1);q(()=>{a.current=!0});let r=s.useCallback(async(r,n={})=>{p(a.current,K),a.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...n}))},[e,t]);return r}():function(){h(J(),"useNavigate() may be used only in the context of a <Router> component.");let e=s.useContext(I),{basename:t,navigator:a}=s.useContext(W),{matches:r}=s.useContext(Q),{pathname:n}=Y(),o=JSON.stringify(E(r)),i=s.useRef(!1);q(()=>{i.current=!0});let l=s.useCallback((r,l={})=>{if(p(i.current,K),!i.current)return;if("number"==typeof r)return void a.go(r);let s=L(r,JSON.parse(o),n,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:M([t,s.pathname])),(l.replace?a.replace:a.push)(s,l.state,l)},[t,a,o,n,e]);return l}()}function ee(e,{relative:t}={}){let{matches:a}=s.useContext(Q),{pathname:r}=Y(),n=JSON.stringify(E(a));return s.useMemo(()=>L(e,JSON.parse(n),r,"path"===t),[e,n,r,t])}function te(e,t,a,r){h(J(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=s.useContext(W),{matches:o}=s.useContext(Q),i=o[o.length-1],l=i?i.params:{},u=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let e=d&&d.path||"";ue(u,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let m,f=Y();if(t){let e="string"==typeof t?g(t):t;h("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=f;let v=m.pathname||"/",P=v;if("/"!==c){let e=c.replace(/^\//,"").split("/");P="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=S(e,{pathname:P});p(d||null!=x,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),p(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(e,t=[],a=null){if(null==e){if(!a)return null;if(a.errors)e=a.matches;else{if(0!==t.length||a.initialized||!(a.matches.length>0))return null;e=a.matches}}let r=e,n=a?.errors;if(null!=n){let e=r.findIndex(e=>e.route.id&&void 0!==n?.[e.route.id]);h(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(n).join(",")}`),r=r.slice(0,Math.min(r.length,e+1))}let o=!1,i=-1;if(a)for(let e=0;e<r.length;e++){let t=r[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(i=e),t.route.id){let{loaderData:e,errors:n}=a,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||l){o=!0,r=i>=0?r.slice(0,i+1):[r[0]];break}}}return r.reduceRight((e,l,u)=>{let c,h=!1,p=null,d=null;a&&(c=n&&l.route.id?n[l.route.id]:void 0,p=l.route.errorElement||re,o&&(i<0&&0===u?(ue("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):i===u&&(h=!0,d=l.route.hydrateFallbackElement||null)));let m=t.concat(r.slice(0,u+1)),f=()=>{let t;return t=c?p:h?d:l.route.Component?s.createElement(l.route.Component,null):l.route.element?l.route.element:e,s.createElement(oe,{match:l,routeContext:{outlet:e,matches:m,isDataRoute:null!=a},children:t})};return a&&(l.route.ErrorBoundary||l.route.errorElement||0===u)?s.createElement(ne,{location:a.location,revalidation:a.revalidation,component:p,error:c,children:f(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):f()},null)}(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:M([c,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:M([c,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,a,r);return t&&y?s.createElement(z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},y):y}function ae(){let e=function(){let e=s.useContext(Z),t=function(e){let t=s.useContext(H);return h(t,ie(e)),t}("useRouteError"),a=le("useRouteError");return void 0!==e?e:t.errors?.[a]}(),t=F(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=s.createElement(s.Fragment,null,s.createElement("p",null,"💿 Hey developer 👋"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:o},"ErrorBoundary")," or"," ",s.createElement("code",{style:o},"errorElement")," prop on your route.")),s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),a?s.createElement("pre",{style:n},a):null,i)}s.createContext(null);var re=s.createElement(ae,null),ne=class extends s.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:void 0!==e.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 void 0!==this.state.error?s.createElement(Q.Provider,{value:this.props.routeContext},s.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function oe({routeContext:e,match:t,children:a}){let r=s.useContext(I);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(Q.Provider,{value:e},a)}function ie(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function le(e){let t=function(e){let t=s.useContext(Q);return h(t,ie(e)),t}(e),a=t.matches[t.matches.length-1];return h(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}var se={};function ue(e,t,a){t||se[e]||(se[e]=!0,p(!1,a))}function ce({basename:e="/",children:t=null,location:a,navigationType:r="POP",navigator:n,static:o=!1}){h(!J(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),l=s.useMemo(()=>({basename:i,navigator:n,static:o,future:{}}),[i,n,o]);"string"==typeof a&&(a=g(a));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:f="default"}=a,S=s.useMemo(()=>{let e=T(u,i);return null==e?null:{location:{pathname:e,search:c,hash:d,state:m,key:f},navigationType:r}},[i,u,c,d,m,f,r]);return p(null!=S,`<Router basename="${i}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==S?null:s.createElement(W.Provider,{value:l},s.createElement(z.Provider,{children:t,value:S}))}s.memo(function({routes:e,future:t,state:a}){return te(e,void 0,a,t)}),s.Component;var he="get",pe="application/x-www-form-urlencoded";function de(e){return null!=e&&"string"==typeof e.tagName}var me=null,fe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ge(e){return null==e||fe.has(e)?e:(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pe}"`),null)}function Se(e,t){if(!1===e||null==e)throw new Error(t)}function ve(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Pe(e,t,a,r,n,o){let i=(e,t)=>!a[t]||e.route.id!==a[t].route.id,l=(e,t)=>a[t].pathname!==e.pathname||a[t].route.path?.endsWith("*")&&a[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function xe(){let e=s.useContext(I);return Se(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ye(){let e=s.useContext(H);return Se(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Symbol("SingleFetchRedirect"),s.Component;var Ve=s.createContext(void 0);function we(){let e=s.useContext(Ve);return Se(e,"You must render this element inside a <HydratedRouter> element"),e}function Ge(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function be({page:e,...t}){let{router:a}=xe(),r=s.useMemo(()=>S(a.routes,e,a.basename),[a.routes,e,a.basename]);return r?s.createElement(Ce,{page:e,matches:r,...t}):null}function ke(e){let{manifest:t,routeModules:a}=we(),[r,n]=s.useState([]);return s.useEffect(()=>{let r=!1;return async function(e,t,a){return function(e,t){let a=new Set,r=new Set(t);return e.reduce((e,n)=>{if(t&&(null==(o=n)||"string"!=typeof o.page)&&"script"===n.as&&n.href&&r.has(n.href))return e;var o;let i=JSON.stringify(function(e){let t={},a=Object.keys(e).sort();for(let r of a)t[r]=e[r];return t}(n));return a.has(i)||(a.add(i),e.push({key:i,link:n})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,a);return e.links?e.links():[]}return[]}))).flat(1).filter(ve).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,a).then(e=>{r||n(e)}),()=>{r=!0}},[e,t,a]),r}function Ce({page:e,matches:t,...a}){let r=Y(),{manifest:n,routeModules:o}=we(),{loaderData:i,matches:l}=ye(),u=s.useMemo(()=>Pe(e,t,l,n,r,"data"),[e,t,l,n,r]),c=s.useMemo(()=>Pe(e,t,l,n,r,"assets"),[e,t,l,n,r]),h=s.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let a=new Set,l=!1;if(t.forEach(e=>{let t=n.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in i&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:a.add(e.route.id))}),0===a.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return l&&a.size>0&&s.searchParams.set("_routes",t.filter(e=>a.has(e.route.id)).map(e=>e.route.id).join(",")),[s.pathname+s.search]},[i,r,n,u,t,e,o]),p=s.useMemo(()=>function(e,t){return a=e.map(e=>{let a=t.routes[e.route.id];if(!a)return[];let r=[a.module];return a.imports&&(r=r.concat(a.imports)),r}).flat(1),[...new Set(a)];var a}(c,n),[c,n]),d=ke(c);return s.createElement(s.Fragment,null,h.map(e=>s.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...a})),p.map(e=>s.createElement("link",{key:e,rel:"modulepreload",href:e,...a})),d.map(({key:e,link:t})=>s.createElement("link",{key:e,...t})))}Ve.displayName="FrameworkContext";function je(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}var _e="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{_e&&(window.__reactRouterVersion="7.1.1")}catch(e){}function Ae({basename:e,children:t,window:a}){let r=s.useRef();null==r.current&&(r.current=c({window:a,v5Compat:!0}));let n=r.current,[o,i]=s.useState({action:n.action,location:n.location}),l=s.useCallback(e=>{s.startTransition(()=>i(e))},[i]);return s.useLayoutEffect(()=>n.listen(l),[n,l]),s.createElement(ce,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n})}var Te=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=s.forwardRef(function({onClick:e,discover:t="render",prefetch:a="none",relative:r,reloadDocument:n,replace:o,state:i,target:l,to:u,preventScrollReset:c,viewTransition:d,...m},g){let S,{basename:v}=s.useContext(W),P="string"==typeof u&&Te.test(u),x=!1;if("string"==typeof u&&P&&(S=u,_e))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),a=T(t.pathname,v);t.origin===e.origin&&null!=a?u=a+t.search+t.hash:x=!0}catch(e){p(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=function(e,{relative:t}={}){h(J(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=s.useContext(W),{hash:n,pathname:o,search:i}=ee(e,{relative:t}),l=o;return"/"!==a&&(l="/"===o?a:M([a,o])),r.createHref({pathname:l,search:i,hash:n})}(u,{relative:r}),[V,w,G]=function(e,t){let a=s.useContext(Ve),[r,n]=s.useState(!1),[o,i]=s.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:h,onTouchStart:p}=t,d=s.useRef(null);s.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),s.useEffect(()=>{if(r){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{n(!0)},f=()=>{n(!1),i(!1)};return a?"intent"!==e?[o,d,{}]:[o,d,{onFocus:Ge(l,m),onBlur:Ge(u,f),onMouseEnter:Ge(c,m),onMouseLeave:Ge(h,f),onTouchStart:Ge(p,m)}]:[!1,d,{}]}(a,m),b=function(e,{target:t,replace:a,state:r,preventScrollReset:n,relative:o,viewTransition:i}={}){let l=X(),u=Y(),c=ee(e,{relative:o});return s.useCallback(s=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(s,t)){s.preventDefault();let t=void 0!==a?a:f(u)===f(c);l(e,{replace:t,state:r,preventScrollReset:n,relative:o,viewTransition:i})}},[u,l,c,a,r,t,e,n,o,i])}(u,{replace:o,state:i,target:l,preventScrollReset:c,relative:r,viewTransition:d}),k=s.createElement("a",{...m,...G,href:S||y,onClick:x||n?e:function(t){e&&e(t),t.defaultPrevented||b(t)},ref:je(g,w),target:l,"data-discover":P||"render"!==t?void 0:"true"});return V&&!P?s.createElement(s.Fragment,null,k,s.createElement(be,{page:y})):k});Re.displayName="Link",s.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:a="",end:r=!1,style:n,to:o,viewTransition:i,children:l,...u},c){let p=ee(o,{relative:u.relative}),d=Y(),m=s.useContext(H),{navigator:f,basename:g}=s.useContext(W),S=null!=m&&function(e,t={}){let a=s.useContext(U);h(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Le("useViewTransitionState"),n=ee(e,{relative:t.relative});if(!a.isTransitioning)return!1;let o=T(a.currentLocation.pathname,r)||a.currentLocation.pathname,i=T(a.nextLocation.pathname,r)||a.nextLocation.pathname;return null!=_(n.pathname,i)||null!=_(n.pathname,o)}(p)&&!0===i,v=f.encodeLocation?f.encodeLocation(p).pathname:p.pathname,P=d.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(P=P.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&g&&(x=T(x,g)||x);const y="/"!==v&&v.endsWith("/")?v.length-1:v.length;let V,w=P===v||!r&&P.startsWith(v)&&"/"===P.charAt(y),G=null!=x&&(x===v||!r&&x.startsWith(v)&&"/"===x.charAt(v.length)),b={isActive:w,isPending:G,isTransitioning:S},k=w?e:void 0;V="function"==typeof a?a(b):[a,w?"active":null,G?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof n?n(b):n;return s.createElement(Re,{...u,"aria-current":k,className:V,ref:c,style:C,to:o,viewTransition:i},"function"==typeof l?l(b):l)}).displayName="NavLink";var Ee=s.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:r,replace:n,state:o,method:i=he,action:l,onSubmit:u,relative:c,preventScrollReset:p,viewTransition:d,...m},g)=>{let S=function(){let{router:e}=Le("useSubmit"),{basename:t}=s.useContext(W),a=le("useRouteId");return s.useCallback(async(r,n={})=>{let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let a,r,n,o,i;if(de(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?T(i,t):null,a=e.getAttribute("method")||he,n=ge(e.getAttribute("enctype"))||pe,o=new FormData(e)}else if(function(e){return de(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return de(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?T(l,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||he,n=ge(e.getAttribute("formenctype"))||ge(i.getAttribute("enctype"))||pe,o=new FormData(i,e),!function(){if(null===me)try{new FormData(document.createElement("form"),0),me=!1}catch(e){me=!0}return me}()){let{name:t,type:a,value:r}=e;if("image"===a){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(de(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=he,r=null,n=pe,i=e}var l;return o&&"text/plain"===n&&(i=o,o=void 0),{action:r,method:a.toLowerCase(),encType:n,formData:o,body:i}}(r,t);if(!1===n.navigate){let t=n.fetcherKey||Ne();await e.fetch(t,a,n.action||o,{preventScrollReset:n.preventScrollReset,formData:s,body:u,formMethod:n.method||i,formEncType:n.encType||l,flushSync:n.flushSync})}else await e.navigate(n.action||o,{preventScrollReset:n.preventScrollReset,formData:s,body:u,formMethod:n.method||i,formEncType:n.encType||l,replace:n.replace,state:n.state,fromRouteId:a,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,a])}(),v=function(e,{relative:t}={}){let{basename:a}=s.useContext(W),r=s.useContext(Q);h(r,"useFormAction must be used inside a RouteContext");let[n]=r.matches.slice(-1),o={...ee(e||".",{relative:t})},i=Y();if(null==e){o.search=i.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let a=e.toString();o.search=a?`?${a}`:""}}return e&&"."!==e||!n.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(o.pathname="/"===o.pathname?a:M([a,o.pathname])),f(o)}(l,{relative:c}),P="get"===i.toLowerCase()?"get":"post",x="string"==typeof l&&Te.test(l);return s.createElement("form",{ref:g,method:P,action:v,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,l=r?.getAttribute("formmethod")||i;S(r||e.currentTarget,{fetcherKey:t,method:l,navigate:a,replace:n,state:o,relative:c,preventScrollReset:p,viewTransition:d})},...m,"data-discover":x||"render"!==e?void 0:"true"})});function Le(e){let t=s.useContext(I);return h(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Ee.displayName="Form";var Me=0,Ne=()=>`__${String(++Me)}__`;new TextEncoder,window.ReactDOM;const Be=window.popupMaker.useQueryParams,De=({children:e})=>{var t;const{navigator:a}=(0,s.useContext)(W),r=X(),n=null==(t=(0,s.useContext)(I))?void 0:t.router,o=Y();return e({replace(e){r(e.search||"?",{replace:!0,state:e.state})},push(e){r(e.search||"?",{replace:!1,state:e.state})},get location(){var e,t,r;return null!=(r=null!=(t=null==(e=null==n?void 0:n.state)?void 0:e.location)?t:null==a?void 0:a.location)?r:o}})},Fe=window.wp.domReady;var $e=a.n(Fe);const Oe=window.wp.hooks,Ie=window.wp.element,He=window.wp.data,Ue=window.popupMaker.data;function We(e){var t,a,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(a=We(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}const ze=function(){for(var e,t,a=0,r="",n=arguments.length;a<n;a++)(e=arguments[a])&&(t=We(e))&&(r&&(r+=" "),r+=t);return r},Qe=window.popupMaker.i18n,Ze=window.wp.components,Je=window.popupMaker.layout,Ye=((0,Ie.forwardRef)(({icon:e,size:t=24,...a},r)=>(0,Ie.cloneElement)(e,{width:t,height:t,...a,ref:r})),window.wp.primitives),Ke=window.ReactJSXRuntime,qe=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Circle,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ke.jsx)(Ye.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm3.8 10.7-1.1 1.1-2.7-2.7-2.7 2.7-1.1-1.1 2.7-2.7-2.7-2.7 1.1-1.1 2.7 2.7 2.7-2.7 1.1 1.1-2.7 2.7 2.7 2.7Z"})})),Xe=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ke.jsx)(Ye.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})),et=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ke.jsx)(Ye.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})),tt=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.Circle,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.G,Ye.Path,Ye.Path,Ye.SVG,Ye.G,Ye.Path,Ye.Path,Ye.SVG,Ye.G,Ye.Path,Ye.Path,Ye.SVG,Ye.G,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})})),at=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ke.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})})),rt=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})})),nt=(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),ot=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})})),it=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})})),lt=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.Path,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})),st=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,(0,Ke.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ke.jsx)(Ye.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})})),ut=(Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,Ye.SVG,Ye.Path,window.wp.htmlEntities),ct=window.popupMaker.utils,ht=window.popupMaker.icons,pt=window.popupMaker.ctaEditor,dt=window.popupMaker.components,mt=window.popupMaker.coreData,ft=()=>{},gt={callToActions:[],filteredCallToActions:[],bulkSelection:[],setBulkSelection:()=>{},updateCallToAction:(e,t)=>Promise.resolve(!1),deleteCallToAction:(e,t=!1)=>Promise.resolve(!1),isLoading:!1,isDeleting:!1,filters:{status:"all",searchText:"",type:"all"},setFilters:ft,sortConfig:{orderby:"id",order:dt.SortDirection.ASC},setSortConfig:ft},St=(0,Ie.createContext)(gt),{Provider:vt,Consumer:Pt}=St,xt=({value:e={},children:t})=>{const[a,r]=(0,Ie.useState)([]),[n,o]=(0,Be.useQueryParams)({orderby:(0,Be.withDefault)(Be.StringParam,"id"),order:(0,Be.withDefault)(Be.StringParam,dt.SortDirection.ASC)}),[i,l]=(0,Be.useQueryParams)({status:(0,Be.withDefault)(Be.StringParam,"all"),searchText:(0,Be.withDefault)(Be.StringParam,""),type:(0,Be.withDefault)(Be.StringParam,"all")}),s=()=>l({status:void 0,searchText:void 0,type:void 0});(0,Ie.useEffect)(()=>s,[]);const u=(0,He.useSelect)(e=>e(mt.callToActionStore).getCallToActions(),[]),c=(0,He.useSelect)(e=>e(mt.callToActionStore).isResolving("getCallToActions"),[]),h=(0,He.useSelect)(e=>e(mt.callToActionStore).isResolving("deleteCallToAction"),[]),{updateCallToAction:p,deleteCallToAction:d}=(0,He.useDispatch)(mt.callToActionStore),m=(0,Ie.useMemo)(()=>{if(!u)return[];const e=u.filter(e=>"all"===i.status||i.status===e.status).filter(e=>!i.searchText||!i.searchText.length||e.title.rendered.toLowerCase().indexOf(i.searchText.toLowerCase())>=0||e.excerpt.rendered&&e.excerpt.rendered.toLowerCase().indexOf(i.searchText.toLowerCase())>=0).filter(e=>"all"===i.type||i.type===e.settings.type);return null!==n&&e.sort((e,t)=>{const a="type"===n.orderby?e.settings.type:e.title.rendered.toLowerCase(),r="type"===n.orderby?t.settings.type:t.title.rendered.toLowerCase();return a<r?n.order===dt.SortDirection.ASC?-1:1:a>r?n.order===dt.SortDirection.ASC?1:-1:0}),e},[u,i,n]);return(0,Ke.jsx)(vt,{value:{...e,bulkSelection:a,setBulkSelection:r,filters:i,setFilters:l,callToActions:u,filteredCallToActions:m,isLoading:c,isDeleting:h,updateCallToAction:p,deleteCallToAction:d,sortConfig:n,setSortConfig:o},children:t})},yt=()=>(0,Ie.useContext)(St),Vt=window.popupMaker.registry,wt=(0,Vt.createRegistry)({name:"cta-editor/list-bulk-actions",groups:{status:{priority:10,label:"Status"},trash:{priority:20,label:"Trash"},export:{priority:30,label:"Export"}}}),Gt=()=>wt.useItems(),bt=wt.register,kt=wt.registerGroup,Ct=()=>wt.getItems(),jt=(0,Vt.createRegistry)({name:"cta-editor/list-quick-actions",groups:{general:{priority:10},trash:{priority:20}}}),_t=()=>jt.useItems(),At=jt.register,Tt=jt.registerGroup,Rt=()=>jt.getItems(),Et=(0,Vt.createRegistry)({name:"cta-editor/list-filters",groups:{core:{priority:10,label:"Core"},advanced:{priority:20,label:"Advanced"}},defaultGroup:"core"}),Lt=()=>Et.useItems(),Mt=Et.register,Nt=Et.registerGroup,Bt=()=>Et.getItems(),Dt=(0,Vt.createRegistry)({name:"cta-editor/list-options",groups:{import:{priority:10,label:"Import"}}}),Ft=()=>Dt.useItems(),$t=Dt.register,Ot=Dt.registerGroup,It=()=>Dt.getItems(),Ht=()=>{const e=(0,Ie.useRef)(void 0),t=(0,Ie.useRef)(),[a,r]=(0,Ie.useState)(!1),n=Gt(),{bulkSelection:o=[]}=yt(),i={};if(0===o.length)return null;const l=({group:t})=>{if(!t||t===e.current)return null;const a=e.current;return e.current=t,a?(0,Ke.jsx)("hr",{}):null};return(0,Ke.jsx)(Ke.Fragment,{children:(0,Ke.jsx)(Ze.Dropdown,{className:"list-table-bulk-actions",contentClassName:"list-table-bulk-actions__popover",placement:"bottom left",focusOnMount:"firstElement",open:a,popoverProps:{noArrow:!1,anchor:{getBoundingClientRect:()=>t.current?.getBoundingClientRect()||new DOMRect},onClose:()=>{r(!1)},onFocusOutside:()=>{r(!1)}},renderToggle:()=>(0,Ke.jsxs)(Ze.Flex,{children:[(0,Ke.jsx)("span",{className:"selected-items",children:(0,Qe.sprintf)(
// translators: 1. number of items.
// translators: 1. number of items.
(0,Qe._n)("%d item selected","%d items selected",o.length,"popup-maker"),o.length)}),(0,Ke.jsxs)(Ze.Button,{className:"popover-toggle",ref:e=>{t.current=e},"aria-label":(0,Qe.__)("Bulk Actions","popup-maker"),variant:"secondary",onClick:()=>r(!a),"aria-expanded":a,icon:ht.CheckAll,iconSize:20,children:[(0,Qe.__)("Bulk Actions","popup-maker"),(0,Ke.jsx)(Ze.Icon,{className:"toggle-icon",icon:a?et:Xe})]})]}),renderContent:({onClose:t})=>(e.current=void 0,(0,Ke.jsx)(Ze.NavigableMenu,{orientation:"vertical",children:n.map(({id:e,group:a,render:r})=>(0,Ke.jsxs)(Ie.Fragment,{children:[(0,Ke.jsx)(l,{group:a}),(0,Ke.jsx)(r,{...i,onClose:t})]},e))}))})})},Ut=({values:e})=>{const t=(0,Ie.useRef)(void 0),a=_t(),r={values:e};if(0===a.length)return null;const n=({group:e})=>{if(!e||e===t.current)return null;const a=t.current;return t.current=e,a?(0,Ke.jsx)("span",{children:"|"}):null};return(0,Ke.jsx)("div",{className:"item-actions",children:(t.current=void 0,(0,Ke.jsx)(Ke.Fragment,{children:a.map(({id:e,group:t,render:a})=>(0,Ke.jsxs)(Ie.Fragment,{children:[(0,Ke.jsx)(n,{group:t}),(0,Ke.jsx)(a,{...r})]},e))}))})},Wt=()=>{const{filters:e={},setFilters:t,callToActions:a=[],filteredCallToActions:r=[]}=yt(),n=Lt(),o=(0,Ie.useRef)(void 0),i=(0,Ie.useCallback)(({group:e})=>e&&e!==o.current?(o.current,o.current=e,null):null,[]),l=(0,Ie.useCallback)(()=>(o.current=void 0,(0,Ke.jsx)(Ke.Fragment,{children:n.map(({id:n,group:o,render:l})=>(0,Ke.jsxs)(Ie.Fragment,{children:[(0,Ke.jsx)(i,{group:o}),(0,Ke.jsx)(l,{filters:e,setFilters:t,onClose:()=>{},items:a,filteredItems:r})]},n))})),[n,e,t,a,r,i]);return 0===n.length?null:(0,Ke.jsx)("div",{className:"list-table-filters",children:l()})},zt=()=>{const e=(0,Ie.useRef)(),t=(0,Ie.useRef)(void 0),[a,r]=(0,Ie.useState)(!1),n=Ft(),o={};if(0===n.length)return null;const i=({group:e})=>{if(!e||e===t.current)return null;const a=t.current;return t.current=e,a?(0,Ke.jsx)("hr",{}):null};return(0,Ke.jsx)(Ze.Dropdown,{className:"list-table-options-menu",contentClassName:"list-table-options-menu__popover",placement:"bottom left",focusOnMount:"firstElement",open:a,popoverProps:{noArrow:!1,anchor:{getBoundingClientRect:()=>e.current?.getBoundingClientRect()||new DOMRect},onClose:()=>{r(!1)},onFocusOutside:()=>{r(!1)}},renderToggle:()=>(0,Ke.jsx)(Ze.Button,{className:"popover-toggle","aria-label":(0,Qe.__)("Additional options","popup-maker"),icon:ot,onClick:()=>r(!a),"aria-expanded":a,ref:t=>{e.current=t}}),renderContent:({onClose:e})=>(t.current=void 0,(0,Ke.jsx)(Ze.NavigableMenu,{orientation:"vertical",children:n.map(({id:t,group:a,render:r})=>(0,Ke.jsxs)(Ie.Fragment,{children:[(0,Ke.jsx)(i,{group:a}),(0,Ke.jsx)(r,{...o,onClose:e})]},t))}))})},{cta_types:Qt}=window.popupMakerCtaAdmin,Zt=()=>{const{setEditorId:e}=(0,pt.useEditor)(),[t,a]=(0,Ie.useState)(!1),[r,n]=(0,Ie.useState)(),o=()=>n(void 0);return(0,Ke.jsx)(xt,{children:(0,Ke.jsx)(Pt,{children:({isLoading:n,bulkSelection:i=[],setBulkSelection:l=ct.noop,filteredCallToActions:s=[],updateCallToAction:u=ct.noop,filters:{searchText:c=""},setFilters:h,sortConfig:p,setSortConfig:d})=>(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(dt.ConfirmDialogue,{...r,onClose:o}),(0,Ke.jsxs)("div",{className:"list-table-container",children:[n&&(0,Ke.jsx)("div",{className:"is-loading",children:(0,Ke.jsx)(Ze.Spinner,{})}),(0,Ke.jsxs)("div",{className:"list-table-header",children:[(0,Ke.jsxs)("div",{className:"list-search",children:[(0,Ke.jsx)(Ze.Icon,{icon:it}),(0,Ke.jsx)(Ze.TextControl,{placeholder:(0,Qe.__)("Search Call to Actions…","popup-maker"),value:null!=c?c:"",onChange:e=>h({searchText:""!==e?e:void 0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,Ke.jsx)(Ht,{}),0===i.length&&(0,Ke.jsx)(Ze.Button,{className:"filters-toggle",variant:"secondary",onClick:()=>{a(!t)},"aria-expanded":t,icon:ht.FilterLines,iconSize:20,text:t?(0,Qe.__)("Hide Filters","popup-maker"):(0,Qe.__)("Filters","popup-maker")}),(0,Ke.jsx)(zt,{})]}),t&&(0,Ke.jsx)(Wt,{}),(0,Ke.jsx)(dt.ListTable,{selectedItems:i,onSelectItems:e=>l(e),items:n?[]:s,columns:{enabled:()=>(0,Ke.jsx)(Ze.Tooltip,{text:(0,Qe.__)("Enable or disable the call to action","popup-maker"),placement:"top-end",children:(0,Ke.jsx)("span",{children:(0,Ke.jsx)(Ze.Icon,{icon:at})})}),title:(0,Qe.__)("Name","popup-maker"),description:(0,Qe.__)("Description","popup-maker"),type:(0,Qe.__)("Type","popup-maker"),conversions:(0,Qe.__)("Conversions","popup-maker"),status:(0,Qe.__)("Status","popup-maker")},sortableColumns:["type","title","conversions"],onSort:(e,t)=>{d({orderby:e,order:t})},initialSort:p,rowClasses:e=>[`call-to-action-${e.id}`,`status-${e.status}`],renderCell:(t,a)=>{var r,n,o;const i=a.status,l="trash"===i,s="publish"===i;switch(t){case"enabled":return(0,Ke.jsx)(Ze.ToggleControl,{label:"","aria-label":(0,Qe.__)("Enable or disable the call to action","popup-maker"),checked:s,disabled:l,onChange:e=>{u({id:a.id,status:e?"publish":"draft"})},__nextHasNoMarginBottom:!0});case"status":return l?(0,Ke.jsx)(Ze.Icon,{"aria-label":(0,Qe.__)("In Trash","popup-maker"),icon:lt,size:20}):(0,Ke.jsx)("span",{children:s?(0,Qe.__)("Enabled","popup-maker"):(0,Qe.__)("Disabled","popup-maker")});case"title":return(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(Ze.Button,{variant:"link",onClick:()=>e(a.id),children:(0,ut.decodeEntities)(a.title.rendered)}),(0,Ke.jsx)(Ut,{values:a})]});case"conversions":return null!==(r=a.stats?.conversions)&&void 0!==r?r:0;case"type":return(e=>{var t;const a=Object.values(Qt).find(({key:t})=>t===e);return null!==(t=a?.label)&&void 0!==t?t:""})(a.settings.type);case"description":return(0,ut.decodeEntities)(a.excerpt?.raw||"");default:return null!==(n=null!==(o=a[t])&&void 0!==o?o:a.settings[t])&&void 0!==n?n:""}}})]})]})})})},Jt=()=>{var e;const{setEditorId:t}=(0,pt.useEditor)(),a=(0,He.useSelect)(e=>e(mt.callToActionStore).getCallToActions(),[]),r=(0,He.useSelect)(e=>e(mt.callToActionStore).isResolving("getCallToActions"),[]),{createCallToAction:n}=(0,He.useDispatch)(mt.callToActionStore),o=null!==(e=a?.length)&&void 0!==e?e:0;return(0,Ke.jsxs)("header",{className:"popup-maker-call-to-actions-view__header",children:[(0,Ke.jsx)("h1",{className:"view-title wp-heading-inline",children:(0,Qe.__)("Call to Actions","popup-maker")}),(0,Ke.jsx)("span",{className:"item-count",children:r?(0,Ke.jsx)(Ze.Spinner,{}):(0,Qe.sprintf)(/* translators: 1. Number of items */ /* translators: 1. Number of items */
(0,Qe._n)("%d item","%d items",o,"popup-maker"),o)}),(0,Ke.jsx)(Ze.Button,{className:"add-call-to-action",onClick:async()=>{const e=await n({title:(0,Qe.__)("New Call to Action","popup-maker")});e&&t(e.id)},variant:"primary",children:(0,Qe.__)("Add Call to Action","popup-maker")})]})},Yt=()=>{const e=(0,Ie.useRef)({}),{notices:t,isEditorActive:a}=(0,He.useSelect)(e=>({notices:e(mt.callToActionStore).getNotices(),isEditorActive:e(mt.callToActionStore).isEditorActive()}),[]),{removeNotice:r}=(0,He.useDispatch)(mt.callToActionStore),n=(0,Ie.useCallback)(t=>{e.current[t]&&(clearTimeout(e.current[t]),delete e.current[t]),r(t)},[r]);return(0,Ie.useLayoutEffect)(()=>{t.forEach(t=>{if(e.current[t.id])return;const a=t.id?.startsWith("field-error-");a||pt.DEBUG_MODE||(e.current[t.id]=setTimeout(()=>{n(t.id)},3e3))})},[t,n]),!t.length||a?null:(0,Ke.jsx)("div",{className:"notices",children:t.map(e=>(0,Ke.jsx)(Ze.Notice,{status:e.status,isDismissible:e.isDismissible,onRemove:()=>n(e.id),children:e.content},e.id))})},Kt=()=>"undefined"!=typeof window&&window.popupMaker.globalVars?window.popupMaker.globalVars:{version:"1.0.0",wpVersion:6.5,pluginUrl:"",assetsUrl:"",adminUrl:"",nonce:"",permissions:{edit_ctas:!1,edit_popups:!1,edit_popup_themes:!1,mange_settings:!1}},qt=()=>{const{permissions:e={edit_ctas:!1}}=Kt(),{edit_ctas:t}=e;if(!t)return(0,Ke.jsxs)("div",{className:"call-to-action-list permission-denied",children:[(0,Ke.jsx)(Yt,{}),(0,Ke.jsx)("h3",{children:(0,Qe.__)("Permission Denied","popup-maker")}),(0,Ke.jsx)("p",{children:(0,Ke.jsx)("strong",{children:(0,Qe.__)("You do not have permission to manage Call To Actions.","popup-maker")})})]});const a=(0,pt.withQueryParams)((0,pt.withModal)(pt.Editor));return(0,Ke.jsxs)("div",{className:"call-to-action-list",children:[(0,Ke.jsx)(Yt,{}),(0,Ke.jsx)(Jt,{}),(0,Ke.jsx)(Zt,{}),(0,Ke.jsx)(a,{})]})},Xt=()=>{const{permissions:e={edit_ctas:!1}}=Kt(),{edit_ctas:t}=e,[{view:a="call-to-actions"},r]=(0,Be.useQueryParams)({tab:Be.StringParam,view:Be.StringParam}),n=(0,Ie.useMemo)(()=>{let e=[];return t&&e.push({name:"call-to-actions",title:(0,Qe.__)("Call to Actions","popup-maker"),className:"call-to-actions",pageTitle:(0,Qe.__)("Popup Maker - Call to Actions","popup-maker"),heading:(0,Qe.__)("Popup Maker - Call to Actions","popup-maker"),comp:qt}),e=(0,Oe.applyFilters)("popupMaker.callToActionEditor.views",[...e],{view:a,setParams:r}),e},[a,r,t]),o=n.find(e=>e.name===a),i=o?.comp?o.comp:()=>(0,Ke.jsx)(Ke.Fragment,{});(0,Ie.useEffect)(()=>{var e;document.title=null!==(e=n.find(e=>e.name===a)?.pageTitle)&&void 0!==e?e:(0,Qe.__)("Popup Maker","popup-maker")},[a,n]);const{adminUrl:l}=Kt();return(0,Ke.jsxs)(Je.AppLayout,{className:ze(["popup-maker-call-to-actions-page",`view-${a}`]),children:[(0,Ke.jsx)(Je.AppHeader,{tabs:n,currentTab:null!=a?a:void 0,onTabChange:e=>r({view:e}),adminUrl:l}),(0,Ke.jsx)(Je.AppContent,{children:(0,Ke.jsx)(i,{})}),(0,Ke.jsx)(Ze.Popover.Slot,{})]})},ea={id:"enable",group:"status",priority:5,render:()=>{const e=(0,He.useRegistry)(),{bulkSelection:t=[],setBulkSelection:a}=yt(),{getCallToAction:r}=(0,He.useSelect)(e=>({getCallToAction:e(mt.callToActionStore).getCallToAction}),[]),{createNotice:n,updateCallToAction:o}=(0,He.useDispatch)(mt.callToActionStore);return 0===t.length?null:t.some(e=>{const t=r(e);return"publish"!==t?.status})?(0,Ke.jsx)(Ze.Button,{icon:rt,text:(0,Qe.__)("Enable","popup-maker"),onClick:()=>{e.batch(()=>{const e=t.length;t.forEach(e=>{const t=r(e);t?.id===e&&o({id:e,status:"publish"},!1,!1)}),a([]),n("success",(0,Qe.sprintf)(
// translators: 1. number of items
// translators: 1. number of items
(0,Qe._n)("%d call to action enabled.","%d call to actions enabled.",e,"popup-maker"),e),{id:"bulk-enable"})})}}):null}},ta={id:"disable",group:"status",priority:6,render:()=>{const{bulkSelection:e=[],setBulkSelection:t}=yt(),a=(0,He.useRegistry)(),{getCallToAction:r}=(0,He.useSelect)(e=>({getCallToAction:e(mt.callToActionStore).getCallToAction}),[]),{createNotice:n,updateCallToAction:o}=(0,He.useDispatch)(mt.callToActionStore);return 0===e.length?null:e.some(e=>{const t=r(e);return"draft"!==t?.status})?(0,Ke.jsx)(Ke.Fragment,{children:(0,Ke.jsx)(Ze.Button,{icon:nt,text:(0,Qe.__)("Disable","popup-maker"),onClick:()=>{a.batch(()=>{const a=e.length;e.forEach(e=>{const t=r(e);t?.id===e&&o({id:e,status:"draft"},!1,!1)}),t([]),n("success",(0,Qe.sprintf)(
// translators: 1. number of items
// translators: 1. number of items
(0,Qe._n)("%d call to action disabled.","%d call to actions disabled.",a,"popup-maker"),a),{id:"bulk-disable"})})}})}):null}},aa={id:"trash",group:"trash",priority:5,render:()=>{const[e,t]=(0,Ie.useState)(),{bulkSelection:a=[],setBulkSelection:r,deleteCallToAction:n}=yt(),o=(0,He.useRegistry)(),{getCallToAction:i}=(0,He.useSelect)(e=>({getCallToAction:e(mt.callToActionStore).getCallToAction}),[]),{createNotice:l}=(0,He.useDispatch)(mt.callToActionStore);return 0===a.length?null:a.some(e=>{const t=i(e);return"trash"!==t?.status})?(0,Ke.jsxs)(Ke.Fragment,{children:[e&&(0,Ke.jsx)(dt.ConfirmDialogue,{...e,onClose:()=>t(void 0)}),(0,Ke.jsx)(Ze.Button,{text:(0,Qe.__)("Trash","popup-maker"),icon:lt,onClick:()=>{t({isDestructive:!0,message:(0,Qe.sprintf)(
// translators: 1. number of items
// translators: 1. number of items
(0,Qe.__)("Are you sure you want to trash %d items?","popup-maker"),a.length),callback:()=>{o.batch(()=>{const e=a.length;a.forEach(e=>n(e,!1,!1)),r([]),l("success",(0,Qe.sprintf)(
// translators: 1. number of items
// translators: 1. number of items
(0,Qe._n)("%d call to action moved to trash.","%d call to actions moved to trash.",e,"popup-maker"),e),{id:"bulk-trash"})})}})}})]}):null}},ra={id:"delete",group:"trash",priority:6,render:()=>{const[e,t]=(0,Ie.useState)(),{bulkSelection:a=[],setBulkSelection:r}=yt(),n=(0,He.useRegistry)(),{createNotice:o,deleteCallToAction:i}=(0,He.useDispatch)(mt.callToActionStore);return 0===a.length?null:(0,Ke.jsxs)(Ke.Fragment,{children:[e&&(0,Ke.jsx)(dt.ConfirmDialogue,{...e,onClose:()=>t(void 0)}),(0,Ke.jsx)(Ze.Button,{text:(0,Qe.__)("Delete Permanently","popup-maker"),icon:qe,isDestructive:!0,onClick:()=>{t({isDestructive:!0,message:(0,Qe.sprintf)(
// translators: 1. call to action label.
// translators: 1. call to action label.
(0,Qe.__)("Are you sure you want to premanently delete %d items?","popup-maker"),a.length),callback:()=>{n.batch(()=>{const e=a.length;a.forEach(e=>i(e,!0,!1)),r([]),o("success",(0,Qe.sprintf)(
// translators: 1. number of items
// translators: 1. number of items
(0,Qe._n)("%d call to action deleted.","%d call to actions deleted.",e,"popup-maker"),e),{id:"bulk-delete"})})}})}})]})}},na={id:"export",group:"export",priority:5,render:()=>{const[e,t]=(0,Ie.useState)(!1),a=(0,Ie.useRef)(null);return(0,Ke.jsxs)(Ke.Fragment,{children:[e&&(0,Ke.jsx)(Ze.Popover,{anchor:a.current,onClose:()=>t(!1),children:(0,Ke.jsxs)(Ze.Flex,{direction:"column",gap:"16px",justify:"center",align:"center",className:"pmp-popover-content",style:{padding:"16px",minWidth:"350px"},children:[(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:28}),(0,Ke.jsx)("h3",{style:{margin:0},children:(0,Qe.__)("Quick exports with Popup Maker Pro","popup-maker")}),(0,Ke.jsx)("p",{style:{margin:0},children:(0,Qe.__)("Popup Maker Pro gives you the power to import & export your call to actions to a JSON file in seconds.","popup-maker")}),(0,Ke.jsx)(Ze.Button,{variant:"primary",href:"https://wppopupmaker.com/pricing/?utm_source=popup-maker&utm_medium=cta-editor&utm_campaign=export-cta",target:"_blank",children:(0,Qe.__)("Learn more or upgrade today","popup-maker")})]})}),(0,Ke.jsxs)(Ze.Flex,{direction:"row",justify:"space-between",onMouseEnter:()=>t(!0),style:{cursor:"pointer",paddingRight:"10px",pointerEvents:"all"},children:[(0,Ke.jsx)(Ze.Button,{icon:tt,text:(0,Qe.__)("Export","popup-maker"),disabled:!0,showTooltip:!0,label:(0,Qe.__)("Export is available with Popup Maker Pro","popup-maker"),ref:a}),(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:14})]})]})}},oa={all:(0,Qe.__)("All","popup-maker"),publish:(0,Qe.__)("Enabled","popup-maker"),draft:(0,Qe.__)("Disabled","popup-maker"),pending:(0,Qe.__)("Pending","popup-maker"),trash:(0,Qe.__)("Trash","popup-maker"),future:(0,Qe.__)("Future","popup-maker"),private:(0,Qe.__)("Private","popup-maker")},ia={id:"status",priority:10,group:"core",render:({filters:e,setFilters:t,onClose:a,items:r,filteredItems:n})=>{var o;const[i,l]=(0,Ie.useState)(!1),s=(0,Ie.useRef)(null),u=(0,Ie.useMemo)(()=>r.reduce((e,t)=>{var a;return e[t.status]=(null!==(a=e[t.status])&&void 0!==a?a:0)+1,e.all++,e},{all:0}),[r]),c=(0,Ie.useMemo)(()=>n.reduce((e,t)=>{var a;return e[t.status]=(null!==(a=e[t.status])&&void 0!==a?a:0)+1,e.all++,e},{all:0}),[n]),h=null!==(o=e?.status)&&void 0!==o?o:"all";return(0,Ke.jsxs)("div",{className:ze(["list-table-filter list-table-filter--status",i?"is-active":""]),children:[(0,Ke.jsxs)(Ze.Button,{className:"filter-button",onClick:()=>l(!i),ref:s,children:[(0,Ke.jsxs)("span",{className:"filter-label",children:[(0,Qe.__)("Status","popup-maker"),":"]}),"Â ",(0,Ke.jsx)("span",{className:"filter-selection",children:oa[h]}),(0,Ke.jsx)(Ze.Icon,{className:"filter-icon",icon:i?et:Xe})]}),i&&s.current&&(0,Ke.jsx)(Ze.Popover,{className:"list-table-filters__popover",anchor:s.current,onClose:()=>{l(!1),a()},position:"bottom right",onFocusOutside:()=>{l(!1),a()},children:(0,Ke.jsx)(Ze.RadioControl,{label:(0,Qe.__)("Status","popup-maker"),hideLabelFromVision:!0,selected:h,options:Object.entries(oa).filter(([e])=>{var t,a,r;return(null!==(t=u[h])&&void 0!==t?t:0)>0?(r=e,Boolean(c?.[r])):(null!==(a=u[e])&&void 0!==a?a:0)>0}).map(([e,t])=>{var a;return{label:`${t} (${null!==(a=c[e])&&void 0!==a?a:0})`,value:e}}),onChange:e=>{t({status:e}),l(!1),a()}})})]})}},la={id:"type",group:"core",render:({filters:e,setFilters:t,onClose:a,items:r,filteredItems:n})=>{var o,i;const[l,s]=(0,Ie.useState)(!1),u=(0,Ie.useRef)(null),c=(0,Ie.useMemo)(()=>{const{cta_types:e}=window.popupMakerCtaAdmin;return Object.values(e).reduce((e,{key:t,label:a})=>({...e,[t]:a}),{all:(0,Qe.__)("All","popup-maker")})},[]),h=(0,Ie.useMemo)(()=>r.reduce((e,t)=>{var a;const r=t.settings.type;return e[r]=(null!==(a=e[r])&&void 0!==a?a:0)+1,e.all++,e},{all:0}),[r]),p=(0,Ie.useMemo)(()=>n.reduce((e,t)=>{var a;const r=t.settings.type;return e[r]=(null!==(a=e[r])&&void 0!==a?a:0)+1,e.all++,e},{all:0}),[n]);return(0,Ke.jsxs)("div",{className:ze(["list-table-filter list-table-filter--type",l?"is-active":""]),children:[(0,Ke.jsxs)(Ze.Button,{className:"filter-button",onClick:()=>s(!l),ref:u,children:[(0,Ke.jsxs)("span",{className:"filter-label",children:[(0,Qe.__)("Type","popup-maker"),":"]}),"Â ",(0,Ke.jsx)("span",{className:"filter-selection",children:c[null!==(o=e?.type)&&void 0!==o?o:"all"]}),(0,Ke.jsx)(Ze.Icon,{className:"filter-icon",icon:l?et:Xe})]}),l&&u.current&&(0,Ke.jsx)(Ze.Popover,{className:"list-table-filters__popover",anchor:u.current,onClose:()=>{s(!1),a()},position:"bottom right",onFocusOutside:()=>{s(!1),a()},children:(0,Ke.jsx)(Ze.RadioControl,{label:(0,Qe.__)("Type","popup-maker"),hideLabelFromVision:!0,selected:null!==(i=e?.type)&&void 0!==i?i:"all",options:Object.entries(c).filter(([t])=>{var a,r,n;return(null!==(a=h[null!==(r=e?.type)&&void 0!==r?r:"all"])&&void 0!==a?a:0)>0?(e=>Boolean(p?.[e]))(t):(null!==(n=h[t])&&void 0!==n?n:0)>0}).map(([e,t])=>{var a;return{label:`${t} (${null!==(a=p[e])&&void 0!==a?a:0})`,value:e}}),onChange:e=>{t({type:"all"===e?void 0:e}),s(!1),a()}})})]})}},sa={id:"import",group:"export",render:()=>{const[e,t]=(0,Ie.useState)(!1),a=(0,Ie.useRef)(null);return(0,Ke.jsxs)(Ke.Fragment,{children:[e&&(0,Ke.jsx)(Ze.Popover,{anchor:a.current,onClose:()=>t(!1),children:(0,Ke.jsxs)(Ze.Flex,{direction:"column",gap:"16px",justify:"center",align:"center",style:{padding:"16px",minWidth:"350px"},children:[(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:28}),(0,Ke.jsx)("h3",{style:{margin:0},children:(0,Qe.__)("Quick imports with Popup Maker Pro","popup-maker")}),(0,Ke.jsx)("p",{style:{margin:0},children:(0,Qe.__)("Popup Maker Pro gives you the power to import your call to actions from a JSON file in seconds.","popup-maker")}),(0,Ke.jsx)(Ze.Button,{variant:"primary",href:"https://wppopupmaker.com/pricing/?utm_source=popup-maker&utm_medium=cta-editor&utm_campaign=import-cta",target:"_blank",children:(0,Qe.__)("Learn more or upgrade today","popup-maker")})]})}),(0,Ke.jsxs)(Ze.Flex,{direction:"row",justify:"space-between",onMouseEnter:()=>t(!0),style:{cursor:"pointer",paddingRight:"10px",pointerEvents:"all"},children:[(0,Ke.jsx)(Ze.Button,{icon:st,text:(0,Qe.__)("Import","popup-maker"),disabled:!0,showTooltip:!0,label:(0,Qe.__)("Import is available with Popup Maker Pro","popup-maker"),ref:a}),(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:14})]})]})}},ua={id:"export",group:"export",render:()=>{const[e,t]=(0,Ie.useState)(!1),a=(0,Ie.useRef)(null);return(0,Ke.jsxs)(Ke.Fragment,{children:[e&&(0,Ke.jsx)(Ze.Popover,{anchor:a.current,onClose:()=>t(!1),children:(0,Ke.jsxs)(Ze.Flex,{direction:"column",gap:"16px",justify:"center",align:"center",className:"pmp-popover-content",style:{padding:"16px",minWidth:"350px"},children:[(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:28}),(0,Ke.jsx)("h3",{style:{margin:0},children:(0,Qe.__)("Quick exports with Popup Maker Pro","popup-maker")}),(0,Ke.jsx)("p",{style:{margin:0},children:(0,Qe.__)("Popup Maker Pro gives you the power to import & export your call to actions to a JSON file in seconds.","popup-maker")}),(0,Ke.jsx)(Ze.Button,{variant:"primary",href:"https://wppopupmaker.com/pricing/?utm_source=popup-maker&utm_medium=cta-editor&utm_campaign=export-cta",target:"_blank",children:(0,Qe.__)("Learn more or upgrade today","popup-maker")})]})}),(0,Ke.jsxs)(Ze.Flex,{direction:"row",justify:"space-between",onMouseEnter:()=>t(!0),style:{cursor:"pointer",paddingRight:"10px",pointerEvents:"all"},children:[(0,Ke.jsx)(Ze.Button,{icon:tt,text:(0,Qe.__)("Export","popup-maker"),disabled:!0,showTooltip:!0,label:(0,Qe.__)("Export is available with Popup Maker Pro","popup-maker"),ref:a}),(0,Ke.jsx)(Ze.Icon,{icon:ht.Mark,size:14})]})]})}},ca={id:"edit",group:"general",priority:-1,render:({values:e})=>{const{setEditorId:t}=(0,pt.useEditor)();return(0,Ke.jsxs)(Ke.Fragment,{children:[`${(0,Qe.__)("ID","popup-maker")}: ${e.id}`,(0,Ke.jsx)(Ze.Button,{text:(0,Qe.__)("Edit","popup-maker"),variant:"link",onClick:()=>t(e.id)})]})}},ha={id:"trash",group:"trash",priority:11,render:({values:e})=>{const[t,a]=(0,Ie.useState)(),r=(0,He.useSelect)(e=>e(mt.callToActionStore).isResolving("deleteCallToAction"),[]),{deleteCallToAction:n,updateCallToAction:o}=(0,He.useDispatch)(mt.callToActionStore),i="trash"===e.status;return(0,Ke.jsxs)(Ke.Fragment,{children:[t&&(0,Ke.jsx)(dt.ConfirmDialogue,{...t,onClose:()=>a(void 0)}),(0,Ke.jsx)(Ze.Button,{text:i?(0,Qe.__)("Untrash","popup-maker"):(0,Qe.__)("Trash","popup-maker"),variant:"link",isDestructive:!0,isBusy:!!r,onClick:()=>i?o({id:e.id,status:"draft"}):n(e.id)})]})}},pa={id:"delete",group:"trash",priority:12,render:({values:e})=>{const[t,a]=(0,Ie.useState)(),r=(0,He.useSelect)(e=>e(mt.callToActionStore).isResolving("deleteCallToAction"),[]),{deleteCallToAction:n}=(0,He.useDispatch)(mt.callToActionStore);return"trash"===e.status?(0,Ke.jsxs)(Ke.Fragment,{children:[t&&(0,Ke.jsx)(dt.ConfirmDialogue,{...t,onClose:()=>a(void 0)}),(0,Ke.jsx)(Ze.Button,{text:(0,Qe.__)("Delete Permanently","popup-maker"),variant:"link",isDestructive:!0,isBusy:!!r,onClick:()=>a({message:(0,Qe.__)("Are you sure you want to premanently delete this call to action?","popup-maker"),callback:()=>{n(e.id,!0)},isDestructive:!0})})]}):null}},da=()=>{const e=document.getElementById("popup-maker-call-to-actions-root-container");e&&(Object.values(n).forEach(e=>{bt(e)}),Object.values(i).forEach(e=>{$t(e)}),Object.values(l).forEach(e=>{At(e)}),Object.values(o).forEach(e=>{Mt(e)}),(0,Oe.doAction)("popupMaker.ctaAdmin.init"),(0,Ie.createRoot)(e).render((0,Ke.jsx)(Ae,{children:(0,Ke.jsx)(Be.QueryParamProvider,{adapter:De,children:(0,Ke.jsx)(He.RegistryProvider,{value:Ue.registry,children:(0,Ke.jsx)(Xt,{})})})})))};$e()(da),(window.popupMaker=window.popupMaker||{}).ctaAdmin=r})();
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists