Changeset 3468409
- Timestamp:
- 02/24/2026 09:00:15 AM (5 weeks ago)
- Location:
- simply-static/trunk
- Files:
-
- 8 edited
-
readme.txt (modified) (4 diffs)
-
simply-static.php (modified) (2 diffs)
-
src/admin/build/index.asset.php (modified) (1 diff)
-
src/admin/build/index.js (modified) (15 diffs)
-
src/admin/inc/class-ss-admin-rest.php (modified) (2 diffs)
-
src/class-ss-plugin.php (modified) (2 diffs)
-
src/class-ss-url-extractor.php (modified) (8 diffs)
-
src/integrations/class-ss-divi-integration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simply-static/trunk/readme.txt
r3465779 r3468409 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.6. 07 Stable tag: 3.6.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 72 72 73 73 = Simply Static Studio - For Businesses & Content Creators = 74 From $ 19/month74 From $9/month 75 75 All-in-one managed WordPress hosting. Zero maintenance. Maximum security. 76 76 … … 203 203 Free: Generate static sites, export as ZIP or to local directory. Perfect for testing and simple exports. 204 204 Pro ($99-299/year): Advanced deployment, automation, forms, search, WP-CLI. For developers and agencies self-hosting. 205 Studio (from $ 19/month): All-in-one managed hosting. We handle WordPress, static hosting, backups, SSL, everything. For businesses who want zero maintenance.205 Studio (from $9/month): All-in-one managed hosting. We handle WordPress, static hosting, backups, SSL, everything. For businesses who want zero maintenance. 206 206 See detailed comparison 207 207 = Can I use the free version for production sites? = … … 276 276 == Changelog == 277 277 278 = 3.6.1 = 279 280 * small admin UX fixes 281 * server-side implementation for pagination-based search in export log 282 * DIVI integration: replace base64 encoded navigation URLs 283 * handle @font-face URLs if skipped by DomDocument (regex) 284 278 285 = 3.6.0 = 279 286 -
simply-static/trunk/simply-static.php
r3465779 r3468409 9 9 * Plugin URI: https://simplystatic.com 10 10 * Description: A static site generator to create fast and secure static versions of your WordPress website. 11 * Version: 3.6. 011 * Version: 3.6.1 12 12 * Author: Patrick Posner 13 13 * Author URI: https://patrickposner.com … … 20 20 define( 'SIMPLY_STATIC_PATH', plugin_dir_path( __FILE__ ) ); 21 21 define( 'SIMPLY_STATIC_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); 22 define( 'SIMPLY_STATIC_VERSION', '3.6. 0' );22 define( 'SIMPLY_STATIC_VERSION', '3.6.1' ); 23 23 24 24 // Check PHP version. -
simply-static/trunk/src/admin/build/index.asset.php
r3465779 r3468409 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element'), 'version' => ' 20e9a93e963b9447cfe0');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element'), 'version' => 'bb697653f4b9d7d77376'); -
simply-static/trunk/src/admin/build/index.js
r3465779 r3468409 1 (()=>{var e,t,s={510:(e,t,s)=>{"use strict";s.r(t),s.d(t,{ServerStyleSheet:()=>is,StyleSheetConsumer:()=>Nt,StyleSheetContext:()=>Pt,StyleSheetManager:()=>Dt,ThemeConsumer:()=>Ut,ThemeContext:()=>Lt,ThemeProvider:()=>Gt,__PRIVATE__:()=>as,createGlobalStyle:()=>ts,css:()=>Vt,default:()=>Xt,isStyledComponent:()=>Ve,keyframes:()=>ss,styled:()=>Xt,useTheme:()=>Wt,version:()=>pe,withTheme:()=>ns});var n=function(){return n=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var i in t=arguments[s])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(e,t,s){if(s||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var a=s(609),r=s.n(a),o=s(833),l=s.n(o),c="-ms-",d="-moz-",p="-webkit-",u="comm", h="rule",m="decl",g="@import",x="@keyframes",y="@layer",f=Math.abs,b=String.fromCharCode,_=Object.assign;function v(e){return e.trim()}function S(e,t){return(e=t.exec(e))?e[0]:e}function w(e,t,s){return e.replace(t,s)}function j(e,t,s){return e.indexOf(t,s)}function C(e,t){return 0|e.charCodeAt(t)}function k(e,t,s){return e.slice(t,s)}function E(e){return e.length}function P(e){return e.length}function N(e,t){return t.push(e),e}function R(e,t){return e.filter((function(e){return!S(e,t)}))}var T=1,D=1,F=0,I=0,B=0,O="";function H(e,t,s,n,i,a,r,o){return{value:e,root:t,parent:s,type:n,props:i,children:a,line:T,column:D,length:r,return:"",siblings:o}}function A(e,t){return _(H("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function M(e){for(;e.root;)e=A(e.root,{children:[e]});N(e,e.siblings)}function $(){return B=I>0?C(O,--I):0,D--,10===B&&(D=1,T--),B}function z(){return B=I<F?C(O,I++):0,D++,10===B&&(D=1,T++),B}function L(){return C(O,I)}function U(){return I}function W(e,t){return k(O,e,t)}function G(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q(e){return v(W(I-1,K(91===e?e+2:40===e?e+1:e)))}function J(e){for(;(B=L())&&B<33;)z();return G(e)>2||G(B)>3?"":" "}function Y(e,t){for(;--t&&z()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return W(e,U()+(t<6&&32==L()&&32==z()))}function K(e){for(;z();)switch(B){case e:return I;case 34:case 39:34!==e&&39!==e&&K(B);break;case 40:41===e&&K(e);break;case 92:z()}return I}function V(e,t){for(;z()&&e+B!==57&&(e+B!==84||47!==L()););return"/*"+W(t,I-1)+"*"+b(47===e?e:z())}function Q(e){for(;!G(L());)z();return W(e,I)}function Z(e,t){for(var s="",n=0;n<e.length;n++)s+=t(e[n],n,e,t)||"";return s}function X(e,t,s,n){switch(e.type){case y:if(e.children.length)break;case g:case m:return e.return=e.return||e.value;case u:return"";case x:return e.return=e.value+"{"+Z(e.children,n)+"}";case h:if(!E(e.value=e.props.join(",")))return""}return E(s=Z(e.children,n))?e.return=e.value+"{"+s+"}":""}function ee(e,t,s){switch(function(e,t){return 45^C(e,0)?(((t<<2^C(e,0))<<2^C(e,1))<<2^C(e,2))<<2^C(e,3):0}(e,t)){case 5103:return p+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return p+e+e;case 4789:return d+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return p+e+d+e+c+e+e;case 5936:switch(C(e,t+11)){case 114:return p+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return p+e+c+w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return p+e+c+w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return p+e+c+e+e;case 6165:return p+e+c+"flex-"+e+e;case 5187:return p+e+w(e,/(\w+).+(:[^]+)/,p+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return p+e+c+"flex-item-"+w(e,/flex-|-self/g,"")+(S(e,/flex-|baseline/)?"":c+"grid-row-"+w(e,/flex-|-self/g,""))+e;case 4675:return p+e+c+"flex-line-pack"+w(e,/align-content|flex-|-self/g,"")+e;case 5548:return p+e+c+w(e,"shrink","negative")+e;case 5292:return p+e+c+w(e,"basis","preferred-size")+e;case 6060:return p+"box-"+w(e,"-grow","")+p+e+c+w(e,"grow","positive")+e;case 4554:return p+w(e,/([^-])(transform)/g,"$1"+p+"$2")+e;case 6187:return w(w(w(e,/(zoom-|grab)/,p+"$1"),/(image-set)/,p+"$1"),e,"")+e;case 5495:case 3959:return w(e,/(image-set\([^]*)/,p+"$1$`$1");case 4968:return w(w(e,/(.+:)(flex-)?(.*)/,p+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+p+e+e;case 4200:if(!S(e,/flex-|baseline/))return c+"grid-column-align"+k(e,t)+e;break;case 2592:case 3360:return c+w(e,"template-","")+e;case 4384:case 3616:return s&&s.some((function(e,s){return t=s,S(e.props,/grid-\w+-end/)}))?~j(e+(s=s[t].value),"span",0)?e:c+w(e,"-start","")+e+c+"grid-row-span:"+(~j(s,"span",0)?S(s,/\d+/):+S(s,/\d+/)-+S(e,/\d+/))+";":c+w(e,"-start","")+e;case 4896:case 4128:return s&&s.some((function(e){return S(e.props,/grid-\w+-start/)}))?e:c+w(w(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return w(e,/(.+)-inline(.+)/,p+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(e)-1-t>6)switch(C(e,t+1)){case 109:if(45!==C(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+p+"$2-$3$1"+d+(108==C(e,t+3)?"$3":"$2-$3"))+e;case 115:return~j(e,"stretch",0)?ee(w(e,"stretch","fill-available"),t,s)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,s,n,i,a,r,o){return c+s+":"+n+o+(i?c+s+"-span:"+(a?r:+r-+n)+o:"")+e}));case 4949:if(121===C(e,t+6))return w(e,":",":"+p)+e;break;case 6444:switch(C(e,45===C(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+p+(45===C(e,14)?"inline-":"")+"box$3$1"+p+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,s,n){if(e.length>-1&&!e.return)switch(e.type){case m:return void(e.return=ee(e.value,e.length,s));case x:return Z([A(e,{value:w(e.value,"@","@"+p)})],n);case h:if(e.length)return function(e,t){return e.map(t).join("")}(s=e.props,(function(t){switch(S(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":M(A(e,{props:[w(t,/:(read-\w+)/,":"+d+"$1")]})),M(A(e,{props:[t]})),_(e,{props:R(s,n)});break;case"::placeholder":M(A(e,{props:[w(t,/:(plac\w+)/,":"+p+"input-$1")]})),M(A(e,{props:[w(t,/:(plac\w+)/,":"+d+"$1")]})),M(A(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),M(A(e,{props:[t]})),_(e,{props:R(s,n)})}return""}))}}function se(e){return function(e){return O="",e}(ne("",null,null,null,[""],e=function(e){return T=D=1,F=E(O=e),I=0,[]}(e),0,[0],e))}function ne(e,t,s,n,i,a,r,o,l){for(var c=0,d=0,p=r,u=0,h=0,m=0,g=1,x=1,y=1,_=0,v="",S=i,k=a,P=n,R=v;x;)switch(m=_,_=z()){case 40:if(108!=m&&58==C(R,p-1)){-1!=j(R+=w(q(_),"&","&\f"),"&\f",f(c?o[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:R+=q(_);break;case 9:case 10:case 13:case 32:R+=J(m);break;case 92:R+=Y(U()-1,7);continue;case 47:switch(L()){case 42:case 47:N(ae(V(z(),U()),t,s,l),l);break;default:R+="/"}break;case 123*g:o[c++]=E(R)*y;case 125*g:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+d:-1==y&&(R=w(R,/\f/g,"")),h>0&&E(R)-p&&N(h>32?re(R+";",n,s,p-1,l):re(w(R," ","")+";",n,s,p-2,l),l);break;case 59:R+=";";default:if(N(P=ie(R,t,s,c,d,i,o,v,S=[],k=[],p,a),a),123===_)if(0===d)ne(R,t,P,P,S,a,p,o,k);else switch(99===u&&110===C(R,3)?100:u){case 100:case 108:case 109:case 115:ne(e,P,P,n&&N(ie(e,P,P,0,0,i,o,v,i,S=[],p,k),k),i,k,p,o,n?S:k);break;default:ne(R,P,P,P,[""],k,0,o,k)}}c=d=h=0,g=y=1,v=R="",p=r;break;case 58:p=1+E(R),h=m;default:if(g<1)if(123==_)--g;else if(125==_&&0==g++&&125==$())continue;switch(R+=b(_),_*g){case 38:y=d>0?1:(R+="\f",-1);break;case 44:o[c++]=(E(R)-1)*y,y=1;break;case 64:45===L()&&(R+=q(z())),u=L(),d=p=E(v=R+=Q(U())),_++;break;case 45:45===m&&2==E(R)&&(g=0)}}return a}function ie(e,t,s,n,i,a,r,o,l,c,d,p){for(var u=i-1,m=0===i?a:[""],g=P(m),x=0,y=0,b=0;x<n;++x)for(var _=0,S=k(e,u+1,u=f(y=r[x])),j=e;_<g;++_)(j=v(y>0?m[_]+" "+S:w(S,/&\f/g,m[_])))&&(l[b++]=j);return H(e,t,s,0===i?h:o,l,c,d,p)}function ae(e,t,s,n){return H(e,t,s,u,b(B),k(e,2,-2),0,n)}function re(e,t,s,n,i){return H(e,t,s,m,k(e,0,n),k(e,n+1,-1),n,i)}var oe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="active",de="data-styled-version",pe="6.1.12",ue="/*!sc*/\n",he="undefined"!=typeof window&&"HTMLElement"in window,me=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ge={},xe=(new Set,Object.freeze([])),ye=Object.freeze({});function fe(e,t,s){return void 0===s&&(s=ye),e.theme!==s.theme&&e.theme||t||s.theme}var be=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ve=/(^-|-$)/g;function Se(e){return e.replace(_e,"-").replace(ve,"")}var we=/(a)(d)/gi,je=52,Ce=function(e){return String.fromCharCode(e+(e>25?39:97))};function ke(e){var t,s="";for(t=Math.abs(e);t>je;t=t/je|0)s=Ce(t%je)+s;return(Ce(t%je)+s).replace(we,"$1-$2")}var Ee,Pe=5381,Ne=function(e,t){for(var s=t.length;s;)e=33*e^t.charCodeAt(--s);return e},Re=function(e){return Ne(Pe,e)};function Te(e){return ke(Re(e)>>>0)}function De(e){return e.displayName||e.name||"Component"}function Fe(e){return"string"==typeof e&&!0}var Ie="function"==typeof Symbol&&Symbol.for,Be=Ie?Symbol.for("react.memo"):60115,Oe=Ie?Symbol.for("react.forward_ref"):60112,He={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ae={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$e=((Ee={})[Oe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ee[Be]=Me,Ee);function ze(e){return("type"in(t=e)&&t.type.$$typeof)===Be?Me:"$$typeof"in e?$e[e.$$typeof]:He;var t}var Le=Object.defineProperty,Ue=Object.getOwnPropertyNames,We=Object.getOwnPropertySymbols,Ge=Object.getOwnPropertyDescriptor,qe=Object.getPrototypeOf,Je=Object.prototype;function Ye(e,t,s){if("string"!=typeof t){if(Je){var n=qe(t);n&&n!==Je&&Ye(e,n,s)}var i=Ue(t);We&&(i=i.concat(We(t)));for(var a=ze(e),r=ze(t),o=0;o<i.length;++o){var l=i[o];if(!(l in Ae||s&&s[l]||r&&l in r||a&&l in a)){var c=Ge(t,l);try{Le(e,l,c)}catch(e){}}}}return e}function Ke(e){return"function"==typeof e}function Ve(e){return"object"==typeof e&&"styledComponentId"in e}function Qe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var s=e[0],n=1;n<e.length;n++)s+=t?t+e[n]:e[n];return s}function Xe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,s){if(void 0===s&&(s=!1),!s&&!Xe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=et(e[n],t[n]);else if(Xe(t))for(var n in t)e[n]=et(e[n],t[n]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function st(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var nt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,s=0;s<e;s++)t+=this.groupSizes[s];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var s=this.groupSizes,n=s.length,i=n;e>=i;)if((i<<=1)<0)throw st(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(s),this.length=i;for(var a=n;a<i;a++)this.groupSizes[a]=0}for(var r=this.indexOfGroup(e+1),o=(a=0,t.length);a<o;a++)this.tag.insertRule(r,t[a])&&(this.groupSizes[e]++,r++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],s=this.indexOfGroup(e),n=s+t;this.groupSizes[e]=0;for(var i=s;i<n;i++)this.tag.deleteRule(s)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var s=this.groupSizes[e],n=this.indexOfGroup(e),i=n+s,a=n;a<i;a++)t+="".concat(this.tag.getRule(a)).concat(ue);return t},e}(),it=new Map,at=new Map,rt=1,ot=function(e){if(it.has(e))return it.get(e);for(;at.has(rt);)rt++;var t=rt++;return it.set(e,t),at.set(t,e),t},lt=function(e,t){rt=t+1,it.set(e,t),at.set(t,e)},ct="style[".concat(le,"][").concat(de,'="').concat(pe,'"]'),dt=new RegExp("^".concat(le,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),pt=function(e,t,s){for(var n,i=s.split(","),a=0,r=i.length;a<r;a++)(n=i[a])&&e.registerName(t,n)},ut=function(e,t){for(var s,n=(null!==(s=t.textContent)&&void 0!==s?s:"").split(ue),i=[],a=0,r=n.length;a<r;a++){var o=n[a].trim();if(o){var l=o.match(dt);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(lt(d,c),pt(e,d,l[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(o)}}},ht=function(e){for(var t=document.querySelectorAll(ct),s=0,n=t.length;s<n;s++){var i=t[s];i&&i.getAttribute(le)!==ce&&(ut(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function mt(){return s.nc}var gt=function(e){var t=document.head,s=e||t,n=document.createElement("style"),i=function(e){var t=Array.from(e.querySelectorAll("style[".concat(le,"]")));return t[t.length-1]}(s),a=void 0!==i?i.nextSibling:null;n.setAttribute(le,ce),n.setAttribute(de,pe);var r=mt();return r&&n.setAttribute("nonce",r),s.insertBefore(n,a),n},xt=function(){function e(e){this.element=gt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,s=0,n=t.length;s<n;s++){var i=t[s];if(i.ownerNode===e)return i}throw st(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),yt=function(){function e(e){this.element=gt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var s=document.createTextNode(t);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ft=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),bt=he,_t={isServer:!he,useCSSOMInjection:!me},vt=function(){function e(e,t,s){void 0===e&&(e=ye),void 0===t&&(t={});var i=this;this.options=n(n({},_t),e),this.gs=t,this.names=new Map(s),this.server=!!e.isServer,!this.server&&he&&bt&&(bt=!1,ht(this)),tt(this,(function(){return function(e){for(var t=e.getTag(),s=t.length,n="",i=function(s){var i=function(e){return at.get(e)}(s);if(void 0===i)return"continue";var a=e.names.get(i),r=t.getGroup(s);if(void 0===a||!a.size||0===r.length)return"continue";var o="".concat(le,".g").concat(s,'[id="').concat(i,'"]'),l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),n+="".concat(r).concat(o,'{content:"').concat(l,'"}').concat(ue)},a=0;a<s;a++)i(a);return n}(i)}))}return e.registerId=function(e){return ot(e)},e.prototype.rehydrate=function(){!this.server&&he&&ht(this)},e.prototype.reconstructWithOptions=function(t,s){return void 0===s&&(s=!0),new e(n(n({},this.options),t),this.gs,s&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,s=e.target;return e.isServer?new ft(s):t?new xt(s):new yt(s)}(this.options),new nt(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ot(e),this.names.has(e))this.names.get(e).add(t);else{var s=new Set;s.add(t),this.names.set(e,s)}},e.prototype.insertRules=function(e,t,s){this.registerName(e,t),this.getTag().insertRules(ot(e),s)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ot(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),St=/&/g,wt=/^\s*\/\/.*$/gm;function jt(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=jt(e.children,t)),e}))}function Ct(e){var t,s,n,i=void 0===e?ye:e,a=i.options,r=void 0===a?ye:a,o=i.plugins,l=void 0===o?xe:o,c=function(e,n,i){return i.startsWith(s)&&i.endsWith(s)&&i.replaceAll(s,"").length>0?".".concat(t):e},d=l.slice();d.push((function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(St,s).replace(n,c))})),r.prefix&&d.push(te),d.push(X);var p=function(e,i,a,o){void 0===i&&(i=""),void 0===a&&(a=""),void 0===o&&(o="&"),t=o,s=i,n=new RegExp("\\".concat(s,"\\b"),"g");var l=e.replace(wt,""),c=se(a||i?"".concat(a," ").concat(i," { ").concat(l," }"):l);r.namespace&&(c=jt(c,r.namespace));var p,u,h,m=[];return Z(c,(p=d.concat((h=function(e){return m.push(e)},function(e){e.root||(e=e.return)&&h(e)})),u=P(p),function(e,t,s,n){for(var i="",a=0;a<u;a++)i+=p[a](e,t,s,n)||"";return i})),m};return p.hash=l.length?l.reduce((function(e,t){return t.name||st(15),Ne(e,t.name)}),Pe).toString():"",p}var kt=new vt,Et=Ct(),Pt=r().createContext({shouldForwardProp:void 0,styleSheet:kt,stylis:Et}),Nt=Pt.Consumer,Rt=r().createContext(void 0);function Tt(){return(0,a.useContext)(Pt)}function Dt(e){var t=(0,a.useState)(e.stylisPlugins),s=t[0],n=t[1],i=Tt().styleSheet,o=(0,a.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target,i]),c=(0,a.useMemo)((function(){return Ct({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:s})}),[e.enableVendorPrefixes,e.namespace,s]);(0,a.useEffect)((function(){l()(s,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]);var d=(0,a.useMemo)((function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:o,stylis:c}}),[e.shouldForwardProp,o,c]);return r().createElement(Pt.Provider,{value:d},r().createElement(Rt.Provider,{value:c},e.children))}var Ft=function(){function e(e,t){var s=this;this.inject=function(e,t){void 0===t&&(t=Et);var n=s.name+t.hash;e.hasNameForId(s.id,n)||e.insertRules(s.id,n,t(s.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,tt(this,(function(){throw st(12,String(s.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=Et),this.name+e.hash},e}(),It=function(e){return e>="A"&&e<="Z"};function Bt(e){for(var t="",s=0;s<e.length;s++){var n=e[s];if(1===s&&"-"===n&&"-"===e[0])return e;It(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Ot=function(e){return null==e||!1===e||""===e},Ht=function(e){var t,s,n=[];for(var a in e){var r=e[a];e.hasOwnProperty(a)&&!Ot(r)&&(Array.isArray(r)&&r.isCss||Ke(r)?n.push("".concat(Bt(a),":"),r,";"):Xe(r)?n.push.apply(n,i(i(["".concat(a," {")],Ht(r),!1),["}"],!1)):n.push("".concat(Bt(a),": ").concat((t=a,null==(s=r)||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||t in oe||t.startsWith("--")?String(s).trim():"".concat(s,"px")),";")))}return n};function At(e,t,s,n){return Ot(e)?[]:Ve(e)?[".".concat(e.styledComponentId)]:Ke(e)?!Ke(i=e)||i.prototype&&i.prototype.isReactComponent||!t?[e]:At(e(t),t,s,n):e instanceof Ft?s?(e.inject(s,n),[e.getName(n)]):[e]:Xe(e)?Ht(e):Array.isArray(e)?Array.prototype.concat.apply(xe,e.map((function(e){return At(e,t,s,n)}))):[e.toString()];var i}function Mt(e){for(var t=0;t<e.length;t+=1){var s=e[t];if(Ke(s)&&!Ve(s))return!1}return!0}var $t=Re(pe),zt=function(){function e(e,t,s){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===s||s.isStatic)&&Mt(e),this.componentId=t,this.baseHash=Ne($t,t),this.baseStyle=s,vt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,s){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,s):"";if(this.isStatic&&!s.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=Qe(n,this.staticRulesId);else{var i=Ze(At(this.rules,e,t,s)),a=ke(Ne(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,a)){var r=s(i,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,r)}n=Qe(n,a),this.staticRulesId=a}else{for(var o=Ne(this.baseHash,s.hash),l="",c=0;c<this.rules.length;c++){var d=this.rules[c];if("string"==typeof d)l+=d;else if(d){var p=Ze(At(d,e,t,s));o=Ne(o,p+c),l+=p}}if(l){var u=ke(o>>>0);t.hasNameForId(this.componentId,u)||t.insertRules(this.componentId,u,s(l,".".concat(u),void 0,this.componentId)),n=Qe(n,u)}}return n},e}(),Lt=r().createContext(void 0),Ut=Lt.Consumer;function Wt(){var e=(0,a.useContext)(Lt);if(!e)throw st(18);return e}function Gt(e){var t=r().useContext(Lt),s=(0,a.useMemo)((function(){return function(e,t){if(!e)throw st(14);if(Ke(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw st(8);return t?n(n({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?r().createElement(Lt.Provider,{value:s},e.children):null}var qt={};function Jt(e,t,s){var i=Ve(e),o=e,l=!Fe(e),c=t.attrs,d=void 0===c?xe:c,p=t.componentId,u=void 0===p?function(e,t){var s="string"!=typeof e?"sc":Se(e);qt[s]=(qt[s]||0)+1;var n="".concat(s,"-").concat(Te(pe+s+qt[s]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):p,h=t.displayName,m=void 0===h?function(e){return Fe(e)?"styled.".concat(e):"Styled(".concat(De(e),")")}(e):h,g=t.displayName&&t.componentId?"".concat(Se(t.displayName),"-").concat(t.componentId):t.componentId||u,x=i&&o.attrs?o.attrs.concat(d).filter(Boolean):d,y=t.shouldForwardProp;if(i&&o.shouldForwardProp){var f=o.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;y=function(e,t){return f(e,t)&&b(e,t)}}else y=f}var _=new zt(s,g,i?o.componentStyle:void 0);function v(e,t){return function(e,t,s){var i=e.attrs,o=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,p=e.target,u=r().useContext(Lt),h=Tt(),m=e.shouldForwardProp||h.shouldForwardProp,g=fe(t,u,l)||ye,x=function(e,t,s){for(var i,a=n(n({},t),{className:void 0,theme:s}),r=0;r<e.length;r+=1){var o=Ke(i=e[r])?i(a):i;for(var l in o)a[l]="className"===l?Qe(a[l],o[l]):"style"===l?n(n({},a[l]),o[l]):o[l]}return t.className&&(a.className=Qe(a.className,t.className)),a}(i,t,g),y=x.as||p,f={};for(var b in x)void 0===x[b]||"$"===b[0]||"as"===b||"theme"===b&&x.theme===g||("forwardedAs"===b?f.as=x.forwardedAs:m&&!m(b,y)||(f[b]=x[b]));var _=function(e,t){var s=Tt();return e.generateAndInjectStyles(t,s.styleSheet,s.stylis)}(o,x),v=Qe(c,d);return _&&(v+=" "+_),x.className&&(v+=" "+x.className),f[Fe(y)&&!be.has(y)?"class":"className"]=v,f.ref=s,(0,a.createElement)(y,f)}(S,e,t)}v.displayName=m;var S=r().forwardRef(v);return S.attrs=x,S.componentStyle=_,S.displayName=m,S.shouldForwardProp=y,S.foldedComponentIds=i?Qe(o.foldedComponentIds,o.styledComponentId):"",S.styledComponentId=g,S.target=i?o.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];for(var n=0,i=t;n<i.length;n++)et(e,i[n],!0);return e}({},o.defaultProps,e):e}}),tt(S,(function(){return".".concat(S.styledComponentId)})),l&&Ye(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function Yt(e,t){for(var s=[e[0]],n=0,i=t.length;n<i;n+=1)s.push(t[n],e[n+1]);return s}new Set;var Kt=function(e){return Object.assign(e,{isCss:!0})};function Vt(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(Ke(e)||Xe(e))return Kt(At(Yt(xe,i([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?At(n):Kt(At(Yt(n,t)))}function Qt(e,t,s){if(void 0===s&&(s=ye),!t)throw st(1,t);var a=function(n){for(var a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];return e(t,s,Vt.apply(void 0,i([n],a,!1)))};return a.attrs=function(i){return Qt(e,t,n(n({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)}))},a.withConfig=function(i){return Qt(e,t,n(n({},s),i))},a}var Zt=function(e){return Qt(Jt,e)},Xt=Zt;be.forEach((function(e){Xt[e]=Zt(e)}));var es=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Mt(e),vt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,s,n){var i=n(Ze(At(this.rules,t,s,n)),""),a=this.componentId+e;s.insertRules(a,a,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,s,n){e>2&&vt.registerId(this.componentId+e),this.removeStyles(e,s),this.createStyles(e,t,s,n)},e}();function ts(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var a=Vt.apply(void 0,i([e],t,!1)),o="sc-global-".concat(Te(JSON.stringify(a))),l=new es(a,o),c=function(e){var t=Tt(),s=r().useContext(Lt),n=r().useRef(t.styleSheet.allocateGSInstance(o)).current;return t.styleSheet.server&&d(n,e,t.styleSheet,s,t.stylis),r().useLayoutEffect((function(){if(!t.styleSheet.server)return d(n,e,t.styleSheet,s,t.stylis),function(){return l.removeStyles(n,t.styleSheet)}}),[n,e,t.styleSheet,s,t.stylis]),null};function d(e,t,s,i,a){if(l.isStatic)l.renderStyles(e,ge,s,a);else{var r=n(n({},t),{theme:fe(t,i,c.defaultProps)});l.renderStyles(e,r,s,a)}}return r().memo(c)}function ss(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var n=Ze(Vt.apply(void 0,i([e],t,!1))),a=Te(n);return new Ft(a,n)}function ns(e){var t=r().forwardRef((function(t,s){var i=fe(t,r().useContext(Lt),e.defaultProps);return r().createElement(e,n({},t,{theme:i,ref:s}))}));return t.displayName="WithTheme(".concat(De(e),")"),Ye(t,e)}var is=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var s=mt(),n=Ze([s&&'nonce="'.concat(s,'"'),"".concat(le,'="true"'),"".concat(de,'="').concat(pe,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw st(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw st(2);var s=e.instance.toString();if(!s)return[];var i=((t={})[le]="",t[de]=pe,t.dangerouslySetInnerHTML={__html:s},t),a=mt();return a&&(i.nonce=a),[r().createElement("style",n({},i,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw st(2);return r().createElement(Dt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw st(3)},e}(),as={StyleSheet:vt,mainSheet:kt};"__sc-".concat(le,"__")},609:e=>{"use strict";e.exports=window.React},757:(e,t,s)=>{"use strict";var n=s(609),i=s(510);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,o=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}(n),l=a(n),c=a(i);function d(e,t){return e[t]}function p(e=[],t,s=0){return[...e.slice(0,s),t,...e.slice(s)]}function u(e=[],t,s="id"){const n=e.slice(),i=d(t,s);return i?n.splice(n.findIndex((e=>d(e,s)===i)),1):n.splice(n.findIndex((e=>e===t)),1),n}function h(e){return e.map(((e,t)=>{const s=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(s.id=t+1),s}))}function m(e,t){return Math.ceil(e/t)}function g(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc"}(r||(r={}));const x=()=>null;function y(e,t=[],s=[]){let n={},i=[...s];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(n=t.style||{},t.classNames&&(i=[...i,...t.classNames]),"function"==typeof t.style&&(n=t.style(e)||{}))})),{conditionalStyle:n,classNames:i.join(" ")}}function f(e,t=[],s="id"){const n=d(e,s);return n?t.some((e=>d(e,s)===n)):t.some((t=>t===e))}function b(e,t){return t?e.findIndex((e=>_(e.id,t))):-1}function _(e,t){return e==t}function v(e,t){const s=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:s,rows:n,rowCount:i,mergeSelections:a}=t,r=!e.allSelected,o=!e.toggleOnSelectedRowsChange;if(a){const t=r?[...e.selectedRows,...n.filter((t=>!f(t,e.selectedRows,s)))]:e.selectedRows.filter((e=>!f(e,n,s)));return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:o})}return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:r?i:0,selectedRows:r?n:[],toggleOnSelectedRowsChange:o})}case"SELECT_SINGLE_ROW":{const{keyField:n,row:i,isSelected:a,rowCount:r,singleSelect:o}=t;return o?a?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:s}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[i],toggleOnSelectedRowsChange:s}):a?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:u(e.selectedRows,i,n),toggleOnSelectedRowsChange:s}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===r,selectedRows:p(e.selectedRows,i),toggleOnSelectedRowsChange:s})}case"SELECT_MULTIPLE_ROWS":{const{keyField:n,selectedRows:i,totalRows:a,mergeSelections:r}=t;if(r){const t=[...e.selectedRows,...i.filter((t=>!f(t,e.selectedRows,n)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:s})}return Object.assign(Object.assign({},e),{selectedCount:i.length,allSelected:i.length===a,selectedRows:i,toggleOnSelectedRowsChange:s})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:s}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:s})}case"SORT_CHANGE":{const{sortDirection:n,selectedColumn:i,clearSelectedOnSort:a}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:i,sortDirection:n,currentPage:1}),a&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_PAGE":{const{page:n,paginationServer:i,visibleOnly:a,persistSelectedOnPageChange:r}=t,o=i&&r,l=i&&!r||a;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:n}),o&&{allSelected:!1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:s,page:n}=t;return Object.assign(Object.assign({},e),{currentPage:n,rowsPerPage:s})}}}const S=i.css`1 (()=>{var e,t,s={510:(e,t,s)=>{"use strict";s.r(t),s.d(t,{ServerStyleSheet:()=>is,StyleSheetConsumer:()=>Nt,StyleSheetContext:()=>Pt,StyleSheetManager:()=>Dt,ThemeConsumer:()=>Ut,ThemeContext:()=>Lt,ThemeProvider:()=>Gt,__PRIVATE__:()=>as,createGlobalStyle:()=>ts,css:()=>Vt,default:()=>Xt,isStyledComponent:()=>Ve,keyframes:()=>ss,styled:()=>Xt,useTheme:()=>Wt,version:()=>pe,withTheme:()=>ns});var n=function(){return n=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var i in t=arguments[s])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(e,t,s){if(s||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var a=s(609),r=s.n(a),o=s(833),l=s.n(o),c="-ms-",d="-moz-",p="-webkit-",u="comm",m="rule",h="decl",g="@import",x="@keyframes",y="@layer",f=Math.abs,b=String.fromCharCode,_=Object.assign;function v(e){return e.trim()}function S(e,t){return(e=t.exec(e))?e[0]:e}function j(e,t,s){return e.replace(t,s)}function w(e,t,s){return e.indexOf(t,s)}function C(e,t){return 0|e.charCodeAt(t)}function k(e,t,s){return e.slice(t,s)}function E(e){return e.length}function P(e){return e.length}function N(e,t){return t.push(e),e}function R(e,t){return e.filter((function(e){return!S(e,t)}))}var T=1,D=1,I=0,F=0,B=0,O="";function H(e,t,s,n,i,a,r,o){return{value:e,root:t,parent:s,type:n,props:i,children:a,line:T,column:D,length:r,return:"",siblings:o}}function A(e,t){return _(H("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function M(e){for(;e.root;)e=A(e.root,{children:[e]});N(e,e.siblings)}function z(){return B=F>0?C(O,--F):0,D--,10===B&&(D=1,T--),B}function $(){return B=F<I?C(O,F++):0,D++,10===B&&(D=1,T++),B}function L(){return C(O,F)}function U(){return F}function W(e,t){return k(O,e,t)}function G(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q(e){return v(W(F-1,K(91===e?e+2:40===e?e+1:e)))}function J(e){for(;(B=L())&&B<33;)$();return G(e)>2||G(B)>3?"":" "}function Y(e,t){for(;--t&&$()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return W(e,U()+(t<6&&32==L()&&32==$()))}function K(e){for(;$();)switch(B){case e:return F;case 34:case 39:34!==e&&39!==e&&K(B);break;case 40:41===e&&K(e);break;case 92:$()}return F}function V(e,t){for(;$()&&e+B!==57&&(e+B!==84||47!==L()););return"/*"+W(t,F-1)+"*"+b(47===e?e:$())}function Q(e){for(;!G(L());)$();return W(e,F)}function Z(e,t){for(var s="",n=0;n<e.length;n++)s+=t(e[n],n,e,t)||"";return s}function X(e,t,s,n){switch(e.type){case y:if(e.children.length)break;case g:case h:return e.return=e.return||e.value;case u:return"";case x:return e.return=e.value+"{"+Z(e.children,n)+"}";case m:if(!E(e.value=e.props.join(",")))return""}return E(s=Z(e.children,n))?e.return=e.value+"{"+s+"}":""}function ee(e,t,s){switch(function(e,t){return 45^C(e,0)?(((t<<2^C(e,0))<<2^C(e,1))<<2^C(e,2))<<2^C(e,3):0}(e,t)){case 5103:return p+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return p+e+e;case 4789:return d+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return p+e+d+e+c+e+e;case 5936:switch(C(e,t+11)){case 114:return p+e+c+j(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return p+e+c+j(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return p+e+c+j(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return p+e+c+e+e;case 6165:return p+e+c+"flex-"+e+e;case 5187:return p+e+j(e,/(\w+).+(:[^]+)/,p+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return p+e+c+"flex-item-"+j(e,/flex-|-self/g,"")+(S(e,/flex-|baseline/)?"":c+"grid-row-"+j(e,/flex-|-self/g,""))+e;case 4675:return p+e+c+"flex-line-pack"+j(e,/align-content|flex-|-self/g,"")+e;case 5548:return p+e+c+j(e,"shrink","negative")+e;case 5292:return p+e+c+j(e,"basis","preferred-size")+e;case 6060:return p+"box-"+j(e,"-grow","")+p+e+c+j(e,"grow","positive")+e;case 4554:return p+j(e,/([^-])(transform)/g,"$1"+p+"$2")+e;case 6187:return j(j(j(e,/(zoom-|grab)/,p+"$1"),/(image-set)/,p+"$1"),e,"")+e;case 5495:case 3959:return j(e,/(image-set\([^]*)/,p+"$1$`$1");case 4968:return j(j(e,/(.+:)(flex-)?(.*)/,p+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+p+e+e;case 4200:if(!S(e,/flex-|baseline/))return c+"grid-column-align"+k(e,t)+e;break;case 2592:case 3360:return c+j(e,"template-","")+e;case 4384:case 3616:return s&&s.some((function(e,s){return t=s,S(e.props,/grid-\w+-end/)}))?~w(e+(s=s[t].value),"span",0)?e:c+j(e,"-start","")+e+c+"grid-row-span:"+(~w(s,"span",0)?S(s,/\d+/):+S(s,/\d+/)-+S(e,/\d+/))+";":c+j(e,"-start","")+e;case 4896:case 4128:return s&&s.some((function(e){return S(e.props,/grid-\w+-start/)}))?e:c+j(j(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return j(e,/(.+)-inline(.+)/,p+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(e)-1-t>6)switch(C(e,t+1)){case 109:if(45!==C(e,t+4))break;case 102:return j(e,/(.+:)(.+)-([^]+)/,"$1"+p+"$2-$3$1"+d+(108==C(e,t+3)?"$3":"$2-$3"))+e;case 115:return~w(e,"stretch",0)?ee(j(e,"stretch","fill-available"),t,s)+e:e}break;case 5152:case 5920:return j(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,s,n,i,a,r,o){return c+s+":"+n+o+(i?c+s+"-span:"+(a?r:+r-+n)+o:"")+e}));case 4949:if(121===C(e,t+6))return j(e,":",":"+p)+e;break;case 6444:switch(C(e,45===C(e,14)?18:11)){case 120:return j(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+p+(45===C(e,14)?"inline-":"")+"box$3$1"+p+"$2$3$1"+c+"$2box$3")+e;case 100:return j(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return j(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,s,n){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=ee(e.value,e.length,s));case x:return Z([A(e,{value:j(e.value,"@","@"+p)})],n);case m:if(e.length)return function(e,t){return e.map(t).join("")}(s=e.props,(function(t){switch(S(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":M(A(e,{props:[j(t,/:(read-\w+)/,":"+d+"$1")]})),M(A(e,{props:[t]})),_(e,{props:R(s,n)});break;case"::placeholder":M(A(e,{props:[j(t,/:(plac\w+)/,":"+p+"input-$1")]})),M(A(e,{props:[j(t,/:(plac\w+)/,":"+d+"$1")]})),M(A(e,{props:[j(t,/:(plac\w+)/,c+"input-$1")]})),M(A(e,{props:[t]})),_(e,{props:R(s,n)})}return""}))}}function se(e){return function(e){return O="",e}(ne("",null,null,null,[""],e=function(e){return T=D=1,I=E(O=e),F=0,[]}(e),0,[0],e))}function ne(e,t,s,n,i,a,r,o,l){for(var c=0,d=0,p=r,u=0,m=0,h=0,g=1,x=1,y=1,_=0,v="",S=i,k=a,P=n,R=v;x;)switch(h=_,_=$()){case 40:if(108!=h&&58==C(R,p-1)){-1!=w(R+=j(q(_),"&","&\f"),"&\f",f(c?o[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:R+=q(_);break;case 9:case 10:case 13:case 32:R+=J(h);break;case 92:R+=Y(U()-1,7);continue;case 47:switch(L()){case 42:case 47:N(ae(V($(),U()),t,s,l),l);break;default:R+="/"}break;case 123*g:o[c++]=E(R)*y;case 125*g:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+d:-1==y&&(R=j(R,/\f/g,"")),m>0&&E(R)-p&&N(m>32?re(R+";",n,s,p-1,l):re(j(R," ","")+";",n,s,p-2,l),l);break;case 59:R+=";";default:if(N(P=ie(R,t,s,c,d,i,o,v,S=[],k=[],p,a),a),123===_)if(0===d)ne(R,t,P,P,S,a,p,o,k);else switch(99===u&&110===C(R,3)?100:u){case 100:case 108:case 109:case 115:ne(e,P,P,n&&N(ie(e,P,P,0,0,i,o,v,i,S=[],p,k),k),i,k,p,o,n?S:k);break;default:ne(R,P,P,P,[""],k,0,o,k)}}c=d=m=0,g=y=1,v=R="",p=r;break;case 58:p=1+E(R),m=h;default:if(g<1)if(123==_)--g;else if(125==_&&0==g++&&125==z())continue;switch(R+=b(_),_*g){case 38:y=d>0?1:(R+="\f",-1);break;case 44:o[c++]=(E(R)-1)*y,y=1;break;case 64:45===L()&&(R+=q($())),u=L(),d=p=E(v=R+=Q(U())),_++;break;case 45:45===h&&2==E(R)&&(g=0)}}return a}function ie(e,t,s,n,i,a,r,o,l,c,d,p){for(var u=i-1,h=0===i?a:[""],g=P(h),x=0,y=0,b=0;x<n;++x)for(var _=0,S=k(e,u+1,u=f(y=r[x])),w=e;_<g;++_)(w=v(y>0?h[_]+" "+S:j(S,/&\f/g,h[_])))&&(l[b++]=w);return H(e,t,s,0===i?m:o,l,c,d,p)}function ae(e,t,s,n){return H(e,t,s,u,b(B),k(e,2,-2),0,n)}function re(e,t,s,n,i){return H(e,t,s,h,k(e,0,n),k(e,n+1,-1),n,i)}var oe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="active",de="data-styled-version",pe="6.1.12",ue="/*!sc*/\n",me="undefined"!=typeof window&&"HTMLElement"in window,he=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ge={},xe=(new Set,Object.freeze([])),ye=Object.freeze({});function fe(e,t,s){return void 0===s&&(s=ye),e.theme!==s.theme&&e.theme||t||s.theme}var be=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ve=/(^-|-$)/g;function Se(e){return e.replace(_e,"-").replace(ve,"")}var je=/(a)(d)/gi,we=52,Ce=function(e){return String.fromCharCode(e+(e>25?39:97))};function ke(e){var t,s="";for(t=Math.abs(e);t>we;t=t/we|0)s=Ce(t%we)+s;return(Ce(t%we)+s).replace(je,"$1-$2")}var Ee,Pe=5381,Ne=function(e,t){for(var s=t.length;s;)e=33*e^t.charCodeAt(--s);return e},Re=function(e){return Ne(Pe,e)};function Te(e){return ke(Re(e)>>>0)}function De(e){return e.displayName||e.name||"Component"}function Ie(e){return"string"==typeof e&&!0}var Fe="function"==typeof Symbol&&Symbol.for,Be=Fe?Symbol.for("react.memo"):60115,Oe=Fe?Symbol.for("react.forward_ref"):60112,He={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ae={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ze=((Ee={})[Oe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ee[Be]=Me,Ee);function $e(e){return("type"in(t=e)&&t.type.$$typeof)===Be?Me:"$$typeof"in e?ze[e.$$typeof]:He;var t}var Le=Object.defineProperty,Ue=Object.getOwnPropertyNames,We=Object.getOwnPropertySymbols,Ge=Object.getOwnPropertyDescriptor,qe=Object.getPrototypeOf,Je=Object.prototype;function Ye(e,t,s){if("string"!=typeof t){if(Je){var n=qe(t);n&&n!==Je&&Ye(e,n,s)}var i=Ue(t);We&&(i=i.concat(We(t)));for(var a=$e(e),r=$e(t),o=0;o<i.length;++o){var l=i[o];if(!(l in Ae||s&&s[l]||r&&l in r||a&&l in a)){var c=Ge(t,l);try{Le(e,l,c)}catch(e){}}}}return e}function Ke(e){return"function"==typeof e}function Ve(e){return"object"==typeof e&&"styledComponentId"in e}function Qe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var s=e[0],n=1;n<e.length;n++)s+=t?t+e[n]:e[n];return s}function Xe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,s){if(void 0===s&&(s=!1),!s&&!Xe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=et(e[n],t[n]);else if(Xe(t))for(var n in t)e[n]=et(e[n],t[n]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function st(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var nt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,s=0;s<e;s++)t+=this.groupSizes[s];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var s=this.groupSizes,n=s.length,i=n;e>=i;)if((i<<=1)<0)throw st(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(s),this.length=i;for(var a=n;a<i;a++)this.groupSizes[a]=0}for(var r=this.indexOfGroup(e+1),o=(a=0,t.length);a<o;a++)this.tag.insertRule(r,t[a])&&(this.groupSizes[e]++,r++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],s=this.indexOfGroup(e),n=s+t;this.groupSizes[e]=0;for(var i=s;i<n;i++)this.tag.deleteRule(s)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var s=this.groupSizes[e],n=this.indexOfGroup(e),i=n+s,a=n;a<i;a++)t+="".concat(this.tag.getRule(a)).concat(ue);return t},e}(),it=new Map,at=new Map,rt=1,ot=function(e){if(it.has(e))return it.get(e);for(;at.has(rt);)rt++;var t=rt++;return it.set(e,t),at.set(t,e),t},lt=function(e,t){rt=t+1,it.set(e,t),at.set(t,e)},ct="style[".concat(le,"][").concat(de,'="').concat(pe,'"]'),dt=new RegExp("^".concat(le,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),pt=function(e,t,s){for(var n,i=s.split(","),a=0,r=i.length;a<r;a++)(n=i[a])&&e.registerName(t,n)},ut=function(e,t){for(var s,n=(null!==(s=t.textContent)&&void 0!==s?s:"").split(ue),i=[],a=0,r=n.length;a<r;a++){var o=n[a].trim();if(o){var l=o.match(dt);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(lt(d,c),pt(e,d,l[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(o)}}},mt=function(e){for(var t=document.querySelectorAll(ct),s=0,n=t.length;s<n;s++){var i=t[s];i&&i.getAttribute(le)!==ce&&(ut(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function ht(){return s.nc}var gt=function(e){var t=document.head,s=e||t,n=document.createElement("style"),i=function(e){var t=Array.from(e.querySelectorAll("style[".concat(le,"]")));return t[t.length-1]}(s),a=void 0!==i?i.nextSibling:null;n.setAttribute(le,ce),n.setAttribute(de,pe);var r=ht();return r&&n.setAttribute("nonce",r),s.insertBefore(n,a),n},xt=function(){function e(e){this.element=gt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,s=0,n=t.length;s<n;s++){var i=t[s];if(i.ownerNode===e)return i}throw st(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),yt=function(){function e(e){this.element=gt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var s=document.createTextNode(t);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ft=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),bt=me,_t={isServer:!me,useCSSOMInjection:!he},vt=function(){function e(e,t,s){void 0===e&&(e=ye),void 0===t&&(t={});var i=this;this.options=n(n({},_t),e),this.gs=t,this.names=new Map(s),this.server=!!e.isServer,!this.server&&me&&bt&&(bt=!1,mt(this)),tt(this,(function(){return function(e){for(var t=e.getTag(),s=t.length,n="",i=function(s){var i=function(e){return at.get(e)}(s);if(void 0===i)return"continue";var a=e.names.get(i),r=t.getGroup(s);if(void 0===a||!a.size||0===r.length)return"continue";var o="".concat(le,".g").concat(s,'[id="').concat(i,'"]'),l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),n+="".concat(r).concat(o,'{content:"').concat(l,'"}').concat(ue)},a=0;a<s;a++)i(a);return n}(i)}))}return e.registerId=function(e){return ot(e)},e.prototype.rehydrate=function(){!this.server&&me&&mt(this)},e.prototype.reconstructWithOptions=function(t,s){return void 0===s&&(s=!0),new e(n(n({},this.options),t),this.gs,s&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,s=e.target;return e.isServer?new ft(s):t?new xt(s):new yt(s)}(this.options),new nt(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ot(e),this.names.has(e))this.names.get(e).add(t);else{var s=new Set;s.add(t),this.names.set(e,s)}},e.prototype.insertRules=function(e,t,s){this.registerName(e,t),this.getTag().insertRules(ot(e),s)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ot(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),St=/&/g,jt=/^\s*\/\/.*$/gm;function wt(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=wt(e.children,t)),e}))}function Ct(e){var t,s,n,i=void 0===e?ye:e,a=i.options,r=void 0===a?ye:a,o=i.plugins,l=void 0===o?xe:o,c=function(e,n,i){return i.startsWith(s)&&i.endsWith(s)&&i.replaceAll(s,"").length>0?".".concat(t):e},d=l.slice();d.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(St,s).replace(n,c))})),r.prefix&&d.push(te),d.push(X);var p=function(e,i,a,o){void 0===i&&(i=""),void 0===a&&(a=""),void 0===o&&(o="&"),t=o,s=i,n=new RegExp("\\".concat(s,"\\b"),"g");var l=e.replace(jt,""),c=se(a||i?"".concat(a," ").concat(i," { ").concat(l," }"):l);r.namespace&&(c=wt(c,r.namespace));var p,u,m,h=[];return Z(c,(p=d.concat((m=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&m(e)})),u=P(p),function(e,t,s,n){for(var i="",a=0;a<u;a++)i+=p[a](e,t,s,n)||"";return i})),h};return p.hash=l.length?l.reduce((function(e,t){return t.name||st(15),Ne(e,t.name)}),Pe).toString():"",p}var kt=new vt,Et=Ct(),Pt=r().createContext({shouldForwardProp:void 0,styleSheet:kt,stylis:Et}),Nt=Pt.Consumer,Rt=r().createContext(void 0);function Tt(){return(0,a.useContext)(Pt)}function Dt(e){var t=(0,a.useState)(e.stylisPlugins),s=t[0],n=t[1],i=Tt().styleSheet,o=(0,a.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target,i]),c=(0,a.useMemo)((function(){return Ct({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:s})}),[e.enableVendorPrefixes,e.namespace,s]);(0,a.useEffect)((function(){l()(s,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]);var d=(0,a.useMemo)((function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:o,stylis:c}}),[e.shouldForwardProp,o,c]);return r().createElement(Pt.Provider,{value:d},r().createElement(Rt.Provider,{value:c},e.children))}var It=function(){function e(e,t){var s=this;this.inject=function(e,t){void 0===t&&(t=Et);var n=s.name+t.hash;e.hasNameForId(s.id,n)||e.insertRules(s.id,n,t(s.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,tt(this,(function(){throw st(12,String(s.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=Et),this.name+e.hash},e}(),Ft=function(e){return e>="A"&&e<="Z"};function Bt(e){for(var t="",s=0;s<e.length;s++){var n=e[s];if(1===s&&"-"===n&&"-"===e[0])return e;Ft(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Ot=function(e){return null==e||!1===e||""===e},Ht=function(e){var t,s,n=[];for(var a in e){var r=e[a];e.hasOwnProperty(a)&&!Ot(r)&&(Array.isArray(r)&&r.isCss||Ke(r)?n.push("".concat(Bt(a),":"),r,";"):Xe(r)?n.push.apply(n,i(i(["".concat(a," {")],Ht(r),!1),["}"],!1)):n.push("".concat(Bt(a),": ").concat((t=a,null==(s=r)||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||t in oe||t.startsWith("--")?String(s).trim():"".concat(s,"px")),";")))}return n};function At(e,t,s,n){return Ot(e)?[]:Ve(e)?[".".concat(e.styledComponentId)]:Ke(e)?!Ke(i=e)||i.prototype&&i.prototype.isReactComponent||!t?[e]:At(e(t),t,s,n):e instanceof It?s?(e.inject(s,n),[e.getName(n)]):[e]:Xe(e)?Ht(e):Array.isArray(e)?Array.prototype.concat.apply(xe,e.map((function(e){return At(e,t,s,n)}))):[e.toString()];var i}function Mt(e){for(var t=0;t<e.length;t+=1){var s=e[t];if(Ke(s)&&!Ve(s))return!1}return!0}var zt=Re(pe),$t=function(){function e(e,t,s){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===s||s.isStatic)&&Mt(e),this.componentId=t,this.baseHash=Ne(zt,t),this.baseStyle=s,vt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,s){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,s):"";if(this.isStatic&&!s.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=Qe(n,this.staticRulesId);else{var i=Ze(At(this.rules,e,t,s)),a=ke(Ne(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,a)){var r=s(i,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,r)}n=Qe(n,a),this.staticRulesId=a}else{for(var o=Ne(this.baseHash,s.hash),l="",c=0;c<this.rules.length;c++){var d=this.rules[c];if("string"==typeof d)l+=d;else if(d){var p=Ze(At(d,e,t,s));o=Ne(o,p+c),l+=p}}if(l){var u=ke(o>>>0);t.hasNameForId(this.componentId,u)||t.insertRules(this.componentId,u,s(l,".".concat(u),void 0,this.componentId)),n=Qe(n,u)}}return n},e}(),Lt=r().createContext(void 0),Ut=Lt.Consumer;function Wt(){var e=(0,a.useContext)(Lt);if(!e)throw st(18);return e}function Gt(e){var t=r().useContext(Lt),s=(0,a.useMemo)((function(){return function(e,t){if(!e)throw st(14);if(Ke(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw st(8);return t?n(n({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?r().createElement(Lt.Provider,{value:s},e.children):null}var qt={};function Jt(e,t,s){var i=Ve(e),o=e,l=!Ie(e),c=t.attrs,d=void 0===c?xe:c,p=t.componentId,u=void 0===p?function(e,t){var s="string"!=typeof e?"sc":Se(e);qt[s]=(qt[s]||0)+1;var n="".concat(s,"-").concat(Te(pe+s+qt[s]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):p,m=t.displayName,h=void 0===m?function(e){return Ie(e)?"styled.".concat(e):"Styled(".concat(De(e),")")}(e):m,g=t.displayName&&t.componentId?"".concat(Se(t.displayName),"-").concat(t.componentId):t.componentId||u,x=i&&o.attrs?o.attrs.concat(d).filter(Boolean):d,y=t.shouldForwardProp;if(i&&o.shouldForwardProp){var f=o.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;y=function(e,t){return f(e,t)&&b(e,t)}}else y=f}var _=new $t(s,g,i?o.componentStyle:void 0);function v(e,t){return function(e,t,s){var i=e.attrs,o=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,p=e.target,u=r().useContext(Lt),m=Tt(),h=e.shouldForwardProp||m.shouldForwardProp,g=fe(t,u,l)||ye,x=function(e,t,s){for(var i,a=n(n({},t),{className:void 0,theme:s}),r=0;r<e.length;r+=1){var o=Ke(i=e[r])?i(a):i;for(var l in o)a[l]="className"===l?Qe(a[l],o[l]):"style"===l?n(n({},a[l]),o[l]):o[l]}return t.className&&(a.className=Qe(a.className,t.className)),a}(i,t,g),y=x.as||p,f={};for(var b in x)void 0===x[b]||"$"===b[0]||"as"===b||"theme"===b&&x.theme===g||("forwardedAs"===b?f.as=x.forwardedAs:h&&!h(b,y)||(f[b]=x[b]));var _=function(e,t){var s=Tt();return e.generateAndInjectStyles(t,s.styleSheet,s.stylis)}(o,x),v=Qe(c,d);return _&&(v+=" "+_),x.className&&(v+=" "+x.className),f[Ie(y)&&!be.has(y)?"class":"className"]=v,f.ref=s,(0,a.createElement)(y,f)}(S,e,t)}v.displayName=h;var S=r().forwardRef(v);return S.attrs=x,S.componentStyle=_,S.displayName=h,S.shouldForwardProp=y,S.foldedComponentIds=i?Qe(o.foldedComponentIds,o.styledComponentId):"",S.styledComponentId=g,S.target=i?o.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];for(var n=0,i=t;n<i.length;n++)et(e,i[n],!0);return e}({},o.defaultProps,e):e}}),tt(S,(function(){return".".concat(S.styledComponentId)})),l&&Ye(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function Yt(e,t){for(var s=[e[0]],n=0,i=t.length;n<i;n+=1)s.push(t[n],e[n+1]);return s}new Set;var Kt=function(e){return Object.assign(e,{isCss:!0})};function Vt(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(Ke(e)||Xe(e))return Kt(At(Yt(xe,i([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?At(n):Kt(At(Yt(n,t)))}function Qt(e,t,s){if(void 0===s&&(s=ye),!t)throw st(1,t);var a=function(n){for(var a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];return e(t,s,Vt.apply(void 0,i([n],a,!1)))};return a.attrs=function(i){return Qt(e,t,n(n({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)}))},a.withConfig=function(i){return Qt(e,t,n(n({},s),i))},a}var Zt=function(e){return Qt(Jt,e)},Xt=Zt;be.forEach((function(e){Xt[e]=Zt(e)}));var es=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Mt(e),vt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,s,n){var i=n(Ze(At(this.rules,t,s,n)),""),a=this.componentId+e;s.insertRules(a,a,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,s,n){e>2&&vt.registerId(this.componentId+e),this.removeStyles(e,s),this.createStyles(e,t,s,n)},e}();function ts(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var a=Vt.apply(void 0,i([e],t,!1)),o="sc-global-".concat(Te(JSON.stringify(a))),l=new es(a,o),c=function(e){var t=Tt(),s=r().useContext(Lt),n=r().useRef(t.styleSheet.allocateGSInstance(o)).current;return t.styleSheet.server&&d(n,e,t.styleSheet,s,t.stylis),r().useLayoutEffect((function(){if(!t.styleSheet.server)return d(n,e,t.styleSheet,s,t.stylis),function(){return l.removeStyles(n,t.styleSheet)}}),[n,e,t.styleSheet,s,t.stylis]),null};function d(e,t,s,i,a){if(l.isStatic)l.renderStyles(e,ge,s,a);else{var r=n(n({},t),{theme:fe(t,i,c.defaultProps)});l.renderStyles(e,r,s,a)}}return r().memo(c)}function ss(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var n=Ze(Vt.apply(void 0,i([e],t,!1))),a=Te(n);return new It(a,n)}function ns(e){var t=r().forwardRef((function(t,s){var i=fe(t,r().useContext(Lt),e.defaultProps);return r().createElement(e,n({},t,{theme:i,ref:s}))}));return t.displayName="WithTheme(".concat(De(e),")"),Ye(t,e)}var is=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var s=ht(),n=Ze([s&&'nonce="'.concat(s,'"'),"".concat(le,'="true"'),"".concat(de,'="').concat(pe,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw st(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw st(2);var s=e.instance.toString();if(!s)return[];var i=((t={})[le]="",t[de]=pe,t.dangerouslySetInnerHTML={__html:s},t),a=ht();return a&&(i.nonce=a),[r().createElement("style",n({},i,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw st(2);return r().createElement(Dt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw st(3)},e}(),as={StyleSheet:vt,mainSheet:kt};"__sc-".concat(le,"__")},609:e=>{"use strict";e.exports=window.React},757:(e,t,s)=>{"use strict";var n=s(609),i=s(510);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,o=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}(n),l=a(n),c=a(i);function d(e,t){return e[t]}function p(e=[],t,s=0){return[...e.slice(0,s),t,...e.slice(s)]}function u(e=[],t,s="id"){const n=e.slice(),i=d(t,s);return i?n.splice(n.findIndex((e=>d(e,s)===i)),1):n.splice(n.findIndex((e=>e===t)),1),n}function m(e){return e.map(((e,t)=>{const s=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(s.id=t+1),s}))}function h(e,t){return Math.ceil(e/t)}function g(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc"}(r||(r={}));const x=()=>null;function y(e,t=[],s=[]){let n={},i=[...s];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(n=t.style||{},t.classNames&&(i=[...i,...t.classNames]),"function"==typeof t.style&&(n=t.style(e)||{}))})),{conditionalStyle:n,classNames:i.join(" ")}}function f(e,t=[],s="id"){const n=d(e,s);return n?t.some((e=>d(e,s)===n)):t.some((t=>t===e))}function b(e,t){return t?e.findIndex((e=>_(e.id,t))):-1}function _(e,t){return e==t}function v(e,t){const s=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:s,rows:n,rowCount:i,mergeSelections:a}=t,r=!e.allSelected,o=!e.toggleOnSelectedRowsChange;if(a){const t=r?[...e.selectedRows,...n.filter((t=>!f(t,e.selectedRows,s)))]:e.selectedRows.filter((e=>!f(e,n,s)));return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:o})}return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:r?i:0,selectedRows:r?n:[],toggleOnSelectedRowsChange:o})}case"SELECT_SINGLE_ROW":{const{keyField:n,row:i,isSelected:a,rowCount:r,singleSelect:o}=t;return o?a?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:s}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[i],toggleOnSelectedRowsChange:s}):a?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:u(e.selectedRows,i,n),toggleOnSelectedRowsChange:s}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===r,selectedRows:p(e.selectedRows,i),toggleOnSelectedRowsChange:s})}case"SELECT_MULTIPLE_ROWS":{const{keyField:n,selectedRows:i,totalRows:a,mergeSelections:r}=t;if(r){const t=[...e.selectedRows,...i.filter((t=>!f(t,e.selectedRows,n)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:s})}return Object.assign(Object.assign({},e),{selectedCount:i.length,allSelected:i.length===a,selectedRows:i,toggleOnSelectedRowsChange:s})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:s}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:s})}case"SORT_CHANGE":{const{sortDirection:n,selectedColumn:i,clearSelectedOnSort:a}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:i,sortDirection:n,currentPage:1}),a&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_PAGE":{const{page:n,paginationServer:i,visibleOnly:a,persistSelectedOnPageChange:r}=t,o=i&&r,l=i&&!r||a;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:n}),o&&{allSelected:!1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:s,page:n}=t;return Object.assign(Object.assign({},e),{currentPage:n,rowsPerPage:s})}}}const S=i.css` 2 2 pointer-events: none; 3 3 opacity: 0.4; 4 `, w=c.default.div`4 `,j=c.default.div` 5 5 position: relative; 6 6 box-sizing: border-box; … … 12 12 ${({disabled:e})=>e&&S}; 13 13 ${({theme:e})=>e.table.style}; 14 `, j=i.css`14 `,w=i.css` 15 15 position: sticky; 16 16 position: -webkit-sticky; /* Safari */ … … 20 20 display: flex; 21 21 width: 100%; 22 ${({$fixedHeader:e})=>e&& j};22 ${({$fixedHeader:e})=>e&&w}; 23 23 ${({theme:e})=>e.head.style}; 24 24 `,k=c.default.div` … … 85 85 text-overflow: ellipsis; 86 86 } 87 `, F=c.default(T).attrs((e=>({style:e.style})))`87 `,I=c.default(T).attrs((e=>({style:e.style})))` 88 88 ${({$renderAsCell:e})=>!e&&D}; 89 89 ${({theme:e,$isDragging:t})=>t&&e.cells.draggingStyle}; 90 90 ${({$cellStyle:e})=>e}; 91 `;var I=o.memo((function({id:e,column:t,row:s,rowIndex:n,dataTag:i,isDragging:a,onDragStart:r,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:p}){const{conditionalStyle:u,classNames:h}=y(s,t.conditionalCellStyles,["rdt_TableCell"]);return o.createElement(F,{id:e,"data-column-id":t.id,role:"cell",className:h,"data-tag":i,$cellStyle:t.style,$renderAsCell:!!t.cell,$allowOverflow:t.allowOverflow,button:t.button,center:t.center,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,width:t.width,$wrapCell:t.wrap,style:u,$isDragging:a,onDragStart:r,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:p},!t.cell&&o.createElement("div",{"data-tag":i},function(e,t,s,n){return t?s&&"function"==typeof s?s(e,n):t(e,n):null}(s,t.selector,t.format,n)),t.cell&&t.cell(s,n,t,e))}));const B="input";var O=o.memo((function({name:e,component:t=B,componentOptions:s={style:{}},indeterminate:n=!1,checked:i=!1,disabled:a=!1,onClick:r=x}){const l=t,c=l!==B?s.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(a),d=o.useMemo((()=>function(e,...t){let s;return Object.keys(e).map((t=>e[t])).forEach(((n,i)=>{const a=e;"function"==typeof n&&(s=Object.assign(Object.assign({},a),{[Object.keys(e)[i]]:n(...t)}))})),s||e}(s,n)),[s,n]);return o.createElement(l,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=n)},style:c,onClick:a?x:r,name:e,"aria-label":e,checked:i,disabled:a},d,{onChange:x}))}));const H=c.default(R)`91 `;var F=o.memo((function({id:e,column:t,row:s,rowIndex:n,dataTag:i,isDragging:a,onDragStart:r,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:p}){const{conditionalStyle:u,classNames:m}=y(s,t.conditionalCellStyles,["rdt_TableCell"]);return o.createElement(I,{id:e,"data-column-id":t.id,role:"cell",className:m,"data-tag":i,$cellStyle:t.style,$renderAsCell:!!t.cell,$allowOverflow:t.allowOverflow,button:t.button,center:t.center,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,width:t.width,$wrapCell:t.wrap,style:u,$isDragging:a,onDragStart:r,onDragOver:l,onDragEnd:c,onDragEnter:d,onDragLeave:p},!t.cell&&o.createElement("div",{"data-tag":i},function(e,t,s,n){return t?s&&"function"==typeof s?s(e,n):t(e,n):null}(s,t.selector,t.format,n)),t.cell&&t.cell(s,n,t,e))}));const B="input";var O=o.memo((function({name:e,component:t=B,componentOptions:s={style:{}},indeterminate:n=!1,checked:i=!1,disabled:a=!1,onClick:r=x}){const l=t,c=l!==B?s.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(a),d=o.useMemo((()=>function(e,...t){let s;return Object.keys(e).map((t=>e[t])).forEach(((n,i)=>{const a=e;"function"==typeof n&&(s=Object.assign(Object.assign({},a),{[Object.keys(e)[i]]:n(...t)}))})),s||e}(s,n)),[s,n]);return o.createElement(l,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=n)},style:c,onClick:a?x:r,name:e,"aria-label":e,checked:i,disabled:a},d,{onChange:x}))}));const H=c.default(R)` 92 92 flex: 0 0 48px; 93 93 min-width: 48px; … … 104 104 background-color: transparent; 105 105 ${({theme:e})=>e.expanderButton.style}; 106 `;function $({disabled:e=!1,expanded:t=!1,expandableIcon:s,id:n,row:i,onToggled:a}){const r=t?s.expanded:s.collapsed;return o.createElement(M,{"aria-disabled":e,onClick:()=>a&&a(i),"data-testid":`expander-button-${n}`,disabled:e,"aria-label":t?"Collapse Row":"Expand Row",role:"button",type:"button"},r)}const z=c.default(R)`106 `;function z({disabled:e=!1,expanded:t=!1,expandableIcon:s,id:n,row:i,onToggled:a}){const r=t?s.expanded:s.collapsed;return o.createElement(M,{"aria-disabled":e,onClick:()=>a&&a(i),"data-testid":`expander-button-${n}`,disabled:e,"aria-label":t?"Collapse Row":"Expand Row",role:"button",type:"button"},r)}const $=c.default(R)` 107 107 white-space: nowrap; 108 108 font-weight: 400; 109 109 min-width: 48px; 110 110 ${({theme:e})=>e.expanderCell.style}; 111 `;function L({row:e,expanded:t=!1,expandableIcon:s,id:n,onToggled:i,disabled:a=!1}){return o.createElement( z,{onClick:e=>e.stopPropagation(),$noPadding:!0},o.createElement($,{id:n,row:e,expanded:t,expandableIcon:s,disabled:a,onToggled:i}))}const U=c.default.div`111 `;function L({row:e,expanded:t=!1,expandableIcon:s,id:n,onToggled:i,disabled:a=!1}){return o.createElement($,{onClick:e=>e.stopPropagation(),$noPadding:!0},o.createElement(z,{id:n,row:e,expanded:t,expandableIcon:s,disabled:a,onToggled:i}))}const U=c.default.div` 112 112 width: 100%; 113 113 box-sizing: border-box; … … 135 135 ${({$selected:e,theme:t})=>e&&t.rows.selectedHighlightStyle}; 136 136 ${({$conditionalStyle:e})=>e}; 137 `;function Z({columns:e=[],conditionalRowStyles:t=[],defaultExpanded:s=!1,defaultExpanderDisabled:n=!1,dense:i=!1,expandableIcon:a,expandableRows:r=!1,expandableRowsComponent:l,expandableRowsComponentProps:c,expandableRowsHideExpander:p,expandOnRowClicked:u=!1,expandOnRowDoubleClicked: h=!1,highlightOnHover:m=!1,id:g,expandableInheritConditionalStyles:f,keyField:b,onRowClicked:v=x,onRowDoubleClicked:S=x,onRowMouseEnter:w=x,onRowMouseLeave:j=x,onRowExpandToggled:C=x,onSelectedRow:k=x,pointerOnHover:E=!1,row:P,rowCount:N,rowIndex:R,selectableRowDisabled:T=null,selectableRows:D=!1,selectableRowsComponent:F,selectableRowsComponentProps:B,selectableRowsHighlight:O=!1,selectableRowsSingle:H=!1,selected:M,striped:$=!1,draggingColumnId:z,onDragStart:U,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:K}){const[V,Z]=o.useState(s);o.useEffect((()=>{Z(s)}),[s]);const X=o.useCallback((()=>{Z(!V),C(!V,P)}),[V,C,P]),ee=E||r&&(u||h),te=o.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(v(P,e),!n&&r&&u&&X())}),[n,u,r,X,v,P]),se=o.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(S(P,e),!n&&r&&h&&X())}),[n,h,r,X,S,P]),ne=o.useCallback((e=>{w(P,e)}),[w,P]),ie=o.useCallback((e=>{j(P,e)}),[j,P]),ae=d(P,b),{conditionalStyle:re,classNames:oe}=y(P,t,["rdt_TableRow"]),le=O&&M,ce=f?re:{},de=$&&R%2==0;return o.createElement(o.Fragment,null,o.createElement(Q,{id:`row-${g}`,role:"row",$striped:de,$highlightOnHover:m,$pointerOnHover:!n&&ee,$dense:i,onClick:te,onDoubleClick:se,onMouseEnter:ne,onMouseLeave:ie,className:oe,$selected:le,$conditionalStyle:re},D&&o.createElement(A,{name:`select-row-${ae}`,keyField:b,row:P,rowCount:N,selected:M,selectableRowsComponent:F,selectableRowsComponentProps:B,selectableRowDisabled:T,selectableRowsSingle:H,onSelectedRow:k}),r&&!p&&o.createElement(L,{id:ae,expandableIcon:a,expanded:V,row:P,onToggled:X,disabled:n}),e.map((e=>e.omit?null:o.createElement(I,{id:`cell-${e.id}-${ae}`,key:`cell-${e.id}-${ae}`,dataTag:e.ignoreRowClick||e.button?null:G,column:e,row:P,rowIndex:R,isDragging:_(z,e.id),onDragStart:U,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:K})))),r&&V&&o.createElement(W,{key:`expander-${ae}`,data:P,extendedRowStyle:ce,extendedClassNames:oe,ExpanderComponent:l,expanderComponentProps:c}))}const X=c.default.span`137 `;function Z({columns:e=[],conditionalRowStyles:t=[],defaultExpanded:s=!1,defaultExpanderDisabled:n=!1,dense:i=!1,expandableIcon:a,expandableRows:r=!1,expandableRowsComponent:l,expandableRowsComponentProps:c,expandableRowsHideExpander:p,expandOnRowClicked:u=!1,expandOnRowDoubleClicked:m=!1,highlightOnHover:h=!1,id:g,expandableInheritConditionalStyles:f,keyField:b,onRowClicked:v=x,onRowDoubleClicked:S=x,onRowMouseEnter:j=x,onRowMouseLeave:w=x,onRowExpandToggled:C=x,onSelectedRow:k=x,pointerOnHover:E=!1,row:P,rowCount:N,rowIndex:R,selectableRowDisabled:T=null,selectableRows:D=!1,selectableRowsComponent:I,selectableRowsComponentProps:B,selectableRowsHighlight:O=!1,selectableRowsSingle:H=!1,selected:M,striped:z=!1,draggingColumnId:$,onDragStart:U,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:K}){const[V,Z]=o.useState(s);o.useEffect((()=>{Z(s)}),[s]);const X=o.useCallback((()=>{Z(!V),C(!V,P)}),[V,C,P]),ee=E||r&&(u||m),te=o.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(v(P,e),!n&&r&&u&&X())}),[n,u,r,X,v,P]),se=o.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(S(P,e),!n&&r&&m&&X())}),[n,m,r,X,S,P]),ne=o.useCallback((e=>{j(P,e)}),[j,P]),ie=o.useCallback((e=>{w(P,e)}),[w,P]),ae=d(P,b),{conditionalStyle:re,classNames:oe}=y(P,t,["rdt_TableRow"]),le=O&&M,ce=f?re:{},de=z&&R%2==0;return o.createElement(o.Fragment,null,o.createElement(Q,{id:`row-${g}`,role:"row",$striped:de,$highlightOnHover:h,$pointerOnHover:!n&&ee,$dense:i,onClick:te,onDoubleClick:se,onMouseEnter:ne,onMouseLeave:ie,className:oe,$selected:le,$conditionalStyle:re},D&&o.createElement(A,{name:`select-row-${ae}`,keyField:b,row:P,rowCount:N,selected:M,selectableRowsComponent:I,selectableRowsComponentProps:B,selectableRowDisabled:T,selectableRowsSingle:H,onSelectedRow:k}),r&&!p&&o.createElement(L,{id:ae,expandableIcon:a,expanded:V,row:P,onToggled:X,disabled:n}),e.map((e=>e.omit?null:o.createElement(F,{id:`cell-${e.id}-${ae}`,key:`cell-${e.id}-${ae}`,dataTag:e.ignoreRowClick||e.button?null:G,column:e,row:P,rowIndex:R,isDragging:_($,e.id),onDragStart:U,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:K})))),r&&V&&o.createElement(W,{key:`expander-${ae}`,data:P,extendedRowStyle:ce,extendedClassNames:oe,ExpanderComponent:l,expanderComponentProps:c}))}const X=c.default.span` 138 138 padding: 2px; 139 139 color: inherit; … … 193 193 white-space: nowrap; 194 194 text-overflow: ellipsis; 195 `;var ae=o.memo((function({column:e,disabled:t,draggingColumnId:s,selectedColumn:n={},sortDirection:i,sortIcon:a,sortServer:l,pagination:c,paginationServer:d,persistSelectedOnSort:p,selectableRowsVisibleOnly:u,onSort: h,onDragStart:m,onDragOver:g,onDragEnd:x,onDragEnter:y,onDragLeave:f}){o.useEffect((()=>{"string"==typeof e.selector&&console.error(`Warning: ${e.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`)}),[]);const[b,v]=o.useState(!1),S=o.useRef(null);if(o.useEffect((()=>{S.current&&v(S.current.scrollWidth>S.current.clientWidth)}),[b]),e.omit)return null;const w=()=>{if(!e.sortable&&!e.selector)return;let t=i;_(n.id,e.id)&&(t=i===r.ASC?r.DESC:r.ASC),h({type:"SORT_CHANGE",sortDirection:t,selectedColumn:e,clearSelectedOnSort:c&&d&&!p||l||u})},j=e=>o.createElement(ee,{sortActive:e,sortDirection:i}),C=()=>o.createElement("span",{className:[i,"__rdt_custom_sort_icon__"].join(" ")},a),k=!(!e.sortable||!_(n.id,e.id)),E=!e.sortable||t,P=e.sortable&&!a&&!e.right,N=e.sortable&&!a&&e.right,R=e.sortable&&a&&!e.right,T=e.sortable&&a&&e.right;return o.createElement(te,{"data-column-id":e.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:e.allowOverflow,button:e.button,compact:e.compact,grow:e.grow,hide:e.hide,maxWidth:e.maxWidth,minWidth:e.minWidth,right:e.right,center:e.center,width:e.width,draggable:e.reorder,$isDragging:_(e.id,s),onDragStart:m,onDragOver:g,onDragEnd:x,onDragEnter:y,onDragLeave:f},e.name&&o.createElement(ne,{"data-column-id":e.id,"data-sort-id":e.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:E?void 0:w,onKeyPress:E?void 0:e=>{"Enter"===e.key&&w()},$sortActive:!E&&k,disabled:E},!E&&T&&C(),!E&&N&&j(k),"string"==typeof e.name?o.createElement(ie,{title:b?e.name:void 0,ref:S,"data-column-id":e.id},e.name):e.name,!E&&R&&C(),!E&&P&&j(k)))}));const re=c.default(R)`195 `;var ae=o.memo((function({column:e,disabled:t,draggingColumnId:s,selectedColumn:n={},sortDirection:i,sortIcon:a,sortServer:l,pagination:c,paginationServer:d,persistSelectedOnSort:p,selectableRowsVisibleOnly:u,onSort:m,onDragStart:h,onDragOver:g,onDragEnd:x,onDragEnter:y,onDragLeave:f}){o.useEffect((()=>{"string"==typeof e.selector&&console.error(`Warning: ${e.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`)}),[]);const[b,v]=o.useState(!1),S=o.useRef(null);if(o.useEffect((()=>{S.current&&v(S.current.scrollWidth>S.current.clientWidth)}),[b]),e.omit)return null;const j=()=>{if(!e.sortable&&!e.selector)return;let t=i;_(n.id,e.id)&&(t=i===r.ASC?r.DESC:r.ASC),m({type:"SORT_CHANGE",sortDirection:t,selectedColumn:e,clearSelectedOnSort:c&&d&&!p||l||u})},w=e=>o.createElement(ee,{sortActive:e,sortDirection:i}),C=()=>o.createElement("span",{className:[i,"__rdt_custom_sort_icon__"].join(" ")},a),k=!(!e.sortable||!_(n.id,e.id)),E=!e.sortable||t,P=e.sortable&&!a&&!e.right,N=e.sortable&&!a&&e.right,R=e.sortable&&a&&!e.right,T=e.sortable&&a&&e.right;return o.createElement(te,{"data-column-id":e.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:e.allowOverflow,button:e.button,compact:e.compact,grow:e.grow,hide:e.hide,maxWidth:e.maxWidth,minWidth:e.minWidth,right:e.right,center:e.center,width:e.width,draggable:e.reorder,$isDragging:_(e.id,s),onDragStart:h,onDragOver:g,onDragEnd:x,onDragEnter:y,onDragLeave:f},e.name&&o.createElement(ne,{"data-column-id":e.id,"data-sort-id":e.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:E?void 0:j,onKeyPress:E?void 0:e=>{"Enter"===e.key&&j()},$sortActive:!E&&k,disabled:E},!E&&T&&C(),!E&&N&&w(k),"string"==typeof e.name?o.createElement(ie,{title:b?e.name:void 0,ref:S,"data-column-id":e.id},e.name):e.name,!E&&R&&C(),!E&&P&&w(k)))}));const re=c.default(R)` 196 196 flex: 0 0 48px; 197 197 justify-content: center; … … 200 200 white-space: nowrap; 201 201 font-size: unset; 202 `;function oe({headCell:e=!0,rowData:t,keyField:s,allSelected:n,mergeSelections:i,selectedRows:a,selectableRowsComponent:r,selectableRowsComponentProps:l,selectableRowDisabled:c,onSelectAllRows:d}){const p=a.length>0&&!n,u=c?t.filter((e=>!c(e))):t, h=0===u.length,m=Math.min(t.length,u.length);return o.createElement(re,{className:"rdt_TableCol",$headCell:e,$noPadding:!0},o.createElement(O,{name:"select-all-rows",component:r,componentOptions:l,onClick:()=>{d({type:"SELECT_ALL_ROWS",rows:u,rowCount:m,mergeSelections:i,keyField:s})},checked:n,indeterminate:p,disabled:h}))}function le(e=t.OP.AUTO){const s="object"==typeof window,[n,i]=o.useState(!1);return o.useEffect((()=>{if(s)if("auto"!==e)i("rtl"===e);else{const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],s=document.getElementsByTagName("HTML")[0],n="rtl"===t.dir||"rtl"===s.dir;i(e&&n)}}),[e,s]),n}const ce=c.default.div`202 `;function oe({headCell:e=!0,rowData:t,keyField:s,allSelected:n,mergeSelections:i,selectedRows:a,selectableRowsComponent:r,selectableRowsComponentProps:l,selectableRowDisabled:c,onSelectAllRows:d}){const p=a.length>0&&!n,u=c?t.filter((e=>!c(e))):t,m=0===u.length,h=Math.min(t.length,u.length);return o.createElement(re,{className:"rdt_TableCol",$headCell:e,$noPadding:!0},o.createElement(O,{name:"select-all-rows",component:r,componentOptions:l,onClick:()=>{d({type:"SELECT_ALL_ROWS",rows:u,rowCount:h,mergeSelections:i,keyField:s})},checked:n,indeterminate:p,disabled:m}))}function le(e=t.OP.AUTO){const s="object"==typeof window,[n,i]=o.useState(!1);return o.useEffect((()=>{if(s)if("auto"!==e)i("rtl"===e);else{const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],s=document.getElementsByTagName("HTML")[0],n="rtl"===t.dir||"rtl"===s.dir;i(e&&n)}}),[e,s]),n}const ce=c.default.div` 203 203 display: flex; 204 204 align-items: center; … … 227 227 ${({theme:e})=>e.contextMenu.style}; 228 228 ${({theme:e,$visible:t})=>t&&e.contextMenu.activeStyle}; 229 `;function ue({contextMessage:e,contextActions:t,contextComponent:s,selectedCount:n,direction:i}){const a=le(i),r=n>0;return s?o.createElement(pe,{$visible:r},o.cloneElement(s,{selectedCount:n})):o.createElement(pe,{$visible:r,$rtl:a},o.createElement(ce,null,((e,t,s)=>{if(0===t)return null;const n=1===t?e.singular:e.plural;return s?`${t} ${e.message||""} ${n}`:`${t} ${n} ${e.message||""}`})(e,n,a)),o.createElement(de,null,t))}const he=c.default.div`229 `;function ue({contextMessage:e,contextActions:t,contextComponent:s,selectedCount:n,direction:i}){const a=le(i),r=n>0;return s?o.createElement(pe,{$visible:r},o.cloneElement(s,{selectedCount:n})):o.createElement(pe,{$visible:r,$rtl:a},o.createElement(ce,null,((e,t,s)=>{if(0===t)return null;const n=1===t?e.singular:e.plural;return s?`${t} ${e.message||""} ${n}`:`${t} ${n} ${e.message||""}`})(e,n,a)),o.createElement(de,null,t))}const me=c.default.div` 230 230 position: relative; 231 231 box-sizing: border-box; … … 238 238 flex-wrap: wrap; 239 239 ${({theme:e})=>e.header.style} 240 `, me=c.default.div`240 `,he=c.default.div` 241 241 flex: 1 0 auto; 242 242 color: ${({theme:e})=>e.header.fontColor}; … … 252 252 margin-left: 5px; 253 253 } 254 `,xe=({title:e,actions:t=null,contextMessage:s,contextActions:n,contextComponent:i,selectedCount:a,direction:r,showMenu:l=!0})=>o.createElement( he,{className:"rdt_TableHeader",role:"heading","aria-level":1},o.createElement(me,null,e),t&&o.createElement(ge,null,t),l&&o.createElement(ue,{contextMessage:s,contextActions:n,contextComponent:i,direction:r,selectedCount:a}));function ye(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]])}return s}"function"==typeof SuppressedError&&SuppressedError;const fe={left:"flex-start",right:"flex-end",center:"center"},be=c.default.header`254 `,xe=({title:e,actions:t=null,contextMessage:s,contextActions:n,contextComponent:i,selectedCount:a,direction:r,showMenu:l=!0})=>o.createElement(me,{className:"rdt_TableHeader",role:"heading","aria-level":1},o.createElement(he,null,e),t&&o.createElement(ge,null,t),l&&o.createElement(ue,{contextMessage:s,contextActions:n,contextComponent:i,direction:r,selectedCount:a}));function ye(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]])}return s}"function"==typeof SuppressedError&&SuppressedError;const fe={left:"flex-start",right:"flex-end",center:"center"},be=c.default.header` 255 255 position: relative; 256 256 display: flex; … … 284 284 285 285 ${({theme:e})=>e.responsiveWrapper.style}; 286 `,je=c.default.div` 287 position: relative; 288 box-sizing: border-box; 289 width: 100%; 290 height: 100%; 291 ${e=>e.theme.progress.style}; 286 292 `,we=c.default.div` 287 position: relative;288 box-sizing: border-box;289 width: 100%;290 height: 100%;291 ${e=>e.theme.progress.style};292 `,je=c.default.div`293 293 position: relative; 294 294 width: 100%; … … 348 348 pointer-events: none; 349 349 } 350 `,Re=e=>{var{defaultValue:t,onChange:s}=e,n=ye(e,["defaultValue","onChange"]);return o.createElement(Ne,null,o.createElement(Pe,Object.assign({onChange:s,defaultValue:t},n)),o.createElement(Ee,null))},Te={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return l.default.createElement("div",null,"To add an expander pass in a component instance via ",l.default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:l.default.createElement((()=>l.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},l.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),l.default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:l.default.createElement((()=>l.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},l.default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),l.default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:l.default.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:l.default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:t.C1.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),l.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),l.default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),l.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),l.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:t.OP.AUTO,onChangePage:x,onChangeRowsPerPage:x,onRowClicked:x,onRowDoubleClicked:x,onRowMouseEnter:x,onRowMouseLeave:x,onRowExpandToggled:x,onSelectedRowsChange:x,onSort:x,onColumnOrderChange:x},De={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"}, Fe=c.default.nav`350 `,Re=e=>{var{defaultValue:t,onChange:s}=e,n=ye(e,["defaultValue","onChange"]);return o.createElement(Ne,null,o.createElement(Pe,Object.assign({onChange:s,defaultValue:t},n)),o.createElement(Ee,null))},Te={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return l.default.createElement("div",null,"To add an expander pass in a component instance via ",l.default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:l.default.createElement((()=>l.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},l.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),l.default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:l.default.createElement((()=>l.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},l.default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),l.default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:l.default.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:l.default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:t.C1.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),l.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),l.default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),l.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:l.default.createElement((()=>l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},l.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),l.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:t.OP.AUTO,onChangePage:x,onChangeRowsPerPage:x,onRowClicked:x,onRowDoubleClicked:x,onRowMouseEnter:x,onRowMouseLeave:x,onRowExpandToggled:x,onSelectedRowsChange:x,onSort:x,onColumnOrderChange:x},De={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},Ie=c.default.nav` 351 351 display: flex; 352 352 flex: 1 1 auto; … … 358 358 width: 100%; 359 359 ${({theme:e})=>e.pagination.style}; 360 `, Ie=c.default.button`360 `,Fe=c.default.button` 361 361 position: relative; 362 362 display: block; … … 381 381 `,Ae=c.default(Oe)` 382 382 margin: 0 4px; 383 `;var Me=o.memo((function({rowsPerPage:e,rowCount:t,currentPage:s,direction:n=Te.direction,paginationRowsPerPageOptions:i=Te.paginationRowsPerPageOptions,paginationIconLastPage:a=Te.paginationIconLastPage,paginationIconFirstPage:r=Te.paginationIconFirstPage,paginationIconNext:l=Te.paginationIconNext,paginationIconPrevious:c=Te.paginationIconPrevious,paginationComponentOptions:d=Te.paginationComponentOptions,onChangeRowsPerPage:p=Te.onChangeRowsPerPage,onChangePage:u=Te.onChangePage}){const h=(()=>{const e="object"==typeof window;function t(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}const[s,n]=o.useState(t);return o.useEffect((()=>{if(!e)return()=>null;function s(){n(t())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)}),[]),s})(),g=le(n),x=h.width&&h.width>599,y=m(t,e),f=s*e,b=f-e+1,_=1===s,v=s===y,S=Object.assign(Object.assign({},De),d),w=s===y?`${b}-${t} ${S.rangeSeparatorText} ${t}`:`${b}-${f} ${S.rangeSeparatorText} ${t}`,j=o.useCallback((()=>u(s-1)),[s,u]),C=o.useCallback((()=>u(s+1)),[s,u]),k=o.useCallback((()=>u(1)),[u]),E=o.useCallback((()=>u(m(t,e))),[u,t,e]),P=o.useCallback((e=>p(Number(e.target.value),s)),[s,p]),N=i.map((e=>o.createElement("option",{key:e,value:e},e)));S.selectAllRowsItem&&N.push(o.createElement("option",{key:-1,value:t},S.selectAllRowsItemText));const R=o.createElement(Re,{onChange:P,defaultValue:e,"aria-label":S.rowsPerPageText},N);return o.createElement(Fe,{className:"rdt_Pagination"},!S.noRowsPerPage&&x&&o.createElement(o.Fragment,null,o.createElement(Ae,null,S.rowsPerPageText),R),x&&o.createElement(He,null,w),o.createElement(Be,null,o.createElement(Ie,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":_,onClick:k,disabled:_,$isRTL:g},r),o.createElement(Ie,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":_,onClick:j,disabled:_,$isRTL:g},c),!S.noRowsPerPage&&!x&&R,o.createElement(Ie,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":v,onClick:C,disabled:v,$isRTL:g},l),o.createElement(Ie,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":v,onClick:E,disabled:v,$isRTL:g},a)))}));const $e=(e,t)=>{const s=o.useRef(!0);o.useEffect((()=>{s.current?s.current=!1:e()}),t)};var ze=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Le}(e)}(e)},Le="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ue(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Je((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function We(e,t,s){return e.concat(t).map((function(e){return Ue(e,s)}))}function Ge(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function qe(e,t){try{return t in e}catch(e){return!1}}function Je(e,t,s){(s=s||{}).arrayMerge=s.arrayMerge||We,s.isMergeableObject=s.isMergeableObject||ze,s.cloneUnlessOtherwiseSpecified=Ue;var n=Array.isArray(t);return n===Array.isArray(e)?n?s.arrayMerge(e,t,s):function(e,t,s){var n={};return s.isMergeableObject(e)&&Ge(e).forEach((function(t){n[t]=Ue(e[t],s)})),Ge(t).forEach((function(i){(function(e,t){return qe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(qe(e,i)&&s.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return Je;var s=t.customMerge(e);return"function"==typeof s?s:Je}(i,s)(e[i],t[i],s):n[i]=Ue(t[i],s))})),n}(e,t,s):Ue(t,s)}Je.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,s){return Je(e,s,t)}),{})};var Ye=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Je);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},Ve={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(e,t,s,n){const[i,a]=o.useState((()=>h(e))),[l,c]=o.useState(""),d=o.useRef("");$e((()=>{a(h(e))}),[e]);const p=o.useCallback((e=>{var t,s,n;const{attributes:a}=e.target,r=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;r&&(d.current=(null===(n=null===(s=i[b(i,r)])||void 0===s?void 0:s.id)||void 0===n?void 0:n.toString())||"",c(d.current))}),[i]),u=o.useCallback((e=>{var s;const{attributes:n}=e.target,r=null===(s=n.getNamedItem("data-column-id"))||void 0===s?void 0:s.value;if(r&&d.current&&r!==d.current){const e=b(i,d.current),s=b(i,r),n=[...i];n[e]=i[s],n[s]=i[e],a(n),t(n)}}),[t,i]),m=o.useCallback((e=>{e.preventDefault()}),[]),g=o.useCallback((e=>{e.preventDefault()}),[]),x=o.useCallback((e=>{e.preventDefault(),d.current="",c("")}),[]),y=function(e=!1){return e?r.ASC:r.DESC}(n),f=o.useMemo((()=>i[b(i,null==s?void 0:s.toString())]||{}),[s,i]);return{tableColumns:i,draggingColumnId:l,handleDragStart:p,handleDragEnter:u,handleDragOver:m,handleDragLeave:g,handleDragEnd:x,defaultSortDirection:y,defaultSortColumn:f}}var Ze=o.memo((function(e){const{data:t=Te.data,columns:s=Te.columns,title:n=Te.title,actions:a=Te.actions,keyField:l=Te.keyField,striped:c=Te.striped,highlightOnHover:p=Te.highlightOnHover,pointerOnHover:u=Te.pointerOnHover,dense:h=Te.dense,selectableRows:x=Te.selectableRows,selectableRowsSingle:y=Te.selectableRowsSingle,selectableRowsHighlight:b=Te.selectableRowsHighlight,selectableRowsNoSelectAll:_=Te.selectableRowsNoSelectAll,selectableRowsVisibleOnly:S=Te.selectableRowsVisibleOnly,selectableRowSelected:j=Te.selectableRowSelected,selectableRowDisabled:E=Te.selectableRowDisabled,selectableRowsComponent:P=Te.selectableRowsComponent,selectableRowsComponentProps:N=Te.selectableRowsComponentProps,onRowExpandToggled:T=Te.onRowExpandToggled,onSelectedRowsChange:D=Te.onSelectedRowsChange,expandableIcon:F=Te.expandableIcon,onChangeRowsPerPage:I=Te.onChangeRowsPerPage,onChangePage:B=Te.onChangePage,paginationServer:O=Te.paginationServer,paginationServerOptions:H=Te.paginationServerOptions,paginationTotalRows:A=Te.paginationTotalRows,paginationDefaultPage:M=Te.paginationDefaultPage,paginationResetDefaultPage:$=Te.paginationResetDefaultPage,paginationPerPage:z=Te.paginationPerPage,paginationRowsPerPageOptions:L=Te.paginationRowsPerPageOptions,paginationIconLastPage:U=Te.paginationIconLastPage,paginationIconFirstPage:W=Te.paginationIconFirstPage,paginationIconNext:G=Te.paginationIconNext,paginationIconPrevious:q=Te.paginationIconPrevious,paginationComponent:J=Te.paginationComponent,paginationComponentOptions:Y=Te.paginationComponentOptions,responsive:K=Te.responsive,progressPending:V=Te.progressPending,progressComponent:Q=Te.progressComponent,persistTableHead:X=Te.persistTableHead,noDataComponent:ee=Te.noDataComponent,disabled:te=Te.disabled,noTableHead:se=Te.noTableHead,noHeader:ne=Te.noHeader,fixedHeader:ie=Te.fixedHeader,fixedHeaderScrollHeight:re=Te.fixedHeaderScrollHeight,pagination:le=Te.pagination,subHeader:ce=Te.subHeader,subHeaderAlign:de=Te.subHeaderAlign,subHeaderWrap:pe=Te.subHeaderWrap,subHeaderComponent:ue=Te.subHeaderComponent,noContextMenu:he=Te.noContextMenu,contextMessage:me=Te.contextMessage,contextActions:ge=Te.contextActions,contextComponent:ye=Te.contextComponent,expandableRows:fe=Te.expandableRows,onRowClicked:be=Te.onRowClicked,onRowDoubleClicked:Ee=Te.onRowDoubleClicked,onRowMouseEnter:Pe=Te.onRowMouseEnter,onRowMouseLeave:Ne=Te.onRowMouseLeave,sortIcon:Re=Te.sortIcon,onSort:De=Te.onSort,sortFunction:Fe=Te.sortFunction,sortServer:Ie=Te.sortServer,expandableRowsComponent:Be=Te.expandableRowsComponent,expandableRowsComponentProps:Oe=Te.expandableRowsComponentProps,expandableRowDisabled:He=Te.expandableRowDisabled,expandableRowsHideExpander:Ae=Te.expandableRowsHideExpander,expandOnRowClicked:ze=Te.expandOnRowClicked,expandOnRowDoubleClicked:Le=Te.expandOnRowDoubleClicked,expandableRowExpanded:Ue=Te.expandableRowExpanded,expandableInheritConditionalStyles:We=Te.expandableInheritConditionalStyles,defaultSortFieldId:Ge=Te.defaultSortFieldId,defaultSortAsc:qe=Te.defaultSortAsc,clearSelectedRows:Je=Te.clearSelectedRows,conditionalRowStyles:Ke=Te.conditionalRowStyles,theme:Ze=Te.theme,customStyles:Xe=Te.customStyles,direction:et=Te.direction,onColumnOrderChange:tt=Te.onColumnOrderChange,className:st,ariaLabel:nt}=e,{tableColumns:it,draggingColumnId:at,handleDragStart:rt,handleDragEnter:ot,handleDragOver:lt,handleDragLeave:ct,handleDragEnd:dt,defaultSortDirection:pt,defaultSortColumn:ut}=Qe(s,tt,Ge,qe),[{rowsPerPage:ht,currentPage:mt,selectedRows:gt,allSelected:xt,selectedCount:yt,selectedColumn:ft,sortDirection:bt,toggleOnSelectedRowsChange:_t},vt]=o.useReducer(v,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:ut,toggleOnSelectedRowsChange:!1,sortDirection:pt,currentPage:M,rowsPerPage:z,selectedRowsFlag:!1,contextMessage:Te.contextMessage}),{persistSelectedOnSort:St=!1,persistSelectedOnPageChange:wt=!1}=H,jt=!(!O||!wt&&!St),Ct=le&&!V&&t.length>0,kt=J||Me,Et=o.useMemo((()=>((e={},t="default",s="default")=>{return Ye({table:{style:{color:(n=Ve[Ve[t]?t:s]).text.primary,backgroundColor:n.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:n.text.primary,backgroundColor:n.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:n.background.default,minHeight:"52px"}},head:{style:{color:n.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:n.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:n.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:n.context.background,fontSize:"18px",fontWeight:400,color:n.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:n.text.primary,backgroundColor:n.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:n.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:n.selected.text,backgroundColor:n.selected.default,borderBottomColor:n.background.default}},highlightOnHoverStyle:{color:n.highlightOnHover.text,backgroundColor:n.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:n.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:n.background.default},stripedStyle:{color:n.striped.text,backgroundColor:n.striped.default}},expanderRow:{style:{color:n.text.primary,backgroundColor:n.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:n.button.default,fill:n.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:n.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:n.button.hover},"&:focus":{outline:"none",backgroundColor:n.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:n.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:n.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:n.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:n.button.default,fill:n.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:n.button.disabled,fill:n.button.disabled},"&:hover:not(:disabled)":{backgroundColor:n.button.hover},"&:focus":{outline:"none",backgroundColor:n.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:n.text.primary,backgroundColor:n.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:n.text.primary,backgroundColor:n.background.default}}},e);var n})(Xe,Ze)),[Xe,Ze]),Pt=o.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),Nt=o.useMemo((()=>{if(Ie)return t;if((null==ft?void 0:ft.sortFunction)&&"function"==typeof ft.sortFunction){const e=ft.sortFunction,s=bt===r.ASC?e:(t,s)=>-1*e(t,s);return[...t].sort(s)}return function(e,t,s,n){return t?n&&"function"==typeof n?n(e.slice(0),t,s):e.slice(0).sort(((e,n)=>{const i=t(e),a=t(n);if("asc"===s){if(i<a)return-1;if(i>a)return 1}if("desc"===s){if(i>a)return-1;if(i<a)return 1}return 0})):e}(t,null==ft?void 0:ft.selector,bt,Fe)}),[Ie,ft,bt,t,Fe]),Rt=o.useMemo((()=>{if(le&&!O){const e=mt*ht,t=e-ht;return Nt.slice(t,e)}return Nt}),[mt,le,O,ht,Nt]),Tt=o.useCallback((e=>{vt(e)}),[]),Dt=o.useCallback((e=>{vt(e)}),[]),Ft=o.useCallback((e=>{vt(e)}),[]),It=o.useCallback(((e,t)=>be(e,t)),[be]),Bt=o.useCallback(((e,t)=>Ee(e,t)),[Ee]),Ot=o.useCallback(((e,t)=>Pe(e,t)),[Pe]),Ht=o.useCallback(((e,t)=>Ne(e,t)),[Ne]),At=o.useCallback((e=>vt({type:"CHANGE_PAGE",page:e,paginationServer:O,visibleOnly:S,persistSelectedOnPageChange:wt})),[O,wt,S]),Mt=o.useCallback((e=>{const t=m(A||Rt.length,e),s=g(mt,t);O||At(s),vt({type:"CHANGE_ROWS_PER_PAGE",page:s,rowsPerPage:e})}),[mt,At,O,A,Rt.length]);if(le&&!O&&Nt.length>0&&0===Rt.length){const e=m(Nt.length,ht),t=g(mt,e);At(t)}$e((()=>{D({allSelected:xt,selectedCount:yt,selectedRows:gt.slice(0)})}),[_t]),$e((()=>{De(ft,bt,Nt.slice(0))}),[ft,bt]),$e((()=>{B(mt,A||Nt.length)}),[mt]),$e((()=>{I(ht,mt)}),[ht]),$e((()=>{At(M)}),[M,$]),$e((()=>{if(le&&O&&A>0){const e=m(A,ht),t=g(mt,e);mt!==t&&At(t)}}),[A]),o.useEffect((()=>{vt({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Je})}),[y,Je]),o.useEffect((()=>{if(!j)return;const e=Nt.filter((e=>j(e))),t=y?e.slice(0,1):e;vt({type:"SELECT_MULTIPLE_ROWS",keyField:l,selectedRows:t,totalRows:Nt.length,mergeSelections:jt})}),[t,j]);const $t=S?Rt:Nt,zt=wt||y||_;return o.createElement(i.ThemeProvider,{theme:Et},!ne&&(!!n||!!a)&&o.createElement(xe,{title:n,actions:a,showMenu:!he,selectedCount:yt,direction:et,contextActions:ge,contextComponent:ye,contextMessage:me}),ce&&o.createElement(_e,{align:de,wrapContent:pe},ue),o.createElement(Se,Object.assign({$responsive:K,$fixedHeader:ie,$fixedHeaderScrollHeight:re,className:st},Pt),o.createElement(je,null,V&&!X&&o.createElement(we,null,Q),o.createElement(w,Object.assign({disabled:te,className:"rdt_Table",role:"table"},nt&&{"aria-label":nt}),!se&&(!!X||Nt.length>0&&!V)&&o.createElement(C,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:ie},o.createElement(k,{className:"rdt_TableHeadRow",role:"row",$dense:h},x&&(zt?o.createElement(R,{style:{flex:"0 0 48px"}}):o.createElement(oe,{allSelected:xt,selectedRows:gt,selectableRowsComponent:P,selectableRowsComponentProps:N,selectableRowDisabled:E,rowData:$t,keyField:l,mergeSelections:jt,onSelectAllRows:Dt})),fe&&!Ae&&o.createElement(Ce,null),it.map((e=>o.createElement(ae,{key:e.id,column:e,selectedColumn:ft,disabled:V||0===Nt.length,pagination:le,paginationServer:O,persistSelectedOnSort:St,selectableRowsVisibleOnly:S,sortDirection:bt,sortIcon:Re,sortServer:Ie,onSort:Tt,onDragStart:rt,onDragOver:lt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct,draggingColumnId:at}))))),!Nt.length&&!V&&o.createElement(ke,null,ee),V&&X&&o.createElement(we,null,Q),!V&&Nt.length>0&&o.createElement(ve,{className:"rdt_TableBody",role:"rowgroup"},Rt.map(((e,t)=>{const s=d(e,l),n=function(e=""){return"number"!=typeof e&&(!e||0===e.length)}(s)?t:s,i=f(e,gt,l),a=!!(fe&&Ue&&Ue(e)),r=!!(fe&&He&&He(e));return o.createElement(Z,{id:n,key:n,keyField:l,"data-row-id":n,columns:it,row:e,rowCount:Nt.length,rowIndex:t,selectableRows:x,expandableRows:fe,expandableIcon:F,highlightOnHover:p,pointerOnHover:u,dense:h,expandOnRowClicked:ze,expandOnRowDoubleClicked:Le,expandableRowsComponent:Be,expandableRowsComponentProps:Oe,expandableRowsHideExpander:Ae,defaultExpanderDisabled:r,defaultExpanded:a,expandableInheritConditionalStyles:We,conditionalRowStyles:Ke,selected:i,selectableRowsHighlight:b,selectableRowsComponent:P,selectableRowsComponentProps:N,selectableRowDisabled:E,selectableRowsSingle:y,striped:c,onRowExpandToggled:T,onRowClicked:It,onRowDoubleClicked:Bt,onRowMouseEnter:Ot,onRowMouseLeave:Ht,onSelectedRow:Ft,draggingColumnId:at,onDragStart:rt,onDragOver:lt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct})})))))),Ct&&o.createElement("div",null,o.createElement(kt,{onChangePage:At,onChangeRowsPerPage:Mt,rowCount:A||Nt.length,currentPage:mt,rowsPerPage:ht,direction:et,paginationRowsPerPageOptions:L,paginationIconLastPage:U,paginationIconFirstPage:W,paginationIconNext:G,paginationIconPrevious:q,paginationComponentOptions:Y})))}));t.Ay=Ze},833:e=>{e.exports=function(e,t,s,n){var i=s?s.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!o(c))return!1;var d=e[c],p=t[c];if(!1===(i=s?s.call(n,d,p,c):void 0)||void 0===i&&d!==p)return!1}return!0}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return s[e](a,a.exports,i),a.exports}i.m=s,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,s)=>(i.f[s](e,t),t)),[])),i.u=e=>(({42:"reactPlayerTwitch",85:"reactPlayerTiktok",173:"reactPlayerVimeo",262:"reactPlayerHls",340:"reactPlayerWistia",353:"reactPlayerPreview",395:"reactPlayerDash",446:"reactPlayerYouTube",723:"reactPlayerMux",771:"reactPlayerSpotify"}[e]||e)+".js?ver="+{42:"47a773c791ecd21eee66",85:"dded45775e12c040609a",173:"bb811d69483435f187ed",262:"58ee61ffc2dac6d20ecc",303:"55c013d91cad46be7915",340:"f10c3e337b4ab3dfce0f",353:"2b3c86b6e416aadf4f56",394:"26ce6b979834bc7bc288",395:"21f211b9595fa18ae2ae",446:"1a6a37eba4e92b12bf1c",723:"aeb3640f9ee7783b59fd",771:"0da202a6d0ffa5db029f"}[e]),i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="simplystatic-settings:",i.l=(s,n,a,r)=>{if(e[s])e[s].push(n);else{var o,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==s||p.getAttribute("data-webpack")==t+a){o=p;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,i.nc&&o.setAttribute("nonce",i.nc),o.setAttribute("data-webpack",t+a),o.src=s),e[s]=[n];var u=(t,n)=>{o.onerror=o.onload=null,clearTimeout(h);var i=e[s];if(delete e[s],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach((e=>e(n))),t)return t(n)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),l&&document.head.appendChild(o)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={57:0};i.f.j=(t,s)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)s.push(n[2]);else{var a=new Promise(((s,i)=>n=e[t]=[s,i]));s.push(n[2]=a);var r=i.p+i.u(t),o=new Error;i.l(r,(s=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=s&&("load"===s.type?"missing":s.type),r=s&&s.target&&s.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+r+")",o.name="ChunkLoadError",o.type=a,o.request=r,n[1](o)}}),"chunk-"+t,t)}};var t=(t,s)=>{var n,a,[r,o,l]=s,c=0;if(r.some((t=>0!==e[t]))){for(n in o)i.o(o,n)&&(i.m[n]=o[n]);l&&l(i)}for(t&&t(s);c<r.length;c++)a=r[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},s=globalThis.webpackChunksimplystatic_settings=globalThis.webpackChunksimplystatic_settings||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})(),i.nc=void 0,(()=>{"use strict";const e=window.wp.element,t=window.wp.apiFetch;var s=i.n(t),n=i(609),a=i.n(n);function r(e,t){const s=(0,n.useRef)();(0,n.useEffect)((()=>{s.current=e}),[e]),(0,n.useEffect)((()=>{if(null!==t){let e=setInterval((function(){s.current()}),t);return()=>clearInterval(e)}}),[t])}const o=window.ReactJSXRuntime,{__}=wp.i18n,l=(0,e.createContext)(),c=function(t){const[n,i]=(0,e.useState)(!1),[a,c]=(0,e.useState)(0),[d,p]=(0,e.useState)(!1),[u,h]=(0,e.useState)(!1),[m,g]=(0,e.useState)(!1),[x,y]=(0,e.useState)({}),[f,b]=(0,e.useState)({}),[_,v]=(0,e.useState)("yes"),[S,w]=(0,e.useState)(1),[j,C]=(0,e.useState)([]),[k,E]=(0,e.useState)(!0),P=()=>{s()({path:"/simplystatic/v1/settings"}).then((e=>{y(e)}))},N=()=>{s()({path:"/simplystatic/v1/is-running",method:"GET"}).then((e=>{var t=JSON.parse(e);i(t.running),p(t.paused),t.delayed&&c(t.delayed_until)}))};function R(e){try{const t=options&&options.integrations;if(!t)return null;if(Array.isArray(t)){for(let s=0;s<t.length;s++){const n=t[s];if(n&&n.id===e)return n}return null}return t[e]||null}catch(e){return null}}const T=e=>{const t=R(e);return!(!t||!t.requires_ui_reload)},D=e=>j.indexOf(e)>=0,F=e=>{let t=x.integrations;return!(!1===t||!t||!Array.isArray(t))&&t.indexOf(e)>=0};return r((()=>{c(a-1)}),a>0?1e3:null),r((()=>{N()}),n||a?5e3:null),(0,e.useEffect)((()=>{options.current_settings?y(options.current_settings):P(),s()({path:"/simplystatic/v1/system-status"}).then((e=>{b(e),s()({path:"/simplystatic/v1/system-status/passed"}).then((e=>{let t=JSON.parse(e);v(t.passed)}))})),N(),w(options.blog_id)}),[]),(0,o.jsx)(l.Provider,{value:{settings:x,configs:f,passedChecks:_,settingsSaved:m,setSettingsSaved:g,updateSetting:(e,t)=>{y((s=>({...s,[e]:t})))},setSettings:y,saveSettings:()=>{const e=j&&j.length>0;return s()({path:"/simplystatic/v1/settings",method:"POST",data:x}).then((t=>(C([]),{resp:t,shouldReload:e})))},resetSettings:()=>{s()({path:"/simplystatic/v1/settings/reset",method:"POST"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&y(t.data)}))},resetDatabase:()=>{s()({path:"/simplystatic/v1/settings/reset-database",method:"POST"})},resetBackgroundQueue:()=>{s()({path:"/simplystatic/v1/settings/reset-background-queue",method:"POST"})},getSettings:P,updateFromNetwork:e=>{s()({path:"/simplystatic/v1/update-from-network",method:"POST",data:{blog_id:e}})},importSettings:e=>{y(e),s()({path:"/simplystatic/v1/settings",method:"POST",data:e})},migrateSettings:()=>{s()({path:"/simplystatic/v1/migrate",method:"POST",migrate:!0})},resetDiagnostics:()=>{s()({path:"/simplystatic/v1/reset-diagnostics",method:"POST"})},isRunning:n,setIsRunning:i,isPaused:d,setIsPaused:p,setIsResumed:h,isResumed:u,blogId:S,setBlogId:w,isPro:()=>!!options.is_multisite||!!options.connect&&!!options.connect.is_connected,isStudio:()=>!!/(static\d*|onstatic)\.studio/.test(options.home)||!!options.version_studio,isIntegrationActive:F,canRunIntegration:e=>!!F(e)&&!D(e),maybeQueueIntegration:e=>{T(e)&&(D(e)||C((t=>t&&t.indexOf(e)>=0?t:[...t||[],e])))},maybeUnqueueIntegration:e=>{T(e)&&D(e)&&C((t=>(t||[]).filter((t=>t!==e))))},isQueuedIntegration:D,getIntegrationById:R,showMobileNav:k,setShowMobileNav:E,isDelayed:a},children:t.children})},d=window.wp.components,p=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,u=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,h=/\.(m3u8)($|\?)/i,m=/\.(mpd)($|\?)/i,g=/stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/,x=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,y=/vimeo\.com\/(?!progressive_redirect).+/,f=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,b=/open\.spotify\.com\/(\w+)\/(\w+)/i,_=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/,v=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,S=(e,t)=>{if(Array.isArray(e)){for(const s of e){if("string"==typeof s&&S(s,t))return!0;if(S(s.src,t))return!0}return!1}return t(e)},w={html:e=>S(e,(e=>p.test(e)||u.test(e))),hls:e=>S(e,(e=>h.test(e))),dash:e=>S(e,(e=>m.test(e))),mux:e=>g.test(e),youtube:e=>x.test(e),vimeo:e=>y.test(e)&&!u.test(e)&&!h.test(e),wistia:e=>f.test(e),spotify:e=>b.test(e),twitch:e=>_.test(e),tiktok:e=>v.test(e)};var j=n.forwardRef(((e,t)=>{const s=p.test(`${e.src}`)?"audio":"video";return n.createElement(s,{...e,ref:t},e.children)})),C=[{key:"hls",name:"hls.js",canPlay:w.hls,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>Promise.all([i.e(394),i.e(262)]).then(i.bind(i,805))))},{key:"dash",name:"dash.js",canPlay:w.dash,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>i.e(395).then(i.bind(i,517))))},{key:"mux",name:"Mux",canPlay:w.mux,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>Promise.all([i.e(394),i.e(723)]).then(i.bind(i,979))))},{key:"youtube",name:"YouTube",canPlay:w.youtube,player:(0,n.lazy)((()=>i.e(446).then(i.bind(i,808))))},{key:"vimeo",name:"Vimeo",canPlay:w.vimeo,player:(0,n.lazy)((()=>i.e(173).then(i.bind(i,183))))},{key:"wistia",name:"Wistia",canPlay:w.wistia,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>i.e(340).then(i.bind(i,868))))},{key:"spotify",name:"Spotify",canPlay:w.spotify,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(771).then(i.bind(i,653))))},{key:"twitch",name:"Twitch",canPlay:w.twitch,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(42).then(i.bind(i,682))))},{key:"tiktok",name:"TikTok",canPlay:w.tiktok,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(85).then(i.bind(i,188))))},{key:"html",name:"html",canPlay:w.html,canEnablePIP:()=>!0,player:j}];const k={width:"320px",height:"180px",volume:1,playbackRate:1,previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}"},E=n.forwardRef(((e,t)=>{const{playing:s,pip:i}=e,a=e.activePlayer,r=(0,n.useRef)(null),o=(0,n.useRef)(!0);if((0,n.useEffect)((()=>{var t,n;r.current&&(r.current.paused&&!0===s&&r.current.play(),r.current.paused||!1!==s||r.current.pause(),r.current.playbackRate=null!=(t=e.playbackRate)?t:1,r.current.volume=null!=(n=e.volume)?n:1)})),(0,n.useEffect)((()=>{var e,t,s,n,a;if(r.current&&globalThis.document){if(i&&!document.pictureInPictureElement)try{null==(t=(e=r.current).requestPictureInPicture)||t.call(e)}catch(e){}if(!i&&document.pictureInPictureElement)try{null==(n=(s=r.current).exitPictureInPicture)||n.call(s),null==(a=document.exitPictureInPicture)||a.call(document)}catch(e){}}}),[i]),!a)return null;const l={},c=["onReady","onStart"];for(const t in e)t.startsWith("on")&&!c.includes(t)&&(l[t]=e[t]);return n.createElement(a,{...l,style:e.style,className:e.className,slot:e.slot,ref:(0,n.useCallback)((e=>{r.current=e,"function"==typeof t?t(e):null!==t&&(t.current=e)}),[t]),src:e.src,crossOrigin:e.crossOrigin,preload:e.preload,controls:e.controls,muted:e.muted,autoPlay:e.autoPlay,loop:e.loop,playsInline:e.playsInline,config:e.config,onLoadStart:t=>{var s,n;o.current=!0,null==(s=e.onReady)||s.call(e),null==(n=e.onLoadStart)||n.call(e,t)},onPlay:t=>{var s,n;o.current&&(o.current=!1,null==(s=e.onStart)||s.call(e,t)),null==(n=e.onPlay)||n.call(e,t)}},e.children)}));E.displayName="Player";var P=E;const N=(0,n.lazy)((()=>i.e(353).then(i.bind(i,924)))),R=[],T=({children:e})=>e;var D=((e,t)=>{const s=n.forwardRef(((s,i)=>{const a={...k,...s},{src:r,slot:o,className:l,style:c,width:d,height:p,fallback:u,wrapper:h}=a,[m,g]=(0,n.useState)(!!a.light);(0,n.useEffect)((()=>{a.light?g(!0):g(!1)}),[a.light]);const x=e=>{var t;g(!1),null==(t=a.onClickPreview)||t.call(a,e)},y=null==h?T:h,f=!1===u?T:n.Suspense;return n.createElement(y,{slot:o,className:l,style:{width:d,height:p,...c}},n.createElement(f,{fallback:u},m?(e=>{if(!e)return null;const{light:t,playIcon:s,previewTabIndex:i,oEmbedUrl:r,previewAriaLabel:o}=a;return n.createElement(N,{src:e,light:t,playIcon:s,previewTabIndex:i,previewAriaLabel:o,oEmbedUrl:r,onClickPreview:x})})(r):(s=>{var r,c;const d=(s=>{for(const t of[...R,...e])if(s&&t.canPlay(s))return t;return t||null})(s);if(!d)return null;const{style:p,width:u,height:h,wrapper:m}=a,g=null==(r=a.config)?void 0:r[d.key];return n.createElement(P,{...a,ref:i,activePlayer:null!=(c=d.player)?c:d,slot:m?void 0:o,className:m?void 0:l,style:m?{display:"block",width:"100%",height:"100%"}:{display:"block",width:u,height:h,...p},config:g})})(r)))}));return s.displayName="ReactPlayer",s.addCustomPlayer=e=>{R.push(e)},s.removeCustomPlayers=()=>{R.length=0},s.canPlay=t=>{if(t)for(const s of[...R,...e])if(s.canPlay(t))return!0;return!1},s.canEnablePIP=t=>{var s;if(t)for(const n of[...R,...e])if(n.canPlay(t)&&(null==(s=n.canEnablePIP)?void 0:s.call(n)))return!0;return!1},s})(C,C[C.length-1]);const{__:F}=wp.i18n,I=function({title:t,videoUrl:s}){const[n,i]=(0,e.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[n&&(0,o.jsx)("div",{className:"simply-static-video-modal-background",children:(0,o.jsx)(d.Modal,{title:t,className:"simply-static-video-modal",onRequestClose:()=>i(!1),children:(0,o.jsx)(D,{src:s,controls:!0,width:"920px",height:"560px",playsInline:!0})})}),(0,o.jsx)(d.Button,{variant:"link",className:"simply-static-video-button",onClick:()=>i(!0),children:(0,o.jsx)(d.Dashicon,{icon:"format-video"})})]})},{__:B}=wp.i18n,O=function(){var t;const{settings:n,updateSetting:i,saveSettings:a,settingsSaved:r,setSettingsSaved:c,isPro:p,isRunning:u,setIsRunning:h}=(0,e.useContext)(l),[m,g]=(0,e.useState)("relative"),[x,y]=(0,e.useState)(!1),[f,b]=(0,e.useState)("https://"),[_,v]=(0,e.useState)(""),[S,w]=(0,e.useState)("/"),[j,C]=(0,e.useState)(!1),[k,E]=(0,e.useState)(!1),[P,N]=(0,e.useState)(!1),[R,T]=(0,e.useState)(!1),[D,F]=(0,e.useState)(!1),[O,H]=(0,e.useState)(!1),[A,M]=(0,e.useState)([]),[$,z]=(0,e.useState)([]),[L,U]=(0,e.useState)(null),[W,G]=(0,e.useState)([]),[q,J]=(0,e.useState)([]),[Y,K]=(0,e.useState)(null),[V,Q]=(0,e.useState)([]),[Z,X]=(0,e.useState)([]),[ee,te]=(0,e.useState)(null),[se,ne]=(0,e.useState)([]),[ie,ae]=(0,e.useState)([]),[re,oe]=(0,e.useState)(null),[le,ce]=(0,e.useState)([]);return(0,e.useEffect)((()=>{U(null),s()({path:"/simplystatic/v1/crawlers",parse:!0}).then((e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void U("Error parsing API response: "+e.message)}if(e&&e.data&&e.data.length>0){const t=e.data.filter((e=>e.can_run));if(M(t),n.crawlers&&Array.isArray(n.crawlers)&&0!==n.crawlers.length){if(Array.isArray(n.crawlers)){const e=n.crawlers.filter((e=>t.some((t=>t.id===e))));if(0===e.length){const e=t.map((e=>e.id));z(e),i("crawlers",e)}else z(e)}}else{const e=t.filter((e=>e.active)).map((e=>e.id));z(e),i("crawlers",e)}}else U("Invalid API response structure or empty crawlers array")})).catch((e=>{U("Error fetching crawlers: "+(e.message||"Unknown error"))})),K(null),s()({path:"/simplystatic/v1/post-types",parse:!0}).then((e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void K("Error parsing API response: "+e.message)}if(e&&e.data&&e.data.length>0)if(G(e.data),n.post_types&&Array.isArray(n.post_types)){if(Array.isArray(n.post_types)){const t=n.post_types.filter((t=>e.data.some((e=>e.name===t))));if(0===t.length){const t=e.data.map((e=>e.name));J(t),i("post_types",t)}else J(t)}}else{const t=e.data.map((e=>e.name));J(t),i("post_types",t)}else K("Invalid API response structure or empty post types array")})).catch((e=>{K("Error fetching post types: "+(e.message||"Unknown error"))})),te(null),s()({path:"/simplystatic/v1/active-plugins",parse:!0}).then((e=>{"string"==typeof e&&(e=JSON.parse(e));const t=Array.isArray(e?.data)?e.data:[];Q(t);const s=Array.isArray(n.plugins_to_include)?n.plugins_to_include:[],a=t.map((e=>e.slug)),r=s.filter((e=>a.includes(e))),o=r.length>0?r:a;X(o),i("plugins_to_include",o)})).catch((e=>te(e?.message||"Unknown error"))),oe(null),s()({path:"/simplystatic/v1/active-themes",parse:!0}).then((e=>{"string"==typeof e&&(e=JSON.parse(e));const t=Array.isArray(e?.data)?e.data:[];ne(t);const s=Array.isArray(n.themes_to_include)?n.themes_to_include:[],a=t.map((e=>e.slug)),r=s.filter((e=>a.includes(e))),o=r.length>0?r:a;ae(o),i("themes_to_include",o)})).catch((e=>oe(e?.message||"Unknown error"))),s()({path:"/simplystatic/v1/pages"}).then((e=>{let t=e||[];t.unshift({label:B("No page selected","simply-static"),value:0}),ce(t)})).catch((()=>{ce([])}))}),[]),(0,e.useEffect)((()=>{n.destination_url_type&&g(n.destination_url_type),n.destination_scheme&&b(n.destination_scheme),n.destination_host&&v(n.destination_host),n.relative_path&&w(n.relative_path),(n.use_forms||n.use_comments)&&y(!0),n.force_replace_url&&C(n.force_replace_url),n.generate_404&&N(n.generate_404),n.add_feeds&&F(n.add_feeds),n.add_rest_api&&H(n.add_rest_api),n.smart_crawl&&T(n.smart_crawl),n.crawlers&&z(n.crawlers),void 0!==n.post_types&&J(Array.isArray(n.post_types)?n.post_types:[])}),[n]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Replacing URLs","simply-static"),(0,o.jsx)(I,{title:B("How to replace URLs","simply-static"),videoUrl:"https://youtu.be/cb8jAMJlfGI"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:B("When exporting your static site, any links to your WordPress site will be replaced by one of the following: absolute URLs, relative URLs, or URLs contructed for offline use.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:B("Replacing URLs","simply-static"),value:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:B("Absolute URLs","simply-static"),value:"absolute"},{label:B("Relative Path","simply-static"),value:"relative"},{label:B("Offline Usage","simply-static"),value:"offline"}],onChange:e=>{g(e),i("destination_url_type",e)}}),"absolute"===m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:"15%",marginTop:"15px"},children:(0,o.jsx)(d.SelectControl,{label:B("Scheme","simply-static"),value:f,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:"https://",value:"https://"},{label:"http://",value:"http://"},{label:"//",value:"//"}],onChange:e=>{b(e),i("destination_scheme",e)}})}),(0,o.jsx)(d.FlexItem,{style:{minWidth:"85%"},children:(0,o.jsx)(d.TextControl,{label:B("Host","simply-static"),type:"text",placeholder:"example.com",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:_,onChange:e=>{v(e),i("destination_host",e)}})})]}),(0,o.jsx)("p",{children:B("Convert all URLs for your WordPress site to absolute URLs at the domain specified above.","simply-static")})]}),"relative"===m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:B("Path","simply-static"),type:"text",placeholder:"/",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:S,onChange:e=>{w(e),i("relative_path",e)}}),(0,o.jsxs)("p",{children:[B("Convert all URLs for your WordPress site to relative URLs that will work at any domain.","simply-static"),(0,o.jsx)("br",{}),B("Optionally specify a path above if you intend to place the files in a subdirectory.","simply-static")]}),(0,o.jsxs)(d.Notice,{status:"warning",isDismissible:!1,children:[(0,o.jsxs)("b",{children:[B("Example","simply-static"),": "]}),B("enter /path above if you wanted to serve your files at www.example.com/path/","simply-static")]})]}),"offline"===m&&(0,o.jsx)("p",{children:B("Convert all URLs for your WordPress site so that you can browse the site locally on your own computer without hosting it on a web server.","simply-static")}),!x&&(0,o.jsx)(d.ToggleControl,{label:B("Force URL replacements","simply-static"),__nextHasNoMarginBottom:!0,help:B(j?"Replace all occurrences of the WordPress URL with the static URL (includes inline CSS and JS).":"Replace only occurrences of the WordPress URL that match our tag list.","simply-static"),checked:j,onChange:e=>{C(e),i("force_replace_url",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Enhanced Crawl","simply-static"),(0,o.jsx)(I,{title:B("How Enhanced Crawl improves your static exports","simply-static"),videoUrl:"https://youtu.be/QfKxeQ1w7tU"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:B("Enhanced Crawl uses native WordPress functions to find all pages and files when running a static export.","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Enable Enhanced Crawl","simply-static")}),help:B(R?"Find pages and files via Enhanced Crawl.":"Don't find pages and files via Enhanced Crawl.","simply-static"),checked:R,onChange:e=>{T(e),i("smart_crawl",e)}}),R&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:2}),L&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading crawlers: ","simply-static")," ",L]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),A.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Active Crawlers","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:$.map((e=>{const t=A.find((t=>t.id===e));return t?t.name:e})),suggestions:A.map((e=>e.name)),onChange:e=>{const t=e.map((e=>{let t=A.find((t=>t.name===e));return t||(t=A.find((t=>t.name.toLowerCase()===(e||"").toLowerCase()))),t||(t=A.find((t=>t.id===e))),t?t.id:null})).filter((e=>!!e&&A.some((t=>t.id===e))));z(t),i("crawlers",t)},help:B("Select which crawlers to activate. If none selected, all crawlers will be active by default.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),$.includes("post_type")&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:2}),Y&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading post types: ","simply-static")," ",Y]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),W.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Post Types to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:Array.isArray(q)?q.map((e=>{const t=W.find((t=>t.name===e));return t?t.label:e})):[],suggestions:W.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=W.find((t=>t.label===e));return t||(t=W.find((t=>t.label.toLowerCase()===e.toLowerCase()))),t||(t=W.find((t=>t.name===e))),t?t.name:e}));J(t),i("post_types",t)},help:B("Select which post types to include in the static export. If you remove all selections, all post types will be included by default.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}):(0,o.jsx)("p",{children:B("Loading post types...","simply-static")})]}),$.includes("plugin_assets")&&(0,o.jsxs)(o.Fragment,{children:[ee&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading plugins: ","simply-static")," ",ee]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),V.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Plugins to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!p(),value:Array.isArray(Z)?Z.map((e=>{const t=V.find((t=>t.slug===e));return t?t.label:e})):[],suggestions:V.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=V.find((t=>t.label===e))||V.find((t=>t.label.toLowerCase()===String(e).toLowerCase()))||V.find((t=>t.slug===e));return t?t.slug:e}));X(t),i("plugins_to_include",t)},help:B("Select which active plugins to include. All active plugins are included by default; remove tokens to exclude them.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),!p()&&(0,o.jsxs)(d.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",B("Requires Simply Static Pro","simply-static")]})]}):(0,o.jsx)("p",{children:B("Loading plugins...","simply-static")})]}),$.includes("theme_assets")&&(0,o.jsxs)(o.Fragment,{children:[re&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading themes: ","simply-static")," ",re]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),se.length>0?(0,o.jsxs)(o.Fragment,{children:[p()&&(0,o.jsx)(d.__experimentalSpacer,{margin:"5px"}),(0,o.jsx)(d.FormTokenField,{label:B("Themes to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!p(),value:Array.isArray(ie)?ie.map((e=>{const t=se.find((t=>t.slug===e));return t?t.label:e})):[],suggestions:se.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=se.find((t=>t.label===e))||se.find((t=>t.label.toLowerCase()===String(e).toLowerCase()))||se.find((t=>t.slug===e));return t?t.slug:e}));ae(t),i("themes_to_include",t)},help:B("Select which theme(s) to include. The active theme and parent (if any) are included by default; remove tokens to exclude them.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),!p()&&(0,o.jsxs)(d.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",B("Requires Simply Static Pro","simply-static")]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}):(0,o.jsx)("p",{children:B("Loading themes...","simply-static")})]}),(0,o.jsx)("div",{className:"crawler-descriptions",children:A.map((e=>(0,o.jsx)("div",{className:"crawler-description",children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{className:"crawler-name",children:(0,o.jsxs)("strong",{children:[e.name,":"]})}),(0,o.jsx)(d.FlexItem,{children:e.description})]})},e.id)))})]}):(0,o.jsx)("p",{children:B("Loading crawlers...","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("404","simply-static"),(0,o.jsx)(I,{title:B("How to manage 404 pages?","simply-static"),videoUrl:"https://youtu.be/dnRtuQrXG-k"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Generate 404 Page?","simply-static")}),help:B(P?"Generate a 404 page based on your theme template.":"Don't generate a 404 page.","simply-static"),checked:P,onChange:e=>{N(e),i("generate_404",e)}}),P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.SelectControl,{label:(0,o.jsx)(o.Fragment,{children:p&&"function"==typeof p&&p()?(0,o.jsx)(o.Fragment,{children:B("Custom 404 page (optional)","simply-static")}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{style:{position:"relative",bottom:"-15px"},children:B("Custom 404 page (optional)","simply-static")}),(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:B("Requires Simply Static Pro","simply-static")})]})}),value:null!==(t=n.custom_404_page)&&void 0!==t?t:0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:le,disabled:!(p&&"function"==typeof p&&p()),onChange:e=>{i("custom_404_page",e)},help:B("If selected, Simply Static will use the content of this page for the 404 page instead of the theme default.","simply-static")}),!(!p||"function"!=typeof p)&&p()&&(0,o.jsx)(d.Button,{variant:"secondary",disabled:u,isBusy:u,onClick:()=>{u||(h(!0),s()({path:"/simplystatic/v1/export-404",method:"POST"}).then((e=>{try{e&&!1===e.success&&e.message?alert(e.message):window.location.reload()}catch(e){window.location.reload()}})).catch((()=>{h(!1),alert(B("Failed to start 404 export.","simply-static"))})))},children:B("Export 404 Page","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Include","simply-static"),(0,o.jsx)(I,{title:B("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextareaControl,{label:B("Additional URLs","simply-static"),placeholder:options.home+"/hidden-page/\n/\\/blog\\/.*$/i ",__nextHasNoMarginBottom:!0,help:B("You can enter full URLs or regex (wrap with / /). Examples: https://example.com/private/ or /\\/blog\\/.*$/i (one per line).","simply-static"),value:n.additional_urls,onChange:e=>{i("additional_urls",e)}}),(0,o.jsx)(d.TextareaControl,{label:B("Additional Files and Directories","simply-static"),placeholder:options.home_path+"additional-directory/\n"+options.home_path+"additional-file.html\n/\\.pdf$/i",__nextHasNoMarginBottom:!0,help:B("Enter absolute paths or regex (wrap with / /). Examples: /\\.pdf$/i or /wp-content\\/uploads\\/reports\\/.*/ (one per line).","simply-static"),value:n.additional_files,onChange:e=>{i("additional_files",e)}}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{try{navigator.clipboard.writeText(options.home_path),E(!0),setTimeout((()=>E(!1)),1500)}catch(e){console.error("Clipboard copy failed",e)}},children:B(k?"Copied home path":"Copy home path","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Include RSS Feeds?","simply-static")}),help:B(D?"Include feed URLs of all your posts.":"Don't include feed URLs for all your posts.","simply-static"),checked:D,onChange:e=>{F(e),i("add_feeds",e)}}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Include Rest API?","simply-static")}),help:B(O?"Include all Rest API endpoints as JSON files.":"Don't include Rest API endpoints as JSON files.","simply-static"),checked:O,onChange:e=>{H(e),i("add_rest_api",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Exclude","simply-static"),(0,o.jsx)(I,{title:B("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextareaControl,{label:B("Urls to exclude","simply-static"),placeholder:"/some-directory/\n.jpg\n/\\.(pdf|zip)$/i\n/\\/private\\/.*/",__nextHasNoMarginBottom:!0,help:B("You can enter substrings or regex (wrap with / /). Examples: .jpg or /\\.(pdf|zip)$/i or //private/.*/ (one per line).","simply-static"),value:n.urls_to_exclude,onChange:e=>{i("urls_to_exclude",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:B("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{a(),c(!0),setTimeout((function(){c(!1)}),2e3)},variant:"primary",children:B("Save Settings","simply-static")})})]})},{__:H}=wp.i18n,A=function(){const{configs:t,resetDiagnostics:s}=(0,e.useContext)(l),[n,i]=(0,e.useState)(!1);return(0,o.jsx)("div",{className:"inner-settings",children:(0,o.jsxs)("div",{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[H("Diagnostics","simply-static"),(0,o.jsx)(I,{title:H("How to use diagnostics","simply-static"),videoUrl:"https://youtu.be/X59YMlz6F2s"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:H("Our diagnostics tool provides detailed insights into your WordPress installation and server configuration and tells you exactly what needs to be optimized to get the most out of Simply Static. Click the button below to get the latest results.","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{s(),i(!0),setTimeout((function(){window.location.reload()}),2e3)},variant:"secondary",children:H("Reset Diagnostics","simply-static")})}),n?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:H("Diagnostics resetted successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),Object.keys(t).map((e=>{const s=t[e];return(0,o.jsxs)("div",{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:e})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("div",{children:(0,o.jsx)("table",{style:{width:"100%",tableLayout:"fixed"},children:(0,o.jsx)("tbody",{className:"table-data",children:Object.entries(s).map((e=>(0,o.jsxs)("tr",{className:"table-row",children:[(0,o.jsxs)("td",{className:"diagnostics-icon",children:[" ",e[1].test?(0,o.jsx)(d.Dashicon,{className:"icon-yes",icon:"yes"}):(0,o.jsx)(d.Dashicon,{className:"icon-no",icon:"no"})]}),(0,o.jsx)("td",{className:"diagnostics-test",children:(0,o.jsx)("b",{children:e[0]})}),(0,o.jsx)("td",{children:e[1].test}),(0,o.jsxs)("td",{className:"diagnostics-result",children:[" ",e[1].test?(0,o.jsx)("p",{children:e[1].description}):(0,o.jsx)("p",{children:e[1].error})]})]},e[0])))})})})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]},e)}))]})})},{__:M}=wp.i18n,$=function(){const{settings:t,importSettings:s,saveSettings:n,resetSettings:i,migrateSettings:a,resetDatabase:r,resetBackgroundQueue:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)(!1),[h,m]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!1),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[w,j]=(0,e.useState)(!1),[C,k]=(0,e.useState)(""),[E,P]=(0,e.useState)(!1),[N,R]=(0,e.useState)(""),[T,D]=(0,e.useState)(!1);return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[M("Export","simply-static"),(0,o.jsx)(I,{title:M("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,o.jsx)(d.CardBody,{children:p?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(o.Fragment,{children:[E&&(0,o.jsx)("p",{children:M("Preparing export...","simply-static")}),N&&(0,o.jsx)(d.Notice,{status:"error",isDismissible:!0,children:(0,o.jsx)("p",{children:N})}),!E&&!N&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{marginBottom:"12px"},children:(0,o.jsx)("textarea",{className:"ss-export-textarea",value:C,readOnly:!0,style:{width:"100%",height:"300px",fontFamily:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:"12px",whiteSpace:"pre",overflow:"auto",boxSizing:"border-box"}})}),(0,o.jsx)("p",{children:(0,o.jsx)(d.ClipboardButton,{variant:"secondary",text:C,onCopy:()=>S(!0),onFinishCopy:()=>S(!1),children:M(v?"Copied!":"Copy export data","simply-static")})})]})]})}):(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{u(!0),P(!0),R(""),wp.apiFetch({path:"/simplystatic/v1/settings/export",method:"GET"}).then((e=>{try{let t=e;"string"==typeof e&&(t=JSON.parse(e));const s=JSON.stringify(t||{},null,2);k(s)}catch(e){R(M("Failed to prepare export JSON.","simply-static")),k("")}})).catch((()=>{R(M("Failed to fetch export data.","simply-static")),k("")})).finally((()=>P(!1)))},variant:"primary",children:M("Export Settings","simply-static")})})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[M("Import","simply-static"),(0,o.jsx)(I,{title:M("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M("Paste in the JSON string you got from your export to import all settings for the plugin.","simply-static")}),(0,o.jsx)("textarea",{rows:"8",name:"import-data",onChange:e=>{j(JSON.parse(e.target.value))}}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{s(w),m(!0),setTimeout((function(){m(!1)}),2e3)},variant:"primary",children:M("Import Settings","simply-static")})}),h?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings imported successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:M("Reset","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M('By clicking the "Reset Plugin Settings", you will reset all plugin settings. This can be useful if you want to import a new set of settings or you want a fresh start.',"simply-static")}),(0,o.jsx)("p",{children:M('If you click the "Reset Database Table" button instead, you will keep all your settings, and we will only recreate our DB table.',"simply-static")}),(0,o.jsx)("p",{children:M('If the background process is stuck and your debug log shows "There is already an export running", use the "Reset Background Queue" button to clear the queue and locks.',"simply-static")}),(0,o.jsxs)("p",{children:[(0,o.jsx)(d.Button,{onClick:()=>{i(),x(!0),setTimeout((function(){x(!1)}),2e3)},variant:"primary",children:M("Reset Plugin Settings","simply-static")}),(0,o.jsx)(d.Button,{onClick:()=>{r(),f(!0),setTimeout((function(){f(!1)}),2e3)},className:"reset-db-btn",variant:"primary",children:M("Reset Database Table","simply-static")}),(0,o.jsx)(d.Button,{onClick:()=>{c(),D(!0),setTimeout((()=>D(!1)),2e3)},className:"reset-bg-btn",variant:"primary",children:M("Reset Background Queue","simply-static")})]}),g?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings resetted successfully.","simply-static")})})}):"",y?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Database table resetted successfully.","simply-static")})})}):"",T?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Background queue reset successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:M("Migrate Settings","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M("Migrate all of your settings to Simply Static 3.0","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{a(),n(),_(!0),setTimeout((function(){_(!1),location.reload()}),2e3)},variant:"primary",children:M("Migrate settings","simply-static")})}),b?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings migration successfully.","simply-static")})})}):""]})]})]})},{__:z}=wp.i18n,L=function(){var t;const{settings:n,updateSetting:i,saveSettings:a,settingsSaved:r,setSettingsSaved:c,isRunning:p,isPro:u,isStudio:h}=(0,e.useContext)(l),[m,g]=(0,e.useState)("zip"),[x,y]=(0,e.useState)(!1),[f,b]=(0,e.useState)("personal"),[_,v]=(0,e.useState)("private"),[S,w]=(0,e.useState)(!1),[j,C]=(0,e.useState)(!1),[k,E]=(0,e.useState)("us-east-2"),[P,N]=(0,e.useState)("aws-iam-key"),[R,T]=(0,e.useState)(!1),[D,F]=(0,e.useState)(!1),[B,O]=(0,e.useState)(!1),[H,A]=(0,e.useState)(!1),[M]=(0,e.useState)([{label:z("ZIP Archive","simply-static"),value:"zip"},{label:z("Local Directory","simply-static"),value:"local"},{label:z("Static Studio","simply-static"),value:"simply-static-studio"},{label:z("SFTP","simply-static"),value:"sftp"},{label:z("GitHub","simply-static"),value:"github"},{label:z("AWS S3","simply-static"),value:"aws-s3"},{label:z("Bunny CDN","simply-static"),value:"cdn"},{label:z("Tiiny.host","simply-static"),value:"tiiny"}]),$=()=>{a(),c(!0),O(!1),setTimeout((function(){c(!1)}),2e3)};return(0,e.useEffect)((()=>{n.delivery_method&&g(n.delivery_method),n.clear_directory_before_export&&y(n.clear_directory_before_export),n.github_account_type&&b(n.github_account_type),n.github_repository_visibility&&v(n.github_repository_visibility),n.github_repository_visibility&&v(n.github_repository_visibility),n.github_throttle_requests&&C(n.github_throttle_requests),n.aws_empty&&w(n.aws_empty),n.aws_auth_method&&N(n.aws_auth_method),n.aws_region&&E(n.aws_region),s()({path:"/simplystatic/v1/pages"}).then((e=>{let t=e;t.unshift({label:z("No page selected","simply-static"),value:0}),F(t)}))}),[n]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:z("Deployment Settings","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:z("Choose from a variety of deployment methods. Depending on your selection we either provide a ZIP file, export to a local directory or send your files to a remote destination.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:z("Deployment method","simply-static"),value:m,options:M,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{g(e),i("delivery_method",e),O(!0)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"simply-static-studio"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:z("Static Studio","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:z("The all-in-one Static WordPress cloud-hosting platform.","simply-static")}),(0,o.jsx)("p",{children:z("Enjoy secure WordPress, the fastest exports, and the best-performing static site hosting in one package.","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{className:"button button-primary",href:"https://simplystatic.com/simply-static-studio/",target:"_blank",children:"Check out Static Studio"})})]})]}),"zip"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[z("ZIP","simply-static"),(0,o.jsx)(I,{title:z("How to export a ZIP file","simply-static"),videoUrl:"https://youtu.be/WHaFjDte6zI"})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("p",{children:z("Get a download link in the activity log once the static export has finished.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"local"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[z("Local Directory","simply-static"),(0,o.jsx)(I,{title:z("How to deploy to a local directory","simply-static"),videoUrl:"https://youtu.be/ZRdXQB5slnY"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:z("Path","simply-static"),type:"text",help:z("This is the directory where your static files will be saved. We will create it automatically on the first export if it doesn't exist.","simply-static"),placeholder:options.home_path+"public_static/",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.local_dir,onChange:e=>{i("local_dir",e)}}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{try{navigator.clipboard.writeText(options.home_path),T(!0),setTimeout((()=>T(!1)),1500)}catch(e){console.error("Clipboard copy failed",e)}},children:z(R?"Copied home path":"Copy home path","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:z("Clear Local Directory","simply-static"),help:z(x?"Clear local directory before running an export.":"Don't clear local directory before running an export.","simply-static"),checked:x,onChange:e=>{y(e),i("clear_directory_before_export",e)}})]})]}),(0,o.jsxs)(o.Fragment,{children:["github"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[z("GitHub","simply-static")," ",(0,o.jsx)(I,{title:z("How to deploy to a GitHub (2/2)","simply-static"),videoUrl:"https://youtu.be/HqyTKwZuUAM"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",z("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:z("GitHub enables you to export your static website to one of the common static hosting providers like Netlify, Cloudflare Pages or GitHub Pages.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:z("Account Type","simply-static"),value:f,help:z("Depending on the account type the settings fields will change.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:z("Personal","simply-static"),value:"personal"},{label:z("Organization","simply-static"),value:"organization"}],onChange:e=>{b(e),i("github_account_type",e)}}),"organization"===f?(0,o.jsx)(d.TextControl,{label:z("Organization","simply-static"),type:"text",help:z("Enter the name of your organization.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_user,onChange:e=>{i("github_user",e)}}):(0,o.jsx)(d.TextControl,{label:z("Username","simply-static"),type:"text",help:z("Enter your GitHub username.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_user,onChange:e=>{i("github_user",e)}}),(0,o.jsx)(d.TextControl,{label:z("E-Mail","simply-static"),type:"email",help:z("Enter your GitHub email address. This will be used to commit files to your repository.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_email,onChange:e=>{i("github_email",e)}}),(0,o.jsx)(d.TextControl,{label:(0,o.jsxs)(o.Fragment,{children:[z("Personal Access Token","simply-static"),(0,o.jsx)(I,{title:z("How to prepare your GitHub account","simply-static"),videoUrl:"https://youtu.be/fjsJJmPeKuc"})]}),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[z("You need a personal access token from GitHub. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic",target:"_blank",children:z("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_personal_access_token,onChange:e=>{i("github_personal_access_token",e)}}),(0,o.jsx)(d.TextControl,{label:z("Repository","simply-static"),type:"text",help:z("Enter a name for your repository (lowercase without spaces or special characters).","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_repository,onChange:e=>{i("github_repository",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsxs)("p",{children:[z("Ensure to create the repository and add a readme file to it before running an export as shown in the docs ","simply-static"),(0,o.jsx)("a",{href:"https://docs.simplystatic.com/article/33-set-up-the-github-integration/",target:"_blank",children:z("here","simply-static")})]})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.TextControl,{label:z("Folder","simply-static"),type:"text",help:z("Enter a relative path to a folder if you want to push files under it. Example: for github.com/USER/REPOSITORY/folder1, enter folder1","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_folder_path,onChange:e=>{i("github_folder_path",e)}}),"organization"===f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsx)("p",{children:z("You need to create the repository manually within your organization before connecting it.","simply-static")})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)(d.SelectControl,{label:z("Visiblity","simply-static"),value:_,help:z("Decide if you want to make your repository public or private.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:z("Public","simply-static"),value:"public"},{label:z("Private","simply-static"),value:"private"}],onChange:e=>{v(e),i("github_repository_visibility",e)}}),(0,o.jsx)(d.TextControl,{label:z("Branch","simply-static"),type:n.github_branch,placeholder:"main",help:z('Simply Static automatically uses "main" as branch. You may want to modify that for example to gh-pages. for GitHub Pages.',"simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_branch,onChange:e=>{i("github_branch",e)}}),(0,o.jsx)(d.TextControl,{label:z("Webhook URL","simply-static"),type:"url",help:z("Enter your Webhook URL here and Simply Static will send a POST request after all files are commited to GitHub.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_webhook_url,onChange:e=>{i("github_webhook_url",e)}}),(0,o.jsx)(d.ToggleControl,{label:z("Throttle Requests","simply-static"),help:z("Enable this option if you are experiencing issues with the GitHub API rate limit.","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,checked:j,onChange:e=>{C(e),i("github_throttle_requests",e)}}),(0,o.jsx)(d.TextControl,{label:z("Batch size","simply-static"),type:"number",help:z("Enter the number of files you want to be processed in a single batch. If current export fails to deploy, lower the number.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!==(t=n.github_batch_size)&&void 0!==t?t:100,onChange:e=>{i("github_batch_size",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"tiiny"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[z("Tiiny.host","simply-static")," ",(0,o.jsx)(I,{title:z("How to deploy to Tiiny.host","simply-static"),videoUrl:"https://youtu.be/Y9EDaQkGl1Y"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",z("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:z("Deploying to Tiiny.host is the easiest and fastest deployment option available in Simply Static Pro.","simply-static")}),(0,o.jsx)(d.TextControl,{disabled:!0,label:z("E-Mail","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[z("This field is auto-filled with the e-mail address used for activating Simply Static Pro.","simply-static"),(0,o.jsx)("br",{}),(0,o.jsx)("b",{children:z("An account will be created automatically on your first deployment.","simply-static")})]}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:options.admin_email}),(0,o.jsx)(d.TextControl,{label:z("Subdomain","simply-static"),type:"text",help:z("That's the part before your TLD. Your full URL is the combination of the subdomain plus the domain suffix.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_subdomain,onChange:e=>{i("tiiny_subdomain",e)}}),(0,o.jsx)(d.TextControl,{label:z("Domain Suffix","simply-static"),type:"text",help:z("This defaults to tiiny.site. If you have a custom domain configured in Tiiny.host, you can also use that one.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_domain_suffix,onChange:e=>{i("tiiny_domain_suffix",e)}}),(0,o.jsx)(d.TextControl,{label:z("Password Protection","simply-static"),type:"password",help:z("Adding a password will activate password protection on your static site. The website is only visible with the password.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_password,onChange:e=>{i("tiiny_password",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"cdn"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[z("Bunny CDN","simply-static"),(0,o.jsx)(I,{title:z("How to deploy to Bunny CDN","simply-static"),videoUrl:"https://youtu.be/FBRg1BI41VY"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",z("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:z("Bunny CDN is a fast and reliable CDN provider that you can run your static website on.","simply-static")}),(0,o.jsx)(d.TextControl,{label:z("Bunny CDN API Key","simply-static"),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[z("Enter your API Key from Bunny CDN. You can find your API-Key as described ","simply-static"),(0,o.jsx)("a",{href:"https://support.bunny.net/hc/en-us/articles/360012168840-Where-do-I-find-my-API-key",target:"_blank",children:z("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_api_key,onChange:e=>{i("cdn_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:z("Storage Host","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[z("Depending on your location, you have a different storage host. You find out which URL to use ","simply-static"),(0,o.jsx)("a",{href:"https://docs.bunny.net/reference/storage-api#storage-endpoints",target:"_blank",children:z("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_storage_host,onChange:e=>{i("cdn_storage_host",e)}}),(0,o.jsx)(d.TextControl,{label:z("Bunny CDN Access Key","simply-static"),type:"password",help:z("Enter your Acess Key from Bunny CDN. You will find it within your storage zone setttings within FTP & API Access -> Password.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_access_key,onChange:e=>{i("cdn_access_key",e)}}),(0,o.jsx)(d.TextControl,{label:z("Pull Zone","simply-static"),type:"text",help:z("A pull zone is the connection of your CDN to the internet. Simply Static will try to find an existing pull zone with the provided name, if there is none it creates a new pull zone.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_pull_zone,onChange:e=>{i("cdn_pull_zone",e)}}),(0,o.jsx)(d.TextControl,{label:z("Storage Zone","simply-static"),type:"text",help:z("A storage zone contains your static files. Simply Static will try to find an existing storage zone with the provided name, if there is none it creates a new storage zone.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_storage_zone,onChange:e=>{i("cdn_storage_zone",e)}}),(0,o.jsx)(d.TextControl,{label:z("Subdirectory","simply-static"),type:"text",placeholder:"/subdirectory/",help:z("If you want to transfer the files to a specific subdirectory on your storage zone add the name of that directory here.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_directory,onChange:e=>{i("cdn_directory",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"aws-s3"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[z("Amazon AWS S3","simply-static"),(0,o.jsx)(I,{title:z("How to deploy to Amazon AWS S3","simply-static"),videoUrl:"https://youtu.be/rtn21J86Upc"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",z("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.SelectControl,{label:z("Authentication Method","simply-static"),value:P,options:[{label:z("AWS IAM Access Key","simply-static"),value:"aws-iam-key"},{label:z("AWS EC2","simply-static"),value:"aws-ec2"}],disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{N(e),i("aws_auth_method",e)}}),"aws-iam-key"===P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:z("Access Key ID","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[z("Enter your Access Key from AWS. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:z("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_access_key,onChange:e=>{i("aws_access_key",e)}}),(0,o.jsx)(d.TextControl,{label:z("Secret Access Key","simply-static"),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[z("Enter your Secret Key from AWS. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:z("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_access_secret,onChange:e=>{i("aws_access_secret",e)}})]}),(0,o.jsx)(d.SelectControl,{label:z("Region","simply-static"),value:k,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:z("US East (Ohio)","simply-static"),value:"us-east-2"},{label:z("US East (N. Virginia)","simply-static"),value:"us-east-1"},{label:z("US West (N. California)","simply-static"),value:"us-west-1"},{label:z("US West (Oregon)","simply-static"),value:"us-west-2"},{label:z("Africa (Cape Town)","simply-static"),value:"af-south-1"},{label:z("Asia Pacific (Hong Kong)","simply-static"),value:"ap-east-1"},{label:z("Asia Pacific (Hyderabad)","simply-static"),value:"ap-south-2"},{label:z("Asia Pacific (Jakarta)","simply-static"),value:"ap-southeast-3"},{label:z("Asia Pacific (Melbourne)","simply-static"),value:"ap-southeast-4"},{label:z("Asia Pacific (Mumbai)","simply-static"),value:"ap-south-1"},{label:z("Asia Pacific (Osaka)","simply-static"),value:"ap-northeast-3"},{label:z("Asia Pacific (Seoul)","simply-static"),value:"ap-northeast-2"},{label:z("Asia Pacific (Singapore)","simply-static"),value:"ap-southeast-1"},{label:z("Asia Pacific (Sydney)","simply-static"),value:"ap-southeast-2"},{label:z("Asia Pacific (Tokyo)","simply-static"),value:"ap-northeast-1"},{label:z("Canada (Central)","simply-static"),value:"ca-central-1"},{label:z("Europe (Frankfurt)","simply-static"),value:"eu-central-1"},{label:z("Europe (Ireland)","simply-static"),value:"eu-west-1"},{label:z("Europe (London)","simply-static"),value:"eu-west-2"},{label:z("Europe (Milan)","simply-static"),value:"eu-south-1"},{label:z("Europe (Paris)","simply-static"),value:"eu-west-3"},{label:z("Europe (Spain)","simply-static"),value:"eu-south-2"},{label:z("Europe (Stockholm)","simply-static"),value:"eu-north-1"},{label:z("Europe (Zurich)","simply-static"),value:"eu-central-2"},{label:z("Middle East (Bahrain)","simply-static"),value:"me-south-1"},{label:z("Middle East (UAE)","simply-static"),value:"me-central-1"},{label:z("South America (São Paulo)","simply-static"),value:"sa-east-1"},{label:z("AWS GovCloud (US-East)","simply-static"),value:"us-gov-east-1"},{label:z("AWS GovCloud (US-West)","simply-static"),value:"us-gov-west-1"}],disabled:"free"===options.plan||!u(),onChange:e=>{E(e),i("aws_region",e)}}),(0,o.jsx)(d.TextControl,{label:z("Bucket","simply-static"),type:"text",help:z("Add the name of your bucket here.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_bucket,onChange:e=>{i("aws_bucket",e)}}),(0,o.jsx)(d.TextControl,{label:z("Subdirectory","simply-static"),type:"text",help:z("Add an optional subdirectory for your bucket","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_subdirectory,onChange:e=>{i("aws_subdirectory",e)}}),(0,o.jsx)(d.TextControl,{label:z("Cloudfront Distribution ID","simply-static"),type:"text",help:z("We automatically invalidate the cache after each export.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_distribution_id,onChange:e=>{i("aws_distribution_id",e)}}),(0,o.jsx)(d.TextControl,{label:z("Webhook URL","simply-static"),type:"url",help:z("Enter your Webhook URL here and Simply Static will send a POST request after all files are transferred to AWS S3.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_webhook_url,onChange:e=>{i("aws_webhook_url",e)}}),(0,o.jsx)(d.ToggleControl,{label:z("Empty bucket before new export?","simply-static"),help:z(S?"Clear bucket before new export.":"Don't clear bucket before new export.","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,checked:S,onChange:e=>{w(e),i("aws_empty",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"sftp"===m&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[z("SFTP","simply-static")," ",(0,o.jsx)(I,{title:z("How to deploy via SFTP","simply-static"),videoUrl:"https://youtu.be/6-QR9wZA3VQ"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",z("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:z("Host","simply-static"),type:"text",help:z("Enter your SFTP host.","simply-static"),value:n.sftp_host,disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{i("sftp_host",e)}}),(0,o.jsx)(d.TextControl,{label:z("Port","simply-static"),type:"number",disabled:"free"===options.plan||!u(),help:z("Enter your SFTP port.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_port,onChange:e=>{i("sftp_port",e)}}),(0,o.jsx)(d.TextControl,{label:z("SFTP username","simply-static"),help:z("Enter your SFTP username.","simply-static"),type:"text",disabled:"free"===options.plan||!u(),placeholder:"username",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_user,onChange:e=>{i("sftp_user",e)}}),(0,o.jsx)(d.TextControl,{label:z("SFTP password","simply-static"),type:"password",disabled:"free"===options.plan||!u(),help:z("Enter your SFTP password.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_pass,onChange:e=>{i("sftp_pass",e)}}),(0,o.jsx)(d.TextareaControl,{label:z("SFTP private key","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,placeholder:z("OPTIONAL: This is only required if you need to authenticate via a private key to access your SFTP server.","simply-static"),help:z("Enter your SFTP private key if you want passwordless upload and the server is configured to allow it. You can set it as a constant in wp-config.php by using define('SSP_SFTP_KEY', 'YOUR_KEY')","simply-static"),value:n.sftp_private_key,onChange:e=>{i("sftp_private_key",e)}}),(0,o.jsx)(d.TextControl,{label:z("SFTP folder","simply-static"),help:z('Leave empty to upload to the default SFTP folder. Enter a folder path where you want the static files to be uploaded to (example: "uploads" will upload to uploads folder. "uploads/new-folder" will upload files to "new-folder"). ',"simply-static"),type:"text",disabled:"free"===options.plan||!u(),placeholder:"",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_folder,onChange:e=>{i("sftp_folder",e)}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:z("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)("div",{className:"save-settings",children:["free"===options.plan?(0,o.jsxs)(o.Fragment,{children:["zip"===m&&(0,o.jsx)(d.Button,{onClick:$,variant:"primary",children:z("Save Settings","simply-static")}),"local"===m&&(0,o.jsx)(d.Button,{onClick:$,variant:"primary",children:z("Save Settings","simply-static")})]}):(0,o.jsx)(d.Button,{onClick:$,variant:"primary",children:z("Save Settings","simply-static")}),"pro"===options.plan&&u()&&(0,o.jsxs)(d.Button,{disabled:p||B||H,variant:"secondary",isBusy:p||H,onClick:()=>{A(!0),s()({path:"/simplystatic/v1/apply-single",method:"POST"}).then((e=>{404===parseInt(e.status)?alert(e.message):window.location.reload()}))},children:[B&&z("Save settings to test","simply-static"),!B&&z("Test Deployment","simply-static")]})]})]})},{__:U}=wp.i18n,W=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)("allowed_http_origins"),[h,m]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!0),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[w,j]=(0,e.useState)(!1),[C,k]=(0,e.useState)(null),[E,P]=(0,e.useState)(null);return(0,e.useEffect)((()=>{s()({path:"/simplystatic/v1/pages-slugs"}).then((e=>{let t=e;t.unshift({label:U("No page selected","simply-static"),value:""}),_(t)})),t.fix_cors&&u(t.fix_cors),t.use_forms&&m(t.use_forms),t.use_comments&&x(t.use_comments),void 0!==t.save_form_entries?f(!!t.save_form_entries):f(!0),void 0!==t.enable_cors?S(!!t.enable_cors):S(!1)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Forms","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Use forms?","simply-static"),__nextHasNoMarginBottom:!0,help:U(h?"Use Forms on your static website.":"Don't use forms on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:h,onChange:e=>{m(e),n("use_forms",e)}}),h&&(0,o.jsx)(d.ToggleControl,{label:U("Store form entries","simply-static"),__nextHasNoMarginBottom:!0,help:U(y?"Store form entries inside WordPress (requires Simply Static Webhook).":"Do not store form entries in WordPress.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!y,onChange:e=>{f(e),n("save_form_entries",e)}}),h&&options.form_connection_url&&"free"!==options.plan&&(0,o.jsx)(d.Button,{href:options.form_connection_url,variant:"secondary",children:U("Create a form connection","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Comments","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Use comments?","simply-static"),__nextHasNoMarginBottom:!0,help:U(g?"Use comments on your static website.":"Don't use comments on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:g,onChange:e=>{x(e),n("use_comments",e)}}),g&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(d.SelectControl,{label:U("Select a redirect page","content-protector"),options:b,help:U("The post will be regenerated after comment submission, but it might take a while so its good practice to redirect the visitor.","simply-static"),disabled:"free"===options.plan||!c(),value:t.comment_redirect,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{n("comment_redirect",e)}})})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(h||g)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Captcha","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:U("We will automatically protect your forms and comments with a captcha on your static site.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:U("Captcha Service","simply-static"),help:U("Choose which captcha service to use.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.captcha_service||"turnstile",options:[{label:U("Cloudflare Turnstile","simply-static"),value:"turnstile"},{label:U("Google reCAPTCHA v3","simply-static"),value:"recaptcha_v3"}],onChange:e=>n("captcha_service",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),E&&(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:E.type,isDismissible:!0,onRemove:()=>P(null),children:E.message}),(0,o.jsx)(d.__experimentalSpacer,{margin:3})]})}),(0,o.jsx)(d.Button,{variant:"secondary",disabled:"free"===options.plan||!c()||w,isBusy:w,onClick:()=>{j(!0),P(null),s()({path:"/simplystatic/v1/captcha/detect-credentials"}).then((e=>{if(j(!1),!e.success)return void P({type:"error",message:U("Failed to detect credentials.","simply-static")});const s=e.credentials,i=t.captcha_service||"turnstile";let a=null,r="";if("turnstile"===i&&s.turnstile&&s.turnstile.length>0)a=s.turnstile[0],r=a.source,n("cloudflare_turnstile_site_key",a.site_key),n("cloudflare_turnstile_secret_key",a.secret_key),P({type:"success",message:U("Turnstile credentials copied from ","simply-static")+r+"!"});else if("recaptcha_v3"===i&&s.recaptcha&&s.recaptcha.length>0)a=s.recaptcha[0],r=a.source,n("recaptcha_site_key",a.site_key),n("recaptcha_secret_key",a.secret_key),P({type:"success",message:U("ReCaptcha credentials copied from ","simply-static")+r+"!"});else{let e="";"turnstile"===i&&s.recaptcha&&s.recaptcha.length>0?e=U(" ReCaptcha credentials were found - switch to ReCaptcha v3 to use them.","simply-static"):"recaptcha_v3"===i&&s.turnstile&&s.turnstile.length>0&&(e=U(" Turnstile credentials were found - switch to Turnstile to use them.","simply-static")),P({type:"warning",message:U("No credentials found for the selected captcha service.","simply-static")+e})}k(s)})).catch((e=>{j(!1),P({type:"error",message:U("Error detecting credentials: ","simply-static")+(e.message||U("Unknown error","simply-static"))})}))},children:U(w?"Detecting...":"Copy existing Credentials","simply-static")}),(0,o.jsx)("p",{className:"components-base-control__help",children:U("Automatically detect and copy captcha credentials from form plugins like Contact Form 7, WPForms, or Fluent Forms.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),"turnstile"===(t.captcha_service||"turnstile")&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:U("Site Key","simply-static"),help:U("Your public key will be used on the static site.","simply-static"),placeholder:U("Enter your Turnstile site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_site_key||"",onChange:e=>n("cloudflare_turnstile_site_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.TextControl,{label:U("Secret Key","simply-static"),help:U("Your secret key will be stored in WordPress.","simply-static"),placeholder:U("Enter your Turnstile secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_secret_key||"",onChange:e=>n("cloudflare_turnstile_secret_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.SelectControl,{label:U("Theme","simply-static"),help:U("Choose how the widget should look on your site.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_theme||"auto",options:[{label:U("Auto","simply-static"),value:"auto"},{label:U("Light","simply-static"),value:"light"},{label:U("Dark","simply-static"),value:"dark"}],onChange:e=>n("cloudflare_turnstile_theme",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.SelectControl,{label:U("Size","simply-static"),help:U("Choose the widget size.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_size||"normal",options:[{label:U("Normal","simply-static"),value:"normal"},{label:U("Flexible","simply-static"),value:"flexible"},{label:U("Compact","simply-static"),value:"compact"}],onChange:e=>n("cloudflare_turnstile_size",e)})]}),"recaptcha_v3"===t.captcha_service&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:U("Site Key","simply-static"),help:U("Your public key will be used on the static site.","simply-static"),placeholder:U("Enter your reCAPTCHA v3 site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.recaptcha_site_key||"",onChange:e=>n("recaptcha_site_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.TextControl,{label:U("Secret Key","simply-static"),help:U("Your secret key will be stored in WordPress.","simply-static"),placeholder:U("Enter your reCAPTCHA v3 secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.recaptcha_secret_key||"",onChange:e=>n("recaptcha_secret_key",e)})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[U("CORS","simply-static"),(0,o.jsx)(I,{title:U("How to deal with CORS","simply-static"),videoUrl:"https://youtu.be/fArtvZhkU14"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Enable CORS","simply-static"),__nextHasNoMarginBottom:!0,help:U(v?"CORS settings enabled. Configure options below.":"Turn on to configure CORS for Forms and Comments requests.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!v,onChange:e=>{S(e),n("enable_cors",e)}}),v&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:U("When using Forms and Comments in Simply Static Pro you may encounter CORS issues as you make requests from your static website to your original one.","simply-static")}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsx)("p",{children:U("Due to the variety of server setups out there, you may need to make changes on your server.","simply-static")})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.TextControl,{label:U("Static URL","simply-static"),type:"url",placeholder:"https://static-site.com",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:U("Add the URL of your static website to allow CORS from it.","simply-static"),disabled:"free"===options.plan||!c(),value:t.static_url,onChange:e=>{n("static_url",e)}}),(0,o.jsx)(d.SelectControl,{label:U("Select CORS method","simply-static"),value:p,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:U("Choose one of the methods to allow CORS for your website.","simply-static"),disabled:"free"===options.plan||!c(),options:[{label:"allowed_http_origins",value:"allowed_http_origins"},{label:"wp_headers",value:"wp_headers"}],onChange:e=>{u(e),n("fix_cors",e)}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:U("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&c()&&(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1),h&&(localStorage.setItem("ss-initial-page","/forms"),window.location.reload())}),2e3)},variant:"primary",children:U("Save Settings","simply-static")})})]})},{__:G}=wp.i18n,q=function(){var t,s,n,i,a,r,c,p;const{settings:u,updateSetting:h,saveSettings:m,settingsSaved:g,setSettingsSaved:x,isPro:y}=(0,e.useContext)(l),[f,b]=(0,e.useState)(!1),[_,v]=(0,e.useState)("fuse"),[S,w]=(0,e.useState)(!1),j=()=>w(!0);(0,e.useEffect)((()=>{u.use_search&&b(u.use_search),u.search_type&&v(u.search_type)}),[u]);const C=null!==(t=null!==(s=u.search_show_submit)&&void 0!==s?s:u.search_fuse_show_submit)&&void 0!==t&&t;return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:G("Search","simply-static")})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:G("Use search?","simply-static"),__nextHasNoMarginBottom:!0,help:G(f?"Use search on your static website.":"Don't use search on your static website.","simply-static"),disabled:"free"===options.plan||!y(),checked:f,onChange:e=>{b(e),h("use_search",e)}}),(0,o.jsx)(d.SelectControl,{label:G("Search Type","simply-static"),value:_,help:G("Decide which search type you want to use. Fuse runs locally based on a file, and Algolia is an external API service.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:"Fuse JS",value:"fuse"},{label:"Algolia API",value:"algolia"}],onChange:e=>{v(e),h("search_type",e)}}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.ToggleControl,{label:G("Use Search Results Page","simply-static"),__nextHasNoMarginBottom:!0,help:G("Simply Static will create a static search results page and the export will include a special __qs directory.","simply-static"),disabled:"free"===options.plan||!y(),checked:null===(n=u.use_search_results_page)||void 0===n||n,onChange:e=>{h("use_search_results_page",e)}}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.ToggleControl,{label:G("Use Submit Button","simply-static"),__nextHasNoMarginBottom:!0,help:G("Show or hide the submit button in the search UI.","simply-static"),disabled:"free"===options.plan||!y(),checked:null!==(i=null!==(a=u.search_show_submit)&&void 0!==a?a:u.search_fuse_show_submit)&&void 0!==i&&i,onChange:e=>{h("search_show_submit",e)}}),C&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(d.TextControl,{label:G("Submit button text","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:G("Search","simply-static"),help:G("Customize the submit button text or HTML (e.g., add an icon).","simply-static"),disabled:"free"===options.plan||!y(),value:null!==(r=u.search_submit_text)&&void 0!==r?r:u.search_fuse_submit_text,onChange:e=>{h("search_submit_text",e)}})}),(0,o.jsx)(d.ToggleControl,{label:G("Show excerpt in suggestions/results","simply-static"),__nextHasNoMarginBottom:!0,help:G("Enable to display the excerpt below each search suggestion and result item.","simply-static"),disabled:"free"===options.plan||!y(),checked:null!==(c=u.search_show_excerpt)&&void 0!==c&&c,onChange:e=>{h("search_show_excerpt",e)}}),(0,o.jsx)(d.TextControl,{label:G("Input placeholder","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:G("Search..","simply-static"),help:G("Customize the placeholder text for the search input.","simply-static"),disabled:"free"===options.plan||!y(),value:null!==(p=u.search_placeholder)&&void 0!==p?p:u.search_fuse_placeholder,onChange:e=>{h("search_placeholder",e)}})]})]})]}),(0,o.jsxs)(o.Fragment,{children:[S&&(0,o.jsxs)(d.Modal,{title:G("How to select data with meta tags","simply-static"),onRequestClose:()=>w(!1),children:[(0,o.jsx)("p",{children:G("Targeting for excerpt in the meta description tag.","simply-static")}),(0,o.jsx)("pre",{children:'<meta name="description" content="This content is what we want as excerpt" />'}),(0,o.jsx)("p",{children:G("Adding such meta in the excerpt field would be:","simply-static")}),(0,o.jsx)("pre",{children:"description|content"}),(0,o.jsx)("p",{children:G("Targeting for title in the property meta tag.","simply-static")}),(0,o.jsx)("pre",{children:'<meta property="og:title" content="This content is what we want as excerpt" />'}),(0,o.jsx)("p",{children:G("Adding such meta in the excerpt field would be:","simply-static")}),(0,o.jsx)("pre",{children:"property|og:title"}),(0,o.jsx)("p",{children:G('If the second item (after | ) is not <code>content</code>, we\'ll use it as value of that attribute (<code>property="og:title"</code> in this example) and use <code>content</code> for value.',"simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)("strong",{children:G("Caution: Use meta tags that exist everywhere for title.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:G("Indexing","simply-static")})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Title","simply-static"),type:"text",placeholder:"title",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the title of the page/post","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:j,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_title,onChange:e=>{h("search_index_title",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Content","simply-static"),type:"text",placeholder:"body",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the content of the page/post.","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:j,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_content,onChange:e=>{h("search_index_content",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Excerpt","simply-static"),type:"text",placeholder:".entry-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the excerpt of the page/post.","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:j,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_excerpt,onChange:e=>{h("search_index_excerpt",e)}}),(0,o.jsx)(d.TextareaControl,{label:G("Exclude URLs","simply-static"),placeholder:"author\narchive\ncategory",__nextHasNoMarginBottom:!0,help:G("Exclude URLs from indexing (one per line). You can use full URLs, parts of an URL or plain words (like stop words).","simply-static"),disabled:"free"===options.plan||!y(),value:u.search_excludable,onChange:e=>{h("search_excludable",e)}})]})]})]}),"fuse"===_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[G("Fuse.js","simply-static"),(0,o.jsx)(I,{title:G("How to add search with FuseJS","simply-static"),videoUrl:"https://youtu.be/K34l1DXjCHk"})]})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!y(),value:u.fuse_selector,onChange:e=>{h("fuse_selector",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:G("If you have multiple search elements with different CSS selectors, separate them by a comma (,) such as: .search-form, .custom-search-form","simply-static")}),(0,o.jsx)(d.__experimentalNumberControl,{label:G("Threshold","simply-static"),isShiftStepEnabled:!0,step:.1,min:.1,max:1,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G(" A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything.","simply-static"),disabled:"free"===options.plan||!y(),value:u.fuse_threshold,placeholder:.1,onChange:e=>{h("fuse_threshold",e)}})]})]})]}),"algolia"===_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[G("Algolia API","simply-static"),(0,o.jsx)(I,{title:G("How to add search with the Algolia API","simply-static"),videoUrl:"https://youtu.be/H9PNZSl0KnU"})]})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("Application ID","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia App ID.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_app_id,onChange:e=>{h("algolia_app_id",e)}}),(0,o.jsx)(d.TextControl,{label:G("Admin API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia Admin API Key.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_admin_api_key,onChange:e=>{h("algolia_admin_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:G("Search-Only API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia Search-Only API Key here. This is the only key that will be visible on your static site.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_search_api_key,onChange:e=>{h("algolia_search_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:G("Name for your index","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia index name here.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_index,onChange:e=>{h("algolia_index",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_selector,onChange:e=>{h("algolia_selector",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:G("If you have multiple search elements with different CSS selectors, separate them by a comma (,) such as: .search-form, .custom-search-form","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:G("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&y()&&(0,o.jsx)(d.Button,{onClick:()=>{m(),x(!0),setTimeout((function(){x(!1)}),2e3)},variant:"primary",children:G("Save Settings","simply-static")})})]})},{__:J}=wp.i18n,Y=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c,isStudio:p}=(0,e.useContext)(l),[u,h]=(0,e.useState)(!1),[m,g]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[f,b]=(0,e.useState)(null);return(0,e.useEffect)((()=>{t.debugging_mode&&h(t.debugging_mode),t.server_cron&&g(t.server_cron)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[J("Basic Auth","simply-static"),(0,o.jsx)(I,{title:J("How to set up basic auth","simply-static"),videoUrl:"https://youtu.be/6udSR3_zSOU"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:J("If you've secured WordPress with HTTP Basic Auth you need to specify the username and password to use below.","simply-static")}),(0,o.jsx)(d.TextControl,{label:J("Basic Auth Username","simply-static"),autoComplete:"off",type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.http_basic_auth_username,onChange:e=>{n("http_basic_auth_username",e)}}),(0,o.jsx)(d.TextControl,{label:J("Basic Auth Password","simply-static"),type:"password",autoComplete:"off",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.http_basic_auth_password,onChange:e=>{n("http_basic_auth_password",e)}}),(0,o.jsx)(d.ToggleControl,{label:J("Enable Basic Auth","simply-static"),__nextHasNoMarginBottom:!0,help:(0,o.jsx)(o.Fragment,{children:"free"===options.plan?(0,o.jsx)(o.Fragment,{children:J("Automatically setting up Basic Auth requires Simply Static Pro.","simply-static")}):(0,o.jsx)(o.Fragment,{children:J("Once enabled we will put your entire website behind password protection.","simply-static")})}),disabled:"free"===options.plan||!c(),checked:!!t.http_basic_auth_on,onChange:e=>{n("http_basic_auth_on",e)}}),t.http_basic_auth_on&&(!t.http_basic_auth_username||!t.http_basic_auth_password)&&(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:J("Requires Username & Password to work","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Temporary Files","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:J("Temporary Files Directory","simply-static"),type:"text",placeholder:options.temp_files_dir,help:J("Optionally specify the directory to save your temporary files. This directory must exist and be writeable.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.temp_files_dir,onChange:e=>{n("temp_files_dir",e)}}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:f.type,isDismissible:!0,onRemove:()=>b(null),children:f.message}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)(d.Button,{isSecondary:!0,onClick:async()=>{y(!0),b(null);try{const e=await s()({path:"/simplystatic/v1/clear-temp-files",method:"POST"});let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){}if(t&&200===t.status)b({type:"success",message:J("Temporary files cleared.","simply-static")});else{const e=t&&t.message?t.message:J("Could not clear temporary files.","simply-static");b({type:"error",message:e})}}catch(e){b({type:"error",message:J("Request failed. Please try again.","simply-static")})}finally{y(!1)}},disabled:x,isBusy:x,children:J(x?"Clearing…":"Clear Temporary Files","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Whitelist Plugins","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextareaControl,{label:J("Whitelist plugins in diagnostics","simply-static"),placeholder:"autoptimize\nwp-search-with-algolia\nwp-rocket",help:J("If you want to exclude certain plugins from the diagnostics check add the plugin slugs here (one per line).","simply-static"),__nextHasNoMarginBottom:!0,value:t.whitelist_plugins,onChange:e=>{n("whitelist_plugins",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Proxy Setup","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextControl,{label:J("Origin URL","simply-static"),type:"url",help:J("If the URL of your WordPress installation differs from the public-facing URL (Proxy Setup), add the public URL here.","simply-static"),placeholder:options.home,autoComplete:"off",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.origin_url,onChange:e=>{n("origin_url",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Debug Log","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:J("Activate Debug Log","simply-static"),help:J("Enable it to download the debug log from Simply Static -> Generate.","simply-static"),__nextHasNoMarginBottom:!0,checked:u,onChange:e=>{h(e),n("debugging_mode",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Cron","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:J("Use server-side cron job","simply-static"),help:J("Enable this if you use a server-side cron job instead of the default WP-Cron.","simply-static"),__nextHasNoMarginBottom:!0,checked:m,onChange:e=>{g(e),n("server_cron",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:J("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1)}),2e3)},variant:"primary",children:J("Save Settings","simply-static")})})]})},{__:K}=wp.i18n,V=function({integration:e,settings:t,toggleIntegration:s}){let n=e.active;const i=e.pro,a=e.can_run,r=e.always_active;void 0!==t.integrations&&!1!==t.integrations&&(n=t.integrations.indexOf(e.id)>=0);let l="pro"===options.plan||!i;return(0,o.jsx)(d.Card,{children:(0,o.jsxs)(d.CardHeader,{className:"ss-integration",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("strong",{children:[e.name||e.id,"redirection"===e.id&&(0,o.jsx)(I,{title:K("Automated Redirects with Redirection","simply-static"),videoUrl:"https://youtu.be/sS4BQcZ4dN8"}),"complianz"===e.id&&(0,o.jsx)(I,{title:K("Cookie Consent with Complianz","simply-static"),videoUrl:"https://youtu.be/GPKYtt8A5QE"})]}),""!==e.description&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),e.description]})]}),!a&&(0,o.jsxs)("span",{className:"ss-align-right ss-no-shrink",children:[(0,o.jsx)("em",{children:"Missing Plugin"}),!l&&(0,o.jsx)("div",{children:(0,o.jsx)(d.Button,{variant:"link",href:"https://simplystatic.com/pricing/",children:K("Requires Simply Static Pro","simply-static")})})]}),a&&l&&!r&&(0,o.jsx)(d.ToggleControl,{className:"integration-toggle",__nextHasNoMarginBottom:!0,checked:n,onChange:t=>{s(e.id,t)}}),a&&l&&r&&(0,o.jsx)("em",{children:"Always Active"}),a&&!l&&(0,o.jsx)(d.Button,{variant:"primary",href:"https://simplystatic.com/pricing/",children:K("Get the Pro version","simply-static")})]})})},{__:Q}=wp.i18n,Z=function(){const{settings:t,updateSetting:s,saveSettings:n,settingsSaved:i,setSettingsSaved:a,maybeQueueIntegration:r}=(0,e.useContext)(l),c=(e,n)=>{n?(e=>{let n=t.integrations;!1===n&&(n=[]),n.indexOf(e)>=0||(n.push(e),s("integrations",n),r(e))})(e):(e=>{let n=t.integrations;!1===n&&(n=[]);const i=n.indexOf(e);i<0||(n.splice(i,1),s("integrations",n),r(e))})(e)},p=Object.keys(options.integrations).filter((e=>options.integrations[e].can_run&&!options.integrations[e].always_active)),u=Object.keys(options.integrations).filter((e=>!options.integrations[e].can_run&&!options.integrations[e].always_active));return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:Q("Integrations","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[Q("Control Integrations that will be active during the export of the static site.","simply-static"),(0,o.jsx)(d.__experimentalSpacer,{margin:10})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),p.map((e=>{const s=options.integrations[e];return(0,o.jsx)(V,{integration:s,settings:t,toggleIntegration:c},s.id||e)})),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),u.map((e=>{const s=options.integrations[e];return(0,o.jsx)(V,{integration:s,settings:t,toggleIntegration:c},s.id||e)})),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:Q("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:async()=>{try{const{shouldReload:e}=await n();if(a(!0),e)return void setTimeout((()=>{try{if("undefined"!=typeof window){const e="/integrations";if(window.localStorage)try{window.localStorage.setItem("ss-initial-page",e)}catch(e){}}}catch(e){}window.location.reload()}),400)}catch(e){}setTimeout((function(){a(!1)}),2e3)},variant:"primary",children:Q("Save Settings","simply-static")})})]})},{__:X}=wp.i18n,ee=function(){const{settings:t,updateSetting:s,saveSettings:n,settingsSaved:i,setSettingsSaved:a}=(0,e.useContext)(l),[r,c]=(0,e.useState)({}),p="undefined"!=typeof options&&options.current_settings&&options.current_settings.ss_uam_access?options.current_settings.ss_uam_access:{},u=(0,e.useMemo)((()=>[{label:X("Administrator","simply-static"),value:"administrator"},{label:X("Editor","simply-static"),value:"editor"},{label:X("Author","simply-static"),value:"author"},{label:X("Contributor","simply-static"),value:"contributor"},{label:X("Subscriber","simply-static"),value:"subscriber"}]),[]),h=(0,e.useMemo)((()=>[{key:"activity",label:X("Activity Log","simply-static"),route:"/"},{key:"diagnostics",label:X("Diagnostics","simply-static"),route:"/diagnostics"}]),[]),m=(0,e.useMemo)((()=>[{key:"general",label:X("General","simply-static"),route:"/general"},{key:"deployment",label:X("Deploy","simply-static"),route:"/deployment"},{key:"forms",label:X("Forms","simply-static"),route:"/forms"},{key:"search",label:X("Search","simply-static"),route:"/search"},{key:"optimize",label:X("Optimize","simply-static"),route:"/optimize"},{key:"workflow",label:X("Workflow","simply-static"),route:"/workflow"}]),[]),g=(0,e.useMemo)((()=>[{key:"integrations",label:X("Integrations","simply-static"),route:"/integrations"},{key:"utilities",label:X("Utilities","simply-static"),route:"/utilities"},{key:"debug",label:X("Debug","simply-static"),route:"/debug"},{key:"uam",label:X("UAM","simply-static"),route:"/uam"}]),[]),x=(0,e.useMemo)((()=>{const e=[{key:"menu_generate",label:X("Generate","simply-static")},{key:"menu_settings",label:X("Settings","simply-static")},{key:"menu_diagnostics",label:X("Diagnostics","simply-static")},{key:"menu_form_connections",label:X("Form Connections","simply-static")}];return t?.ss_use_builds&&e.push({key:"menu_builds",label:X("Builds","simply-static")}),e}),[t?.ss_use_builds]);(0,e.useEffect)((()=>{c({...t?.ss_uam_access||{}})}),[t]);const y=(e,t)=>{const n={...r,[e]:t};c(n),s("ss_uam_access",n)},f=({id:e,label:t,value:s,onChange:n})=>(0,o.jsxs)(d.Flex,{align:"center",gap:3,children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:260},children:(0,o.jsx)("b",{id:`${e}-label`,children:t})}),(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.SelectControl,{"aria-label":t,value:s,options:u,onChange:n})})]}),b=(e,t)=>r&&Object.prototype.hasOwnProperty.call(r,e)&&r[e]?r[e]:p&&Object.prototype.hasOwnProperty.call(p,e)&&p[e]?p[e]:t;return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("UAM (User Access Management)","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("p",{children:X("Control who can access Simply Static pages, menu entries, and selected features by assigning a minimum WordPress role.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Tools","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:h.map((e=>{const t="activity"===e.key?"editor":"administrator";return(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)}))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Settings","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:m.map((e=>(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key)))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Advanced","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:g.map((e=>(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key)))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Menu","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:x.map((e=>{const t="menu_generate"===e.key?"editor":"administrator";return(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)}))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Features","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsxs)(d.Flex,{direction:"column",gap:3,children:[(0,o.jsx)(f,{id:"uam-adminbar",label:X("Admin Bar","simply-static"),value:b("adminbar","editor"),onChange:e=>y("adminbar",e)}),(0,o.jsx)(f,{id:"uam-single-export",label:X("Single Export (Button)","simply-static"),value:b("single_export_button","editor"),onChange:e=>y("single_export_button",e)})]})})]}),i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:X("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{n(),a(!0),setTimeout((function(){a(!1)}),2e3)},variant:"primary",children:X("Save Settings","simply-static")})})]})};function te(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var n,i,a=s.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}return r}"function"==typeof SuppressedError&&SuppressedError;var se=function(e){var t=e.children;return a().createElement("div",{className:"react-terminal-line"},t)};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===s&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("/**\n * Modfied version of [termynal.js](https://github.com/ines/termynal/blob/master/termynal.css).\n *\n * @author Ines Montani <[email protected]>\n * @version 0.0.1\n * @license MIT\n */\n .react-terminal-wrapper {\n width: 100%;\n background: #252a33;\n color: #eee;\n font-size: 18px;\n font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;\n border-radius: 4px;\n padding: 75px 45px 35px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n.react-terminal {\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n.react-terminal-wrapper.react-terminal-light {\n background: #ddd;\n color: #1a1e24;\n}\n\n.react-terminal-window-buttons {\n position: absolute;\n top: 15px;\n left: 15px;\n display: flex;\n flex-direction: row;\n gap: 10px;\n}\n\n.react-terminal-window-buttons button {\n width: 15px;\n height: 15px;\n border-radius: 50%;\n border: 0;\n}\n\n.react-terminal-window-buttons button.clickable {\n cursor: pointer;\n}\n\n.react-terminal-window-buttons button.red-btn {\n background: #d9515d;\n}\n\n.react-terminal-window-buttons button.yellow-btn {\n background: #f4c025;\n}\n\n.react-terminal-window-buttons button.green-btn {\n background: #3ec930;\n}\n\n.react-terminal-wrapper:after {\n content: attr(data-terminal-name);\n position: absolute;\n color: #a2a2a2;\n top: 5px;\n left: 0;\n width: 100%;\n text-align: center;\n pointer-events: none;\n}\n\n.react-terminal-wrapper.react-terminal-light:after {\n color: #D76D77;\n}\n\n.react-terminal-line {\n white-space: pre;\n}\n\n.react-terminal-line:before {\n /* Set up defaults and ensure empty lines are displayed. */\n content: '';\n display: inline-block;\n vertical-align: middle;\n color: #a2a2a2;\n}\n\n.react-terminal-light .react-terminal-line:before {\n color: #D76D77;\n}\n\n.react-terminal-input:before {\n margin-right: 0.75em;\n content: '$';\n}\n\n.react-terminal-input[data-terminal-prompt]:before {\n content: attr(data-terminal-prompt);\n}\n\n.react-terminal-wrapper:focus-within .react-terminal-active-input .cursor {\n position: relative;\n display: inline-block;\n width: 0.55em;\n height: 1em;\n top: 0.225em;\n background: #fff;\n -webkit-animation: blink 1s infinite;\n animation: blink 1s infinite;\n}\n\n/* Cursor animation */\n\n@-webkit-keyframes blink {\n 50% {\n opacity: 0;\n }\n}\n\n@keyframes blink {\n 50% {\n opacity: 0;\n }\n}\n\n.terminal-hidden-input {\n position: fixed;\n left: -1000px;\n}\n\n/* .react-terminal-progress {\n display: flex;\n margin: .5rem 0;\n}\n\n.react-terminal-progress-bar {\n background-color: #fff;\n border-radius: .25rem;\n width: 25%;\n}\n\n.react-terminal-wrapper.react-terminal-light .react-terminal-progress-bar {\n background-color: #000;\n} */\n");var ne,ie,ae=function(e){var t=e.redBtnCallback,s=e.yellowBtnCallback,n=e.greenBtnCallback;return a().createElement("div",{className:"react-terminal-window-buttons"},a().createElement("button",{className:"".concat(s?"clickable":""," red-btn"),disabled:!t,onClick:t}),a().createElement("button",{className:"".concat(s?"clickable":""," yellow-btn"),disabled:!s,onClick:s}),a().createElement("button",{className:"".concat(n?"clickable":""," green-btn"),disabled:!n,onClick:n}))};(ie=ne||(ne={}))[ie.Light=0]="Light",ie[ie.Dark=1]="Dark";var re=function(e){var t=e.name,s=e.prompt,i=e.height,r=void 0===i?"600px":i,o=e.colorMode,l=e.onInput,c=e.children,d=e.startingInputValue,p=void 0===d?"":d,u=e.redBtnCallback,h=e.yellowBtnCallback,m=e.greenBtnCallback,g=e.TopButtonsPanel,x=void 0===g?ae:g,y=te((0,n.useState)(""),2),f=y[0],b=y[1],_=te((0,n.useState)(0),2),v=_[0],S=_[1],w=(0,n.useRef)(null);(0,n.useEffect)((function(){b(p.trim())}),[p]),(0,n.useEffect)((function(){var e,t;if(null!=l){var s=[],n=function(e){var t=function(){var t;return null===(t=null==e?void 0:e.querySelector(".terminal-hidden-input"))||void 0===t?void 0:t.focus()};null==e||e.addEventListener("click",t),s.push({terminalEl:e,listener:t})};try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,s=t&&e[t],n=0;if(s)return s.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(document.getElementsByClassName("react-terminal-wrapper")),a=i.next();!a.done;a=i.next())n(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return function(){s.forEach((function(e){e.terminalEl.removeEventListener("click",e.listener)}))}}}),[l]);var j=["react-terminal-wrapper"];return o===ne.Light&&j.push("react-terminal-light"),a().createElement("div",{className:j.join(" "),"data-terminal-name":t},a().createElement(x,{redBtnCallback:u,yellowBtnCallback:h,greenBtnCallback:m}),a().createElement("div",{className:"react-terminal",style:{height:r}},c,"function"==typeof l&&a().createElement("div",{className:"react-terminal-line react-terminal-input react-terminal-active-input","data-terminal-prompt":s||"$",key:"terminal-line-prompt"},f,a().createElement("span",{className:"cursor",style:{left:"".concat(v+1,"px")}})),a().createElement("div",{ref:w})),a().createElement("input",{className:"terminal-hidden-input",placeholder:"Terminal Hidden Input",value:f,autoFocus:null!=l,onChange:function(e){b(e.target.value)},onKeyDown:function(e){var t,s;if(l)if("Enter"===e.key)l(f),S(0),b(""),setTimeout((function(){var e;return null===(e=null==w?void 0:w.current)||void 0===e?void 0:e.scrollIntoView({behavior:"auto",block:"nearest"})}),500);else if(["ArrowLeft","ArrowRight","ArrowDown","ArrowUp","Delete"].includes(e.key)){var n=e.currentTarget,i="",a=f.length-(n.selectionStart||0);a=(t=a)>(s=f.length)?s:t<0?0:t,"ArrowLeft"===e.key?(a>f.length-1&&a--,i=f.slice(f.length-1-a)):"ArrowRight"===e.key||"Delete"===e.key?i=f.slice(f.length-a+1):"ArrowUp"===e.key&&(i=f.slice(0));var r=function(e,t){var s=document.createElement("span");s.style.visibility="hidden",s.style.position="absolute",s.style.fontSize=window.getComputedStyle(e).fontSize,s.style.fontFamily=window.getComputedStyle(e).fontFamily,s.innerText=t,document.body.appendChild(s);var n=s.getBoundingClientRect().width;return document.body.removeChild(s),-n}(n,i);S(r)}}}))};const{__:oe}=wp.i18n,le=function(){const{isRunning:t,isResumed:n,isPaused:i,blogId:a}=(0,e.useContext)(l),[c,d]=(0,e.useState)([(0,o.jsx)(se,{children:"Waiting for new export.."},"waiting")]);function p(){s()({path:"/simplystatic/v1/activity-log?blog_id="+a+"&is_network_admin="+options.is_network,method:"GET"}).then((e=>{var t=JSON.parse(e),s=[];for(var n in t.data){var i=t.data[n].datetime,a=t.data[n].message,r=n.includes("pause")||n.includes("cancel"),l=n.includes("resume");s.push((0,o.jsxs)(se,{children:["[",i,"] ",(0,o.jsx)("span",{className:`${r?"is-error":""} ${l?"is-success":""}`,dangerouslySetInnerHTML:{__html:a}})]},n))}d(s)}))}return r((()=>{p()}),t?2500:null),(0,e.useEffect)((()=>{t&&!n&&d([(0,o.jsx)(se,{children:"Waiting for new export.."},"waiting")]),t&&n&&d([(0,o.jsx)(se,{children:"Resuming the export.."},"resuming")]),p()}),[t]),(0,o.jsx)(re,{name:oe("Activity Log","simply-static"),height:"250px",colorMode:ne.Dark,children:c})};var ce=i(757);const de=function(){const{isRunning:t,blogId:n,isPro:i,settings:a}=(0,e.useContext)(l),[c,p]=(0,e.useState)([]),[u,h]=(0,e.useState)(!1),[m,g]=(0,e.useState)(25),[x,y]=(0,e.useState)(0),[f,b]=(0,e.useState)(""),[_,v]=(0,e.useState)([]),[S,w]=(0,e.useState)(!1),[j,C]=(0,e.useState)(0),[k,E]=(0,e.useState)("export"),[P,N]=(0,e.useState)(null);(0,e.useEffect)((()=>{a&&"zip"===a.delivery_method?E("export"):s()({path:"/simplystatic/v1/export-type",method:"GET"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&(a&&"zip"===a.delivery_method?E("export"):(E(t.data.export_type),N(t.data.export_type_id)))})).catch((e=>{console.error("Error fetching export type:",e),a&&"zip"===a.delivery_method?E("export"):options.last_export_end?E("Update"):E("export")}))}),[a]);const R=[{name:"Code",selector:e=>e.code,sortable:!0,width:"12%"},{name:"URL",selector:e=>{const t=e&&"string"==typeof e.url?e.url:"";if(!t)return(0,o.jsx)("span",{children:"-"});let s=t;if(t.startsWith("/"))s=t;else try{const e=new URL(t);s=e.pathname+e.search+e.hash}catch(e){}return(0,o.jsx)("a",{target:"_blank",href:t,children:s})},sortable:!0,sortFunction:(e,t)=>e.url.localeCompare(t.url),width:i()?"40%":"60%",wrap:!0}],T={name:"Export-Type",selector:e=>"Build"===k||"Single"===k?`${k} (ID: ${P})`:k,sortable:!0,width:"20%"},D={name:"Notes",wrap:!0,selector:e=>(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:e.notes}}),sortable:!0,sortFunction:(e,t)=>{const s=e.notes.replace(/<[^>]*>/g,""),n=t.notes.replace(/<[^>]*>/g,"");return s.localeCompare(n)},width:"28%"},F=i()?[...R,T,D]:[...R,D];function I(e,t=!1){((e=null!=e?e:1)!==x||t)&&h(!0),s()({path:`/simplystatic/v1/export-log?page=${e}&per_page=${m}&blog_id=${n}&is_network_admin=${options.is_network}`,method:"GET"}).then((s=>{var n=JSON.parse(s);if(e!==x||t){p(n.data),h(!1);const e=n.data.total_static_pages||0,t=Math.ceil(e/m);C(t)}else c.total_static_pages=n.data.total_static_pages,p(c);y(e)}))}async function B(){w(!0);try{const e=await s()({path:`/simplystatic/v1/export-log?page=1&per_page=${m}&blog_id=${n}&is_network_admin=${options.is_network}`,method:"GET"}),t=JSON.parse(e),i=t.data.total_static_pages||0;let a=Math.ceil(i/m);const r=20;a>r&&(console.log(`Site has ${a} pages of data, limiting to ${r} pages to prevent timeouts`),a=r);const o=5;let l=[];t.data&&t.data.static_pages&&(l=[...t.data.static_pages]);for(let e=2;e<=a;e+=o){const t=Math.min(e+o-1,a);console.log(`Fetching batch of pages ${e} to ${t}`);const i=[];for(let a=e;a<=t;a++)i.push(s()({path:`/simplystatic/v1/export-log?page=${a}&per_page=${m}&blog_id=${n}&is_network_admin=${options.is_network}`,method:"GET"}));(await Promise.all(i)).forEach((e=>{const t=JSON.parse(e);t.data&&t.data.static_pages&&(l=[...l,...t.data.static_pages])}))}return v(l),console.log(`Fetched ${l.length} total items from ${a} pages (out of ${Math.ceil(i/m)} total pages)`),l}catch(e){return console.error("Error fetching all data:",e),[]}finally{w(!1)}}const[O,H]=(0,e.useState)(0);r((()=>{I();const e=Date.now();f&&_.length>0&&e-O>3e4&&(console.log("Refreshing all data for search (30-second interval)"),B(),H(e))}),t?5e3:null),(0,e.useEffect)((()=>{I(1,!0),t&&s()({path:"/simplystatic/v1/export-type",method:"GET"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&(E(t.data.export_type),N(t.data.export_type_id))})).catch((e=>{console.error("Error fetching export type:",e)}))}),[t]);const A=(f&&_.length>0&&"Build"!==k&&"Single"!==k?_:c.static_pages||[]).filter((e=>{if(!f)return!0;const t=f.toLowerCase();return e.code&&e.code.toString().toLowerCase().includes(t)||e.url&&e.url.toLowerCase().includes(t)||e.notes&&e.notes.toLowerCase().includes(t)}));return(0,o.jsxs)("div",{className:"log-table-container",children:[(0,o.jsx)(d.Flex,{children:(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("input",{id:"export-search",className:"ss-export-log-search",type:"text",placeholder:"Search...",value:f,onChange:async e=>{const t=e.target.value;b(t),t&&0===_.length&&"Build"!==k&&"Single"!==k&&(await B(),H(Date.now()))}})})}),(0,o.jsx)(ce.Ay,{columns:F,data:f?A:c.static_pages||[],pagination:!0,paginationServer:!f,paginationTotalRows:f?A.length:c.total_static_pages,paginationPerPage:25,paginationRowsPerPageOptions:[25,50,100,200],progressPending:u||S&&f,progressComponent:(0,o.jsxs)("div",{style:{padding:"24px",textAlign:"center"},children:[(0,o.jsx)(d.Spinner,{}),(0,o.jsx)("div",{style:{marginTop:"8px"},children:S&&f?"Loading all data for search...":"Loading..."})]}),onChangeRowsPerPage:(e,t)=>{g(e),I(t,!0)},onChangePage:f?void 0:e=>{I(e)}})]})},{__:pe}=wp.i18n,ue=function(){const[t,n]=(0,e.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Button,{variant:"primary",href:options.log_file,download:!0,style:{marginRight:"10px"},children:pe("Download Log","simply-static")}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{s()({path:"/simplystatic/v1/delete-log",method:"POST"}),n(!0),setTimeout((function(){n(!1)}),2e3)},children:pe("Clear Log","simply-static")}),t&&(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:pe("Log file cleared.","simply-static")})})})]})},{__:he}=wp.i18n,me=function(e){const{children:t,canGenerate:s,isPaused:n,isDelayed:i,startExport:a,cancelExport:r,pauseExport:l,resumeExport:c}=e,p="function"==typeof l,u="function"==typeof r,h="function"==typeof c,m="function"==typeof a;return(0,o.jsxs)("div",{className:"generate-buttons-container",children:[s&&m&&(0,o.jsxs)(d.Button,{onClick:()=>{a()},disabled:!s||i,className:"generate",children:[s&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),he("Generate","simply-static")]}),s&&i>0&&(0,o.jsxs)(o.Fragment,{children:[" ",i,"s"]}),!s&&(0,o.jsx)(d.Dashicon,{icon:"update spin"})]}),!s&&(0,o.jsxs)(o.Fragment,{children:[!n&&p&&(0,o.jsx)(d.Button,{label:he("Pause","simply-static"),className:"ss-generate-media-button","aria-label":he("Pause","simply-static"),onClick:()=>l(),children:(0,o.jsx)(d.Dashicon,{icon:"controls-pause"})}),n&&h&&(0,o.jsx)(d.Button,{label:he("Resume","simply-static"),className:"ss-generate-media-button","aria-label":he("Resume","simply-static"),onClick:()=>c(),children:(0,o.jsx)(d.Dashicon,{icon:"controls-play"})}),u&&(0,o.jsx)(d.Button,{onClick:()=>r(),label:he("Cancel","simply-static"),className:"ss-generate-cancel-button","aria-label":he("Cancel","simply-static"),children:(0,o.jsx)(d.Dashicon,{icon:"no"})})]}),t]})},{__:ge}=wp.i18n,xe=function(t){const{site:i,setAnyRunning:a}=t,r=i.id,[l,c]=(0,e.useState)(!i.running&&!i.paused),[p,u]=(0,e.useState)(i.running),[h,m]=(0,e.useState)(i.paused);(0,n.useEffect)((()=>{p&&a(!0)}),[p]),(0,n.useEffect)((()=>{m(i.paused),u(i.running),c(!i.running&&!i.paused)}),[i]);const g=()=>"pro"===options.plan;return(0,o.jsxs)("tr",{children:[(0,o.jsxs)("td",{children:[i.name,(0,o.jsx)("br",{}),(0,o.jsx)("a",{href:i.url,children:i.url})]}),(0,o.jsx)("td",{children:i.status}),(0,o.jsx)("td",{className:"generate-container network-generate-container",children:(0,o.jsxs)(me,{site:i,canGenerate:l,startExport:g()?()=>{c(!1),m(!1),s()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:r,type:"export",is_network_admin:options.is_network}}).then((e=>{500!==JSON.parse(e).status?u(!0):c(!0)}))}:null,isPaused:h,isRunning:p,cancelExport:g()?()=>{s()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{m(!1),u(!1),c(!0)}))}:null,pauseExport:g()?()=>{s()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{u(!1),m(!0)}))}:null,resumeExport:g()?()=>{s()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{m(!1),u(!0)}))}:null,children:[!g()&&(0,o.jsxs)(d.Button,{label:"Generate","aria-label":ge("Generate","simply-static"),className:"generate",disabled:!0,children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),ge("Generate","simply-static")]}),(0,o.jsx)(d.Button,{className:"sub-site-settings",onClick:()=>window.location=i.settings_url,children:(0,o.jsx)(d.Dashicon,{icon:"admin-generic"})}),!g()&&(0,o.jsx)(d.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:ge("Upgrade to manage from network.","simply-static")})]})})]})},{__:ye}=wp.i18n,fe=function(t){const[i,a]=(0,e.useState)([]),[l,c]=(0,e.useState)(!1),[d,p]=(0,e.useState)(0);function u(){s()({path:"/simplystatic/v1/sites",method:"GET"}).then((e=>{let t=[],s=!1;e.data.forEach((function(e){t.push(e),e.running&&(s=!0)})),a(t),c(s)}))}return r((()=>{u()}),l?2500:3e5),r((()=>{var e;!d&&i.length>0&&p(i[0].id),d&&(e=d,s()({path:"/simplystatic/v1/trigger-cron",method:"POST",data:{blog_id:e}}).then((t=>{var s=JSON.parse(t);200===s.status?console.log("CRON triggered successfully for site "+e):console.error("Failed to trigger CRON:",s.message);let n=function(e){let t=function(){let e=[];return i.forEach((function(t){e.push(t.id)})),e}();if(0===t.length)return 0;let s=t.indexOf(e);return-1===s?t[0]:(s++,t[s]||t[0])}(e);p(n)})).catch((e=>{console.error("Error triggering CRON:",e)})))}),l?15e4:null),(0,n.useEffect)((()=>{u()}),[]),(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("table",{className:"wp-list-table widefat fixed striped posts simple-static-sites",children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{children:ye("Name","simply-static")}),(0,o.jsx)("th",{children:ye("Status","simply-static")}),(0,o.jsx)("th",{children:ye("Actions","simply-static")})]})}),(0,o.jsx)("tbody",{children:i.map((e=>(0,o.jsx)(xe,{setAnyRunning:c,site:e},e.id)))})]})})},{__:be}=wp.i18n;function _e(){const[t,s]=(0,e.useState)(!1);(0,e.useEffect)((()=>{try{if(options.is_network||"pro"===options.plan)return void s(!1);const e=new Date,t=e.getFullYear(),n=new Date(t,10,28,0,0,0),i=new Date(t,11,5,23,59,59),a=`ss_bf_banner_dismissed_${t}`,r=!("undefined"==typeof window||!window.localStorage)&&"1"===window.localStorage.getItem(a);s(!r&&e>=n&&e<=i)}catch(e){s(!1)}}),[]);const n=()=>{try{const e=`ss_bf_banner_dismissed_${(new Date).getFullYear()}`;"undefined"!=typeof window&&window.localStorage&&window.localStorage.setItem(e,"1")}catch(e){}s(!1)};return t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"notice",isDismissible:!0,onRemove:n,className:"bf-banner",children:(0,o.jsxs)("p",{children:[(0,o.jsx)("strong",{children:"BLACK FRIDAY"}),": Upgrade to ",(0,o.jsx)("b",{children:"Simply Static Pro"})," and save ",(0,o.jsx)("b",{children:"25%"})," by using the code ",(0,o.jsx)("b",{children:"SSBF25"})," ",(0,o.jsx)(d.Button,{isPrimary:!0,href:"https://simplystatic.com/pricing/?utm_source=plugin&utm_medium=banner&utm_campaign=bf",target:"_blank",rel:"noopener noreferrer",style:{marginLeft:8},children:be("Buy now","simply-static")})]})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}):null}const{__:ve}=wp.i18n,Se=function(){const{settings:t,blogId:s,setBlogId:n}=(0,e.useContext)(l);return(0,o.jsxs)("div",{className:"inner-settings",children:[!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(_e,{}),(0,o.jsx)(le,{}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)(d.Flex,{align:"top",children:[options.is_network&&(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.Card,{children:(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(fe,{})})})}),t.debugging_mode&&options.log_file&&!options.is_network&&(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:ve("Debugging","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(ue,{})})]})})]}),!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:ve("Export Log","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(de,{})})]})]})]})},{__:we}=wp.i18n,je=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)(!1),[h,m]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!1),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[w,j]=(0,e.useState)("wp-content"),[C,k]=(0,e.useState)("wp-includes"),[E,P]=(0,e.useState)("uploads"),[N,R]=(0,e.useState)("plugins"),[T,D]=(0,e.useState)("themes"),[F,B]=(0,e.useState)("style"),[O,H]=(0,e.useState)("author"),[A,M]=(0,e.useState)(!1),[$,z]=(0,e.useState)(!1),[L,U]=(0,e.useState)(!1),[W,G]=(0,e.useState)(!1),[q,J]=(0,e.useState)(!1),[Y,K]=(0,e.useState)(!1),[V,Q]=(0,e.useState)(!1),[Z,X]=(0,e.useState)(!1),[ee,te]=(0,e.useState)(!1),[se,ne]=(0,e.useState)(!1),[ie,ae]=(0,e.useState)(!1),[re,oe]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{t.use_minify&&u(t.use_minify),t.minify_html&&m(t.minify_html),t.minify_css&&x(t.minify_css),t.minify_inline_css&&f(t.minify_inline_css),t.minify_js&&_(t.minify_js),t.minify_inline_js&&S(t.minify_inline_js),t.wp_content_directory&&j(t.wp_content_directory),t.wp_includes_directory&&k(t.wp_includes_directory),t.wp_uploads_directory&&P(t.wp_uploads_directory),t.wp_plugins_directory&&R(t.wp_plugins_directory),t.wp_themes_directory&&D(t.wp_themes_directory),t.theme_style_name&&B(t.theme_style_name),t.author_url&&H(t.author_url),t.hide_version&&M(t.hide_version),t.hide_generator&&U(t.hide_generator),t.hide_prefetch&&z(t.hide_prefetch),t.hide_rsd&&G(t.hide_rsd),t.hide_emotes&&J(t.hide_emotes),t.disable_xmlrpc&&K(t.disable_xmlrpc),t.disable_embed&&Q(t.disable_embed),t.disable_db_debug&&X(t.disable_db_debug),t.disable_wlw_manifest&&te(t.disable_wlw_manifest),t.version_css&&ne(t.version_css),t.version_js&&ae(t.version_js)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[we("Minify","simply-static"),(0,o.jsx)(I,{title:we("How to minify HTML, CSS and JavaScript?","simply-static"),videoUrl:"https://youtu.be/52IKv5ai-i4"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Minify Files?","simply-static"),__nextHasNoMarginBottom:!0,help:we(p?"Enable minify files on your static website.":"Don't enable minify files on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:p,onChange:e=>{u(e),n("use_minify",e)}}),p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Minify HTML","simply-static"),__nextHasNoMarginBottom:!0,help:we(h?"Minify HTML files.":"Don't minify HTML files.","simply-static"),disabled:"free"===options.plan||!c(),checked:h,onChange:e=>{m(e),n("minify_html",e)}}),h&&(0,o.jsx)(d.ToggleControl,{label:we("Leave quotes inside HTML attributes","simply-static"),__nextHasNoMarginBottom:!0,help:we("If there are issues with comments or JavaScript when minifying HTML, toggle this ON.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!t.minify_html_leave_quotes,onChange:e=>{n("minify_html_leave_quotes",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Minify CSS","simply-static"),__nextHasNoMarginBottom:!0,help:we(g?"Minify CSS files.":"Don't minify CSS files.","simply-static"),disabled:"free"===options.plan||!c(),checked:g,onChange:e=>{x(e),n("minify_css",e)}}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextareaControl,{label:we("Exclude Stylesheet URLs","simply-static"),__nextHasNoMarginBottom:!0,help:we("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!c(),value:t.minify_css_exclude,onChange:e=>{n("minify_css_exclude",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Minify Inline CSS","simply-static"),__nextHasNoMarginBottom:!0,help:we(y?"Minify Inline CSS.":"Don't minify Inline CSS.","simply-static"),disabled:"free"===options.plan||!c(),checked:y,onChange:e=>{f(e),n("minify_inline_css",e)}})]}),(0,o.jsx)(d.ToggleControl,{label:we("Minify JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:we(b?"Minify JavaScript files.":"Don't minify JavaScript files.","simply-static"),disabled:"free"===options.plan||!c(),checked:b,onChange:e=>{_(e),n("minify_js",e)}}),b&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextareaControl,{label:we("Exclude JavaScript URLs","simply-static"),__nextHasNoMarginBottom:!0,help:we("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!c(),value:t.minify_js_exclude,onChange:e=>{n("minify_js_exclude",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Minify Inline JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:we(v?"Minify Inline JavaScript.":"Don't minify Inline JavaScript.","simply-static"),disabled:"free"===options.plan||!c(),checked:v,onChange:e=>{S(e),n("minify_inline_js",e)}})]})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:we("Versioning","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Version CSS?","simply-static"),__nextHasNoMarginBottom:!0,help:we(se?"Appends a version query string to CSS files.":"Don't append a version query string to CSS files.","simply-static"),disabled:"free"===options.plan||!c(),checked:se,onChange:e=>{ne(e),n("version_css",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Version JavaScript?","simply-static"),__nextHasNoMarginBottom:!0,help:we(ie?"Appends a version query string to JavaScript files.":"Don't append a version query string to JavaScript files.","simply-static"),disabled:"free"===options.plan||!c(),checked:ie,onChange:e=>{ae(e),n("version_js",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[we("Image Optimization","simply-static"),(0,o.jsx)(I,{title:we("How to optimize images with ShortPixel?","simply-static"),videoUrl:"https://youtu.be/OIfKcXz3cxY"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Optimize Images with ShortPixel?","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_enabled?we("Optimize images with the ShortPixel API.","simply-static"):we("Don't optimize images with the ShortPixel API.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!t.shortpixel_enabled,onChange:e=>{n("shortpixel_enabled",e)}}),t.shortpixel_enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:we("ShortPixel API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.shortpixel_api_key,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_api_key",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Convert to webP","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_webp_enabled?we("Convert images to webp format.","simply-static"):we("Don't convert images to webp format","simply-static"),checked:!!t.shortpixel_webp_enabled,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_webp_enabled",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Backup the original images?","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_backup_enabled?we("Back original images.","simply-static"):we("Don't backup original images.","simply-static"),checked:!!t.shortpixel_backup_enabled,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_backup_enabled",e)}}),t.shortpixel_backup_enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:we("It will preserve every image which might increase your disk space usage.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{padding:1}),(0,o.jsxs)(d.Button,{disabled:re,onClick:()=>{oe(!0),s()({path:"/simplystatic/v1/shortpixel-restore",method:"POST"}).then((e=>{const t=JSON.parse(e);oe(!1),alert(t.message)})).catch((e=>{oe(!1),alert(e.message)}))},variant:"secondary",children:[!re&&we("Restore Original Images","simply-static"),re&&[(0,o.jsx)(d.Dashicon,{icon:"update spin"}),we("Restoring...","simply-static")]]})]})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[we("Replace","simply-static"),(0,o.jsx)(I,{title:we("How to replace WP default paths","simply-static"),videoUrl:"https://youtu.be/GedyNJJMGaY"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:we("wp-content directory","simply-static"),help:we('Replace the "wp-content" directory.',"simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"wp-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:w,onChange:e=>{n("wp_content_directory",e)}}),(0,o.jsx)(d.TextControl,{label:we("wp-includes directory","simply-static"),help:we('Replace the "wp-includes" directory.',"simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"wp-includes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:C,onChange:e=>{n("wp_includes_directory",e)}}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:we("Uploads directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:w+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"uploads",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:E,onChange:e=>{P(e),n("wp_uploads_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:we('Replace the "wp-content/uploads" directory.',"simply-static")})]}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:we("Plugins directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:w+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"plugins",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:N,onChange:e=>{R(e),n("wp_plugins_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:we('Replace the "wp-content/plugins" directory.',"simply-static")})]}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:we("Themes directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:w+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"themes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:T,onChange:e=>{D(e),n("wp_themes_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:we('Replace the "wp-content/themes" directory.',"simply-static")})]}),(0,o.jsx)(d.__experimentalInputControl,{label:we("Theme style name","simply-static"),help:we("Replace the style.css filename.","simply-static"),disabled:"free"===options.plan||!c(),type:"text",className:"ss-theme-style-name",suffix:".css",placeholder:"style",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:F,onChange:e=>{B(e),n("theme_style_name",e)}}),(0,o.jsx)(d.TextControl,{label:we("Author URL","simply-static"),help:we("Replace the author url.","simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"author",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:O,onChange:e=>{H(e),n("author_url",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[we("Hide","simply-static"),(0,o.jsx)(I,{title:we("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Hide WordPress Version","simply-static"),__nextHasNoMarginBottom:!0,checked:A,disabled:"free"===options.plan||!c(),onChange:e=>{M(e),n("hide_version",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Hide WordPress Generator Meta","simply-static"),__nextHasNoMarginBottom:!0,checked:L,disabled:"free"===options.plan||!c(),onChange:e=>{U(e),n("hide_generator",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Hide DNS Prefetch WordPress link","simply-static"),__nextHasNoMarginBottom:!0,checked:$,disabled:"free"===options.plan||!c(),onChange:e=>{z(e),n("hide_prefetch",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Hide RSD Header","simply-static"),__nextHasNoMarginBottom:!0,checked:W,disabled:"free"===options.plan||!c(),onChange:e=>{G(e),n("hide_rsd",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[we("Disable","simply-static"),(0,o.jsx)(I,{title:we("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",we("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:we("Disable XML-RPC","simply-static"),__nextHasNoMarginBottom:!0,checked:Y,disabled:"free"===options.plan||!c(),onChange:e=>{K(e),n("disable_xmlrpc",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Disable Embed Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:V,disabled:"free"===options.plan||!c(),onChange:e=>{Q(e),n("disable_embed",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Disable DB Debug in Frontend","simply-static"),__nextHasNoMarginBottom:!0,checked:Z,disabled:"free"===options.plan||!c(),onChange:e=>{X(e),n("disable_db_debug",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Disable WLW Manifest Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:ee,disabled:"free"===options.plan||!c(),onChange:e=>{te(e),n("disable_wlw_manifest",e)}}),(0,o.jsx)(d.ToggleControl,{label:we("Disable Emojis","simply-static"),__nextHasNoMarginBottom:!0,checked:q,disabled:"free"===options.plan||!c(),onChange:e=>{J(e),n("hide_emotes",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:we("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&c()&&(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1)}),2e3)},variant:"primary",children:we("Save Settings","simply-static")})})]})},{__:Ce}=wp.i18n,ke=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),p="function"!=typeof c||!!c(),[u,h]=(0,e.useState)([]),[m,g]=(0,e.useState)({}),[x,y]=(0,e.useState)([]),[f,b]=(0,e.useState)([]),[_,v]=(0,e.useState)({}),[S,w]=(0,e.useState)([]),[j,C]=(0,e.useState)(!0),[k,E]=(0,e.useState)(!1),[P,N]=(0,e.useState)(!1),[R,T]=(0,e.useState)(3),[D,F]=(0,e.useState)(""),[I,B]=(0,e.useState)(["export","update","build","single"]),[O,H]=(0,e.useState)(!0),[A,M]=(0,e.useState)(!0),[$,z]=(0,e.useState)(!1),[L,U]=(0,e.useState)([]),[W,G]=(0,e.useState)({}),[q,J]=(0,e.useState)([]);return(0,e.useEffect)((()=>{if(C(!1!==t.ss_use_single_exports),E(!!t.ss_single_export_add_xml_sitemap),s()({path:"/simplystatic/v1/pages"}).then((e=>{const s=e.map((e=>e.label)),n={};e.forEach((e=>n[e.label]=e.value)),h(s),g(n);const i=Array.isArray(t.ss_single_pages)?t.ss_single_pages:[];if(i.length>0){const t=i.map((t=>{const s=e.find((e=>String(e.value)===String(t)));return s?s.label:String(t)}));y(t)}})),s()({path:"/simplystatic/v1/taxonomies"}).then((e=>{const s=e.map((e=>e.label)),n={};e.forEach((e=>n[e.label]=e.value)),b(s),v(n);const i=Array.isArray(t.ss_single_taxonomy_archives)?t.ss_single_taxonomy_archives:[];if(i.length>0){const t=i.map((t=>{const s=e.find((e=>String(e.value)===String(t)));return s?s.label:String(t)}));w(t)}})),s()({path:"/simplystatic/v1/post-types"}).then((e=>{let s=Array.isArray(e)?e:e&&e.data?e.data:[];const i=s.map((e=>e.label)),a={};s.forEach((e=>a[e.label]=e.name)),U(i),G(a);const r=Array.isArray(t.ss_single_auto_export_types)?t.ss_single_auto_export_types:[];let o=r;r.length||(o=s.map((e=>e.name)));const l=o.map((e=>{const t=s.find((t=>String(t.name)===String(e)));return t?t.label:String(e)}));J(l),r.length||n("ss_single_auto_export_types",o)})),H(!!t.ss_single_include_archives||void 0===t.ss_single_include_archives),M(!!t.ss_single_include_pagination||void 0===t.ss_single_include_pagination),z(!!t.ss_use_builds),N(!!t.ss_single_auto_export),void 0!==t.ss_single_auto_export_delay){const e=parseInt(t.ss_single_auto_export_delay,10);T(Number.isNaN(e)?3:Math.max(0,e))}else T(3);F(t.ss_webhook_url||t.ss_single_export_webhook_url||"");Array.isArray(t.ss_webhook_enabled_types)&&t.ss_webhook_enabled_types.length?B(t.ss_webhook_enabled_types):B(t.ss_single_export_webhook_url&&t.ss_single_export_webhook_url.length?["single"]:["export","update","build","single"])}),[t.ss_single_pages,t.ss_single_taxonomy_archives,t.ss_use_builds]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Single Exports","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:Ce("Use Single Exports?","simply-static"),help:Ce(j?"Quickly push updates to your static site while editing pages/posts.":"Do not allow quick updates while editing posts/pages.","simply-static"),checked:!!j,disabled:!p,onChange:e=>{p&&(C(e),n("ss_use_single_exports",e))}}),j&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.ToggleControl,{label:Ce("Use Auto Export?","simply-static"),help:Ce(P?"Automatically schedule a Single Export when a post/page is updated/published.":"Do not automatically run Single Export when a post/page is updated/published.","simply-static"),checked:!!P,disabled:!p,onChange:e=>{p&&(N(e),n("ss_single_auto_export",e))}}),P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:Ce("Auto Export Post Types","simply-static"),__next40pxDefaultSize:!0,value:q,suggestions:L,onChange:e=>{if(!p)return;J(e);const t=e.map((e=>W[e]?W[e]:e)).filter(Boolean),s=t.length?t:Object.values(W);n("ss_single_auto_export_types",s)},help:Ce("Choose which public post types should trigger automatic Single Exports when updated. If none is selected, all public post types are used.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which public post types should trigger automatic Single Exports when updated. If none is selected, all public post types are used.","simply-static")})]}),P&&(0,o.jsx)(d.__experimentalInputControl,{label:Ce("Auto export delay (seconds)","simply-static"),help:Ce("Delay before the automatic Single Export starts after a change is detected.","simply-static"),type:"number",min:0,value:R,disabled:!p,onChange:e=>{if(!p)return;const t=parseInt(e,10),s=Number.isNaN(t)?0:Math.max(0,t);T(s),n("ss_single_auto_export_delay",s)}}),(0,o.jsx)(d.FormTokenField,{label:Ce("Pages to update","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,suggestions:u,onChange:e=>{if(!p)return;y(e);const t=e.map((e=>{if(m[e])return m[e];const t=parseInt(e,10);return isNaN(t)?null:t})).filter((e=>null!==e));n("ss_single_pages",t)},help:Ce("Select which pages should start a Single Export. If none selected, we use your homepage.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:200,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which pages/files should be updated when running a Single Export.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),(0,o.jsx)(d.FormTokenField,{label:Ce("Taxonomy Archives","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:S,suggestions:f,onChange:e=>{if(!p)return;w(e);const t=e.map((e=>_[e]?_[e]:e)).filter(Boolean);n("ss_single_taxonomy_archives",t)},help:Ce("Choose which taxonomy archives to include for selected pages/posts (e.g., Categories, Tags, or custom taxonomies).","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which taxonomies should be updated when running a Single Export.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update archives (author/date/post_type)","simply-static"),help:Ce(O?"Update archive URLs when running a Single Export.":"Do not update archive URLs.","simply-static"),checked:!!O,disabled:!p,onChange:e=>{p&&(H(e),n("ss_single_include_archives",e))}}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update pagination","simply-static"),help:Ce(A?"Update pagination URLs when running a Single Export.":"Do not update pagination URLs.","simply-static"),checked:!!A,disabled:!p,onChange:e=>{p&&(M(e),n("ss_single_include_pagination",e))}}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update XML sitemap","simply-static"),help:Ce(k?"Update XML sitemaps when running a Single Export.":"Do not update XML sitemaps.","simply-static"),checked:!!k,disabled:!p,onChange:e=>{p&&(E(e),n("ss_single_export_add_xml_sitemap",e))}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Build Exports","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:Ce("Use Build Exports?","simply-static"),help:Ce($?"Use build exports to quickly update a list of pages and files on your static site.":"Build Exports are disabled.","simply-static"),checked:!!$,disabled:!p,onChange:e=>{p&&(z(e),n("ss_use_builds",e))}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Webhook","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:Ce("Webhook URL","simply-static"),placeholder:"https://example.com/webhook-endpoint",value:D,disabled:!p,onChange:e=>{p&&(F(e),n("ss_webhook_url",e))},help:Ce("Simply Static will POST a JSON payload to this URL after exports finish.","simply-static")}),(0,o.jsx)("p",{className:"description",children:Ce("Fire for these export types:","simply-static")}),(0,o.jsx)("div",{className:"ss-webhook-types",children:["export","update","build","single"].map((e=>(0,o.jsx)(d.ToggleControl,{label:Ce("export"===e?"Export (full)":"update"===e?"Update":"build"===e?"Build":"Single","simply-static"),checked:I.includes(e),disabled:!p,onChange:t=>{if(!p)return;const s=new Set(I);t?s.add(e):s.delete(e);const i=Array.from(s);B(i),n("ss_webhook_enabled_types",i)}},e)))}),(0,o.jsx)("p",{className:"description",children:Ce("Payload includes event, site_url, export_type, identifiers (when available), timestamp, and success.","simply-static")})]})]}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:Ce("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),p&&(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{p&&(i(),r(!0),setTimeout((()=>r(!1)),2e3))},variant:"primary",children:Ce("Save Settings","simply-static")})})]})},Ee=function(){const{isPro:t,isStudio:s}=(0,e.useContext)(l);return(0,o.jsx)(o.Fragment,{children:"pro"===options.plan&&t()?(0,o.jsx)(o.Fragment,{children:s()?(0,o.jsxs)("p",{className:"version-number",children:["Free: ",(0,o.jsx)("b",{children:options.version}),(0,o.jsx)("br",{}),"Pro: ",(0,o.jsx)("b",{children:options.version_pro}),(0,o.jsx)("br",{}),"Studio: ",(0,o.jsx)("b",{children:options.version_studio})]}):(0,o.jsxs)("p",{className:"version-number",children:["Free: ",(0,o.jsx)("b",{children:options.version}),(0,o.jsx)("br",{}),"Pro: ",(0,o.jsx)("b",{children:options.version_pro})]})}):(0,o.jsxs)("p",{className:"version-number",children:["Version: ",(0,o.jsx)("b",{children:options.version})]})})},{__:Pe}=wp.i18n,Ne=function(t=null){const{isPro:s}=(0,e.useContext)(l);return(0,o.jsxs)(d.Card,{className:"plugin-nav",children:[(0,o.jsx)("div",{className:"plugin-logo",children:(0,o.jsx)("img",{alt:"Logo",src:options.logo})}),(0,o.jsx)(Ee,{}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Button,{href:"https://simplystatic.com/changelogs/",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-ul"})," ",Pe("Changelog","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-links"})," ",Pe("Documentation","simply-static")]}),"free"===options.plan&&(0,o.jsxs)(d.Button,{href:"https://simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-site-alt3"}),"Simply Static Pro"]})]})},{__:Re}=wp.i18n;function Te({onClose:t,setSelectableEnvironments:n,setSelectedEnvironment:i}){const[a,r]=(0,e.useState)(""),[l,c]=(0,e.useState)(!1);return(0,o.jsxs)("div",{className:"ss-environment-form",children:[(0,o.jsx)(d.TextControl,{label:"Name",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>r(e),value:a}),(0,o.jsx)("p",{children:Re("A new environment will be created with the current configuration.","simply-static")}),(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexBlock,{children:(0,o.jsx)(d.Button,{variant:"primary",onClick:()=>{c(!0),s()({path:"/simplystatic/v1/environment",method:"POST",data:{title:a}}).then((e=>{let s=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));n(s),i(e.current_environment),t()})).catch((e=>{alert(e.message)})).finally((()=>c(!1)))},isBusy:l,children:Re(l?"Creating...":"Create","simply-static")})}),(0,o.jsx)(d.FlexBlock,{children:(0,o.jsx)(d.Button,{variant:"secondary",onClick:t,children:Re("Cancel","simply-static")})})]})]})}const{__:De}=wp.i18n;function Fe({onChange:e,current:t,environments:s,disabled:n,onDelete:i}){return(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:"80%"},children:(0,o.jsx)(d.SelectControl,{disabled:n,value:t,options:s,help:De("Choose an environment or create a new one to configure settings.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e})}),(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.Button,{className:"environment-delete-button",variant:"tertiary",label:De("Delete selected environment","simply-static"),size:"small",icon:"trash",disabled:n,onClick:i})})]})}const{__:Ie}=wp.i18n;function Be({getSettings:t,isRunning:n}){const{getIntegrationById:i}=(0,e.useContext)(l),a=()=>{try{if("undefined"==typeof options)return!1;if("pro"!==options.plan)return!1;const e=i?i("environments"):null;return!(!e||!e.active&&!e.can_run)}catch(e){return!1}},[r,c]=(0,e.useState)(""),[p,u]=(0,e.useState)([]),[h,m]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{a()&&s()({path:"/simplystatic/v1/environment",method:"GET"}).then((e=>{let t=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));u(t),c(e.current_environment)})).catch((e=>{}))}),[]),(0,o.jsxs)("div",{className:"environment-container",children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Ie("Environment","simply-static")]}),!h&&r&&(0,o.jsxs)("p",{children:["Current: ",(0,o.jsx)("strong",{children:g?Ie("Changing ...","simply-static"):p.filter((e=>e.value===r)).pop().label})]}),!h&&p.length>0&&(0,o.jsx)(Fe,{onChange:e=>{x(!0),a()?s()({path:"/simplystatic/v1/environment",method:"PUT",data:{version:e}}).then((()=>{t(),c(e)})).catch((e=>alert(e.message))).finally((()=>{x(!1)})):x(!1)},environments:p,onDelete:()=>{x(!0),a()?s()({path:"/simplystatic/v1/environment",method:"DELETE",data:{version:r}}).then((e=>{t();let s=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));u(s),c(e.current_environment)})).catch((e=>alert(e.message))).finally((()=>{x(!1)})):x(!1)},current:r,disabled:n||g}),!h&&(0,o.jsx)(d.Button,{disabled:n||g,variant:"primary",size:"large",onClick:()=>m(!0),children:"Create an Environment"}),h&&(0,o.jsx)(Te,{onClose:()=>m(!1),setSelectedEnvironment:c,setSelectableEnvironments:u})]})}const{__:Oe}=wp.i18n,He=function(t=null){const{isRunning:n,setIsRunning:i,isResumed:a,setIsResumed:c,isPaused:p,setIsPaused:u,blogId:h,settings:m,updateFromNetwork:g,getSettings:x,isPro:y,canRunIntegration:f,showMobileNav:b,setShowMobileNav:_,isDelayed:v}=(0,e.useContext)(l),{activeItem:S,setActiveItem:w}=t,[j,C]=(0,e.useState)(!1),[k,E]=(0,e.useState)("current"),[P,N]=(0,e.useState)([]),[R,T]=(0,e.useState)(!1),[D,F]=(0,e.useState)("export"),[I,B]=(0,e.useState)(!0);if(options.is_multisite){const t=()=>{s()({path:"/simplystatic/v1/check-can-run",method:"GET"}).then((e=>{JSON.parse(e).can_run?B(!0):B(!1)}))};r((()=>{t()}),n?null:1e5),(0,e.useEffect)((()=>{t()}),[])}(0,e.useEffect)((()=>{if(C(n||p),options.selectable_sites&&!options.is_network&&options.is_multisite){let e=options.selectable_sites.slice().sort((function(e,t){return(e.name||"").localeCompare(t.name||"")})).map((function(e){return{label:`${e.name} (#${e.blog_id})`,value:e.blog_id}}));e.unshift({label:Oe("Use current settings","simply-static"),value:"current"}),N(e)}}),[options,n,p]),(0,e.useEffect)((()=>{F("export")}),[m]);let O="";if(Object.keys(options.builds).length){const e=Object.keys(options.builds).map((e=>(0,o.jsx)("option",{value:e,children:options.builds[e]},e)));e.sort(((e,t)=>e.props.children.localeCompare(t.props.children))),O=(0,o.jsx)("optgroup",{label:"Builds",children:e})}const H=e=>{try{return!options.allowed_pages||options.allowed_pages.includes(e)}catch(e){return!0}},A=["/","/diagnostics"].some(H),M=["/general","/deployment","/forms","/search","/optimize","/workflow"].some(H),$=["/integrations","/utilities","/debug","/uam"].some(H);return(0,o.jsxs)(d.Card,{className:"plugin-nav",children:[(0,o.jsx)("div",{className:"plugin-logo",children:(0,o.jsx)("img",{alt:"Logo",src:options.logo})}),(0,o.jsx)(Ee,{}),(0,o.jsxs)("div",{className:"generate-container "+(j?"generating":""),children:[(0,o.jsxs)(d.SelectControl,{className:"generate-type",value:D,disabled:j,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{F(e)},children:[(0,o.jsx)("option",{value:"export",children:Oe("Export","simply-static")}),"zip"!==m.delivery_method&&"tiiny"!==m.delivery_method&&(0,o.jsx)(o.Fragment,{children:"pro"===options.plan&&y()?(0,o.jsx)("option",{value:"update",children:Oe("Export Changes","simply-static")}):(0,o.jsx)("option",{disabled:!0,value:"update",children:Oe("Export Changes (Requires Simply Static Pro)","simply-static")})}),O]}),I&&(0,o.jsx)(me,{canGenerate:!j,startExport:()=>{C(!0),c(!1),u(!1),s()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:h,type:D}}).then((e=>{var t=JSON.parse(e);if(500===t.status)return alert(t.message),void C(!1);i(!0)}))},cancelExport:()=>{s()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:h}}).then((e=>{c(!1),u(!1),i(!1),C(!1)}))},pauseExport:()=>{s()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:h}}).then((e=>{i(!1),c(!1),u(!0)}))},resumeExport:()=>{s()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:h}}).then((e=>{c(!0),u(!1),i(!0)}))},isRunning:n,isPaused:p,isResumed:a,isDelayed:v}),!I&&options.is_multisite&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Button,{disabled:!0,className:"generate",children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),Oe("Generate","simply-static")]}),(0,o.jsx)(d.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:Oe("An export from another site is running. Upgrade to queue them.","simply-static")})]})]}),(0,o.jsxs)(d.CardBody,{children:["pro"===options.plan&&y()&&(0,o.jsx)(o.Fragment,{children:!options.is_network&&f("environments")&&(0,o.jsx)(Be,{isRunning:n,getSettings:x})}),!options.is_network&&options.is_multisite&&(0,o.jsxs)("div",{className:"import-container",children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Import","simply-static")]}),(0,o.jsx)(d.SelectControl,{value:k,options:P,help:Oe("Choose a subsite to import settings from.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{E(e)}}),"current"!==k&&(0,o.jsx)(d.Button,{isPrimary:!0,onClick:()=>{(e=>{g(e),T(!0),setTimeout((function(){T(!1),window.location.reload()}),3500)})(k)},children:Oe("Import Settings","simply-static")}),R?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,className:"upgrade-network-notice",children:(0,o.jsx)("p",{children:Oe("Settings successfully imported.","simply-static")})})}):""]}),A&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Tools","simply-static")]}),H("/")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/"),_(!b)},className:"/"===S?"is-active-item generate":"generate",path:"/",children:[(0,o.jsx)(d.Dashicon,{icon:"update"})," ",Oe("Activity Log","simply-static")]}),H("/diagnostics")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/diagnostics"),_(!b)},className:"/diagnostics"===S?"is-active-item":"",path:"/diagnostics",children:[(0,o.jsx)(d.Dashicon,{icon:"bell"})," ",Oe("Diagnostics","simply-static")]})]})]}),M&&(0,o.jsxs)(d.CardBody,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Settings","simply-static")]}),H("/general")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/general"),_(!b)},className:"/general"===S?"is-active-item":"",path:"/general",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-generic"})," ",Oe("General","simply-static")]}),!options.is_network&&!options.hidden_settings.includes("deployment")&&H("/deployment")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/deployment"),_(!b)},className:"/deployment"===S?"is-active-item":"",path:"/deployment",children:[(0,o.jsx)(d.Dashicon,{icon:"migrate"})," ",Oe("Deploy","simply-static")]}),!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[H("/forms")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/forms"),_(!b)},className:"/forms"===S?"is-active-item":"",path:"/forms",children:[(0,o.jsx)(d.Dashicon,{icon:"align-center"})," ",Oe("Forms","simply-static")]}),H("/search")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/search"),_(!b)},className:"/search"===S?"is-active-item":"",path:"/search",children:[(0,o.jsx)(d.Dashicon,{icon:"search"})," ",Oe("Search","simply-static")]}),H("/optimize")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/optimize"),_(!b)},className:"/optimize"===S?"is-active-item":"",path:"/optimize",children:[(0,o.jsx)(d.Dashicon,{icon:"dashboard"})," ",Oe("Optimize","simply-static")]}),H("/workflow")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/workflow"),_(!b)},className:"/workflow"===S?"is-active-item":"",path:"/workflow",children:[(0,o.jsx)(d.Dashicon,{icon:"randomize"})," ",Oe("Workflow","simply-static")]})]})]}),$&&(0,o.jsxs)(d.CardBody,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Advanced","simply-static")]}),H("/integrations")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/integrations"),_(!b)},className:"/integrations"===S?"is-active-item":"",path:"/integrations",children:[(0,o.jsx)(d.Dashicon,{icon:"block-default"})," ",Oe("Integrations","simply-static")]}),H("/utilities")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/utilities"),_(!b)},className:"/utilities"===S?"is-active-item":"",path:"/utilities",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-tools"})," ",Oe("Utilities","simply-static")]}),H("/debug")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/debug"),_(!b)},className:"/debug"===S?"is-active-item":"",path:"/debug",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-help"})," ",Oe("Debug","simply-static")]}),options.uam_enabled&&H("/uam")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{w("/uam"),_(!b)},className:"/uam"===S?"is-active-item":"",path:"/uam",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-users"})," ",Oe("UAM","simply-static")]})]}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("h4",{className:"settings-headline",children:"Learn"}),(0,o.jsxs)(d.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-links"})," ",Oe("Documentation","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://www.youtube.com/playlist?list=PLcpe8_rNg8U5g1gCOa0Ge6T17f50nSvmg",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"format-video"})," ",Oe("Video Course","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://simplystatic.com/tutorials/",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"edit"})," ",Oe("Tutorials","simply-static")]})]})]})},{__:Ae}=wp.i18n,Me=function(){const{isRunning:t,isPaused:s,passedChecks:n,isPro:i,showMobileNav:a,setShowMobileNav:r,settings:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)({activeItem:"/"}),[h,m]=(0,e.useState)(localStorage.getItem("ss-initial-page")?localStorage.getItem("ss-initial-page"):options.initial),[g,x]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{let e=localStorage.getItem("ss-initial-page");g||(x(!0),e?(u(e),m(e),localStorage.removeItem("ss-initial-page")):(u(options.initial),m(options.initial)))}),[options,t,s]),(0,o.jsx)("div",{className:"plugin-settings-container",children:(0,o.jsx)(d.__experimentalNavigatorProvider,{initialPath:h,style:{minHeight:window.innerHeight-(wpadminbar?wpadminbar.clientHeight:0)-1+"px"},children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsxs)("a",{onClick:()=>{r(!a)},className:"show-nav",children:[(0,o.jsx)(d.Dashicon,{icon:"align-center"})," ",Ae("Toggle menu","simply-static")]}),(0,o.jsx)(d.FlexItem,{className:a?"toggle-nav sidebar":"sidebar",children:options.is_network?(0,o.jsx)(Ne,{}):(0,o.jsx)(He,{setActiveItem:u,activeItem:p})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,className:a?"":"toggle-nav",children:(0,o.jsxs)("div",{className:"plugin-settings",children:["no"!==n||options.is_network?"":(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(d.Notice,{status:"notice",isDismissible:!1,className:"/"==p?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,o.jsxs)("p",{children:[Ae("There are errors in diagnostics that may negatively affect your static export.","simply-static"),(0,o.jsx)("br",{}),Ae("Please review them and get them fixed to avoid problems.","simply-static")]}),(0,o.jsxs)(d.__experimentalNavigatorButton,{isSecondary:!0,onClick:()=>{u("/diagnostics"),r(!a)},className:"/diagnostics"===p?"is-active-item":"",path:"/diagnostics",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-help"})," ",Ae("Visit Diagnostics","simply-static")]})]})}),"pro"!==options.plan||i()?"":(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,className:"/"==p?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,o.jsxs)("p",{children:[Ae("You are using the pro version without a valid license.","simply-static"),(0,o.jsx)("br",{}),Ae("We have temporarily disabled all the pro features now. Please contact our support to have the problem solved.","simply-static")]}),(0,o.jsx)(d.Button,{isPrimary:!0,href:"https://simplystatic.com/support/",target:"_blank",children:"Contact Support"})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:"5px"})]})}),"/"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/",children:(0,o.jsx)(Se,{})}),"/diagnostics"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/diagnostics",children:(0,o.jsx)(A,{})}),"/general"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/general",children:(0,o.jsx)(O,{})}),"/deployment"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/deployment",children:(0,o.jsx)(L,{})}),"/forms"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/forms",children:(0,o.jsx)(W,{})}),"/search"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/search",children:(0,o.jsx)(q,{})}),"/optimize"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/optimize",children:(0,o.jsx)(je,{})}),"/workflow"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/workflow",children:(0,o.jsx)(ke,{})}),"/utilities"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/utilities",children:(0,o.jsx)($,{})}),"/debug"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/debug",children:(0,o.jsx)(Y,{})}),"/uam"===p&&options.uam_enabled&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/uam",children:(0,o.jsx)(ee,{})}),"/integrations"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/integrations",children:(0,o.jsx)(Z,{})})]})})]})})})},$e=function(){return(0,o.jsx)(c,{children:(0,o.jsx)("div",{children:(0,o.jsx)(Me,{})})})};"simplystatic-settings"===options.screen&&(0,e.createRoot)(document.getElementById("simplystatic-settings")).render((0,o.jsx)($e,{}))})()})();383 `;var Me=o.memo((function({rowsPerPage:e,rowCount:t,currentPage:s,direction:n=Te.direction,paginationRowsPerPageOptions:i=Te.paginationRowsPerPageOptions,paginationIconLastPage:a=Te.paginationIconLastPage,paginationIconFirstPage:r=Te.paginationIconFirstPage,paginationIconNext:l=Te.paginationIconNext,paginationIconPrevious:c=Te.paginationIconPrevious,paginationComponentOptions:d=Te.paginationComponentOptions,onChangeRowsPerPage:p=Te.onChangeRowsPerPage,onChangePage:u=Te.onChangePage}){const m=(()=>{const e="object"==typeof window;function t(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}const[s,n]=o.useState(t);return o.useEffect((()=>{if(!e)return()=>null;function s(){n(t())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)}),[]),s})(),g=le(n),x=m.width&&m.width>599,y=h(t,e),f=s*e,b=f-e+1,_=1===s,v=s===y,S=Object.assign(Object.assign({},De),d),j=s===y?`${b}-${t} ${S.rangeSeparatorText} ${t}`:`${b}-${f} ${S.rangeSeparatorText} ${t}`,w=o.useCallback((()=>u(s-1)),[s,u]),C=o.useCallback((()=>u(s+1)),[s,u]),k=o.useCallback((()=>u(1)),[u]),E=o.useCallback((()=>u(h(t,e))),[u,t,e]),P=o.useCallback((e=>p(Number(e.target.value),s)),[s,p]),N=i.map((e=>o.createElement("option",{key:e,value:e},e)));S.selectAllRowsItem&&N.push(o.createElement("option",{key:-1,value:t},S.selectAllRowsItemText));const R=o.createElement(Re,{onChange:P,defaultValue:e,"aria-label":S.rowsPerPageText},N);return o.createElement(Ie,{className:"rdt_Pagination"},!S.noRowsPerPage&&x&&o.createElement(o.Fragment,null,o.createElement(Ae,null,S.rowsPerPageText),R),x&&o.createElement(He,null,j),o.createElement(Be,null,o.createElement(Fe,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":_,onClick:k,disabled:_,$isRTL:g},r),o.createElement(Fe,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":_,onClick:w,disabled:_,$isRTL:g},c),!S.noRowsPerPage&&!x&&R,o.createElement(Fe,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":v,onClick:C,disabled:v,$isRTL:g},l),o.createElement(Fe,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":v,onClick:E,disabled:v,$isRTL:g},a)))}));const ze=(e,t)=>{const s=o.useRef(!0);o.useEffect((()=>{s.current?s.current=!1:e()}),t)};var $e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Le}(e)}(e)},Le="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ue(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Je((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function We(e,t,s){return e.concat(t).map((function(e){return Ue(e,s)}))}function Ge(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function qe(e,t){try{return t in e}catch(e){return!1}}function Je(e,t,s){(s=s||{}).arrayMerge=s.arrayMerge||We,s.isMergeableObject=s.isMergeableObject||$e,s.cloneUnlessOtherwiseSpecified=Ue;var n=Array.isArray(t);return n===Array.isArray(e)?n?s.arrayMerge(e,t,s):function(e,t,s){var n={};return s.isMergeableObject(e)&&Ge(e).forEach((function(t){n[t]=Ue(e[t],s)})),Ge(t).forEach((function(i){(function(e,t){return qe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(qe(e,i)&&s.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return Je;var s=t.customMerge(e);return"function"==typeof s?s:Je}(i,s)(e[i],t[i],s):n[i]=Ue(t[i],s))})),n}(e,t,s):Ue(t,s)}Je.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,s){return Je(e,s,t)}),{})};var Ye=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Je);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},Ve={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(e,t,s,n){const[i,a]=o.useState((()=>m(e))),[l,c]=o.useState(""),d=o.useRef("");ze((()=>{a(m(e))}),[e]);const p=o.useCallback((e=>{var t,s,n;const{attributes:a}=e.target,r=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;r&&(d.current=(null===(n=null===(s=i[b(i,r)])||void 0===s?void 0:s.id)||void 0===n?void 0:n.toString())||"",c(d.current))}),[i]),u=o.useCallback((e=>{var s;const{attributes:n}=e.target,r=null===(s=n.getNamedItem("data-column-id"))||void 0===s?void 0:s.value;if(r&&d.current&&r!==d.current){const e=b(i,d.current),s=b(i,r),n=[...i];n[e]=i[s],n[s]=i[e],a(n),t(n)}}),[t,i]),h=o.useCallback((e=>{e.preventDefault()}),[]),g=o.useCallback((e=>{e.preventDefault()}),[]),x=o.useCallback((e=>{e.preventDefault(),d.current="",c("")}),[]),y=function(e=!1){return e?r.ASC:r.DESC}(n),f=o.useMemo((()=>i[b(i,null==s?void 0:s.toString())]||{}),[s,i]);return{tableColumns:i,draggingColumnId:l,handleDragStart:p,handleDragEnter:u,handleDragOver:h,handleDragLeave:g,handleDragEnd:x,defaultSortDirection:y,defaultSortColumn:f}}var Ze=o.memo((function(e){const{data:t=Te.data,columns:s=Te.columns,title:n=Te.title,actions:a=Te.actions,keyField:l=Te.keyField,striped:c=Te.striped,highlightOnHover:p=Te.highlightOnHover,pointerOnHover:u=Te.pointerOnHover,dense:m=Te.dense,selectableRows:x=Te.selectableRows,selectableRowsSingle:y=Te.selectableRowsSingle,selectableRowsHighlight:b=Te.selectableRowsHighlight,selectableRowsNoSelectAll:_=Te.selectableRowsNoSelectAll,selectableRowsVisibleOnly:S=Te.selectableRowsVisibleOnly,selectableRowSelected:w=Te.selectableRowSelected,selectableRowDisabled:E=Te.selectableRowDisabled,selectableRowsComponent:P=Te.selectableRowsComponent,selectableRowsComponentProps:N=Te.selectableRowsComponentProps,onRowExpandToggled:T=Te.onRowExpandToggled,onSelectedRowsChange:D=Te.onSelectedRowsChange,expandableIcon:I=Te.expandableIcon,onChangeRowsPerPage:F=Te.onChangeRowsPerPage,onChangePage:B=Te.onChangePage,paginationServer:O=Te.paginationServer,paginationServerOptions:H=Te.paginationServerOptions,paginationTotalRows:A=Te.paginationTotalRows,paginationDefaultPage:M=Te.paginationDefaultPage,paginationResetDefaultPage:z=Te.paginationResetDefaultPage,paginationPerPage:$=Te.paginationPerPage,paginationRowsPerPageOptions:L=Te.paginationRowsPerPageOptions,paginationIconLastPage:U=Te.paginationIconLastPage,paginationIconFirstPage:W=Te.paginationIconFirstPage,paginationIconNext:G=Te.paginationIconNext,paginationIconPrevious:q=Te.paginationIconPrevious,paginationComponent:J=Te.paginationComponent,paginationComponentOptions:Y=Te.paginationComponentOptions,responsive:K=Te.responsive,progressPending:V=Te.progressPending,progressComponent:Q=Te.progressComponent,persistTableHead:X=Te.persistTableHead,noDataComponent:ee=Te.noDataComponent,disabled:te=Te.disabled,noTableHead:se=Te.noTableHead,noHeader:ne=Te.noHeader,fixedHeader:ie=Te.fixedHeader,fixedHeaderScrollHeight:re=Te.fixedHeaderScrollHeight,pagination:le=Te.pagination,subHeader:ce=Te.subHeader,subHeaderAlign:de=Te.subHeaderAlign,subHeaderWrap:pe=Te.subHeaderWrap,subHeaderComponent:ue=Te.subHeaderComponent,noContextMenu:me=Te.noContextMenu,contextMessage:he=Te.contextMessage,contextActions:ge=Te.contextActions,contextComponent:ye=Te.contextComponent,expandableRows:fe=Te.expandableRows,onRowClicked:be=Te.onRowClicked,onRowDoubleClicked:Ee=Te.onRowDoubleClicked,onRowMouseEnter:Pe=Te.onRowMouseEnter,onRowMouseLeave:Ne=Te.onRowMouseLeave,sortIcon:Re=Te.sortIcon,onSort:De=Te.onSort,sortFunction:Ie=Te.sortFunction,sortServer:Fe=Te.sortServer,expandableRowsComponent:Be=Te.expandableRowsComponent,expandableRowsComponentProps:Oe=Te.expandableRowsComponentProps,expandableRowDisabled:He=Te.expandableRowDisabled,expandableRowsHideExpander:Ae=Te.expandableRowsHideExpander,expandOnRowClicked:$e=Te.expandOnRowClicked,expandOnRowDoubleClicked:Le=Te.expandOnRowDoubleClicked,expandableRowExpanded:Ue=Te.expandableRowExpanded,expandableInheritConditionalStyles:We=Te.expandableInheritConditionalStyles,defaultSortFieldId:Ge=Te.defaultSortFieldId,defaultSortAsc:qe=Te.defaultSortAsc,clearSelectedRows:Je=Te.clearSelectedRows,conditionalRowStyles:Ke=Te.conditionalRowStyles,theme:Ze=Te.theme,customStyles:Xe=Te.customStyles,direction:et=Te.direction,onColumnOrderChange:tt=Te.onColumnOrderChange,className:st,ariaLabel:nt}=e,{tableColumns:it,draggingColumnId:at,handleDragStart:rt,handleDragEnter:ot,handleDragOver:lt,handleDragLeave:ct,handleDragEnd:dt,defaultSortDirection:pt,defaultSortColumn:ut}=Qe(s,tt,Ge,qe),[{rowsPerPage:mt,currentPage:ht,selectedRows:gt,allSelected:xt,selectedCount:yt,selectedColumn:ft,sortDirection:bt,toggleOnSelectedRowsChange:_t},vt]=o.useReducer(v,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:ut,toggleOnSelectedRowsChange:!1,sortDirection:pt,currentPage:M,rowsPerPage:$,selectedRowsFlag:!1,contextMessage:Te.contextMessage}),{persistSelectedOnSort:St=!1,persistSelectedOnPageChange:jt=!1}=H,wt=!(!O||!jt&&!St),Ct=le&&!V&&t.length>0,kt=J||Me,Et=o.useMemo((()=>((e={},t="default",s="default")=>{return Ye({table:{style:{color:(n=Ve[Ve[t]?t:s]).text.primary,backgroundColor:n.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:n.text.primary,backgroundColor:n.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:n.background.default,minHeight:"52px"}},head:{style:{color:n.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:n.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:n.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:n.context.background,fontSize:"18px",fontWeight:400,color:n.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:n.text.primary,backgroundColor:n.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:n.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:n.selected.text,backgroundColor:n.selected.default,borderBottomColor:n.background.default}},highlightOnHoverStyle:{color:n.highlightOnHover.text,backgroundColor:n.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:n.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:n.background.default},stripedStyle:{color:n.striped.text,backgroundColor:n.striped.default}},expanderRow:{style:{color:n.text.primary,backgroundColor:n.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:n.button.default,fill:n.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:n.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:n.button.hover},"&:focus":{outline:"none",backgroundColor:n.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:n.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:n.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:n.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:n.button.default,fill:n.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:n.button.disabled,fill:n.button.disabled},"&:hover:not(:disabled)":{backgroundColor:n.button.hover},"&:focus":{outline:"none",backgroundColor:n.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:n.text.primary,backgroundColor:n.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:n.text.primary,backgroundColor:n.background.default}}},e);var n})(Xe,Ze)),[Xe,Ze]),Pt=o.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),Nt=o.useMemo((()=>{if(Fe)return t;if((null==ft?void 0:ft.sortFunction)&&"function"==typeof ft.sortFunction){const e=ft.sortFunction,s=bt===r.ASC?e:(t,s)=>-1*e(t,s);return[...t].sort(s)}return function(e,t,s,n){return t?n&&"function"==typeof n?n(e.slice(0),t,s):e.slice(0).sort(((e,n)=>{const i=t(e),a=t(n);if("asc"===s){if(i<a)return-1;if(i>a)return 1}if("desc"===s){if(i>a)return-1;if(i<a)return 1}return 0})):e}(t,null==ft?void 0:ft.selector,bt,Ie)}),[Fe,ft,bt,t,Ie]),Rt=o.useMemo((()=>{if(le&&!O){const e=ht*mt,t=e-mt;return Nt.slice(t,e)}return Nt}),[ht,le,O,mt,Nt]),Tt=o.useCallback((e=>{vt(e)}),[]),Dt=o.useCallback((e=>{vt(e)}),[]),It=o.useCallback((e=>{vt(e)}),[]),Ft=o.useCallback(((e,t)=>be(e,t)),[be]),Bt=o.useCallback(((e,t)=>Ee(e,t)),[Ee]),Ot=o.useCallback(((e,t)=>Pe(e,t)),[Pe]),Ht=o.useCallback(((e,t)=>Ne(e,t)),[Ne]),At=o.useCallback((e=>vt({type:"CHANGE_PAGE",page:e,paginationServer:O,visibleOnly:S,persistSelectedOnPageChange:jt})),[O,jt,S]),Mt=o.useCallback((e=>{const t=h(A||Rt.length,e),s=g(ht,t);O||At(s),vt({type:"CHANGE_ROWS_PER_PAGE",page:s,rowsPerPage:e})}),[ht,At,O,A,Rt.length]);if(le&&!O&&Nt.length>0&&0===Rt.length){const e=h(Nt.length,mt),t=g(ht,e);At(t)}ze((()=>{D({allSelected:xt,selectedCount:yt,selectedRows:gt.slice(0)})}),[_t]),ze((()=>{De(ft,bt,Nt.slice(0))}),[ft,bt]),ze((()=>{B(ht,A||Nt.length)}),[ht]),ze((()=>{F(mt,ht)}),[mt]),ze((()=>{At(M)}),[M,z]),ze((()=>{if(le&&O&&A>0){const e=h(A,mt),t=g(ht,e);ht!==t&&At(t)}}),[A]),o.useEffect((()=>{vt({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Je})}),[y,Je]),o.useEffect((()=>{if(!w)return;const e=Nt.filter((e=>w(e))),t=y?e.slice(0,1):e;vt({type:"SELECT_MULTIPLE_ROWS",keyField:l,selectedRows:t,totalRows:Nt.length,mergeSelections:wt})}),[t,w]);const zt=S?Rt:Nt,$t=jt||y||_;return o.createElement(i.ThemeProvider,{theme:Et},!ne&&(!!n||!!a)&&o.createElement(xe,{title:n,actions:a,showMenu:!me,selectedCount:yt,direction:et,contextActions:ge,contextComponent:ye,contextMessage:he}),ce&&o.createElement(_e,{align:de,wrapContent:pe},ue),o.createElement(Se,Object.assign({$responsive:K,$fixedHeader:ie,$fixedHeaderScrollHeight:re,className:st},Pt),o.createElement(we,null,V&&!X&&o.createElement(je,null,Q),o.createElement(j,Object.assign({disabled:te,className:"rdt_Table",role:"table"},nt&&{"aria-label":nt}),!se&&(!!X||Nt.length>0&&!V)&&o.createElement(C,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:ie},o.createElement(k,{className:"rdt_TableHeadRow",role:"row",$dense:m},x&&($t?o.createElement(R,{style:{flex:"0 0 48px"}}):o.createElement(oe,{allSelected:xt,selectedRows:gt,selectableRowsComponent:P,selectableRowsComponentProps:N,selectableRowDisabled:E,rowData:zt,keyField:l,mergeSelections:wt,onSelectAllRows:Dt})),fe&&!Ae&&o.createElement(Ce,null),it.map((e=>o.createElement(ae,{key:e.id,column:e,selectedColumn:ft,disabled:V||0===Nt.length,pagination:le,paginationServer:O,persistSelectedOnSort:St,selectableRowsVisibleOnly:S,sortDirection:bt,sortIcon:Re,sortServer:Fe,onSort:Tt,onDragStart:rt,onDragOver:lt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct,draggingColumnId:at}))))),!Nt.length&&!V&&o.createElement(ke,null,ee),V&&X&&o.createElement(je,null,Q),!V&&Nt.length>0&&o.createElement(ve,{className:"rdt_TableBody",role:"rowgroup"},Rt.map(((e,t)=>{const s=d(e,l),n=function(e=""){return"number"!=typeof e&&(!e||0===e.length)}(s)?t:s,i=f(e,gt,l),a=!!(fe&&Ue&&Ue(e)),r=!!(fe&&He&&He(e));return o.createElement(Z,{id:n,key:n,keyField:l,"data-row-id":n,columns:it,row:e,rowCount:Nt.length,rowIndex:t,selectableRows:x,expandableRows:fe,expandableIcon:I,highlightOnHover:p,pointerOnHover:u,dense:m,expandOnRowClicked:$e,expandOnRowDoubleClicked:Le,expandableRowsComponent:Be,expandableRowsComponentProps:Oe,expandableRowsHideExpander:Ae,defaultExpanderDisabled:r,defaultExpanded:a,expandableInheritConditionalStyles:We,conditionalRowStyles:Ke,selected:i,selectableRowsHighlight:b,selectableRowsComponent:P,selectableRowsComponentProps:N,selectableRowDisabled:E,selectableRowsSingle:y,striped:c,onRowExpandToggled:T,onRowClicked:Ft,onRowDoubleClicked:Bt,onRowMouseEnter:Ot,onRowMouseLeave:Ht,onSelectedRow:It,draggingColumnId:at,onDragStart:rt,onDragOver:lt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct})})))))),Ct&&o.createElement("div",null,o.createElement(kt,{onChangePage:At,onChangeRowsPerPage:Mt,rowCount:A||Nt.length,currentPage:ht,rowsPerPage:mt,direction:et,paginationRowsPerPageOptions:L,paginationIconLastPage:U,paginationIconFirstPage:W,paginationIconNext:G,paginationIconPrevious:q,paginationComponentOptions:Y})))}));t.Ay=Ze},833:e=>{e.exports=function(e,t,s,n){var i=s?s.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!o(c))return!1;var d=e[c],p=t[c];if(!1===(i=s?s.call(n,d,p,c):void 0)||void 0===i&&d!==p)return!1}return!0}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return s[e](a,a.exports,i),a.exports}i.m=s,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,s)=>(i.f[s](e,t),t)),[])),i.u=e=>(({42:"reactPlayerTwitch",85:"reactPlayerTiktok",173:"reactPlayerVimeo",262:"reactPlayerHls",340:"reactPlayerWistia",353:"reactPlayerPreview",395:"reactPlayerDash",446:"reactPlayerYouTube",723:"reactPlayerMux",771:"reactPlayerSpotify"}[e]||e)+".js?ver="+{42:"47a773c791ecd21eee66",85:"dded45775e12c040609a",173:"bb811d69483435f187ed",262:"58ee61ffc2dac6d20ecc",303:"55c013d91cad46be7915",340:"f10c3e337b4ab3dfce0f",353:"2b3c86b6e416aadf4f56",394:"26ce6b979834bc7bc288",395:"21f211b9595fa18ae2ae",446:"1a6a37eba4e92b12bf1c",723:"aeb3640f9ee7783b59fd",771:"0da202a6d0ffa5db029f"}[e]),i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="simplystatic-settings:",i.l=(s,n,a,r)=>{if(e[s])e[s].push(n);else{var o,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==s||p.getAttribute("data-webpack")==t+a){o=p;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,i.nc&&o.setAttribute("nonce",i.nc),o.setAttribute("data-webpack",t+a),o.src=s),e[s]=[n];var u=(t,n)=>{o.onerror=o.onload=null,clearTimeout(m);var i=e[s];if(delete e[s],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach((e=>e(n))),t)return t(n)},m=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),l&&document.head.appendChild(o)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={57:0};i.f.j=(t,s)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)s.push(n[2]);else{var a=new Promise(((s,i)=>n=e[t]=[s,i]));s.push(n[2]=a);var r=i.p+i.u(t),o=new Error;i.l(r,(s=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=s&&("load"===s.type?"missing":s.type),r=s&&s.target&&s.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+r+")",o.name="ChunkLoadError",o.type=a,o.request=r,n[1](o)}}),"chunk-"+t,t)}};var t=(t,s)=>{var n,a,[r,o,l]=s,c=0;if(r.some((t=>0!==e[t]))){for(n in o)i.o(o,n)&&(i.m[n]=o[n]);l&&l(i)}for(t&&t(s);c<r.length;c++)a=r[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},s=globalThis.webpackChunksimplystatic_settings=globalThis.webpackChunksimplystatic_settings||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})(),i.nc=void 0,(()=>{"use strict";const e=window.wp.element,t=window.wp.apiFetch;var s=i.n(t),n=i(609),a=i.n(n);function r(e,t){const s=(0,n.useRef)();(0,n.useEffect)((()=>{s.current=e}),[e]),(0,n.useEffect)((()=>{if(null!==t){let e=setInterval((function(){s.current()}),t);return()=>clearInterval(e)}}),[t])}const o=window.ReactJSXRuntime,{__}=wp.i18n,l=(0,e.createContext)(),c=function(t){const[n,i]=(0,e.useState)(!1),[a,c]=(0,e.useState)(0),[d,p]=(0,e.useState)(!1),[u,m]=(0,e.useState)(!1),[h,g]=(0,e.useState)(!1),[x,y]=(0,e.useState)({}),[f,b]=(0,e.useState)({}),[_,v]=(0,e.useState)("yes"),[S,j]=(0,e.useState)(1),[w,C]=(0,e.useState)([]),[k,E]=(0,e.useState)(!0),P=()=>{s()({path:"/simplystatic/v1/settings"}).then((e=>{y(e)}))},N=()=>{s()({path:"/simplystatic/v1/is-running",method:"GET"}).then((e=>{var t=JSON.parse(e);i(t.running),p(t.paused),t.delayed&&c(t.delayed_until)}))};function R(e){try{const t=options&&options.integrations;if(!t)return null;if(Array.isArray(t)){for(let s=0;s<t.length;s++){const n=t[s];if(n&&n.id===e)return n}return null}return t[e]||null}catch(e){return null}}const T=e=>{const t=R(e);return!(!t||!t.requires_ui_reload)},D=e=>w.indexOf(e)>=0,I=e=>{let t=x.integrations;return!(!1===t||!t||!Array.isArray(t))&&t.indexOf(e)>=0};return r((()=>{c(a-1)}),a>0?1e3:null),r((()=>{N()}),n||a?5e3:null),(0,e.useEffect)((()=>{options.current_settings?y(options.current_settings):P(),s()({path:"/simplystatic/v1/system-status"}).then((e=>{b(e),s()({path:"/simplystatic/v1/system-status/passed"}).then((e=>{let t=JSON.parse(e);v(t.passed)}))})),N(),j(options.blog_id)}),[]),(0,o.jsx)(l.Provider,{value:{settings:x,configs:f,passedChecks:_,settingsSaved:h,setSettingsSaved:g,updateSetting:(e,t)=>{y((s=>({...s,[e]:t})))},setSettings:y,saveSettings:()=>{const e=w&&w.length>0;return s()({path:"/simplystatic/v1/settings",method:"POST",data:x}).then((t=>(C([]),{resp:t,shouldReload:e})))},resetSettings:()=>{s()({path:"/simplystatic/v1/settings/reset",method:"POST"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&y(t.data)}))},resetDatabase:()=>{s()({path:"/simplystatic/v1/settings/reset-database",method:"POST"})},resetBackgroundQueue:()=>{s()({path:"/simplystatic/v1/settings/reset-background-queue",method:"POST"})},getSettings:P,updateFromNetwork:e=>{s()({path:"/simplystatic/v1/update-from-network",method:"POST",data:{blog_id:e}})},importSettings:e=>{y(e),s()({path:"/simplystatic/v1/settings",method:"POST",data:e})},migrateSettings:()=>{s()({path:"/simplystatic/v1/migrate",method:"POST",migrate:!0})},resetDiagnostics:()=>{s()({path:"/simplystatic/v1/reset-diagnostics",method:"POST"})},isRunning:n,setIsRunning:i,isPaused:d,setIsPaused:p,setIsResumed:m,isResumed:u,blogId:S,setBlogId:j,isPro:()=>!!options.is_multisite||!!options.connect&&!!options.connect.is_connected,isStudio:()=>!!/(static\d*|onstatic)\.studio/.test(options.home)||!!options.version_studio,isIntegrationActive:I,canRunIntegration:e=>!!I(e)&&!D(e),maybeQueueIntegration:e=>{T(e)&&(D(e)||C((t=>t&&t.indexOf(e)>=0?t:[...t||[],e])))},maybeUnqueueIntegration:e=>{T(e)&&D(e)&&C((t=>(t||[]).filter((t=>t!==e))))},isQueuedIntegration:D,getIntegrationById:R,showMobileNav:k,setShowMobileNav:E,isDelayed:a},children:t.children})},d=window.wp.components,p=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,u=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,m=/\.(m3u8)($|\?)/i,h=/\.(mpd)($|\?)/i,g=/stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/,x=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,y=/vimeo\.com\/(?!progressive_redirect).+/,f=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,b=/open\.spotify\.com\/(\w+)\/(\w+)/i,_=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/,v=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,S=(e,t)=>{if(Array.isArray(e)){for(const s of e){if("string"==typeof s&&S(s,t))return!0;if(S(s.src,t))return!0}return!1}return t(e)},j={html:e=>S(e,(e=>p.test(e)||u.test(e))),hls:e=>S(e,(e=>m.test(e))),dash:e=>S(e,(e=>h.test(e))),mux:e=>g.test(e),youtube:e=>x.test(e),vimeo:e=>y.test(e)&&!u.test(e)&&!m.test(e),wistia:e=>f.test(e),spotify:e=>b.test(e),twitch:e=>_.test(e),tiktok:e=>v.test(e)};var w=n.forwardRef(((e,t)=>{const s=p.test(`${e.src}`)?"audio":"video";return n.createElement(s,{...e,ref:t},e.children)})),C=[{key:"hls",name:"hls.js",canPlay:j.hls,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>Promise.all([i.e(394),i.e(262)]).then(i.bind(i,805))))},{key:"dash",name:"dash.js",canPlay:j.dash,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>i.e(395).then(i.bind(i,517))))},{key:"mux",name:"Mux",canPlay:j.mux,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>Promise.all([i.e(394),i.e(723)]).then(i.bind(i,979))))},{key:"youtube",name:"YouTube",canPlay:j.youtube,player:(0,n.lazy)((()=>i.e(446).then(i.bind(i,808))))},{key:"vimeo",name:"Vimeo",canPlay:j.vimeo,player:(0,n.lazy)((()=>i.e(173).then(i.bind(i,183))))},{key:"wistia",name:"Wistia",canPlay:j.wistia,canEnablePIP:()=>!0,player:(0,n.lazy)((()=>i.e(340).then(i.bind(i,868))))},{key:"spotify",name:"Spotify",canPlay:j.spotify,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(771).then(i.bind(i,653))))},{key:"twitch",name:"Twitch",canPlay:j.twitch,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(42).then(i.bind(i,682))))},{key:"tiktok",name:"TikTok",canPlay:j.tiktok,canEnablePIP:()=>!1,player:(0,n.lazy)((()=>i.e(85).then(i.bind(i,188))))},{key:"html",name:"html",canPlay:j.html,canEnablePIP:()=>!0,player:w}];const k={width:"320px",height:"180px",volume:1,playbackRate:1,previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}"},E=n.forwardRef(((e,t)=>{const{playing:s,pip:i}=e,a=e.activePlayer,r=(0,n.useRef)(null),o=(0,n.useRef)(!0);if((0,n.useEffect)((()=>{var t,n;r.current&&(r.current.paused&&!0===s&&r.current.play(),r.current.paused||!1!==s||r.current.pause(),r.current.playbackRate=null!=(t=e.playbackRate)?t:1,r.current.volume=null!=(n=e.volume)?n:1)})),(0,n.useEffect)((()=>{var e,t,s,n,a;if(r.current&&globalThis.document){if(i&&!document.pictureInPictureElement)try{null==(t=(e=r.current).requestPictureInPicture)||t.call(e)}catch(e){}if(!i&&document.pictureInPictureElement)try{null==(n=(s=r.current).exitPictureInPicture)||n.call(s),null==(a=document.exitPictureInPicture)||a.call(document)}catch(e){}}}),[i]),!a)return null;const l={},c=["onReady","onStart"];for(const t in e)t.startsWith("on")&&!c.includes(t)&&(l[t]=e[t]);return n.createElement(a,{...l,style:e.style,className:e.className,slot:e.slot,ref:(0,n.useCallback)((e=>{r.current=e,"function"==typeof t?t(e):null!==t&&(t.current=e)}),[t]),src:e.src,crossOrigin:e.crossOrigin,preload:e.preload,controls:e.controls,muted:e.muted,autoPlay:e.autoPlay,loop:e.loop,playsInline:e.playsInline,config:e.config,onLoadStart:t=>{var s,n;o.current=!0,null==(s=e.onReady)||s.call(e),null==(n=e.onLoadStart)||n.call(e,t)},onPlay:t=>{var s,n;o.current&&(o.current=!1,null==(s=e.onStart)||s.call(e,t)),null==(n=e.onPlay)||n.call(e,t)}},e.children)}));E.displayName="Player";var P=E;const N=(0,n.lazy)((()=>i.e(353).then(i.bind(i,924)))),R=[],T=({children:e})=>e;var D=((e,t)=>{const s=n.forwardRef(((s,i)=>{const a={...k,...s},{src:r,slot:o,className:l,style:c,width:d,height:p,fallback:u,wrapper:m}=a,[h,g]=(0,n.useState)(!!a.light);(0,n.useEffect)((()=>{a.light?g(!0):g(!1)}),[a.light]);const x=e=>{var t;g(!1),null==(t=a.onClickPreview)||t.call(a,e)},y=null==m?T:m,f=!1===u?T:n.Suspense;return n.createElement(y,{slot:o,className:l,style:{width:d,height:p,...c}},n.createElement(f,{fallback:u},h?(e=>{if(!e)return null;const{light:t,playIcon:s,previewTabIndex:i,oEmbedUrl:r,previewAriaLabel:o}=a;return n.createElement(N,{src:e,light:t,playIcon:s,previewTabIndex:i,previewAriaLabel:o,oEmbedUrl:r,onClickPreview:x})})(r):(s=>{var r,c;const d=(s=>{for(const t of[...R,...e])if(s&&t.canPlay(s))return t;return t||null})(s);if(!d)return null;const{style:p,width:u,height:m,wrapper:h}=a,g=null==(r=a.config)?void 0:r[d.key];return n.createElement(P,{...a,ref:i,activePlayer:null!=(c=d.player)?c:d,slot:h?void 0:o,className:h?void 0:l,style:h?{display:"block",width:"100%",height:"100%"}:{display:"block",width:u,height:m,...p},config:g})})(r)))}));return s.displayName="ReactPlayer",s.addCustomPlayer=e=>{R.push(e)},s.removeCustomPlayers=()=>{R.length=0},s.canPlay=t=>{if(t)for(const s of[...R,...e])if(s.canPlay(t))return!0;return!1},s.canEnablePIP=t=>{var s;if(t)for(const n of[...R,...e])if(n.canPlay(t)&&(null==(s=n.canEnablePIP)?void 0:s.call(n)))return!0;return!1},s})(C,C[C.length-1]);const{__:I}=wp.i18n,F=function({title:t,videoUrl:s}){const[n,i]=(0,e.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[n&&(0,o.jsx)("div",{className:"simply-static-video-modal-background",children:(0,o.jsx)(d.Modal,{title:t,className:"simply-static-video-modal",onRequestClose:()=>i(!1),children:(0,o.jsx)(D,{src:s,controls:!0,width:"920px",height:"560px",playsInline:!0})})}),(0,o.jsx)(d.Button,{variant:"link",className:"simply-static-video-button",onClick:()=>i(!0),children:(0,o.jsx)(d.Dashicon,{icon:"format-video"})})]})},{__:B}=wp.i18n,O=function(){var t;const{settings:n,updateSetting:i,saveSettings:a,settingsSaved:r,setSettingsSaved:c,isPro:p,isRunning:u,setIsRunning:m,isStudio:h}=(0,e.useContext)(l),[g,x]=(0,e.useState)("relative"),[y,f]=(0,e.useState)(!1),[b,_]=(0,e.useState)("https://"),[v,S]=(0,e.useState)(""),[j,w]=(0,e.useState)("/"),[C,k]=(0,e.useState)(!1),[E,P]=(0,e.useState)(!1),[N,R]=(0,e.useState)(!1),[T,D]=(0,e.useState)(!1),[I,O]=(0,e.useState)(!1),[H,A]=(0,e.useState)(!1),[M,z]=(0,e.useState)([]),[$,L]=(0,e.useState)([]),[U,W]=(0,e.useState)(null),[G,q]=(0,e.useState)([]),[J,Y]=(0,e.useState)([]),[K,V]=(0,e.useState)(null),[Q,Z]=(0,e.useState)([]),[X,ee]=(0,e.useState)([]),[te,se]=(0,e.useState)(null),[ne,ie]=(0,e.useState)([]),[ae,re]=(0,e.useState)([]),[oe,le]=(0,e.useState)(null),[ce,de]=(0,e.useState)([]);return(0,e.useEffect)((()=>{W(null),s()({path:"/simplystatic/v1/crawlers",parse:!0}).then((e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void W("Error parsing API response: "+e.message)}if(e&&e.data&&e.data.length>0){const t=e.data.filter((e=>e.can_run));if(z(t),n.crawlers&&Array.isArray(n.crawlers)&&0!==n.crawlers.length){if(Array.isArray(n.crawlers)){const e=n.crawlers.filter((e=>t.some((t=>t.id===e))));if(0===e.length){const e=t.map((e=>e.id));L(e),i("crawlers",e)}else L(e)}}else{const e=t.filter((e=>e.active)).map((e=>e.id));L(e),i("crawlers",e)}}else W("Invalid API response structure or empty crawlers array")})).catch((e=>{W("Error fetching crawlers: "+(e.message||"Unknown error"))})),V(null),s()({path:"/simplystatic/v1/post-types",parse:!0}).then((e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void V("Error parsing API response: "+e.message)}if(e&&e.data&&e.data.length>0)if(q(e.data),n.post_types&&Array.isArray(n.post_types)){if(Array.isArray(n.post_types)){const t=n.post_types.filter((t=>e.data.some((e=>e.name===t))));if(0===t.length){const t=e.data.map((e=>e.name));Y(t),i("post_types",t)}else Y(t)}}else{const t=e.data.map((e=>e.name));Y(t),i("post_types",t)}else V("Invalid API response structure or empty post types array")})).catch((e=>{V("Error fetching post types: "+(e.message||"Unknown error"))})),se(null),s()({path:"/simplystatic/v1/active-plugins",parse:!0}).then((e=>{"string"==typeof e&&(e=JSON.parse(e));const t=Array.isArray(e?.data)?e.data:[];Z(t);const s=Array.isArray(n.plugins_to_include)?n.plugins_to_include:[],a=t.map((e=>e.slug)),r=s.filter((e=>a.includes(e))),o=r.length>0?r:a;ee(o),i("plugins_to_include",o)})).catch((e=>se(e?.message||"Unknown error"))),le(null),s()({path:"/simplystatic/v1/active-themes",parse:!0}).then((e=>{"string"==typeof e&&(e=JSON.parse(e));const t=Array.isArray(e?.data)?e.data:[];ie(t);const s=Array.isArray(n.themes_to_include)?n.themes_to_include:[],a=t.map((e=>e.slug)),r=s.filter((e=>a.includes(e))),o=r.length>0?r:a;re(o),i("themes_to_include",o)})).catch((e=>le(e?.message||"Unknown error"))),s()({path:"/simplystatic/v1/pages"}).then((e=>{let t=e||[];t.unshift({label:B("No page selected","simply-static"),value:0}),de(t)})).catch((()=>{de([])}))}),[]),(0,e.useEffect)((()=>{n.destination_url_type&&x(n.destination_url_type),n.destination_scheme&&_(n.destination_scheme),n.destination_host&&S(n.destination_host),n.relative_path&&w(n.relative_path),(n.use_forms||n.use_comments)&&f(!0),n.force_replace_url&&k(n.force_replace_url),n.generate_404&&R(n.generate_404),n.add_feeds&&O(n.add_feeds),n.add_rest_api&&A(n.add_rest_api),n.smart_crawl&&D(n.smart_crawl),n.crawlers&&L(n.crawlers),void 0!==n.post_types&&Y(Array.isArray(n.post_types)?n.post_types:[])}),[n]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Replacing URLs","simply-static"),(0,o.jsx)(F,{title:B("How to replace URLs","simply-static"),videoUrl:"https://youtu.be/cb8jAMJlfGI"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:B("When exporting your static site, any links to your WordPress site will be replaced by one of the following: absolute URLs, relative URLs, or URLs contructed for offline use.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:B("Replacing URLs","simply-static"),value:g,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:h(),options:[{label:B("Absolute URLs","simply-static"),value:"absolute"},{label:B("Relative Path","simply-static"),value:"relative"},{label:B("Offline Usage","simply-static"),value:"offline"}],onChange:e=>{x(e),i("destination_url_type",e)}}),"absolute"===g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:"15%",marginTop:"15px"},children:(0,o.jsx)(d.SelectControl,{label:B("Scheme","simply-static"),value:b,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:h(),options:[{label:"https://",value:"https://"},{label:"http://",value:"http://"},{label:"//",value:"//"}],onChange:e=>{_(e),i("destination_scheme",e)}})}),(0,o.jsx)(d.FlexItem,{style:{minWidth:"85%"},children:(0,o.jsx)(d.TextControl,{label:B("Host","simply-static"),type:"text",placeholder:"example.com",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:v,onChange:e=>{S(e),i("destination_host",e)}})})]}),(0,o.jsx)("p",{children:B("Convert all URLs for your WordPress site to absolute URLs at the domain specified above.","simply-static")})]}),"relative"===g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:B("Path","simply-static"),type:"text",placeholder:"/",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:j,onChange:e=>{w(e),i("relative_path",e)}}),(0,o.jsxs)("p",{children:[B("Convert all URLs for your WordPress site to relative URLs that will work at any domain.","simply-static"),(0,o.jsx)("br",{}),B("Optionally specify a path above if you intend to place the files in a subdirectory.","simply-static")]}),(0,o.jsxs)(d.Notice,{status:"warning",isDismissible:!1,children:[(0,o.jsxs)("b",{children:[B("Example","simply-static"),": "]}),B("enter /path above if you wanted to serve your files at www.example.com/path/","simply-static")]})]}),"offline"===g&&(0,o.jsx)("p",{children:B("Convert all URLs for your WordPress site so that you can browse the site locally on your own computer without hosting it on a web server.","simply-static")}),!y&&(0,o.jsx)(d.ToggleControl,{label:B("Force URL replacements","simply-static"),__nextHasNoMarginBottom:!0,help:B(C?"Replace all occurrences of the WordPress URL with the static URL (includes inline CSS and JS).":"Replace only occurrences of the WordPress URL that match our tag list.","simply-static"),checked:C,onChange:e=>{k(e),i("force_replace_url",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Enhanced Crawl","simply-static"),(0,o.jsx)(F,{title:B("How Enhanced Crawl improves your static exports","simply-static"),videoUrl:"https://youtu.be/QfKxeQ1w7tU"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:B("Enhanced Crawl uses native WordPress functions to find all pages and files when running a static export.","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Enable Enhanced Crawl","simply-static")}),help:B(T?"Find pages and files via Enhanced Crawl.":"Don't find pages and files via Enhanced Crawl.","simply-static"),checked:T,onChange:e=>{D(e),i("smart_crawl",e)}}),T&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:2}),U&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading crawlers: ","simply-static")," ",U]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),M.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Active Crawlers","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:$.map((e=>{const t=M.find((t=>t.id===e));return t?t.name:e})),suggestions:M.map((e=>e.name)),onChange:e=>{const t=e.map((e=>{let t=M.find((t=>t.name===e));return t||(t=M.find((t=>t.name.toLowerCase()===(e||"").toLowerCase()))),t||(t=M.find((t=>t.id===e))),t?t.id:null})).filter((e=>!!e&&M.some((t=>t.id===e))));L(t),i("crawlers",t)},help:B("Select which crawlers to activate. If none selected, all crawlers will be active by default.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),$.includes("post_type")&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:2}),K&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading post types: ","simply-static")," ",K]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),G.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Post Types to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:Array.isArray(J)?J.map((e=>{const t=G.find((t=>t.name===e));return t?t.label:e})):[],suggestions:G.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=G.find((t=>t.label===e));return t||(t=G.find((t=>t.label.toLowerCase()===e.toLowerCase()))),t||(t=G.find((t=>t.name===e))),t?t.name:e}));Y(t),i("post_types",t)},help:B("Select which post types to include in the static export. If you remove all selections, all post types will be included by default.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}):(0,o.jsx)("p",{children:B("Loading post types...","simply-static")})]}),$.includes("plugin_assets")&&(0,o.jsxs)(o.Fragment,{children:[te&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading plugins: ","simply-static")," ",te]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),Q.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:B("Plugins to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!p(),value:Array.isArray(X)?X.map((e=>{const t=Q.find((t=>t.slug===e));return t?t.label:e})):[],suggestions:Q.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=Q.find((t=>t.label===e))||Q.find((t=>t.label.toLowerCase()===String(e).toLowerCase()))||Q.find((t=>t.slug===e));return t?t.slug:e}));ee(t),i("plugins_to_include",t)},help:B("Select which active plugins to include. All active plugins are included by default; remove tokens to exclude them.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),!p()&&(0,o.jsxs)(d.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",B("Requires Simply Static Pro","simply-static")]})]}):(0,o.jsx)("p",{children:B("Loading plugins...","simply-static")})]}),$.includes("theme_assets")&&(0,o.jsxs)(o.Fragment,{children:[oe&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,children:[B("Error loading themes: ","simply-static")," ",oe]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}),ne.length>0?(0,o.jsxs)(o.Fragment,{children:[p()&&(0,o.jsx)(d.__experimentalSpacer,{margin:"5px"}),(0,o.jsx)(d.FormTokenField,{label:B("Themes to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!p(),value:Array.isArray(ae)?ae.map((e=>{const t=ne.find((t=>t.slug===e));return t?t.label:e})):[],suggestions:ne.map((e=>e.label)),onChange:e=>{const t=e.map((e=>{let t=ne.find((t=>t.label===e))||ne.find((t=>t.label.toLowerCase()===String(e).toLowerCase()))||ne.find((t=>t.slug===e));return t?t.slug:e}));re(t),i("themes_to_include",t)},help:B("Select which theme(s) to include. The active theme and parent (if any) are included by default; remove tokens to exclude them.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field"}),!p()&&(0,o.jsxs)(d.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",B("Requires Simply Static Pro","simply-static")]}),(0,o.jsx)(d.__experimentalSpacer,{margin:2})]}):(0,o.jsx)("p",{children:B("Loading themes...","simply-static")})]}),(0,o.jsx)("div",{className:"crawler-descriptions",children:M.map((e=>(0,o.jsx)("div",{className:"crawler-description",children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{className:"crawler-name",children:(0,o.jsxs)("strong",{children:[e.name,":"]})}),(0,o.jsx)(d.FlexItem,{children:e.description})]})},e.id)))})]}):(0,o.jsx)("p",{children:B("Loading crawlers...","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("404","simply-static"),(0,o.jsx)(F,{title:B("How to manage 404 pages?","simply-static"),videoUrl:"https://youtu.be/dnRtuQrXG-k"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Generate 404 Page?","simply-static")}),help:B(N?"Generate a 404 page based on your theme template.":"Don't generate a 404 page.","simply-static"),checked:N,onChange:e=>{R(e),i("generate_404",e)}}),N&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.SelectControl,{label:(0,o.jsx)(o.Fragment,{children:p&&"function"==typeof p&&p()?(0,o.jsx)(o.Fragment,{children:B("Custom 404 page (optional)","simply-static")}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{style:{position:"relative",bottom:"-15px"},children:B("Custom 404 page (optional)","simply-static")}),(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:B("Requires Simply Static Pro","simply-static")})]})}),value:null!==(t=n.custom_404_page)&&void 0!==t?t:0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:ce,disabled:!(p&&"function"==typeof p&&p()),onChange:e=>{i("custom_404_page",e)},help:B("If selected, Simply Static will use the content of this page for the 404 page instead of the theme default.","simply-static")}),!(!p||"function"!=typeof p)&&p()&&(0,o.jsx)(d.Button,{variant:"secondary",disabled:u,isBusy:u,onClick:()=>{u||(m(!0),s()({path:"/simplystatic/v1/export-404",method:"POST"}).then((e=>{try{e&&!1===e.success&&e.message?alert(e.message):window.location.reload()}catch(e){window.location.reload()}})).catch((()=>{m(!1),alert(B("Failed to start 404 export.","simply-static"))})))},children:B("Export 404 Page","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Include","simply-static"),(0,o.jsx)(F,{title:B("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextareaControl,{label:B("Additional URLs","simply-static"),placeholder:options.home+"/hidden-page/\n/\\/blog\\/.*$/i ",__nextHasNoMarginBottom:!0,help:B("You can enter full URLs or regex (wrap with / /). Examples: https://example.com/private/ or /\\/blog\\/.*$/i (one per line).","simply-static"),value:n.additional_urls,onChange:e=>{i("additional_urls",e)}}),(0,o.jsx)(d.TextareaControl,{label:B("Additional Files and Directories","simply-static"),placeholder:options.home_path+"additional-directory/\n"+options.home_path+"additional-file.html\n/\\.pdf$/i",__nextHasNoMarginBottom:!0,help:B("Enter absolute paths or regex (wrap with / /). Examples: /\\.pdf$/i or /wp-content\\/uploads\\/reports\\/.*/ (one per line).","simply-static"),value:n.additional_files,onChange:e=>{i("additional_files",e)}}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{try{navigator.clipboard.writeText(options.home_path),P(!0),setTimeout((()=>P(!1)),1500)}catch(e){console.error("Clipboard copy failed",e)}},children:B(E?"Copied home path":"Copy home path","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Include RSS Feeds?","simply-static")}),help:B(I?"Include feed URLs of all your posts.":"Don't include feed URLs for all your posts.","simply-static"),checked:I,onChange:e=>{O(e),i("add_feeds",e)}}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.jsx)(o.Fragment,{children:B("Include Rest API?","simply-static")}),help:B(H?"Include all Rest API endpoints as JSON files.":"Don't include Rest API endpoints as JSON files.","simply-static"),checked:H,onChange:e=>{A(e),i("add_rest_api",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[B("Exclude","simply-static"),(0,o.jsx)(F,{title:B("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextareaControl,{label:B("Urls to exclude","simply-static"),placeholder:"/some-directory/\n.jpg\n/\\.(pdf|zip)$/i\n/\\/private\\/.*/",__nextHasNoMarginBottom:!0,help:B("You can enter substrings or regex (wrap with / /). Examples: .jpg or /\\.(pdf|zip)$/i or //private/.*/ (one per line).","simply-static"),value:n.urls_to_exclude,onChange:e=>{i("urls_to_exclude",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:B("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{a(),c(!0),setTimeout((function(){c(!1)}),2e3)},variant:"primary",children:B("Save Settings","simply-static")})})]})},{__:H}=wp.i18n,A=function(){const{configs:t,resetDiagnostics:s}=(0,e.useContext)(l),[n,i]=(0,e.useState)(!1);return(0,o.jsx)("div",{className:"inner-settings",children:(0,o.jsxs)("div",{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[H("Diagnostics","simply-static"),(0,o.jsx)(F,{title:H("How to use diagnostics","simply-static"),videoUrl:"https://youtu.be/X59YMlz6F2s"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:H("Our diagnostics tool provides detailed insights into your WordPress installation and server configuration and tells you exactly what needs to be optimized to get the most out of Simply Static. Click the button below to get the latest results.","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{s(),i(!0),setTimeout((function(){window.location.reload()}),2e3)},variant:"secondary",children:H("Reset Diagnostics","simply-static")})}),n?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:H("Diagnostics resetted successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),Object.keys(t).map((e=>{const s=t[e];return(0,o.jsxs)("div",{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:e})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("div",{children:(0,o.jsx)("table",{style:{width:"100%",tableLayout:"fixed"},children:(0,o.jsx)("tbody",{className:"table-data",children:Object.entries(s).map((e=>(0,o.jsxs)("tr",{className:"table-row",children:[(0,o.jsxs)("td",{className:"diagnostics-icon",children:[" ",e[1].test?(0,o.jsx)(d.Dashicon,{className:"icon-yes",icon:"yes"}):(0,o.jsx)(d.Dashicon,{className:"icon-no",icon:"no"})]}),(0,o.jsx)("td",{className:"diagnostics-test",children:(0,o.jsx)("b",{children:e[0]})}),(0,o.jsx)("td",{children:e[1].test}),(0,o.jsxs)("td",{className:"diagnostics-result",children:[" ",e[1].test?(0,o.jsx)("p",{children:e[1].description}):(0,o.jsx)("p",{children:e[1].error})]})]},e[0])))})})})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]},e)}))]})})},{__:M}=wp.i18n,z=function(){const{settings:t,importSettings:s,saveSettings:n,resetSettings:i,migrateSettings:a,resetDatabase:r,resetBackgroundQueue:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)(!1),[m,h]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!1),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[j,w]=(0,e.useState)(!1),[C,k]=(0,e.useState)(""),[E,P]=(0,e.useState)(!1),[N,R]=(0,e.useState)(""),[T,D]=(0,e.useState)(!1);return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[M("Export","simply-static"),(0,o.jsx)(F,{title:M("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,o.jsx)(d.CardBody,{children:p?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(o.Fragment,{children:[E&&(0,o.jsx)("p",{children:M("Preparing export...","simply-static")}),N&&(0,o.jsx)(d.Notice,{status:"error",isDismissible:!0,children:(0,o.jsx)("p",{children:N})}),!E&&!N&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{marginBottom:"12px"},children:(0,o.jsx)("textarea",{className:"ss-export-textarea",value:C,readOnly:!0,style:{width:"100%",height:"300px",fontFamily:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:"12px",whiteSpace:"pre",overflow:"auto",boxSizing:"border-box"}})}),(0,o.jsx)("p",{children:(0,o.jsx)(d.ClipboardButton,{variant:"secondary",text:C,onCopy:()=>S(!0),onFinishCopy:()=>S(!1),children:M(v?"Copied!":"Copy export data","simply-static")})})]})]})}):(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{u(!0),P(!0),R(""),wp.apiFetch({path:"/simplystatic/v1/settings/export",method:"GET"}).then((e=>{try{let t=e;"string"==typeof e&&(t=JSON.parse(e));const s=JSON.stringify(t||{},null,2);k(s)}catch(e){R(M("Failed to prepare export JSON.","simply-static")),k("")}})).catch((()=>{R(M("Failed to fetch export data.","simply-static")),k("")})).finally((()=>P(!1)))},variant:"primary",children:M("Export Settings","simply-static")})})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[M("Import","simply-static"),(0,o.jsx)(F,{title:M("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M("Paste in the JSON string you got from your export to import all settings for the plugin.","simply-static")}),(0,o.jsx)("textarea",{rows:"8",name:"import-data",onChange:e=>{w(JSON.parse(e.target.value))}}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{s(j),h(!0),setTimeout((function(){h(!1)}),2e3)},variant:"primary",children:M("Import Settings","simply-static")})}),m?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings imported successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:M("Reset","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M('By clicking the "Reset Plugin Settings", you will reset all plugin settings. This can be useful if you want to import a new set of settings or you want a fresh start.',"simply-static")}),(0,o.jsx)("p",{children:M('If you click the "Reset Database Table" button instead, you will keep all your settings, and we will only recreate our DB table.',"simply-static")}),(0,o.jsx)("p",{children:M('If the background process is stuck and your debug log shows "There is already an export running", use the "Reset Background Queue" button to clear the queue and locks.',"simply-static")}),(0,o.jsxs)("p",{children:[(0,o.jsx)(d.Button,{onClick:()=>{i(),x(!0),setTimeout((function(){x(!1)}),2e3)},variant:"primary",children:M("Reset Plugin Settings","simply-static")}),(0,o.jsx)(d.Button,{onClick:()=>{r(),f(!0),setTimeout((function(){f(!1)}),2e3)},className:"reset-db-btn",variant:"primary",children:M("Reset Database Table","simply-static")}),(0,o.jsx)(d.Button,{onClick:()=>{c(),D(!0),setTimeout((()=>D(!1)),2e3)},className:"reset-bg-btn",variant:"primary",children:M("Reset Background Queue","simply-static")})]}),g?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings resetted successfully.","simply-static")})})}):"",y?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Database table resetted successfully.","simply-static")})})}):"",T?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Background queue reset successfully.","simply-static")})})}):""]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:M("Migrate Settings","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:M("Migrate all of your settings to Simply Static 3.0","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)(d.Button,{onClick:()=>{a(),n(),_(!0),setTimeout((function(){_(!1),location.reload()}),2e3)},variant:"primary",children:M("Migrate settings","simply-static")})}),b?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:M("Settings migration successfully.","simply-static")})})}):""]})]})]})},{__:$}=wp.i18n,L=function(){var t;const{settings:n,updateSetting:i,saveSettings:a,settingsSaved:r,setSettingsSaved:c,isRunning:p,isPro:u,isStudio:m}=(0,e.useContext)(l),[h,g]=(0,e.useState)("zip"),[x,y]=(0,e.useState)(!1),[f,b]=(0,e.useState)("personal"),[_,v]=(0,e.useState)("private"),[S,j]=(0,e.useState)(!1),[w,C]=(0,e.useState)(!1),[k,E]=(0,e.useState)("us-east-2"),[P,N]=(0,e.useState)("aws-iam-key"),[R,T]=(0,e.useState)(!1),[D,I]=(0,e.useState)(!1),[B,O]=(0,e.useState)(!1),[H,A]=(0,e.useState)(!1),[M]=(0,e.useState)([{label:$("ZIP Archive","simply-static"),value:"zip"},{label:$("Local Directory","simply-static"),value:"local"},{label:$("Static Studio","simply-static"),value:"simply-static-studio"},{label:$("SFTP","simply-static"),value:"sftp"},{label:$("GitHub","simply-static"),value:"github"},{label:$("AWS S3","simply-static"),value:"aws-s3"},{label:$("Bunny CDN","simply-static"),value:"cdn"},{label:$("Tiiny.host","simply-static"),value:"tiiny"}]),z=()=>{a(),c(!0),O(!1),setTimeout((function(){c(!1)}),2e3)};return(0,e.useEffect)((()=>{n.delivery_method&&g(n.delivery_method),n.clear_directory_before_export&&y(n.clear_directory_before_export),n.github_account_type&&b(n.github_account_type),n.github_repository_visibility&&v(n.github_repository_visibility),n.github_repository_visibility&&v(n.github_repository_visibility),n.github_throttle_requests&&C(n.github_throttle_requests),n.aws_empty&&j(n.aws_empty),n.aws_auth_method&&N(n.aws_auth_method),n.aws_region&&E(n.aws_region),s()({path:"/simplystatic/v1/pages"}).then((e=>{let t=e;t.unshift({label:$("No page selected","simply-static"),value:0}),I(t)}))}),[n]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:$("Deployment Settings","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:$("Choose from a variety of deployment methods. Depending on your selection we either provide a ZIP file, export to a local directory or send your files to a remote destination.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:$("Deployment method","simply-static"),value:h,options:M,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{g(e),i("delivery_method",e),O(!0)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"simply-static-studio"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:$("Static Studio","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:$("The all-in-one Static WordPress cloud-hosting platform.","simply-static")}),(0,o.jsx)("p",{children:$("Enjoy secure WordPress, the fastest exports, and the best-performing static site hosting in one package.","simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{className:"button button-primary",href:"https://simplystatic.com/simply-static-studio/",target:"_blank",children:"Check out Static Studio"})})]})]}),"zip"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[$("ZIP","simply-static"),(0,o.jsx)(F,{title:$("How to export a ZIP file","simply-static"),videoUrl:"https://youtu.be/WHaFjDte6zI"})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("p",{children:$("Get a download link in the activity log once the static export has finished.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"local"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[$("Local Directory","simply-static"),(0,o.jsx)(F,{title:$("How to deploy to a local directory","simply-static"),videoUrl:"https://youtu.be/ZRdXQB5slnY"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:$("Path","simply-static"),type:"text",help:$("This is the directory where your static files will be saved. We will create it automatically on the first export if it doesn't exist.","simply-static"),placeholder:options.home_path+"public_static/",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.local_dir,onChange:e=>{i("local_dir",e)}}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{try{navigator.clipboard.writeText(options.home_path),T(!0),setTimeout((()=>T(!1)),1500)}catch(e){console.error("Clipboard copy failed",e)}},children:$(R?"Copied home path":"Copy home path","simply-static")}),(0,o.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:$("Clear Local Directory","simply-static"),help:$(x?"Clear local directory before running an export.":"Don't clear local directory before running an export.","simply-static"),checked:x,onChange:e=>{y(e),i("clear_directory_before_export",e)}})]})]}),(0,o.jsxs)(o.Fragment,{children:["github"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[$("GitHub","simply-static")," ",(0,o.jsx)(F,{title:$("How to deploy to a GitHub (2/2)","simply-static"),videoUrl:"https://youtu.be/HqyTKwZuUAM"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",$("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:$("GitHub enables you to export your static website to one of the common static hosting providers like Netlify, Cloudflare Pages or GitHub Pages.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:$("Account Type","simply-static"),value:f,help:$("Depending on the account type the settings fields will change.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:$("Personal","simply-static"),value:"personal"},{label:$("Organization","simply-static"),value:"organization"}],onChange:e=>{b(e),i("github_account_type",e)}}),"organization"===f?(0,o.jsx)(d.TextControl,{label:$("Organization","simply-static"),type:"text",help:$("Enter the name of your organization.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_user,onChange:e=>{i("github_user",e)}}):(0,o.jsx)(d.TextControl,{label:$("Username","simply-static"),type:"text",help:$("Enter your GitHub username.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_user,onChange:e=>{i("github_user",e)}}),(0,o.jsx)(d.TextControl,{label:$("E-Mail","simply-static"),type:"email",help:$("Enter your GitHub email address. This will be used to commit files to your repository.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_email,onChange:e=>{i("github_email",e)}}),(0,o.jsx)(d.TextControl,{label:(0,o.jsxs)(o.Fragment,{children:[$("Personal Access Token","simply-static"),(0,o.jsx)(F,{title:$("How to prepare your GitHub account","simply-static"),videoUrl:"https://youtu.be/fjsJJmPeKuc"})]}),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[$("You need a personal access token from GitHub. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic",target:"_blank",children:$("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_personal_access_token,onChange:e=>{i("github_personal_access_token",e)}}),(0,o.jsx)(d.TextControl,{label:$("Repository","simply-static"),type:"text",help:$("Enter a name for your repository (lowercase without spaces or special characters).","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_repository,onChange:e=>{i("github_repository",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsxs)("p",{children:[$("Ensure to create the repository and add a readme file to it before running an export as shown in the docs ","simply-static"),(0,o.jsx)("a",{href:"https://docs.simplystatic.com/article/33-set-up-the-github-integration/",target:"_blank",children:$("here","simply-static")})]})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.TextControl,{label:$("Folder","simply-static"),type:"text",help:$("Enter a relative path to a folder if you want to push files under it. Example: for github.com/USER/REPOSITORY/folder1, enter folder1","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_folder_path,onChange:e=>{i("github_folder_path",e)}}),"organization"===f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsx)("p",{children:$("You need to create the repository manually within your organization before connecting it.","simply-static")})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)(d.SelectControl,{label:$("Visiblity","simply-static"),value:_,help:$("Decide if you want to make your repository public or private.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:$("Public","simply-static"),value:"public"},{label:$("Private","simply-static"),value:"private"}],onChange:e=>{v(e),i("github_repository_visibility",e)}}),(0,o.jsx)(d.TextControl,{label:$("Branch","simply-static"),type:n.github_branch,placeholder:"main",help:$('Simply Static automatically uses "main" as branch. You may want to modify that for example to gh-pages. for GitHub Pages.',"simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_branch,onChange:e=>{i("github_branch",e)}}),(0,o.jsx)(d.TextControl,{label:$("Webhook URL","simply-static"),type:"url",help:$("Enter your Webhook URL here and Simply Static will send a POST request after all files are commited to GitHub.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.github_webhook_url,onChange:e=>{i("github_webhook_url",e)}}),(0,o.jsx)(d.ToggleControl,{label:$("Throttle Requests","simply-static"),help:$("Enable this option if you are experiencing issues with the GitHub API rate limit.","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,checked:w,onChange:e=>{C(e),i("github_throttle_requests",e)}}),(0,o.jsx)(d.TextControl,{label:$("Batch size","simply-static"),type:"number",help:$("Enter the number of files you want to be processed in a single batch. If current export fails to deploy, lower the number.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!==(t=n.github_batch_size)&&void 0!==t?t:100,onChange:e=>{i("github_batch_size",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"tiiny"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[$("Tiiny.host","simply-static")," ",(0,o.jsx)(F,{title:$("How to deploy to Tiiny.host","simply-static"),videoUrl:"https://youtu.be/Y9EDaQkGl1Y"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",$("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:$("Deploying to Tiiny.host is the easiest and fastest deployment option available in Simply Static Pro.","simply-static")}),(0,o.jsx)(d.TextControl,{disabled:!0,label:$("E-Mail","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[$("This field is auto-filled with the e-mail address used for activating Simply Static Pro.","simply-static"),(0,o.jsx)("br",{}),(0,o.jsx)("b",{children:$("An account will be created automatically on your first deployment.","simply-static")})]}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:options.admin_email}),(0,o.jsx)(d.TextControl,{label:$("Subdomain","simply-static"),type:"text",help:$("That's the part before your TLD. Your full URL is the combination of the subdomain plus the domain suffix.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_subdomain,onChange:e=>{i("tiiny_subdomain",e)}}),(0,o.jsx)(d.TextControl,{label:$("Domain Suffix","simply-static"),type:"text",help:$("This defaults to tiiny.site. If you have a custom domain configured in Tiiny.host, you can also use that one.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_domain_suffix,onChange:e=>{i("tiiny_domain_suffix",e)}}),(0,o.jsx)(d.TextControl,{label:$("Password Protection","simply-static"),type:"password",help:$("Adding a password will activate password protection on your static site. The website is only visible with the password.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.tiiny_password,onChange:e=>{i("tiiny_password",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"cdn"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[$("Bunny CDN","simply-static"),(0,o.jsx)(F,{title:$("How to deploy to Bunny CDN","simply-static"),videoUrl:"https://youtu.be/FBRg1BI41VY"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",$("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:$("Bunny CDN is a fast and reliable CDN provider that you can run your static website on.","simply-static")}),(0,o.jsx)(d.TextControl,{label:$("Bunny CDN API Key","simply-static"),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[$("Enter your API Key from Bunny CDN. You can find your API-Key as described ","simply-static"),(0,o.jsx)("a",{href:"https://support.bunny.net/hc/en-us/articles/360012168840-Where-do-I-find-my-API-key",target:"_blank",children:$("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_api_key,onChange:e=>{i("cdn_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:$("Storage Host","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[$("Depending on your location, you have a different storage host. You find out which URL to use ","simply-static"),(0,o.jsx)("a",{href:"https://docs.bunny.net/reference/storage-api#storage-endpoints",target:"_blank",children:$("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_storage_host,onChange:e=>{i("cdn_storage_host",e)}}),(0,o.jsx)(d.TextControl,{label:$("Bunny CDN Access Key","simply-static"),type:"password",help:$("Enter your Acess Key from Bunny CDN. You will find it within your storage zone setttings within FTP & API Access -> Password.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_access_key,onChange:e=>{i("cdn_access_key",e)}}),(0,o.jsx)(d.TextControl,{label:$("Pull Zone","simply-static"),type:"text",help:$("A pull zone is the connection of your CDN to the internet. Simply Static will try to find an existing pull zone with the provided name, if there is none it creates a new pull zone.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_pull_zone,onChange:e=>{i("cdn_pull_zone",e)}}),(0,o.jsx)(d.TextControl,{label:$("Storage Zone","simply-static"),type:"text",help:$("A storage zone contains your static files. Simply Static will try to find an existing storage zone with the provided name, if there is none it creates a new storage zone.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_storage_zone,onChange:e=>{i("cdn_storage_zone",e)}}),(0,o.jsx)(d.TextControl,{label:$("Subdirectory","simply-static"),type:"text",placeholder:"/subdirectory/",help:$("If you want to transfer the files to a specific subdirectory on your storage zone add the name of that directory here.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.cdn_directory,onChange:e=>{i("cdn_directory",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"aws-s3"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[$("Amazon AWS S3","simply-static"),(0,o.jsx)(F,{title:$("How to deploy to Amazon AWS S3","simply-static"),videoUrl:"https://youtu.be/rtn21J86Upc"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",$("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.SelectControl,{label:$("Authentication Method","simply-static"),value:P,options:[{label:$("AWS IAM Access Key","simply-static"),value:"aws-iam-key"},{label:$("AWS EC2","simply-static"),value:"aws-ec2"}],disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{N(e),i("aws_auth_method",e)}}),"aws-iam-key"===P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:$("Access Key ID","simply-static"),type:"text",help:(0,o.jsxs)(o.Fragment,{children:[$("Enter your Access Key from AWS. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:$("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_access_key,onChange:e=>{i("aws_access_key",e)}}),(0,o.jsx)(d.TextControl,{label:$("Secret Access Key","simply-static"),type:"password",help:(0,o.jsxs)(o.Fragment,{children:[$("Enter your Secret Key from AWS. Learn how to get one ","simply-static"),(0,o.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:$("here","simply-static")})]}),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_access_secret,onChange:e=>{i("aws_access_secret",e)}})]}),(0,o.jsx)(d.SelectControl,{label:$("Region","simply-static"),value:k,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:$("US East (Ohio)","simply-static"),value:"us-east-2"},{label:$("US East (N. Virginia)","simply-static"),value:"us-east-1"},{label:$("US West (N. California)","simply-static"),value:"us-west-1"},{label:$("US West (Oregon)","simply-static"),value:"us-west-2"},{label:$("Africa (Cape Town)","simply-static"),value:"af-south-1"},{label:$("Asia Pacific (Hong Kong)","simply-static"),value:"ap-east-1"},{label:$("Asia Pacific (Hyderabad)","simply-static"),value:"ap-south-2"},{label:$("Asia Pacific (Jakarta)","simply-static"),value:"ap-southeast-3"},{label:$("Asia Pacific (Melbourne)","simply-static"),value:"ap-southeast-4"},{label:$("Asia Pacific (Mumbai)","simply-static"),value:"ap-south-1"},{label:$("Asia Pacific (Osaka)","simply-static"),value:"ap-northeast-3"},{label:$("Asia Pacific (Seoul)","simply-static"),value:"ap-northeast-2"},{label:$("Asia Pacific (Singapore)","simply-static"),value:"ap-southeast-1"},{label:$("Asia Pacific (Sydney)","simply-static"),value:"ap-southeast-2"},{label:$("Asia Pacific (Tokyo)","simply-static"),value:"ap-northeast-1"},{label:$("Canada (Central)","simply-static"),value:"ca-central-1"},{label:$("Europe (Frankfurt)","simply-static"),value:"eu-central-1"},{label:$("Europe (Ireland)","simply-static"),value:"eu-west-1"},{label:$("Europe (London)","simply-static"),value:"eu-west-2"},{label:$("Europe (Milan)","simply-static"),value:"eu-south-1"},{label:$("Europe (Paris)","simply-static"),value:"eu-west-3"},{label:$("Europe (Spain)","simply-static"),value:"eu-south-2"},{label:$("Europe (Stockholm)","simply-static"),value:"eu-north-1"},{label:$("Europe (Zurich)","simply-static"),value:"eu-central-2"},{label:$("Middle East (Bahrain)","simply-static"),value:"me-south-1"},{label:$("Middle East (UAE)","simply-static"),value:"me-central-1"},{label:$("South America (São Paulo)","simply-static"),value:"sa-east-1"},{label:$("AWS GovCloud (US-East)","simply-static"),value:"us-gov-east-1"},{label:$("AWS GovCloud (US-West)","simply-static"),value:"us-gov-west-1"}],disabled:"free"===options.plan||!u(),onChange:e=>{E(e),i("aws_region",e)}}),(0,o.jsx)(d.TextControl,{label:$("Bucket","simply-static"),type:"text",help:$("Add the name of your bucket here.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_bucket,onChange:e=>{i("aws_bucket",e)}}),(0,o.jsx)(d.TextControl,{label:$("Subdirectory","simply-static"),type:"text",help:$("Add an optional subdirectory for your bucket","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_subdirectory,onChange:e=>{i("aws_subdirectory",e)}}),(0,o.jsx)(d.TextControl,{label:$("Cloudfront Distribution ID","simply-static"),type:"text",help:$("We automatically invalidate the cache after each export.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_distribution_id,onChange:e=>{i("aws_distribution_id",e)}}),(0,o.jsx)(d.TextControl,{label:$("Webhook URL","simply-static"),type:"url",help:$("Enter your Webhook URL here and Simply Static will send a POST request after all files are transferred to AWS S3.","simply-static"),disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.aws_webhook_url,onChange:e=>{i("aws_webhook_url",e)}}),(0,o.jsx)(d.ToggleControl,{label:$("Empty bucket before new export?","simply-static"),help:$(S?"Clear bucket before new export.":"Don't clear bucket before new export.","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,checked:S,onChange:e=>{j(e),i("aws_empty",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),"sftp"===h&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[$("SFTP","simply-static")," ",(0,o.jsx)(F,{title:$("How to deploy via SFTP","simply-static"),videoUrl:"https://youtu.be/6-QR9wZA3VQ"})]})}),("free"===options.plan||!u())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",$("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:$("Host","simply-static"),type:"text",help:$("Enter your SFTP host.","simply-static"),value:n.sftp_host,disabled:"free"===options.plan||!u(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{i("sftp_host",e)}}),(0,o.jsx)(d.TextControl,{label:$("Port","simply-static"),type:"number",disabled:"free"===options.plan||!u(),help:$("Enter your SFTP port.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_port,onChange:e=>{i("sftp_port",e)}}),(0,o.jsx)(d.TextControl,{label:$("SFTP username","simply-static"),help:$("Enter your SFTP username.","simply-static"),type:"text",disabled:"free"===options.plan||!u(),placeholder:"username",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_user,onChange:e=>{i("sftp_user",e)}}),(0,o.jsx)(d.TextControl,{label:$("SFTP password","simply-static"),type:"password",disabled:"free"===options.plan||!u(),help:$("Enter your SFTP password.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_pass,onChange:e=>{i("sftp_pass",e)}}),(0,o.jsx)(d.TextareaControl,{label:$("SFTP private key","simply-static"),disabled:"free"===options.plan||!u(),__nextHasNoMarginBottom:!0,placeholder:$("OPTIONAL: This is only required if you need to authenticate via a private key to access your SFTP server.","simply-static"),help:$("Enter your SFTP private key if you want passwordless upload and the server is configured to allow it. You can set it as a constant in wp-config.php by using define('SSP_SFTP_KEY', 'YOUR_KEY')","simply-static"),value:n.sftp_private_key,onChange:e=>{i("sftp_private_key",e)}}),(0,o.jsx)(d.TextControl,{label:$("SFTP folder","simply-static"),help:$('Leave empty to upload to the default SFTP folder. Enter a folder path where you want the static files to be uploaded to (example: "uploads" will upload to uploads folder. "uploads/new-folder" will upload files to "new-folder"). ',"simply-static"),type:"text",disabled:"free"===options.plan||!u(),placeholder:"",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n.sftp_folder,onChange:e=>{i("sftp_folder",e)}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:$("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)("div",{className:"save-settings",children:["free"===options.plan?(0,o.jsxs)(o.Fragment,{children:["zip"===h&&(0,o.jsx)(d.Button,{onClick:z,variant:"primary",children:$("Save Settings","simply-static")}),"local"===h&&(0,o.jsx)(d.Button,{onClick:z,variant:"primary",children:$("Save Settings","simply-static")})]}):(0,o.jsx)(d.Button,{onClick:z,variant:"primary",children:$("Save Settings","simply-static")}),"pro"===options.plan&&u()&&(0,o.jsxs)(d.Button,{disabled:p||B||H,variant:"secondary",isBusy:p||H,onClick:()=>{A(!0),s()({path:"/simplystatic/v1/apply-single",method:"POST"}).then((e=>{404===parseInt(e.status)?alert(e.message):window.location.reload()}))},children:[B&&$("Save settings to test","simply-static"),!B&&$("Test Deployment","simply-static")]})]})]})},{__:U}=wp.i18n,W=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)("allowed_http_origins"),[m,h]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!0),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[j,w]=(0,e.useState)(!1),[C,k]=(0,e.useState)(null),[E,P]=(0,e.useState)(null);return(0,e.useEffect)((()=>{s()({path:"/simplystatic/v1/pages-slugs"}).then((e=>{let t=e;t.unshift({label:U("No page selected","simply-static"),value:""}),_(t)})),t.fix_cors&&u(t.fix_cors),t.use_forms&&h(t.use_forms),t.use_comments&&x(t.use_comments),void 0!==t.save_form_entries?f(!!t.save_form_entries):f(!0),void 0!==t.enable_cors?S(!!t.enable_cors):S(!1)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Forms","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Use forms?","simply-static"),__nextHasNoMarginBottom:!0,help:U(m?"Use Forms on your static website.":"Don't use forms on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:m,onChange:e=>{h(e),n("use_forms",e)}}),m&&(0,o.jsx)(d.ToggleControl,{label:U("Store form entries","simply-static"),__nextHasNoMarginBottom:!0,help:U(y?"Store form entries inside WordPress (requires Simply Static Webhook).":"Do not store form entries in WordPress.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!y,onChange:e=>{f(e),n("save_form_entries",e)}}),m&&options.form_connection_url&&"free"!==options.plan&&(0,o.jsx)(d.Button,{href:options.form_connection_url,variant:"secondary",children:U("Create a form connection","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Comments","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Use comments?","simply-static"),__nextHasNoMarginBottom:!0,help:U(g?"Use comments on your static website.":"Don't use comments on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:g,onChange:e=>{x(e),n("use_comments",e)}}),g&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(d.SelectControl,{label:U("Select a redirect page","content-protector"),options:b,help:U("The post will be regenerated after comment submission, but it might take a while so its good practice to redirect the visitor.","simply-static"),disabled:"free"===options.plan||!c(),value:t.comment_redirect,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{n("comment_redirect",e)}})})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(m||g)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:U("Captcha","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:U("We will automatically protect your forms and comments with a captcha on your static site.","simply-static")}),(0,o.jsx)(d.SelectControl,{label:U("Captcha Service","simply-static"),help:U("Choose which captcha service to use.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.captcha_service||"turnstile",options:[{label:U("Cloudflare Turnstile","simply-static"),value:"turnstile"},{label:U("Google reCAPTCHA v3","simply-static"),value:"recaptcha_v3"}],onChange:e=>n("captcha_service",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),E&&(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:E.type,isDismissible:!0,onRemove:()=>P(null),children:E.message}),(0,o.jsx)(d.__experimentalSpacer,{margin:3})]})}),(0,o.jsx)(d.Button,{variant:"secondary",disabled:"free"===options.plan||!c()||j,isBusy:j,onClick:()=>{w(!0),P(null),s()({path:"/simplystatic/v1/captcha/detect-credentials"}).then((e=>{if(w(!1),!e.success)return void P({type:"error",message:U("Failed to detect credentials.","simply-static")});const s=e.credentials,i=t.captcha_service||"turnstile";let a=null,r="";if("turnstile"===i&&s.turnstile&&s.turnstile.length>0)a=s.turnstile[0],r=a.source,n("cloudflare_turnstile_site_key",a.site_key),n("cloudflare_turnstile_secret_key",a.secret_key),P({type:"success",message:U("Turnstile credentials copied from ","simply-static")+r+"!"});else if("recaptcha_v3"===i&&s.recaptcha&&s.recaptcha.length>0)a=s.recaptcha[0],r=a.source,n("recaptcha_site_key",a.site_key),n("recaptcha_secret_key",a.secret_key),P({type:"success",message:U("ReCaptcha credentials copied from ","simply-static")+r+"!"});else{let e="";"turnstile"===i&&s.recaptcha&&s.recaptcha.length>0?e=U(" ReCaptcha credentials were found - switch to ReCaptcha v3 to use them.","simply-static"):"recaptcha_v3"===i&&s.turnstile&&s.turnstile.length>0&&(e=U(" Turnstile credentials were found - switch to Turnstile to use them.","simply-static")),P({type:"warning",message:U("No credentials found for the selected captcha service.","simply-static")+e})}k(s)})).catch((e=>{w(!1),P({type:"error",message:U("Error detecting credentials: ","simply-static")+(e.message||U("Unknown error","simply-static"))})}))},children:U(j?"Detecting...":"Copy existing Credentials","simply-static")}),(0,o.jsx)("p",{className:"components-base-control__help",children:U("Automatically detect and copy captcha credentials from form plugins like Contact Form 7, WPForms, or Fluent Forms.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),"turnstile"===(t.captcha_service||"turnstile")&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:U("Site Key","simply-static"),help:U("Your public key will be used on the static site.","simply-static"),placeholder:U("Enter your Turnstile site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_site_key||"",onChange:e=>n("cloudflare_turnstile_site_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.TextControl,{label:U("Secret Key","simply-static"),help:U("Your secret key will be stored in WordPress.","simply-static"),placeholder:U("Enter your Turnstile secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_secret_key||"",onChange:e=>n("cloudflare_turnstile_secret_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.SelectControl,{label:U("Theme","simply-static"),help:U("Choose how the widget should look on your site.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_theme||"auto",options:[{label:U("Auto","simply-static"),value:"auto"},{label:U("Light","simply-static"),value:"light"},{label:U("Dark","simply-static"),value:"dark"}],onChange:e=>n("cloudflare_turnstile_theme",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.SelectControl,{label:U("Size","simply-static"),help:U("Choose the widget size.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.cloudflare_turnstile_size||"normal",options:[{label:U("Normal","simply-static"),value:"normal"},{label:U("Flexible","simply-static"),value:"flexible"},{label:U("Compact","simply-static"),value:"compact"}],onChange:e=>n("cloudflare_turnstile_size",e)})]}),"recaptcha_v3"===t.captcha_service&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:U("Site Key","simply-static"),help:U("Your public key will be used on the static site.","simply-static"),placeholder:U("Enter your reCAPTCHA v3 site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.recaptcha_site_key||"",onChange:e=>n("recaptcha_site_key",e)}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.TextControl,{label:U("Secret Key","simply-static"),help:U("Your secret key will be stored in WordPress.","simply-static"),placeholder:U("Enter your reCAPTCHA v3 secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!c(),value:t.recaptcha_secret_key||"",onChange:e=>n("recaptcha_secret_key",e)})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[U("CORS","simply-static"),(0,o.jsx)(F,{title:U("How to deal with CORS","simply-static"),videoUrl:"https://youtu.be/fArtvZhkU14"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",U("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:U("Enable CORS","simply-static"),__nextHasNoMarginBottom:!0,help:U(v?"CORS settings enabled. Configure options below.":"Turn on to configure CORS for Forms and Comments requests.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!v,onChange:e=>{S(e),n("enable_cors",e)}}),v&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:U("When using Forms and Comments in Simply Static Pro you may encounter CORS issues as you make requests from your static website to your original one.","simply-static")}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:(0,o.jsx)("p",{children:U("Due to the variety of server setups out there, you may need to make changes on your server.","simply-static")})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.TextControl,{label:U("Static URL","simply-static"),type:"url",placeholder:"https://static-site.com",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:U("Add the URL of your static website to allow CORS from it.","simply-static"),disabled:"free"===options.plan||!c(),value:t.static_url,onChange:e=>{n("static_url",e)}}),(0,o.jsx)(d.SelectControl,{label:U("Select CORS method","simply-static"),value:p,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:U("Choose one of the methods to allow CORS for your website.","simply-static"),disabled:"free"===options.plan||!c(),options:[{label:"allowed_http_origins",value:"allowed_http_origins"},{label:"wp_headers",value:"wp_headers"}],onChange:e=>{u(e),n("fix_cors",e)}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:U("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&c()&&(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1),m&&(localStorage.setItem("ss-initial-page","/forms"),window.location.reload())}),2e3)},variant:"primary",children:U("Save Settings","simply-static")})})]})},{__:G}=wp.i18n,q=function(){var t,s,n,i,a,r,c,p;const{settings:u,updateSetting:m,saveSettings:h,settingsSaved:g,setSettingsSaved:x,isPro:y}=(0,e.useContext)(l),[f,b]=(0,e.useState)(!1),[_,v]=(0,e.useState)("fuse"),[S,j]=(0,e.useState)(!1),w=()=>j(!0);(0,e.useEffect)((()=>{u.use_search&&b(u.use_search),u.search_type&&v(u.search_type)}),[u]);const C=null!==(t=null!==(s=u.search_show_submit)&&void 0!==s?s:u.search_fuse_show_submit)&&void 0!==t&&t;return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:G("Search","simply-static")})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:G("Use search?","simply-static"),__nextHasNoMarginBottom:!0,help:G(f?"Use search on your static website.":"Don't use search on your static website.","simply-static"),disabled:"free"===options.plan||!y(),checked:f,onChange:e=>{b(e),m("use_search",e)}}),(0,o.jsx)(d.SelectControl,{label:G("Search Type","simply-static"),value:_,help:G("Decide which search type you want to use. Fuse runs locally based on a file, and Algolia is an external API service.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:"Fuse JS",value:"fuse"},{label:"Algolia API",value:"algolia"}],onChange:e=>{v(e),m("search_type",e)}}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.ToggleControl,{label:G("Use Search Results Page","simply-static"),__nextHasNoMarginBottom:!0,help:G("Simply Static will create a static search results page and the export will include a special __qs directory.","simply-static"),disabled:"free"===options.plan||!y(),checked:null===(n=u.use_search_results_page)||void 0===n||n,onChange:e=>{m("use_search_results_page",e)}}),(0,o.jsx)(d.__experimentalSpacer,{margin:3}),(0,o.jsx)(d.ToggleControl,{label:G("Use Submit Button","simply-static"),__nextHasNoMarginBottom:!0,help:G("Show or hide the submit button in the search UI.","simply-static"),disabled:"free"===options.plan||!y(),checked:null!==(i=null!==(a=u.search_show_submit)&&void 0!==a?a:u.search_fuse_show_submit)&&void 0!==i&&i,onChange:e=>{m("search_show_submit",e)}}),C&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(d.TextControl,{label:G("Submit button text","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:G("Search","simply-static"),help:G("Customize the submit button text or HTML (e.g., add an icon).","simply-static"),disabled:"free"===options.plan||!y(),value:null!==(r=u.search_submit_text)&&void 0!==r?r:u.search_fuse_submit_text,onChange:e=>{m("search_submit_text",e)}})}),(0,o.jsx)(d.ToggleControl,{label:G("Show excerpt in suggestions/results","simply-static"),__nextHasNoMarginBottom:!0,help:G("Enable to display the excerpt below each search suggestion and result item.","simply-static"),disabled:"free"===options.plan||!y(),checked:null!==(c=u.search_show_excerpt)&&void 0!==c&&c,onChange:e=>{m("search_show_excerpt",e)}}),(0,o.jsx)(d.TextControl,{label:G("Input placeholder","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:G("Search..","simply-static"),help:G("Customize the placeholder text for the search input.","simply-static"),disabled:"free"===options.plan||!y(),value:null!==(p=u.search_placeholder)&&void 0!==p?p:u.search_fuse_placeholder,onChange:e=>{m("search_placeholder",e)}})]})]})]}),(0,o.jsxs)(o.Fragment,{children:[S&&(0,o.jsxs)(d.Modal,{title:G("How to select data with meta tags","simply-static"),onRequestClose:()=>j(!1),children:[(0,o.jsx)("p",{children:G("Targeting for excerpt in the meta description tag.","simply-static")}),(0,o.jsx)("pre",{children:'<meta name="description" content="This content is what we want as excerpt" />'}),(0,o.jsx)("p",{children:G("Adding such meta in the excerpt field would be:","simply-static")}),(0,o.jsx)("pre",{children:"description|content"}),(0,o.jsx)("p",{children:G("Targeting for title in the property meta tag.","simply-static")}),(0,o.jsx)("pre",{children:'<meta property="og:title" content="This content is what we want as excerpt" />'}),(0,o.jsx)("p",{children:G("Adding such meta in the excerpt field would be:","simply-static")}),(0,o.jsx)("pre",{children:"property|og:title"}),(0,o.jsx)("p",{children:G('If the second item (after | ) is not <code>content</code>, we\'ll use it as value of that attribute (<code>property="og:title"</code> in this example) and use <code>content</code> for value.',"simply-static")}),(0,o.jsx)("p",{children:(0,o.jsx)("strong",{children:G("Caution: Use meta tags that exist everywhere for title.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:G("Indexing","simply-static")})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Title","simply-static"),type:"text",placeholder:"title",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the title of the page/post","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:w,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_title,onChange:e=>{m("search_index_title",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Content","simply-static"),type:"text",placeholder:"body",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the content of the page/post.","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:w,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_content,onChange:e=>{m("search_index_content",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector for Excerpt","simply-static"),type:"text",placeholder:".entry-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,o.jsxs)(o.Fragment,{children:[G("Add the CSS selector which contains the excerpt of the page/post.","simply-static")," ",(0,o.jsx)(d.Button,{variant:"link",onClick:w,children:G("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!y(),value:u.search_index_excerpt,onChange:e=>{m("search_index_excerpt",e)}}),(0,o.jsx)(d.TextareaControl,{label:G("Exclude URLs","simply-static"),placeholder:"author\narchive\ncategory",__nextHasNoMarginBottom:!0,help:G("Exclude URLs from indexing (one per line). You can use full URLs, parts of an URL or plain words (like stop words).","simply-static"),disabled:"free"===options.plan||!y(),value:u.search_excludable,onChange:e=>{m("search_excludable",e)}})]})]})]}),"fuse"===_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[G("Fuse.js","simply-static"),(0,o.jsx)(F,{title:G("How to add search with FuseJS","simply-static"),videoUrl:"https://youtu.be/K34l1DXjCHk"})]})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!y(),value:u.fuse_selector,onChange:e=>{m("fuse_selector",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:G("If you have multiple search elements with different CSS selectors, separate them by a comma (,) such as: .search-form, .custom-search-form","simply-static")}),(0,o.jsx)(d.__experimentalNumberControl,{label:G("Threshold","simply-static"),isShiftStepEnabled:!0,step:.1,min:.1,max:1,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G(" A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything.","simply-static"),disabled:"free"===options.plan||!y(),value:u.fuse_threshold,placeholder:.1,onChange:e=>{m("fuse_threshold",e)}})]})]})]}),"algolia"===_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[G("Algolia API","simply-static"),(0,o.jsx)(F,{title:G("How to add search with the Algolia API","simply-static"),videoUrl:"https://youtu.be/H9PNZSl0KnU"})]})}),("free"===options.plan||!y())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:G("Application ID","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia App ID.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_app_id,onChange:e=>{m("algolia_app_id",e)}}),(0,o.jsx)(d.TextControl,{label:G("Admin API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia Admin API Key.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_admin_api_key,onChange:e=>{m("algolia_admin_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:G("Search-Only API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia Search-Only API Key here. This is the only key that will be visible on your static site.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_search_api_key,onChange:e=>{m("algolia_search_api_key",e)}}),(0,o.jsx)(d.TextControl,{label:G("Name for your index","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add your Algolia index name here.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_index,onChange:e=>{m("algolia_index",e)}}),(0,o.jsx)(d.TextControl,{label:G("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:G("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!y(),value:u.algolia_selector,onChange:e=>{m("algolia_selector",e)}}),(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:G("If you have multiple search elements with different CSS selectors, separate them by a comma (,) such as: .search-form, .custom-search-form","simply-static")})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:G("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&y()&&(0,o.jsx)(d.Button,{onClick:()=>{h(),x(!0),setTimeout((function(){x(!1)}),2e3)},variant:"primary",children:G("Save Settings","simply-static")})})]})},{__:J}=wp.i18n,Y=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c,isStudio:p}=(0,e.useContext)(l),[u,m]=(0,e.useState)(!1),[h,g]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[f,b]=(0,e.useState)(null);return(0,e.useEffect)((()=>{t.debugging_mode&&m(t.debugging_mode),t.server_cron&&g(t.server_cron)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)("b",{children:[J("Basic Auth","simply-static"),(0,o.jsx)(F,{title:J("How to set up basic auth","simply-static"),videoUrl:"https://youtu.be/6udSR3_zSOU"})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("p",{children:J("If you've secured WordPress with HTTP Basic Auth you need to specify the username and password to use below.","simply-static")}),(0,o.jsx)(d.TextControl,{label:J("Basic Auth Username","simply-static"),autoComplete:"off",type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.http_basic_auth_username,onChange:e=>{n("http_basic_auth_username",e)}}),(0,o.jsx)(d.TextControl,{label:J("Basic Auth Password","simply-static"),type:"password",autoComplete:"off",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.http_basic_auth_password,onChange:e=>{n("http_basic_auth_password",e)}}),(0,o.jsx)(d.ToggleControl,{label:J("Enable Basic Auth","simply-static"),__nextHasNoMarginBottom:!0,help:(0,o.jsx)(o.Fragment,{children:"free"===options.plan?(0,o.jsx)(o.Fragment,{children:J("Automatically setting up Basic Auth requires Simply Static Pro.","simply-static")}):(0,o.jsx)(o.Fragment,{children:J("Once enabled we will put your entire website behind password protection.","simply-static")})}),disabled:"free"===options.plan||!c(),checked:!!t.http_basic_auth_on,onChange:e=>{n("http_basic_auth_on",e)}}),t.http_basic_auth_on&&(!t.http_basic_auth_username||!t.http_basic_auth_password)&&(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:J("Requires Username & Password to work","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Temporary Files","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:J("Temporary Files Directory","simply-static"),type:"text",placeholder:options.temp_files_dir,help:J("Optionally specify the directory to save your temporary files. This directory must exist and be writeable.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.temp_files_dir,onChange:e=>{n("temp_files_dir",e)}}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:f.type,isDismissible:!0,onRemove:()=>b(null),children:f.message}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)(d.Button,{isSecondary:!0,onClick:async()=>{y(!0),b(null);try{const e=await s()({path:"/simplystatic/v1/clear-temp-files",method:"POST"});let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){}if(t&&200===t.status)b({type:"success",message:J("Temporary files cleared.","simply-static")});else{const e=t&&t.message?t.message:J("Could not clear temporary files.","simply-static");b({type:"error",message:e})}}catch(e){b({type:"error",message:J("Request failed. Please try again.","simply-static")})}finally{y(!1)}},disabled:x,isBusy:x,children:J(x?"Clearing…":"Clear Temporary Files","simply-static")})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Whitelist Plugins","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextareaControl,{label:J("Whitelist plugins in diagnostics","simply-static"),placeholder:"autoptimize\nwp-search-with-algolia\nwp-rocket",help:J("If you want to exclude certain plugins from the diagnostics check add the plugin slugs here (one per line).","simply-static"),__nextHasNoMarginBottom:!0,value:t.whitelist_plugins,onChange:e=>{n("whitelist_plugins",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Proxy Setup","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.TextControl,{label:J("Origin URL","simply-static"),type:"url",help:J("If the URL of your WordPress installation differs from the public-facing URL (Proxy Setup), add the public URL here.","simply-static"),placeholder:options.home,autoComplete:"off",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.origin_url,onChange:e=>{n("origin_url",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Debug Log","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:J("Activate Debug Log","simply-static"),help:J("Enable it to download the debug log from Simply Static -> Generate.","simply-static"),__nextHasNoMarginBottom:!0,checked:u,onChange:e=>{m(e),n("debugging_mode",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),!p()&&(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:J("Cron","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:J("Use server-side cron job","simply-static"),help:J("Enable this if you use a server-side cron job instead of the default WP-Cron.","simply-static"),__nextHasNoMarginBottom:!0,checked:h,onChange:e=>{g(e),n("server_cron",e)}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:J("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1)}),2e3)},variant:"primary",children:J("Save Settings","simply-static")})})]})},{__:K}=wp.i18n,V=function({integration:e,settings:t,toggleIntegration:s}){let n=e.active;const i=e.pro,a=e.can_run,r=e.always_active;void 0!==t.integrations&&!1!==t.integrations&&(n=t.integrations.indexOf(e.id)>=0);let l="pro"===options.plan||!i;return(0,o.jsx)(d.Card,{children:(0,o.jsxs)(d.CardHeader,{className:"ss-integration",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("strong",{children:[e.name||e.id,"redirection"===e.id&&(0,o.jsx)(F,{title:K("Automated Redirects with Redirection","simply-static"),videoUrl:"https://youtu.be/sS4BQcZ4dN8"}),"complianz"===e.id&&(0,o.jsx)(F,{title:K("Cookie Consent with Complianz","simply-static"),videoUrl:"https://youtu.be/GPKYtt8A5QE"})]}),""!==e.description&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),e.description]})]}),!a&&(0,o.jsxs)("span",{className:"ss-align-right ss-no-shrink",children:[(0,o.jsx)("em",{children:"Missing Plugin"}),!l&&(0,o.jsx)("div",{children:(0,o.jsx)(d.Button,{variant:"link",href:"https://simplystatic.com/pricing/",children:K("Requires Simply Static Pro","simply-static")})})]}),a&&l&&!r&&(0,o.jsx)(d.ToggleControl,{className:"integration-toggle",__nextHasNoMarginBottom:!0,checked:n,onChange:t=>{s(e.id,t)}}),a&&l&&r&&(0,o.jsx)("em",{children:"Always Active"}),a&&!l&&(0,o.jsx)(d.Button,{variant:"primary",href:"https://simplystatic.com/pricing/",children:K("Get the Pro version","simply-static")})]})})},{__:Q}=wp.i18n,Z=function(){const{settings:t,updateSetting:s,saveSettings:n,settingsSaved:i,setSettingsSaved:a,maybeQueueIntegration:r}=(0,e.useContext)(l),c=(e,n)=>{n?(e=>{let n=t.integrations;!1===n&&(n=[]),n.indexOf(e)>=0||(n.push(e),s("integrations",n),r(e))})(e):(e=>{let n=t.integrations;!1===n&&(n=[]);const i=n.indexOf(e);i<0||(n.splice(i,1),s("integrations",n),r(e))})(e)},p=Object.keys(options.integrations).filter((e=>options.integrations[e].can_run&&!options.integrations[e].always_active)),u=Object.keys(options.integrations).filter((e=>!options.integrations[e].can_run&&!options.integrations[e].always_active));return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:Q("Integrations","simply-static")})}),(0,o.jsxs)(d.CardBody,{children:[Q("Control Integrations that will be active during the export of the static site.","simply-static"),(0,o.jsx)(d.__experimentalSpacer,{margin:10})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),p.map((e=>{const s=options.integrations[e];return(0,o.jsx)(V,{integration:s,settings:t,toggleIntegration:c},s.id||e)})),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),u.map((e=>{const s=options.integrations[e];return(0,o.jsx)(V,{integration:s,settings:t,toggleIntegration:c},s.id||e)})),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:Q("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:async()=>{try{const{shouldReload:e}=await n();if(a(!0),e)return void setTimeout((()=>{try{if("undefined"!=typeof window){const e="/integrations";if(window.localStorage)try{window.localStorage.setItem("ss-initial-page",e)}catch(e){}}}catch(e){}window.location.reload()}),400)}catch(e){}setTimeout((function(){a(!1)}),2e3)},variant:"primary",children:Q("Save Settings","simply-static")})})]})},{__:X}=wp.i18n,ee=function(){const{settings:t,updateSetting:s,saveSettings:n,settingsSaved:i,setSettingsSaved:a}=(0,e.useContext)(l),[r,c]=(0,e.useState)({}),p="undefined"!=typeof options&&options.current_settings&&options.current_settings.ss_uam_access?options.current_settings.ss_uam_access:{},u=(0,e.useMemo)((()=>[{label:X("Administrator","simply-static"),value:"administrator"},{label:X("Editor","simply-static"),value:"editor"},{label:X("Author","simply-static"),value:"author"},{label:X("Contributor","simply-static"),value:"contributor"},{label:X("Subscriber","simply-static"),value:"subscriber"}]),[]),m=(0,e.useMemo)((()=>[{key:"activity",label:X("Activity Log","simply-static"),route:"/"},{key:"diagnostics",label:X("Diagnostics","simply-static"),route:"/diagnostics"}]),[]),h=(0,e.useMemo)((()=>[{key:"general",label:X("General","simply-static"),route:"/general"},{key:"deployment",label:X("Deploy","simply-static"),route:"/deployment"},{key:"forms",label:X("Forms","simply-static"),route:"/forms"},{key:"search",label:X("Search","simply-static"),route:"/search"},{key:"optimize",label:X("Optimize","simply-static"),route:"/optimize"},{key:"workflow",label:X("Workflow","simply-static"),route:"/workflow"}]),[]),g=(0,e.useMemo)((()=>[{key:"integrations",label:X("Integrations","simply-static"),route:"/integrations"},{key:"utilities",label:X("Utilities","simply-static"),route:"/utilities"},{key:"debug",label:X("Debug","simply-static"),route:"/debug"},{key:"uam",label:X("UAM","simply-static"),route:"/uam"}]),[]),x=(0,e.useMemo)((()=>{const e=[{key:"menu_generate",label:X("Generate","simply-static")},{key:"menu_settings",label:X("Settings","simply-static")},{key:"menu_diagnostics",label:X("Diagnostics","simply-static")},{key:"menu_form_connections",label:X("Form Connections","simply-static")}];return t?.ss_use_builds&&e.push({key:"menu_builds",label:X("Builds","simply-static")}),e}),[t?.ss_use_builds]);(0,e.useEffect)((()=>{c({...t?.ss_uam_access||{}})}),[t]);const y=(e,t)=>{const n={...r,[e]:t};c(n),s("ss_uam_access",n)},f=({id:e,label:t,value:s,onChange:n})=>(0,o.jsxs)(d.Flex,{align:"center",gap:3,children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:260},children:(0,o.jsx)("b",{id:`${e}-label`,children:t})}),(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.SelectControl,{"aria-label":t,value:s,options:u,onChange:n})})]}),b=(e,t)=>r&&Object.prototype.hasOwnProperty.call(r,e)&&r[e]?r[e]:p&&Object.prototype.hasOwnProperty.call(p,e)&&p[e]?p[e]:t;return(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("UAM (User Access Management)","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)("p",{children:X("Control who can access Simply Static pages, menu entries, and selected features by assigning a minimum WordPress role.","simply-static")})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Tools","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:m.map((e=>{const t="activity"===e.key?"editor":"administrator";return(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)}))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Settings","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:h.map((e=>(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key)))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Advanced","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:g.map((e=>(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key)))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Menu","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.Flex,{direction:"column",gap:3,children:x.map((e=>{const t="menu_generate"===e.key?"editor":"administrator";return(0,o.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)}))})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:X("Features","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsxs)(d.Flex,{direction:"column",gap:3,children:[(0,o.jsx)(f,{id:"uam-adminbar",label:X("Admin Bar","simply-static"),value:b("adminbar","editor"),onChange:e=>y("adminbar",e)}),(0,o.jsx)(f,{id:"uam-single-export",label:X("Single Export (Button)","simply-static"),value:b("single_export_button","editor"),onChange:e=>y("single_export_button",e)})]})})]}),i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:X("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{n(),a(!0),setTimeout((function(){a(!1)}),2e3)},variant:"primary",children:X("Save Settings","simply-static")})})]})};function te(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var n,i,a=s.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}return r}"function"==typeof SuppressedError&&SuppressedError;var se=function(e){var t=e.children;return a().createElement("div",{className:"react-terminal-line"},t)};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===s&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("/**\n * Modfied version of [termynal.js](https://github.com/ines/termynal/blob/master/termynal.css).\n *\n * @author Ines Montani <[email protected]>\n * @version 0.0.1\n * @license MIT\n */\n .react-terminal-wrapper {\n width: 100%;\n background: #252a33;\n color: #eee;\n font-size: 18px;\n font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;\n border-radius: 4px;\n padding: 75px 45px 35px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n.react-terminal {\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n.react-terminal-wrapper.react-terminal-light {\n background: #ddd;\n color: #1a1e24;\n}\n\n.react-terminal-window-buttons {\n position: absolute;\n top: 15px;\n left: 15px;\n display: flex;\n flex-direction: row;\n gap: 10px;\n}\n\n.react-terminal-window-buttons button {\n width: 15px;\n height: 15px;\n border-radius: 50%;\n border: 0;\n}\n\n.react-terminal-window-buttons button.clickable {\n cursor: pointer;\n}\n\n.react-terminal-window-buttons button.red-btn {\n background: #d9515d;\n}\n\n.react-terminal-window-buttons button.yellow-btn {\n background: #f4c025;\n}\n\n.react-terminal-window-buttons button.green-btn {\n background: #3ec930;\n}\n\n.react-terminal-wrapper:after {\n content: attr(data-terminal-name);\n position: absolute;\n color: #a2a2a2;\n top: 5px;\n left: 0;\n width: 100%;\n text-align: center;\n pointer-events: none;\n}\n\n.react-terminal-wrapper.react-terminal-light:after {\n color: #D76D77;\n}\n\n.react-terminal-line {\n white-space: pre;\n}\n\n.react-terminal-line:before {\n /* Set up defaults and ensure empty lines are displayed. */\n content: '';\n display: inline-block;\n vertical-align: middle;\n color: #a2a2a2;\n}\n\n.react-terminal-light .react-terminal-line:before {\n color: #D76D77;\n}\n\n.react-terminal-input:before {\n margin-right: 0.75em;\n content: '$';\n}\n\n.react-terminal-input[data-terminal-prompt]:before {\n content: attr(data-terminal-prompt);\n}\n\n.react-terminal-wrapper:focus-within .react-terminal-active-input .cursor {\n position: relative;\n display: inline-block;\n width: 0.55em;\n height: 1em;\n top: 0.225em;\n background: #fff;\n -webkit-animation: blink 1s infinite;\n animation: blink 1s infinite;\n}\n\n/* Cursor animation */\n\n@-webkit-keyframes blink {\n 50% {\n opacity: 0;\n }\n}\n\n@keyframes blink {\n 50% {\n opacity: 0;\n }\n}\n\n.terminal-hidden-input {\n position: fixed;\n left: -1000px;\n}\n\n/* .react-terminal-progress {\n display: flex;\n margin: .5rem 0;\n}\n\n.react-terminal-progress-bar {\n background-color: #fff;\n border-radius: .25rem;\n width: 25%;\n}\n\n.react-terminal-wrapper.react-terminal-light .react-terminal-progress-bar {\n background-color: #000;\n} */\n");var ne,ie,ae=function(e){var t=e.redBtnCallback,s=e.yellowBtnCallback,n=e.greenBtnCallback;return a().createElement("div",{className:"react-terminal-window-buttons"},a().createElement("button",{className:"".concat(s?"clickable":""," red-btn"),disabled:!t,onClick:t}),a().createElement("button",{className:"".concat(s?"clickable":""," yellow-btn"),disabled:!s,onClick:s}),a().createElement("button",{className:"".concat(n?"clickable":""," green-btn"),disabled:!n,onClick:n}))};(ie=ne||(ne={}))[ie.Light=0]="Light",ie[ie.Dark=1]="Dark";var re=function(e){var t=e.name,s=e.prompt,i=e.height,r=void 0===i?"600px":i,o=e.colorMode,l=e.onInput,c=e.children,d=e.startingInputValue,p=void 0===d?"":d,u=e.redBtnCallback,m=e.yellowBtnCallback,h=e.greenBtnCallback,g=e.TopButtonsPanel,x=void 0===g?ae:g,y=te((0,n.useState)(""),2),f=y[0],b=y[1],_=te((0,n.useState)(0),2),v=_[0],S=_[1],j=(0,n.useRef)(null);(0,n.useEffect)((function(){b(p.trim())}),[p]),(0,n.useEffect)((function(){var e,t;if(null!=l){var s=[],n=function(e){var t=function(){var t;return null===(t=null==e?void 0:e.querySelector(".terminal-hidden-input"))||void 0===t?void 0:t.focus()};null==e||e.addEventListener("click",t),s.push({terminalEl:e,listener:t})};try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,s=t&&e[t],n=0;if(s)return s.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(document.getElementsByClassName("react-terminal-wrapper")),a=i.next();!a.done;a=i.next())n(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return function(){s.forEach((function(e){e.terminalEl.removeEventListener("click",e.listener)}))}}}),[l]);var w=["react-terminal-wrapper"];return o===ne.Light&&w.push("react-terminal-light"),a().createElement("div",{className:w.join(" "),"data-terminal-name":t},a().createElement(x,{redBtnCallback:u,yellowBtnCallback:m,greenBtnCallback:h}),a().createElement("div",{className:"react-terminal",style:{height:r}},c,"function"==typeof l&&a().createElement("div",{className:"react-terminal-line react-terminal-input react-terminal-active-input","data-terminal-prompt":s||"$",key:"terminal-line-prompt"},f,a().createElement("span",{className:"cursor",style:{left:"".concat(v+1,"px")}})),a().createElement("div",{ref:j})),a().createElement("input",{className:"terminal-hidden-input",placeholder:"Terminal Hidden Input",value:f,autoFocus:null!=l,onChange:function(e){b(e.target.value)},onKeyDown:function(e){var t,s;if(l)if("Enter"===e.key)l(f),S(0),b(""),setTimeout((function(){var e;return null===(e=null==j?void 0:j.current)||void 0===e?void 0:e.scrollIntoView({behavior:"auto",block:"nearest"})}),500);else if(["ArrowLeft","ArrowRight","ArrowDown","ArrowUp","Delete"].includes(e.key)){var n=e.currentTarget,i="",a=f.length-(n.selectionStart||0);a=(t=a)>(s=f.length)?s:t<0?0:t,"ArrowLeft"===e.key?(a>f.length-1&&a--,i=f.slice(f.length-1-a)):"ArrowRight"===e.key||"Delete"===e.key?i=f.slice(f.length-a+1):"ArrowUp"===e.key&&(i=f.slice(0));var r=function(e,t){var s=document.createElement("span");s.style.visibility="hidden",s.style.position="absolute",s.style.fontSize=window.getComputedStyle(e).fontSize,s.style.fontFamily=window.getComputedStyle(e).fontFamily,s.innerText=t,document.body.appendChild(s);var n=s.getBoundingClientRect().width;return document.body.removeChild(s),-n}(n,i);S(r)}}}))};const{__:oe}=wp.i18n,le=function(){const{isRunning:t,isResumed:n,isPaused:i,blogId:a}=(0,e.useContext)(l),[c,d]=(0,e.useState)([(0,o.jsx)(se,{children:"Waiting for new export.."},"waiting")]);function p(){s()({path:"/simplystatic/v1/activity-log?blog_id="+a+"&is_network_admin="+options.is_network,method:"GET"}).then((e=>{var t=JSON.parse(e),s=[];for(var n in t.data){var i=t.data[n].datetime,a=t.data[n].message,r=n.includes("pause")||n.includes("cancel"),l=n.includes("resume");s.push((0,o.jsxs)(se,{children:["[",i,"] ",(0,o.jsx)("span",{className:`${r?"is-error":""} ${l?"is-success":""}`,dangerouslySetInnerHTML:{__html:a}})]},n))}d(s)}))}return r((()=>{p()}),t?2500:null),(0,e.useEffect)((()=>{t&&!n&&d([(0,o.jsx)(se,{children:"Waiting for new export.."},"waiting")]),t&&n&&d([(0,o.jsx)(se,{children:"Resuming the export.."},"resuming")]),p()}),[t]),(0,o.jsx)(re,{name:oe("Activity Log","simply-static"),height:"250px",colorMode:ne.Dark,children:c})};var ce=i(757);const de=function(){const{isRunning:t,blogId:n,isPro:i,settings:a}=(0,e.useContext)(l),[c,p]=(0,e.useState)([]),[u,m]=(0,e.useState)(!1),[h,g]=(0,e.useState)(25),[x,y]=(0,e.useState)(0),[f,b]=(0,e.useState)(""),[_,v]=(0,e.useState)("export"),[S,j]=(0,e.useState)(null);(0,e.useEffect)((()=>{a&&"zip"===a.delivery_method?v("export"):s()({path:"/simplystatic/v1/export-type",method:"GET"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&(a&&"zip"===a.delivery_method?v("export"):(v(t.data.export_type),j(t.data.export_type_id)))})).catch((e=>{console.error("Error fetching export type:",e),a&&"zip"===a.delivery_method?v("export"):options.last_export_end?v("Update"):v("export")}))}),[a]);const w=[{name:"Code",selector:e=>e.code,sortable:!0,width:"12%"},{name:"URL",selector:e=>{const t=e&&"string"==typeof e.url?e.url:"";if(!t)return(0,o.jsx)("span",{children:"-"});let s=t;if(t.startsWith("/"))s=t;else try{const e=new URL(t);s=e.pathname+e.search+e.hash}catch(e){}return(0,o.jsx)("a",{target:"_blank",href:t,children:s})},sortable:!0,sortFunction:(e,t)=>e.url.localeCompare(t.url),width:i()?"40%":"60%",wrap:!0}],C={name:"Export-Type",selector:e=>"Build"===_||"Single"===_?`${_} (ID: ${S})`:_,sortable:!0,width:"20%"},k={name:"Notes",wrap:!0,selector:e=>(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:e.notes}}),sortable:!0,sortFunction:(e,t)=>{const s=e.notes.replace(/<[^>]*>/g,""),n=t.notes.replace(/<[^>]*>/g,"");return s.localeCompare(n)},width:"28%"},E=i()?[...w,C,k]:[...w,k];function P(e,t=!1,i=f){((e=null!=e?e:1)!==x||t)&&m(!0),s()({path:`/simplystatic/v1/export-log?page=${e}&per_page=${h}&blog_id=${n}&is_network_admin=${options.is_network}&search=${encodeURIComponent(i)}`,method:"GET"}).then((s=>{var n=JSON.parse(s);e!==x||t?(p(n.data),m(!1)):(c.total_static_pages=n.data.total_static_pages,p(c)),y(e)}))}return r((()=>{P()}),t?5e3:null),(0,e.useEffect)((()=>{P(1,!0),t&&s()({path:"/simplystatic/v1/export-type",method:"GET"}).then((e=>{const t=JSON.parse(e);200===t.status&&t.data&&(v(t.data.export_type),j(t.data.export_type_id))})).catch((e=>{console.error("Error fetching export type:",e)}))}),[t]),(0,o.jsxs)("div",{className:"log-table-container",children:[(0,o.jsx)(d.Flex,{children:(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("input",{id:"export-search",className:"ss-export-log-search",type:"text",placeholder:"Search...",value:f,onChange:e=>{const t=e.target.value;b(t),P(1,!0,t)}})})}),(0,o.jsx)(ce.Ay,{columns:E,data:c.static_pages||[],pagination:!0,paginationServer:!0,paginationTotalRows:c.total_static_pages,paginationPerPage:25,paginationRowsPerPageOptions:[25,50,100,200],progressPending:u,progressComponent:(0,o.jsxs)("div",{style:{padding:"24px",textAlign:"center"},children:[(0,o.jsx)(d.Spinner,{}),(0,o.jsx)("div",{style:{marginTop:"8px"},children:"Loading..."})]}),onChangeRowsPerPage:(e,t)=>{g(e),P(t,!0)},onChangePage:e=>{P(e)}})]})},{__:pe}=wp.i18n,ue=function(){const[t,n]=(0,e.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Button,{variant:"primary",href:options.log_file,download:!0,style:{marginRight:"10px"},children:pe("Download Log","simply-static")}),(0,o.jsx)(d.Button,{variant:"secondary",onClick:()=>{s()({path:"/simplystatic/v1/delete-log",method:"POST"}),n(!0),setTimeout((function(){n(!1)}),2e3)},children:pe("Clear Log","simply-static")}),t&&(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:pe("Log file cleared.","simply-static")})})})]})},{__:me}=wp.i18n,he=function(e){const{children:t,canGenerate:s,isPaused:n,isDelayed:i,startExport:a,cancelExport:r,pauseExport:l,resumeExport:c}=e,p="function"==typeof l,u="function"==typeof r,m="function"==typeof c,h="function"==typeof a;return(0,o.jsxs)("div",{className:"generate-buttons-container",children:[s&&h&&(0,o.jsxs)(d.Button,{onClick:()=>{a()},disabled:!s||i,className:"generate",children:[s&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),me("Generate","simply-static")]}),s&&i>0&&(0,o.jsxs)(o.Fragment,{children:[" ",i,"s"]}),!s&&(0,o.jsx)(d.Dashicon,{icon:"update spin"})]}),!s&&(0,o.jsxs)(o.Fragment,{children:[!n&&p&&(0,o.jsx)(d.Button,{label:me("Pause","simply-static"),className:"ss-generate-media-button","aria-label":me("Pause","simply-static"),onClick:()=>l(),children:(0,o.jsx)(d.Dashicon,{icon:"controls-pause"})}),n&&m&&(0,o.jsx)(d.Button,{label:me("Resume","simply-static"),className:"ss-generate-media-button","aria-label":me("Resume","simply-static"),onClick:()=>c(),children:(0,o.jsx)(d.Dashicon,{icon:"controls-play"})}),u&&(0,o.jsx)(d.Button,{onClick:()=>r(),label:me("Cancel","simply-static"),className:"ss-generate-cancel-button","aria-label":me("Cancel","simply-static"),children:(0,o.jsx)(d.Dashicon,{icon:"no"})})]}),t]})},{__:ge}=wp.i18n,xe=function(t){const{site:i,setAnyRunning:a}=t,r=i.id,[l,c]=(0,e.useState)(!i.running&&!i.paused),[p,u]=(0,e.useState)(i.running),[m,h]=(0,e.useState)(i.paused);(0,n.useEffect)((()=>{p&&a(!0)}),[p]),(0,n.useEffect)((()=>{h(i.paused),u(i.running),c(!i.running&&!i.paused)}),[i]);const g=()=>"pro"===options.plan;return(0,o.jsxs)("tr",{children:[(0,o.jsxs)("td",{children:[i.name,(0,o.jsx)("br",{}),(0,o.jsx)("a",{href:i.url,children:i.url})]}),(0,o.jsx)("td",{children:i.status}),(0,o.jsx)("td",{className:"generate-container network-generate-container",children:(0,o.jsxs)(he,{site:i,canGenerate:l,startExport:g()?()=>{c(!1),h(!1),s()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:r,type:"export",is_network_admin:options.is_network}}).then((e=>{500!==JSON.parse(e).status?u(!0):c(!0)}))}:null,isPaused:m,isRunning:p,cancelExport:g()?()=>{s()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{h(!1),u(!1),c(!0)}))}:null,pauseExport:g()?()=>{s()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{u(!1),h(!0)}))}:null,resumeExport:g()?()=>{s()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:r,is_network_admin:options.is_network}}).then((e=>{h(!1),u(!0)}))}:null,children:[!g()&&(0,o.jsxs)(d.Button,{label:"Generate","aria-label":ge("Generate","simply-static"),className:"generate",disabled:!0,children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),ge("Generate","simply-static")]}),(0,o.jsx)(d.Button,{className:"sub-site-settings",onClick:()=>window.location=i.settings_url,children:(0,o.jsx)(d.Dashicon,{icon:"admin-generic"})}),!g()&&(0,o.jsx)(d.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:ge("Upgrade to manage from network.","simply-static")})]})})]})},{__:ye}=wp.i18n,fe=function(t){const[i,a]=(0,e.useState)([]),[l,c]=(0,e.useState)(!1),[d,p]=(0,e.useState)(0);function u(){s()({path:"/simplystatic/v1/sites",method:"GET"}).then((e=>{let t=[],s=!1;e.data.forEach((function(e){t.push(e),e.running&&(s=!0)})),a(t),c(s)}))}return r((()=>{u()}),l?2500:3e5),r((()=>{var e;!d&&i.length>0&&p(i[0].id),d&&(e=d,s()({path:"/simplystatic/v1/trigger-cron",method:"POST",data:{blog_id:e}}).then((t=>{var s=JSON.parse(t);200===s.status?console.log("CRON triggered successfully for site "+e):console.error("Failed to trigger CRON:",s.message);let n=function(e){let t=function(){let e=[];return i.forEach((function(t){e.push(t.id)})),e}();if(0===t.length)return 0;let s=t.indexOf(e);return-1===s?t[0]:(s++,t[s]||t[0])}(e);p(n)})).catch((e=>{console.error("Error triggering CRON:",e)})))}),l?15e4:null),(0,n.useEffect)((()=>{u()}),[]),(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("table",{className:"wp-list-table widefat fixed striped posts simple-static-sites",children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{children:ye("Name","simply-static")}),(0,o.jsx)("th",{children:ye("Status","simply-static")}),(0,o.jsx)("th",{children:ye("Actions","simply-static")})]})}),(0,o.jsx)("tbody",{children:i.map((e=>(0,o.jsx)(xe,{setAnyRunning:c,site:e},e.id)))})]})})},{__:be}=wp.i18n;function _e(){const[t,s]=(0,e.useState)(!1);(0,e.useEffect)((()=>{try{if(options.is_network||"pro"===options.plan)return void s(!1);const e=new Date,t=e.getFullYear(),n=new Date(t,10,28,0,0,0),i=new Date(t,11,5,23,59,59),a=`ss_bf_banner_dismissed_${t}`,r=!("undefined"==typeof window||!window.localStorage)&&"1"===window.localStorage.getItem(a);s(!r&&e>=n&&e<=i)}catch(e){s(!1)}}),[]);const n=()=>{try{const e=`ss_bf_banner_dismissed_${(new Date).getFullYear()}`;"undefined"!=typeof window&&window.localStorage&&window.localStorage.setItem(e,"1")}catch(e){}s(!1)};return t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"notice",isDismissible:!0,onRemove:n,className:"bf-banner",children:(0,o.jsxs)("p",{children:[(0,o.jsx)("strong",{children:"BLACK FRIDAY"}),": Upgrade to ",(0,o.jsx)("b",{children:"Simply Static Pro"})," and save ",(0,o.jsx)("b",{children:"25%"})," by using the code ",(0,o.jsx)("b",{children:"SSBF25"})," ",(0,o.jsx)(d.Button,{isPrimary:!0,href:"https://simplystatic.com/pricing/?utm_source=plugin&utm_medium=banner&utm_campaign=bf",target:"_blank",rel:"noopener noreferrer",style:{marginLeft:8},children:be("Buy now","simply-static")})]})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}):null}const{__:ve}=wp.i18n,Se=function(){const{settings:t,blogId:s,setBlogId:n}=(0,e.useContext)(l);return(0,o.jsxs)("div",{className:"inner-settings",children:[!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(_e,{}),(0,o.jsx)(le,{}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsxs)(d.Flex,{align:"top",children:[options.is_network&&(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.Card,{children:(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(fe,{})})})}),t.debugging_mode&&options.log_file&&!options.is_network&&(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:ve("Debugging","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(ue,{})})]})})]}),!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsx)("b",{children:ve("Export Log","simply-static")})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(de,{})})]})]})]})},{__:je}=wp.i18n,we=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)(!1),[m,h]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1),[y,f]=(0,e.useState)(!1),[b,_]=(0,e.useState)(!1),[v,S]=(0,e.useState)(!1),[j,w]=(0,e.useState)("wp-content"),[C,k]=(0,e.useState)("wp-includes"),[E,P]=(0,e.useState)("uploads"),[N,R]=(0,e.useState)("plugins"),[T,D]=(0,e.useState)("themes"),[I,B]=(0,e.useState)("style"),[O,H]=(0,e.useState)("author"),[A,M]=(0,e.useState)(!1),[z,$]=(0,e.useState)(!1),[L,U]=(0,e.useState)(!1),[W,G]=(0,e.useState)(!1),[q,J]=(0,e.useState)(!1),[Y,K]=(0,e.useState)(!1),[V,Q]=(0,e.useState)(!1),[Z,X]=(0,e.useState)(!1),[ee,te]=(0,e.useState)(!1),[se,ne]=(0,e.useState)(!1),[ie,ae]=(0,e.useState)(!1),[re,oe]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{t.use_minify&&u(t.use_minify),t.minify_html&&h(t.minify_html),t.minify_css&&x(t.minify_css),t.minify_inline_css&&f(t.minify_inline_css),t.minify_js&&_(t.minify_js),t.minify_inline_js&&S(t.minify_inline_js),t.wp_content_directory&&w(t.wp_content_directory),t.wp_includes_directory&&k(t.wp_includes_directory),t.wp_uploads_directory&&P(t.wp_uploads_directory),t.wp_plugins_directory&&R(t.wp_plugins_directory),t.wp_themes_directory&&D(t.wp_themes_directory),t.theme_style_name&&B(t.theme_style_name),t.author_url&&H(t.author_url),t.hide_version&&M(t.hide_version),t.hide_generator&&U(t.hide_generator),t.hide_prefetch&&$(t.hide_prefetch),t.hide_rsd&&G(t.hide_rsd),t.hide_emotes&&J(t.hide_emotes),t.disable_xmlrpc&&K(t.disable_xmlrpc),t.disable_embed&&Q(t.disable_embed),t.disable_db_debug&&X(t.disable_db_debug),t.disable_wlw_manifest&&te(t.disable_wlw_manifest),t.version_css&&ne(t.version_css),t.version_js&&ae(t.version_js)}),[t]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[je("Minify","simply-static"),(0,o.jsx)(F,{title:je("How to minify HTML, CSS and JavaScript?","simply-static"),videoUrl:"https://youtu.be/52IKv5ai-i4"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Minify Files?","simply-static"),__nextHasNoMarginBottom:!0,help:je(p?"Enable minify files on your static website.":"Don't enable minify files on your static website.","simply-static"),disabled:"free"===options.plan||!c(),checked:p,onChange:e=>{u(e),n("use_minify",e)}}),p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Minify HTML","simply-static"),__nextHasNoMarginBottom:!0,help:je(m?"Minify HTML files.":"Don't minify HTML files.","simply-static"),disabled:"free"===options.plan||!c(),checked:m,onChange:e=>{h(e),n("minify_html",e)}}),m&&(0,o.jsx)(d.ToggleControl,{label:je("Leave quotes inside HTML attributes","simply-static"),__nextHasNoMarginBottom:!0,help:je("If there are issues with comments or JavaScript when minifying HTML, toggle this ON.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!t.minify_html_leave_quotes,onChange:e=>{n("minify_html_leave_quotes",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Minify CSS","simply-static"),__nextHasNoMarginBottom:!0,help:je(g?"Minify CSS files.":"Don't minify CSS files.","simply-static"),disabled:"free"===options.plan||!c(),checked:g,onChange:e=>{x(e),n("minify_css",e)}}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextareaControl,{label:je("Exclude Stylesheet URLs","simply-static"),__nextHasNoMarginBottom:!0,help:je("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!c(),value:t.minify_css_exclude,onChange:e=>{n("minify_css_exclude",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Minify Inline CSS","simply-static"),__nextHasNoMarginBottom:!0,help:je(y?"Minify Inline CSS.":"Don't minify Inline CSS.","simply-static"),disabled:"free"===options.plan||!c(),checked:y,onChange:e=>{f(e),n("minify_inline_css",e)}})]}),(0,o.jsx)(d.ToggleControl,{label:je("Minify JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:je(b?"Minify JavaScript files.":"Don't minify JavaScript files.","simply-static"),disabled:"free"===options.plan||!c(),checked:b,onChange:e=>{_(e),n("minify_js",e)}}),b&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextareaControl,{label:je("Exclude JavaScript URLs","simply-static"),__nextHasNoMarginBottom:!0,help:je("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!c(),value:t.minify_js_exclude,onChange:e=>{n("minify_js_exclude",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Minify Inline JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:je(v?"Minify Inline JavaScript.":"Don't minify Inline JavaScript.","simply-static"),disabled:"free"===options.plan||!c(),checked:v,onChange:e=>{S(e),n("minify_inline_js",e)}})]})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("b",{children:je("Versioning","simply-static")})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Version CSS?","simply-static"),__nextHasNoMarginBottom:!0,help:je(se?"Appends a version query string to CSS files.":"Don't append a version query string to CSS files.","simply-static"),disabled:"free"===options.plan||!c(),checked:se,onChange:e=>{ne(e),n("version_css",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Version JavaScript?","simply-static"),__nextHasNoMarginBottom:!0,help:je(ie?"Appends a version query string to JavaScript files.":"Don't append a version query string to JavaScript files.","simply-static"),disabled:"free"===options.plan||!c(),checked:ie,onChange:e=>{ae(e),n("version_js",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[je("Image Optimization","simply-static"),(0,o.jsx)(F,{title:je("How to optimize images with ShortPixel?","simply-static"),videoUrl:"https://youtu.be/OIfKcXz3cxY"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Optimize Images with ShortPixel?","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_enabled?je("Optimize images with the ShortPixel API.","simply-static"):je("Don't optimize images with the ShortPixel API.","simply-static"),disabled:"free"===options.plan||!c(),checked:!!t.shortpixel_enabled,onChange:e=>{n("shortpixel_enabled",e)}}),t.shortpixel_enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.TextControl,{label:je("ShortPixel API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:t.shortpixel_api_key,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_api_key",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Convert to webP","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_webp_enabled?je("Convert images to webp format.","simply-static"):je("Don't convert images to webp format","simply-static"),checked:!!t.shortpixel_webp_enabled,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_webp_enabled",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Backup the original images?","simply-static"),__nextHasNoMarginBottom:!0,help:t.shortpixel_backup_enabled?je("Back original images.","simply-static"):je("Don't backup original images.","simply-static"),checked:!!t.shortpixel_backup_enabled,disabled:"free"===options.plan||!c(),onChange:e=>{n("shortpixel_backup_enabled",e)}}),t.shortpixel_backup_enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Notice,{status:"warning",isDismissible:!1,children:je("It will preserve every image which might increase your disk space usage.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{padding:1}),(0,o.jsxs)(d.Button,{disabled:re,onClick:()=>{oe(!0),s()({path:"/simplystatic/v1/shortpixel-restore",method:"POST"}).then((e=>{const t=JSON.parse(e);oe(!1),alert(t.message)})).catch((e=>{oe(!1),alert(e.message)}))},variant:"secondary",children:[!re&&je("Restore Original Images","simply-static"),re&&[(0,o.jsx)(d.Dashicon,{icon:"update spin"}),je("Restoring...","simply-static")]]})]})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[je("Replace","simply-static"),(0,o.jsx)(F,{title:je("How to replace WP default paths","simply-static"),videoUrl:"https://youtu.be/GedyNJJMGaY"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:je("wp-content directory","simply-static"),help:je('Replace the "wp-content" directory.',"simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"wp-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:j,onChange:e=>{n("wp_content_directory",e)}}),(0,o.jsx)(d.TextControl,{label:je("wp-includes directory","simply-static"),help:je('Replace the "wp-includes" directory.',"simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"wp-includes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:C,onChange:e=>{n("wp_includes_directory",e)}}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:je("Uploads directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:j+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"uploads",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:E,onChange:e=>{P(e),n("wp_uploads_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:je('Replace the "wp-content/uploads" directory.',"simply-static")})]}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:je("Plugins directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:j+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"plugins",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:N,onChange:e=>{R(e),n("wp_plugins_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:je('Replace the "wp-content/plugins" directory.',"simply-static")})]}),(0,o.jsxs)("div",{className:"ss-directory-input-group",children:[(0,o.jsx)("label",{className:"components-base-control__label",children:je("Themes directory","simply-static")}),(0,o.jsxs)(d.Flex,{align:"flex-start",gap:0,children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:j+"/",className:"ss-directory-prefix"})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,children:(0,o.jsx)(d.TextControl,{disabled:"free"===options.plan||!c(),type:"text",placeholder:"themes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:T,onChange:e=>{D(e),n("wp_themes_directory",e)}})})]}),(0,o.jsx)("p",{className:"components-base-control__help",children:je('Replace the "wp-content/themes" directory.',"simply-static")})]}),(0,o.jsx)(d.__experimentalInputControl,{label:je("Theme style name","simply-static"),help:je("Replace the style.css filename.","simply-static"),disabled:"free"===options.plan||!c(),type:"text",className:"ss-theme-style-name",suffix:".css",placeholder:"style",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:I,onChange:e=>{B(e),n("theme_style_name",e)}}),(0,o.jsx)(d.TextControl,{label:je("Author URL","simply-static"),help:je("Replace the author url.","simply-static"),disabled:"free"===options.plan||!c(),type:"text",placeholder:"author",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:O,onChange:e=>{H(e),n("author_url",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[je("Hide","simply-static"),(0,o.jsx)(F,{title:je("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Hide WordPress Version","simply-static"),__nextHasNoMarginBottom:!0,checked:A,disabled:"free"===options.plan||!c(),onChange:e=>{M(e),n("hide_version",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Hide WordPress Generator Meta","simply-static"),__nextHasNoMarginBottom:!0,checked:L,disabled:"free"===options.plan||!c(),onChange:e=>{U(e),n("hide_generator",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Hide DNS Prefetch WordPress link","simply-static"),__nextHasNoMarginBottom:!0,checked:z,disabled:"free"===options.plan||!c(),onChange:e=>{$(e),n("hide_prefetch",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Hide RSD Header","simply-static"),__nextHasNoMarginBottom:!0,checked:W,disabled:"free"===options.plan||!c(),onChange:e=>{G(e),n("hide_rsd",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)("b",{children:[je("Disable","simply-static"),(0,o.jsx)(F,{title:je("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!c())&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsxs)(d.ExternalLink,{href:"https://simplystatic.com",children:[" ",je("Requires Simply Static Pro","simply-static")]})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:je("Disable XML-RPC","simply-static"),__nextHasNoMarginBottom:!0,checked:Y,disabled:"free"===options.plan||!c(),onChange:e=>{K(e),n("disable_xmlrpc",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Disable Embed Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:V,disabled:"free"===options.plan||!c(),onChange:e=>{Q(e),n("disable_embed",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Disable DB Debug in Frontend","simply-static"),__nextHasNoMarginBottom:!0,checked:Z,disabled:"free"===options.plan||!c(),onChange:e=>{X(e),n("disable_db_debug",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Disable WLW Manifest Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:ee,disabled:"free"===options.plan||!c(),onChange:e=>{te(e),n("disable_wlw_manifest",e)}}),(0,o.jsx)(d.ToggleControl,{label:je("Disable Emojis","simply-static"),__nextHasNoMarginBottom:!0,checked:q,disabled:"free"===options.plan||!c(),onChange:e=>{J(e),n("hide_emotes",e)}})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:je("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),(0,o.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&c()&&(0,o.jsx)(d.Button,{onClick:()=>{i(),r(!0),setTimeout((function(){r(!1)}),2e3)},variant:"primary",children:je("Save Settings","simply-static")})})]})},{__:Ce}=wp.i18n,ke=function(){const{settings:t,updateSetting:n,saveSettings:i,settingsSaved:a,setSettingsSaved:r,isPro:c}=(0,e.useContext)(l),p="function"!=typeof c||!!c(),[u,m]=(0,e.useState)([]),[h,g]=(0,e.useState)({}),[x,y]=(0,e.useState)([]),[f,b]=(0,e.useState)([]),[_,v]=(0,e.useState)({}),[S,j]=(0,e.useState)([]),[w,C]=(0,e.useState)(!0),[k,E]=(0,e.useState)(!1),[P,N]=(0,e.useState)(!1),[R,T]=(0,e.useState)(3),[D,I]=(0,e.useState)(""),[F,B]=(0,e.useState)(["export","update","build","single"]),[O,H]=(0,e.useState)(!0),[A,M]=(0,e.useState)(!0),[z,$]=(0,e.useState)(!1),[L,U]=(0,e.useState)([]),[W,G]=(0,e.useState)({}),[q,J]=(0,e.useState)([]);return(0,e.useEffect)((()=>{if(C(!1!==t.ss_use_single_exports),E(!!t.ss_single_export_add_xml_sitemap),s()({path:"/simplystatic/v1/pages"}).then((e=>{const s=e.map((e=>e.label)),n={};e.forEach((e=>n[e.label]=e.value)),m(s),g(n);const i=Array.isArray(t.ss_single_pages)?t.ss_single_pages:[];if(i.length>0){const t=i.map((t=>{const s=e.find((e=>String(e.value)===String(t)));return s?s.label:String(t)}));y(t)}})),s()({path:"/simplystatic/v1/taxonomies"}).then((e=>{const s=e.map((e=>e.label)),n={};e.forEach((e=>n[e.label]=e.value)),b(s),v(n);const i=Array.isArray(t.ss_single_taxonomy_archives)?t.ss_single_taxonomy_archives:[];if(i.length>0){const t=i.map((t=>{const s=e.find((e=>String(e.value)===String(t)));return s?s.label:String(t)}));j(t)}})),s()({path:"/simplystatic/v1/post-types"}).then((e=>{let s=Array.isArray(e)?e:e&&e.data?e.data:[];const i=s.map((e=>e.label)),a={};s.forEach((e=>a[e.label]=e.name)),U(i),G(a);const r=Array.isArray(t.ss_single_auto_export_types)?t.ss_single_auto_export_types:[];let o=r;r.length||(o=s.map((e=>e.name)));const l=o.map((e=>{const t=s.find((t=>String(t.name)===String(e)));return t?t.label:String(e)}));J(l),r.length||n("ss_single_auto_export_types",o)})),H(!!t.ss_single_include_archives||void 0===t.ss_single_include_archives),M(!!t.ss_single_include_pagination||void 0===t.ss_single_include_pagination),$(!!t.ss_use_builds),N(!!t.ss_single_auto_export),void 0!==t.ss_single_auto_export_delay){const e=parseInt(t.ss_single_auto_export_delay,10);T(Number.isNaN(e)?3:Math.max(0,e))}else T(3);I(t.ss_webhook_url||t.ss_single_export_webhook_url||"");Array.isArray(t.ss_webhook_enabled_types)&&t.ss_webhook_enabled_types.length?B(t.ss_webhook_enabled_types):B(t.ss_single_export_webhook_url&&t.ss_single_export_webhook_url.length?["single"]:["export","update","build","single"])}),[t.ss_single_pages,t.ss_single_taxonomy_archives,t.ss_use_builds]),(0,o.jsxs)("div",{className:"inner-settings",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Single Exports","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.ToggleControl,{label:Ce("Use Single Exports?","simply-static"),help:Ce(w?"Quickly push updates to your static site while editing pages/posts.":"Do not allow quick updates while editing posts/pages.","simply-static"),checked:!!w,disabled:!p,onChange:e=>{p&&(C(e),n("ss_use_single_exports",e))}}),w&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.ToggleControl,{label:Ce("Use Auto Export?","simply-static"),help:Ce(P?"Automatically schedule a Single Export when a post/page is updated/published.":"Do not automatically run Single Export when a post/page is updated/published.","simply-static"),checked:!!P,disabled:!p,onChange:e=>{p&&(N(e),n("ss_single_auto_export",e))}}),P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.FormTokenField,{label:Ce("Auto Export Post Types","simply-static"),__next40pxDefaultSize:!0,value:q,suggestions:L,onChange:e=>{if(!p)return;J(e);const t=e.map((e=>W[e]?W[e]:e)).filter(Boolean),s=t.length?t:Object.values(W);n("ss_single_auto_export_types",s)},help:Ce("Choose which public post types should trigger automatic Single Exports when updated. If none is selected, all public post types are used.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which public post types should trigger automatic Single Exports when updated. If none is selected, all public post types are used.","simply-static")})]}),P&&(0,o.jsx)(d.__experimentalInputControl,{label:Ce("Auto export delay (seconds)","simply-static"),help:Ce("Delay before the automatic Single Export starts after a change is detected.","simply-static"),type:"number",min:0,value:R,disabled:!p,onChange:e=>{if(!p)return;const t=parseInt(e,10),s=Number.isNaN(t)?0:Math.max(0,t);T(s),n("ss_single_auto_export_delay",s)}}),(0,o.jsx)(d.FormTokenField,{label:Ce("Pages to update","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,suggestions:u,onChange:e=>{if(!p)return;y(e);const t=e.map((e=>{if(h[e])return h[e];const t=parseInt(e,10);return isNaN(t)?null:t})).filter((e=>null!==e));n("ss_single_pages",t)},help:Ce("Select which pages should start a Single Export. If none selected, we use your homepage.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:200,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which pages/files should be updated when running a Single Export.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),(0,o.jsx)(d.FormTokenField,{label:Ce("Taxonomy Archives","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:S,suggestions:f,onChange:e=>{if(!p)return;j(e);const t=e.map((e=>_[e]?_[e]:e)).filter(Boolean);n("ss_single_taxonomy_archives",t)},help:Ce("Choose which taxonomy archives to include for selected pages/posts (e.g., Categories, Tags, or custom taxonomies).","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:100,className:"horizontal-token-field",disabled:!p}),(0,o.jsx)("p",{className:"description",children:Ce("Choose which taxonomies should be updated when running a Single Export.","simply-static")}),(0,o.jsx)(d.__experimentalSpacer,{margin:2}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update archives (author/date/post_type)","simply-static"),help:Ce(O?"Update archive URLs when running a Single Export.":"Do not update archive URLs.","simply-static"),checked:!!O,disabled:!p,onChange:e=>{p&&(H(e),n("ss_single_include_archives",e))}}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update pagination","simply-static"),help:Ce(A?"Update pagination URLs when running a Single Export.":"Do not update pagination URLs.","simply-static"),checked:!!A,disabled:!p,onChange:e=>{p&&(M(e),n("ss_single_include_pagination",e))}}),(0,o.jsx)(d.ToggleControl,{label:Ce("Update XML sitemap","simply-static"),help:Ce(k?"Update XML sitemaps when running a Single Export.":"Do not update XML sitemaps.","simply-static"),checked:!!k,disabled:!p,onChange:e=>{p&&(E(e),n("ss_single_export_add_xml_sitemap",e))}})]})]})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Build Exports","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsx)(d.CardBody,{children:(0,o.jsx)(d.ToggleControl,{label:Ce("Use Build Exports?","simply-static"),help:Ce(z?"Use build exports to quickly update a list of pages and files on your static site.":"Build Exports are disabled.","simply-static"),checked:!!z,disabled:!p,onChange:e=>{p&&($(e),n("ss_use_builds",e))}})})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)("strong",{children:Ce("Webhook","simply-static")})}),("free"===options.plan||!p)&&(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.ExternalLink,{href:"https://simplystatic.com",children:Ce("Requires Simply Static Pro","simply-static")})})]})}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)(d.TextControl,{label:Ce("Webhook URL","simply-static"),placeholder:"https://example.com/webhook-endpoint",value:D,disabled:!p,onChange:e=>{p&&(I(e),n("ss_webhook_url",e))},help:Ce("Simply Static will POST a JSON payload to this URL after exports finish.","simply-static")}),(0,o.jsx)("p",{className:"description",children:Ce("Fire for these export types:","simply-static")}),(0,o.jsx)("div",{className:"ss-webhook-types",children:["export","update","build","single"].map((e=>(0,o.jsx)(d.ToggleControl,{label:Ce("export"===e?"Export (full)":"update"===e?"Update":"build"===e?"Build":"Single","simply-static"),checked:F.includes(e),disabled:!p,onChange:t=>{if(!p)return;const s=new Set(F);t?s.add(e):s.delete(e);const i=Array.from(s);B(i),n("ss_webhook_enabled_types",i)}},e)))}),(0,o.jsx)("p",{className:"description",children:Ce("Payload includes event, site_url, export_type, identifiers (when available), timestamp, and success.","simply-static")})]})]}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,children:(0,o.jsx)("p",{children:Ce("Settings saved successfully.","simply-static")})})}),(0,o.jsx)(d.__experimentalSpacer,{margin:5})]}),p&&(0,o.jsx)("div",{className:"save-settings",children:(0,o.jsx)(d.Button,{onClick:()=>{p&&(i(),r(!0),setTimeout((()=>r(!1)),2e3))},variant:"primary",children:Ce("Save Settings","simply-static")})})]})},Ee=function(){const{isPro:t,isStudio:s}=(0,e.useContext)(l);return(0,o.jsx)(o.Fragment,{children:"pro"===options.plan&&t()?(0,o.jsx)(o.Fragment,{children:s()?(0,o.jsxs)("p",{className:"version-number",children:["Free: ",(0,o.jsx)("b",{children:options.version}),(0,o.jsx)("br",{}),"Pro: ",(0,o.jsx)("b",{children:options.version_pro}),(0,o.jsx)("br",{}),"Studio: ",(0,o.jsx)("b",{children:options.version_studio})]}):(0,o.jsxs)("p",{className:"version-number",children:["Free: ",(0,o.jsx)("b",{children:options.version}),(0,o.jsx)("br",{}),"Pro: ",(0,o.jsx)("b",{children:options.version_pro})]})}):(0,o.jsxs)("p",{className:"version-number",children:["Version: ",(0,o.jsx)("b",{children:options.version})]})})},{__:Pe}=wp.i18n,Ne=function(t=null){const{isPro:s}=(0,e.useContext)(l);return(0,o.jsxs)(d.Card,{className:"plugin-nav",children:[(0,o.jsx)("div",{className:"plugin-logo",children:(0,o.jsx)("img",{alt:"Logo",src:options.logo})}),(0,o.jsx)(Ee,{}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsx)(d.__experimentalSpacer,{margin:5}),(0,o.jsxs)(d.Button,{href:"https://simplystatic.com/changelogs/",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-ul"})," ",Pe("Changelog","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-links"})," ",Pe("Documentation","simply-static")]}),"free"===options.plan&&(0,o.jsxs)(d.Button,{href:"https://simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-site-alt3"}),"Simply Static Pro"]})]})},{__:Re}=wp.i18n;function Te({onClose:t,setSelectableEnvironments:n,setSelectedEnvironment:i}){const[a,r]=(0,e.useState)(""),[l,c]=(0,e.useState)(!1);return(0,o.jsxs)("div",{className:"ss-environment-form",children:[(0,o.jsx)(d.TextControl,{label:"Name",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>r(e),value:a}),(0,o.jsx)("p",{children:Re("A new environment will be created with the current configuration.","simply-static")}),(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexBlock,{children:(0,o.jsx)(d.Button,{variant:"primary",onClick:()=>{c(!0),s()({path:"/simplystatic/v1/environment",method:"POST",data:{title:a}}).then((e=>{let s=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));n(s),i(e.current_environment),t()})).catch((e=>{alert(e.message)})).finally((()=>c(!1)))},isBusy:l,children:Re(l?"Creating...":"Create","simply-static")})}),(0,o.jsx)(d.FlexBlock,{children:(0,o.jsx)(d.Button,{variant:"secondary",onClick:t,children:Re("Cancel","simply-static")})})]})]})}const{__:De}=wp.i18n;function Ie({onChange:e,current:t,environments:s,disabled:n,onDelete:i}){return(0,o.jsxs)(d.Flex,{children:[(0,o.jsx)(d.FlexItem,{style:{minWidth:"80%"},children:(0,o.jsx)(d.SelectControl,{disabled:n,value:t,options:s,help:De("Choose an environment or create a new one to configure settings.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e})}),(0,o.jsx)(d.FlexItem,{children:(0,o.jsx)(d.Button,{className:"environment-delete-button",variant:"tertiary",label:De("Delete selected environment","simply-static"),size:"small",icon:"trash",disabled:n,onClick:i})})]})}const{__:Fe}=wp.i18n;function Be({getSettings:t,isRunning:n}){const{getIntegrationById:i}=(0,e.useContext)(l),a=()=>{try{if("undefined"==typeof options)return!1;if("pro"!==options.plan)return!1;const e=i?i("environments"):null;return!(!e||!e.active&&!e.can_run)}catch(e){return!1}},[r,c]=(0,e.useState)(""),[p,u]=(0,e.useState)([]),[m,h]=(0,e.useState)(!1),[g,x]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{a()&&s()({path:"/simplystatic/v1/environment",method:"GET"}).then((e=>{let t=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));u(t),c(e.current_environment)})).catch((e=>{}))}),[]),(0,o.jsxs)("div",{className:"environment-container",children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Fe("Environment","simply-static")]}),!m&&r&&(0,o.jsxs)("p",{children:["Current: ",(0,o.jsx)("strong",{children:g?Fe("Changing ...","simply-static"):p.filter((e=>e.value===r)).pop().label})]}),!m&&p.length>0&&(0,o.jsx)(Ie,{onChange:e=>{x(!0),a()?s()({path:"/simplystatic/v1/environment",method:"PUT",data:{version:e}}).then((()=>{t(),c(e)})).catch((e=>alert(e.message))).finally((()=>{x(!1)})):x(!1)},environments:p,onDelete:()=>{x(!0),a()?s()({path:"/simplystatic/v1/environment",method:"DELETE",data:{version:r}}).then((e=>{t();let s=Object.keys(e.environments).map((function(t){return{label:e.environments[t],value:t}}));u(s),c(e.current_environment)})).catch((e=>alert(e.message))).finally((()=>{x(!1)})):x(!1)},current:r,disabled:n||g}),!m&&(0,o.jsx)(d.Button,{disabled:n||g,variant:"primary",size:"large",onClick:()=>h(!0),children:"Create an Environment"}),m&&(0,o.jsx)(Te,{onClose:()=>h(!1),setSelectedEnvironment:c,setSelectableEnvironments:u})]})}const{__:Oe}=wp.i18n,He=function(t=null){const{isRunning:n,setIsRunning:i,isResumed:a,setIsResumed:c,isPaused:p,setIsPaused:u,blogId:m,settings:h,updateFromNetwork:g,getSettings:x,isPro:y,canRunIntegration:f,showMobileNav:b,setShowMobileNav:_,isDelayed:v}=(0,e.useContext)(l),{activeItem:S,setActiveItem:j}=t,[w,C]=(0,e.useState)(!1),[k,E]=(0,e.useState)("current"),[P,N]=(0,e.useState)([]),[R,T]=(0,e.useState)(!1),[D,I]=(0,e.useState)("export"),[F,B]=(0,e.useState)(!0);if(options.is_multisite){const t=()=>{s()({path:"/simplystatic/v1/check-can-run",method:"GET"}).then((e=>{JSON.parse(e).can_run?B(!0):B(!1)}))};r((()=>{t()}),n?null:1e5),(0,e.useEffect)((()=>{t()}),[])}(0,e.useEffect)((()=>{if(C(n||p),options.selectable_sites&&!options.is_network&&options.is_multisite){let e=options.selectable_sites.slice().sort((function(e,t){return(e.name||"").localeCompare(t.name||"")})).map((function(e){return{label:`${e.name} (#${e.blog_id})`,value:e.blog_id}}));e.unshift({label:Oe("Use current settings","simply-static"),value:"current"}),N(e)}}),[options,n,p]),(0,e.useEffect)((()=>{I("export")}),[h]);let O="";if(Object.keys(options.builds).length){const e=Object.keys(options.builds).map((e=>(0,o.jsx)("option",{value:e,children:options.builds[e]},e)));e.sort(((e,t)=>e.props.children.localeCompare(t.props.children))),O=(0,o.jsx)("optgroup",{label:"Builds",children:e})}const H=e=>{try{return!options.allowed_pages||options.allowed_pages.includes(e)}catch(e){return!0}},A=["/","/diagnostics"].some(H),M=["/general","/deployment","/forms","/search","/optimize","/workflow"].some(H),z=["/integrations","/utilities","/debug","/uam"].some(H);return(0,o.jsxs)(d.Card,{className:"plugin-nav",children:[(0,o.jsx)("div",{className:"plugin-logo",children:(0,o.jsx)("img",{alt:"Logo",src:options.logo})}),(0,o.jsx)(Ee,{}),(0,o.jsxs)("div",{className:"generate-container "+(w?"generating":""),children:[(0,o.jsxs)(d.SelectControl,{className:"generate-type",value:D,disabled:w,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{I(e)},children:[(0,o.jsx)("option",{value:"export",children:Oe("Export","simply-static")}),"zip"!==h.delivery_method&&"tiiny"!==h.delivery_method&&(0,o.jsx)(o.Fragment,{children:"pro"===options.plan&&y()?(0,o.jsx)("option",{value:"update",children:Oe("Export Changes","simply-static")}):(0,o.jsx)("option",{disabled:!0,value:"update",children:Oe("Export Changes (Requires Simply Static Pro)","simply-static")})}),O]}),F&&(0,o.jsx)(he,{canGenerate:!w,startExport:()=>{C(!0),c(!1),u(!1),s()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:m,type:D}}).then((e=>{var t=JSON.parse(e);if(500===t.status)return alert(t.message),void C(!1);i(!0)}))},cancelExport:()=>{s()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:m}}).then((e=>{c(!1),u(!1),i(!1),C(!1)}))},pauseExport:()=>{s()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:m}}).then((e=>{i(!1),c(!1),u(!0)}))},resumeExport:()=>{s()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:m}}).then((e=>{c(!0),u(!1),i(!0)}))},isRunning:n,isPaused:p,isResumed:a,isDelayed:v}),!F&&options.is_multisite&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Button,{disabled:!0,className:"generate",children:[(0,o.jsx)(d.Dashicon,{icon:"update"}),Oe("Generate","simply-static")]}),(0,o.jsx)(d.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:Oe("An export from another site is running. Upgrade to queue them.","simply-static")})]})]}),(0,o.jsxs)(d.CardBody,{children:["pro"===options.plan&&y()&&(0,o.jsx)(o.Fragment,{children:!options.is_network&&f("environments")&&(0,o.jsx)(Be,{isRunning:n,getSettings:x})}),!options.is_network&&options.is_multisite&&(0,o.jsxs)("div",{className:"import-container",children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Import","simply-static")]}),(0,o.jsx)(d.SelectControl,{value:k,options:P,help:Oe("Choose a subsite to import settings from.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{E(e)}}),"current"!==k&&(0,o.jsx)(d.Button,{isPrimary:!0,onClick:()=>{(e=>{g(e),T(!0),setTimeout((function(){T(!1),window.location.reload()}),3500)})(k)},children:Oe("Import Settings","simply-static")}),R?(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsx)(d.Notice,{status:"success",isDismissible:!1,className:"upgrade-network-notice",children:(0,o.jsx)("p",{children:Oe("Settings successfully imported.","simply-static")})})}):""]}),A&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Tools","simply-static")]}),H("/")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/"),_(!b)},className:"/"===S?"is-active-item generate":"generate",path:"/",children:[(0,o.jsx)(d.Dashicon,{icon:"update"})," ",Oe("Activity Log","simply-static")]}),H("/diagnostics")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/diagnostics"),_(!b)},className:"/diagnostics"===S?"is-active-item":"",path:"/diagnostics",children:[(0,o.jsx)(d.Dashicon,{icon:"bell"})," ",Oe("Diagnostics","simply-static")]})]})]}),M&&(0,o.jsxs)(d.CardBody,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Settings","simply-static")]}),H("/general")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/general"),_(!b)},className:"/general"===S?"is-active-item":"",path:"/general",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-generic"})," ",Oe("General","simply-static")]}),!options.is_network&&!options.hidden_settings.includes("deployment")&&H("/deployment")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/deployment"),_(!b)},className:"/deployment"===S?"is-active-item":"",path:"/deployment",children:[(0,o.jsx)(d.Dashicon,{icon:"migrate"})," ",Oe("Deploy","simply-static")]}),!options.is_network&&(0,o.jsxs)(o.Fragment,{children:[H("/forms")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/forms"),_(!b)},className:"/forms"===S?"is-active-item":"",path:"/forms",children:[(0,o.jsx)(d.Dashicon,{icon:"align-center"})," ",Oe("Forms","simply-static")]}),H("/search")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/search"),_(!b)},className:"/search"===S?"is-active-item":"",path:"/search",children:[(0,o.jsx)(d.Dashicon,{icon:"search"})," ",Oe("Search","simply-static")]}),H("/optimize")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/optimize"),_(!b)},className:"/optimize"===S?"is-active-item":"",path:"/optimize",children:[(0,o.jsx)(d.Dashicon,{icon:"dashboard"})," ",Oe("Optimize","simply-static")]}),H("/workflow")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/workflow"),_(!b)},className:"/workflow"===S?"is-active-item":"",path:"/workflow",children:[(0,o.jsx)(d.Dashicon,{icon:"randomize"})," ",Oe("Workflow","simply-static")]})]})]}),z&&(0,o.jsxs)(d.CardBody,{children:[(0,o.jsxs)("h4",{className:"settings-headline",children:[" ",Oe("Advanced","simply-static")]}),H("/integrations")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/integrations"),_(!b)},className:"/integrations"===S?"is-active-item":"",path:"/integrations",children:[(0,o.jsx)(d.Dashicon,{icon:"block-default"})," ",Oe("Integrations","simply-static")]}),H("/utilities")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/utilities"),_(!b)},className:"/utilities"===S?"is-active-item":"",path:"/utilities",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-tools"})," ",Oe("Utilities","simply-static")]}),H("/debug")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/debug"),_(!b)},className:"/debug"===S?"is-active-item":"",path:"/debug",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-help"})," ",Oe("Debug","simply-static")]}),options.uam_enabled&&H("/uam")&&(0,o.jsxs)(d.__experimentalNavigatorButton,{onClick:()=>{j("/uam"),_(!b)},className:"/uam"===S?"is-active-item":"",path:"/uam",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-users"})," ",Oe("UAM","simply-static")]})]}),(0,o.jsxs)(d.CardBody,{children:[(0,o.jsx)("h4",{className:"settings-headline",children:"Learn"}),(0,o.jsxs)(d.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"admin-links"})," ",Oe("Documentation","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://www.youtube.com/playlist?list=PLcpe8_rNg8U5g1gCOa0Ge6T17f50nSvmg",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"format-video"})," ",Oe("Video Course","simply-static")]}),(0,o.jsxs)(d.Button,{href:"https://simplystatic.com/tutorials/",target:"_blank",children:[(0,o.jsx)(d.Dashicon,{icon:"edit"})," ",Oe("Tutorials","simply-static")]})]})]})},{__:Ae}=wp.i18n,Me=function(){const{isRunning:t,isPaused:s,passedChecks:n,isPro:i,showMobileNav:a,setShowMobileNav:r,settings:c}=(0,e.useContext)(l),[p,u]=(0,e.useState)({activeItem:"/"}),[m,h]=(0,e.useState)(localStorage.getItem("ss-initial-page")?localStorage.getItem("ss-initial-page"):options.initial),[g,x]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{let e=localStorage.getItem("ss-initial-page");g||(x(!0),e?(u(e),h(e),localStorage.removeItem("ss-initial-page")):(u(options.initial),h(options.initial)))}),[options,t,s]),(0,o.jsx)("div",{className:"plugin-settings-container",children:(0,o.jsx)(d.__experimentalNavigatorProvider,{initialPath:m,style:{minHeight:window.innerHeight-(wpadminbar?wpadminbar.clientHeight:0)-1+"px"},children:(0,o.jsxs)(d.Flex,{children:[(0,o.jsxs)("a",{onClick:()=>{r(!a)},className:"show-nav",children:[(0,o.jsx)(d.Dashicon,{icon:"align-center"})," ",Ae("Toggle menu","simply-static")]}),(0,o.jsx)(d.FlexItem,{className:a?"toggle-nav sidebar":"sidebar",children:options.is_network?(0,o.jsx)(Ne,{}):(0,o.jsx)(He,{setActiveItem:u,activeItem:p})}),(0,o.jsx)(d.FlexItem,{isBlock:!0,className:a?"":"toggle-nav",children:(0,o.jsxs)("div",{className:"plugin-settings",children:["no"!==n||options.is_network?"":(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(d.Notice,{status:"notice",isDismissible:!1,className:"/"==p?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,o.jsxs)("p",{children:[Ae("There are errors in diagnostics that may negatively affect your static export.","simply-static"),(0,o.jsx)("br",{}),Ae("Please review them and get them fixed to avoid problems.","simply-static")]}),(0,o.jsxs)(d.__experimentalNavigatorButton,{isSecondary:!0,onClick:()=>{u("/diagnostics"),r(!a)},className:"/diagnostics"===p?"is-active-item":"",path:"/diagnostics",children:[(0,o.jsx)(d.Dashicon,{icon:"editor-help"})," ",Ae("Visit Diagnostics","simply-static")]})]})}),"pro"!==options.plan||i()?"":(0,o.jsx)(d.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.Notice,{status:"error",isDismissible:!1,className:"/"==p?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,o.jsxs)("p",{children:[Ae("You are using the pro version without a valid license.","simply-static"),(0,o.jsx)("br",{}),Ae("We have temporarily disabled all the pro features now. Please contact our support to have the problem solved.","simply-static")]}),(0,o.jsx)(d.Button,{isPrimary:!0,href:"https://simplystatic.com/support/",target:"_blank",children:"Contact Support"})]}),(0,o.jsx)(d.__experimentalSpacer,{margin:"5px"})]})}),"/"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/",children:(0,o.jsx)(Se,{})}),"/diagnostics"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/diagnostics",children:(0,o.jsx)(A,{})}),"/general"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/general",children:(0,o.jsx)(O,{})}),"/deployment"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/deployment",children:(0,o.jsx)(L,{})}),"/forms"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/forms",children:(0,o.jsx)(W,{})}),"/search"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/search",children:(0,o.jsx)(q,{})}),"/optimize"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/optimize",children:(0,o.jsx)(we,{})}),"/workflow"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/workflow",children:(0,o.jsx)(ke,{})}),"/utilities"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/utilities",children:(0,o.jsx)(z,{})}),"/debug"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/debug",children:(0,o.jsx)(Y,{})}),"/uam"===p&&options.uam_enabled&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/uam",children:(0,o.jsx)(ee,{})}),"/integrations"===p&&(0,o.jsx)(d.__experimentalNavigatorScreen,{path:"/integrations",children:(0,o.jsx)(Z,{})})]})})]})})})},ze=function(){return(0,o.jsx)(c,{children:(0,o.jsx)("div",{children:(0,o.jsx)(Me,{})})})};"simplystatic-settings"===options.screen&&(0,e.createRoot)(document.getElementById("simplystatic-settings")).render((0,o.jsx)(ze,{}))})()})(); -
simply-static/trunk/src/admin/inc/class-ss-admin-rest.php
r3461695 r3468409 1154 1154 $params = $request->get_params(); 1155 1155 $blog_id = ! empty( $params['blog_id'] ) ? $params['blog_id'] : 0; 1156 $search = ! empty( $params['search'] ) ? sanitize_text_field( $params['search'] ) : ''; 1156 1157 1157 1158 if ( $blog_id && is_multisite() ) { … … 1159 1160 } 1160 1161 1161 $export_log = Plugin::instance()->get_export_log( $params['per_page'], $params['page'], $blog_id );1162 $export_log = Plugin::instance()->get_export_log( $params['per_page'], $params['page'], $blog_id, $search ); 1162 1163 1163 1164 if ( $blog_id && is_multisite() ) { -
simply-static/trunk/src/class-ss-plugin.php
r3461695 r3468409 374 374 * Get export log data. 375 375 * 376 * @param int $per_page given per page. 377 * @param int $current_page given current page. 378 * @param int $blog_id given blog id. 376 * @param int $per_page given per page. 377 * @param int $current_page given current page. 378 * @param int $blog_id given blog id. 379 * @param string $search optional search term to filter by URL, status code, or notes. 379 380 * 380 381 * @return array 381 382 */ 382 public function get_export_log( $per_page, $current_page = 1, $blog_id = 0 ) { 383 public function get_export_log( $per_page, $current_page = 1, $blog_id = 0, $search = '' ) { 384 global $wpdb; 383 385 384 386 $blog_id = $blog_id ?: get_current_blog_id(); … … 389 391 $offset = ( intval( $current_page ) - 1 ) * intval( $per_page ); 390 392 391 $static_pages = apply_filters( 392 'ss_total_pages_log', 393 Page::query() 394 ->limit( $per_page ) 395 ->offset( $offset ) 396 ->order( 'http_status_code DESC' ) 397 ->find() 398 ); 399 400 $http_status_codes = Page::get_http_status_codes_summary(); 401 $total_static_pages = apply_filters( 'ss_total_pages', array_sum( array_values( $http_status_codes ) ) ); 402 $total_pages = ceil( $total_static_pages / $per_page ); 393 $query = Page::query() 394 ->limit( $per_page ) 395 ->offset( $offset ) 396 ->order( 'http_status_code DESC' ); 397 398 if ( ! empty( $search ) ) { 399 $like = '%' . $wpdb->esc_like( $search ) . '%'; 400 $query->where( 401 $wpdb->prepare( 402 '(url LIKE %s OR http_status_code LIKE %s OR status_message LIKE %s)', 403 $like, 404 $like, 405 $like 406 ) 407 ); 408 } 409 410 $static_pages = apply_filters( 'ss_total_pages_log', $query->find() ); 411 412 if ( ! empty( $search ) ) { 413 $like = '%' . $wpdb->esc_like( $search ) . '%'; 414 $count_query = Page::query(); 415 $count_query->where( 416 $wpdb->prepare( 417 '(url LIKE %s OR http_status_code LIKE %s OR status_message LIKE %s)', 418 $like, 419 $like, 420 $like 421 ) 422 ); 423 $total_static_pages = apply_filters( 'ss_total_pages', (int) $count_query->count() ); 424 } else { 425 $http_status_codes = Page::get_http_status_codes_summary(); 426 $total_static_pages = apply_filters( 'ss_total_pages', array_sum( array_values( $http_status_codes ) ) ); 427 } 428 429 $total_pages = ceil( $total_static_pages / $per_page ); 403 430 404 431 do_action( 'ss_after_render_export_log', $blog_id, $this->get_archive_creation_job() ); -
simply-static/trunk/src/class-ss-url-extractor.php
r3465779 r3468409 212 212 if ( $this->static_page->is_type( 'html' ) ) { 213 213 $this->save_body( $this->extract_and_replace_urls_in_html() ); 214 $body = apply_filters( 'ss_after_replace_urls_in_html', $this->get_body(), $this->static_page ); 215 $this->save_body( $body ); 214 216 } 215 217 … … 442 444 $this->save_body( $response_body ); 443 445 } 446 444 447 445 448 /** … … 943 946 $html = apply_filters( 'ss_html_after_restored_attributes', $html, $this ); 944 947 948 // Use regex to double-check <style> attributes for things like @font-face URLs. 949 $origin_host = Util::origin_host(); 950 951 if ( strpos( $html, $origin_host ) !== false ) { 952 $html = preg_replace_callback( 953 '/<style\b[^>]*>(.*?)<\/style>/is', 954 function ( $style_match ) use ( $origin_host ) { 955 if ( strpos( $style_match[1], $origin_host ) === false ) { 956 return $style_match[0]; 957 } 958 $updated_css = $this->extract_and_replace_urls_in_css( $style_match[1] ); 959 960 return str_replace( $style_match[1], $updated_css, $style_match[0] ); 961 }, 962 $html 963 ); 964 } 965 945 966 return $html; 946 967 } … … 988 1009 // Example: data:text/css;charset=UTF-8,<css content> 989 1010 // Or URL-encoded: data://text/css%3Bcharset%3DUTF-8,%0D%0A<encoded css> 990 1011 991 1012 // First, try to match the data URI pattern 992 1013 if ( ! preg_match( '/^data:([^,]*),(.*)$/is', $data_uri, $matches ) ) { … … 994 1015 if ( preg_match( '/^data:\/\/([^,]*),(.*)$/is', $data_uri, $matches ) ) { 995 1016 // URL-encoded format detected 996 $media_type = urldecode( $matches[1] );1017 $media_type = urldecode( $matches[1] ); 997 1018 $css_content = urldecode( $matches[2] ); 998 1019 999 1020 // Process URLs in the CSS content 1000 1021 $processed_css = $this->force_replace( $css_content ); 1001 1022 1002 1023 // Re-encode and return 1003 1024 return 'data://' . urlencode( $media_type ) . ',' . urlencode( $processed_css ); 1004 1025 } 1026 1005 1027 return $data_uri; // Return unchanged if pattern doesn't match 1006 1028 } 1007 1008 $media_type = $matches[1];1029 1030 $media_type = $matches[1]; 1009 1031 $css_content = $matches[2]; 1010 $is_base64 = false;1011 1032 $is_base64 = false; 1033 1012 1034 // Check if content is base64 encoded 1013 1035 if ( stripos( $media_type, ';base64' ) !== false ) { 1014 $is_base64 = true;1015 $media_type = str_ireplace( ';base64', '', $media_type );1036 $is_base64 = true; 1037 $media_type = str_ireplace( ';base64', '', $media_type ); 1016 1038 $css_content = base64_decode( $css_content ); 1017 1039 } else { … … 1019 1041 $css_content = urldecode( $css_content ); 1020 1042 } 1021 1043 1022 1044 // Process URLs in the CSS content using force_replace to handle origin URLs 1023 1045 $processed_css = $this->force_replace( $css_content ); 1024 1046 1025 1047 // Re-encode the CSS content 1026 1048 if ( $is_base64 ) { 1027 1049 $encoded_css = base64_encode( $processed_css ); 1050 1028 1051 return 'data:' . $media_type . ';base64,' . $encoded_css; 1029 1052 } else { 1030 1053 // URL-encode the content, preserving the original format 1031 1054 $encoded_css = rawurlencode( $processed_css ); 1055 1032 1056 return 'data:' . $media_type . ',' . $encoded_css; 1033 1057 } … … 1049 1073 * @return string The CSS with all URLs converted 1050 1074 */ 1051 private function extract_and_replace_urls_in_css( $text ) {1052 // Decode entities to ensure URLs are detected correctly, using site charset1053 $charset = \get_bloginfo( 'charset' );1054 if ( empty( $charset ) ) {1055 $charset = 'UTF-8';1056 }1057 $text = html_entity_decode( $text, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE, $charset );1075 private function extract_and_replace_urls_in_css( $text ) { 1076 // Decode entities to ensure URLs are detected correctly, using site charset 1077 $charset = \get_bloginfo( 'charset' ); 1078 if ( empty( $charset ) ) { 1079 $charset = 'UTF-8'; 1080 } 1081 $text = html_entity_decode( $text, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE, $charset ); 1058 1082 1059 1083 // Pass 1: Handle url(...) constructs with quoted or unquoted values, including relative URLs. … … 1093 1117 // Pass 2: Fallback - replace any remaining bare local absolute or protocol-relative URLs by converting them. 1094 1118 $escaped_origin = preg_quote( Util::origin_host(), '/' ); 1095 $text = preg_replace_callback( 1096 '/((?:https?:)?\/\/' . $escaped_origin . ')[^"\')\s;,]+/i', 1097 function ( $m ) { 1098 $matched_url = $m[0]; 1099 $updated = $this->add_to_extracted_urls( $matched_url ); 1100 1101 return $updated ?: $matched_url; 1102 }, 1103 $text 1104 ); 1105 1106 // Pass 3: Fix HTML numeric entities used inside CSS content strings (e.g., content: "" from Elementor/EAEL) 1107 // Browsers do not decode HTML entities inside CSS. Convert these to proper CSS escapes like \f10e. 1108 if ( apply_filters( 'simply_static_fix_css_content_entities', true, $this->static_page, $this ) ) { 1109 $text = $this->convert_css_content_entities_to_escapes( $text ); 1110 } 1111 1112 return $text; 1113 } 1114 1115 /** 1116 * Convert HTML numeric entities within CSS content property string literals 1117 * into CSS escape sequences so icon fonts (e.g., Font Awesome) render correctly. 1118 * 1119 * Examples: 1120 * content: "" => content: "\f10e" 1121 * content: '\xF10E' => unchanged 1122 * content: "\f10e" => unchanged 1123 * 1124 * Supports both decimal () and hexadecimal ( / ). 1125 */ 1126 private function convert_css_content_entities_to_escapes( string $css ): string { 1127 // Only process quoted values of the content property to avoid false positives 1128 return preg_replace_callback( 1129 '/(content\s*:\s*)(["\'])((?:\\\\.|(?!\2).)*?)(\2)/is', 1130 function ( $m ) { 1131 $prefix = $m[1]; 1132 $quote = $m[2]; 1133 $value = $m[3]; 1134 1135 // If value already contains a CSS escape (e.g., \f10e), leave those intact 1136 // Convert hex entities first: &#xHHHH; or &#Xhhhh; 1137 $value = preg_replace_callback( 1138 '/&#x([0-9a-fA-F]+);/i', 1139 function ( $hm ) { 1140 $hex = strtolower( $hm[1] ); 1141 // Ensure it is prefixed with a single backslash as a CSS escape 1142 return '\\' . $hex; 1143 }, 1144 $value 1145 ); 1146 1147 // Convert decimal entities: &#DDDDD; 1148 $value = preg_replace_callback( 1149 '/&#([0-9]+);/', 1150 function ( $dm ) { 1151 $dec = (int) $dm[1]; 1152 if ( $dec <= 0 ) { 1153 return $dm[0]; 1154 } 1155 $hex = dechex( $dec ); 1156 return '\\' . strtolower( $hex ); 1157 }, 1158 $value 1159 ); 1160 1161 return $prefix . $quote . $value . $quote; 1162 }, 1163 $css 1164 ); 1165 } 1119 $text = preg_replace_callback( 1120 '/((?:https?:)?\/\/' . $escaped_origin . ')[^"\')\s;,]+/i', 1121 function ( $m ) { 1122 $matched_url = $m[0]; 1123 $updated = $this->add_to_extracted_urls( $matched_url ); 1124 1125 return $updated ?: $matched_url; 1126 }, 1127 $text 1128 ); 1129 1130 // Pass 3: Fix HTML numeric entities used inside CSS content strings (e.g., content: "" from Elementor/EAEL) 1131 // Browsers do not decode HTML entities inside CSS. Convert these to proper CSS escapes like \f10e. 1132 if ( apply_filters( 'simply_static_fix_css_content_entities', true, $this->static_page, $this ) ) { 1133 $text = $this->convert_css_content_entities_to_escapes( $text ); 1134 } 1135 1136 return $text; 1137 } 1138 1139 /** 1140 * Convert HTML numeric entities within CSS content property string literals 1141 * into CSS escape sequences so icon fonts (e.g., Font Awesome) render correctly. 1142 * 1143 * Examples: 1144 * content: "" => content: "\f10e" 1145 * content: '\xF10E' => unchanged 1146 * content: "\f10e" => unchanged 1147 * 1148 * Supports both decimal () and hexadecimal ( / ). 1149 */ 1150 private function convert_css_content_entities_to_escapes( string $css ): string { 1151 // Only process quoted values of the content property to avoid false positives 1152 return preg_replace_callback( 1153 '/(content\s*:\s*)(["\'])((?:\\\\.|(?!\2).)*?)(\2)/is', 1154 function ( $m ) { 1155 $prefix = $m[1]; 1156 $quote = $m[2]; 1157 $value = $m[3]; 1158 1159 // If value already contains a CSS escape (e.g., \f10e), leave those intact 1160 // Convert hex entities first: &#xHHHH; or &#Xhhhh; 1161 $value = preg_replace_callback( 1162 '/&#x([0-9a-fA-F]+);/i', 1163 function ( $hm ) { 1164 $hex = strtolower( $hm[1] ); 1165 1166 // Ensure it is prefixed with a single backslash as a CSS escape 1167 return '\\' . $hex; 1168 }, 1169 $value 1170 ); 1171 1172 // Convert decimal entities: &#DDDDD; 1173 $value = preg_replace_callback( 1174 '/&#([0-9]+);/', 1175 function ( $dm ) { 1176 $dec = (int) $dm[1]; 1177 if ( $dec <= 0 ) { 1178 return $dm[0]; 1179 } 1180 $hex = dechex( $dec ); 1181 1182 return '\\' . strtolower( $hex ); 1183 }, 1184 $value 1185 ); 1186 1187 return $prefix . $quote . $value . $quote; 1188 }, 1189 $css 1190 ); 1191 } 1166 1192 1167 1193 private function extract_and_replace_urls_in_script( $text ) { -
simply-static/trunk/src/integrations/class-ss-divi-integration.php
r3465779 r3468409 72 72 public function run() { 73 73 $this->disable_divi_performance_options(); 74 add_filter( 'ss_after_replace_urls_in_html', [ $this, 'replace_data_fac_urls' ], 10, 2 ); 75 } 76 77 /** 78 * Replace base64-encoded URLs stored in Divi's data-fac navigation attribute. 79 * 80 * Divi stores navigation link URLs as base64-encoded strings: 81 * <span class="fac_menu" data-fac="BASE64_ENCODED_URL">Link</span> 82 * 83 * This method decodes each data-fac value, replaces the origin URL with the 84 * destination URL, and re-encodes the result so the static site links correctly. 85 * 86 * @param string $body The HTML body. 87 * @param Page $static_page The static page being processed. 88 * 89 * @return string Updated HTML body. 90 */ 91 public function replace_data_fac_urls( string $body, $static_page ): string { 92 if ( ! $this->dependency_active() ) { 93 return $body; 94 } 95 96 $destination_url = Options::instance()->get_destination_url(); 97 $attrs = apply_filters( 'ss_divi_base64_url_attributes', array( 'data-fac' ) ); 98 99 foreach ( $attrs as $attr ) { 100 $attr_pattern = preg_quote( $attr, '/' ); 101 $body = preg_replace_callback( 102 '/' . $attr_pattern . '=(["\'])([A-Za-z0-9+\/=]+)\1/i', 103 function ( $matches ) use ( $destination_url, $attr ) { 104 $quote = $matches[1]; 105 $encoded = $matches[2]; 106 $decoded = base64_decode( $encoded, true ); 107 108 // Only process values that look like URLs containing our origin host. 109 if ( false === $decoded || strpos( $decoded, Util::origin_host() ) === false ) { 110 return $matches[0]; 111 } 112 113 $updated = preg_replace( 114 '/(https?:)?\/\/' . addcslashes( Util::origin_host(), '/' ) . '/i', 115 $destination_url, 116 $decoded 117 ); 118 119 $re_encoded = base64_encode( $updated ); 120 121 Util::debug_log( sprintf( 'Divi: replaced base64 URL in %s: %s → %s', $attr, $decoded, $updated ) ); 122 123 return $attr . '=' . $quote . $re_encoded . $quote; 124 }, 125 $body 126 ); 127 } 128 129 return $body; 74 130 } 75 131
Note: See TracChangeset
for help on using the changeset viewer.