(()=>{"use strict";var e,t,s={757(e,t,s){var i=s(609),n=s(882);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=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 i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}(i),o=a(i),r=a(n);const c=n.css`
	pointer-events: none;
	opacity: 0.4;
`,d=r.default.div`
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	max-width: 100%;
	${({disabled:e})=>e&&c};
	${({theme:e})=>{var t;return null===(t=e.table)||void 0===t?void 0:t.style}};
`,p=n.css`
	position: sticky;
	position: -webkit-sticky; /* Safari */
	top: 0;
	z-index: 1;
`,u=r.default.div`
	display: flex;
	width: 100%;
	${({$fixedHeader:e})=>e&&p};
	${({theme:e})=>{var t;return null===(t=e.head)||void 0===t?void 0:t.style}};
`,h=r.default.div`
	display: flex;
	align-items: stretch;
	width: 100%;
	${({theme:e})=>{var t;return null===(t=e.headRow)||void 0===t?void 0:t.style}};
	${({$dense:e,theme:t})=>{var s;return e&&(null===(s=t.headRow)||void 0===s?void 0:s.denseStyle)}};
`,m=(e,...t)=>n.css`
		@media screen and (max-width: ${599}px) {
			${n.css(e,...t)}
		}
	`,g=(e,...t)=>n.css`
		@media screen and (max-width: ${959}px) {
			${n.css(e,...t)}
		}
	`,x=(e,...t)=>n.css`
		@media screen and (max-width: ${1280}px) {
			${n.css(e,...t)}
		}
	`,y=r.default.div`
	position: relative;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	line-height: normal;
	${({theme:e,$headCell:t})=>{var s;return null===(s=e[t?"headCells":"cells"])||void 0===s?void 0:s.style}};
	${({$noPadding:e})=>e&&"padding: 0"};
`,f=r.default(y)`
	flex-grow: ${({button:e,grow:t})=>0===t||e?0:t||1};
	flex-shrink: 0;
	flex-basis: 0;
	max-width: ${({maxWidth:e})=>e||"100%"};
	min-width: ${({minWidth:e})=>e||"100px"};
	${({width:e})=>e&&n.css`
			min-width: ${e};
			max-width: ${e};
		`};
	${({right:e})=>e&&"justify-content: flex-end"};
	${({button:e,center:t})=>(t||e)&&"justify-content: center"};
	${({compact:e,button:t})=>(e||t)&&"padding: 0"};

	/* handle hiding cells */
	${({hide:e})=>e&&"sm"===e&&m`
    display: none;
  `};
	${({hide:e})=>e&&"md"===e&&g`
    display: none;
  `};
	${({hide:e})=>e&&"lg"===e&&x`
    display: none;
  `};
	${({hide:e})=>e&&Number.isInteger(e)&&(e=>(t,...s)=>n.css`
			@media screen and (max-width: ${e}px) {
				${n.css(t,...s)}
			}
		`)(e)`
    display: none;
  `};
`;var b;function _(e,t){return e[t]}function j(e=[],t,s=0){return[...e.slice(0,s),t,...e.slice(s)]}function v(e=[],t,s="id"){const i=e.slice(),n=_(t,s);return n?i.splice(i.findIndex(e=>_(e,s)===n),1):i.splice(i.findIndex(e=>e===t),1),i}function w(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 S(e,t){return Math.ceil(e/t)}function C(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc"}(b||(b={}));const k=()=>null;function P(e,t=[],s=[]){let i={},n=[...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)&&(i=t.style||{},t.classNames&&(n=[...n,...t.classNames]),"function"==typeof t.style&&(i=t.style(e)||{}))}),{conditionalStyle:i,classNames:n.join(" ")}}function N(e,t=[],s="id"){const i=_(e,s);return i?t.some(e=>_(e,s)===i):t.some(t=>t===e)}function R(e,t){return t?e.findIndex(e=>E(e.id,t)):-1}function E(e,t){return e==t}const T=n.css`
	div:first-child {
		white-space: ${({$wrapCell:e})=>e?"normal":"nowrap"};
		overflow: ${({$allowOverflow:e})=>e?"visible":"hidden"};
		text-overflow: ellipsis;
	}
`,D=r.default(f).attrs(e=>({style:e.style}))`
	${({$renderAsCell:e})=>!e&&T};
	${({theme:e,$isDragging:t})=>{var s;return t&&(null===(s=e.cells)||void 0===s?void 0:s.draggingStyle)}};
	${({$cellStyle:e})=>e};
`;var F=l.memo(function({id:e,column:t,row:s,rowIndex:i,dataTag:n,isDragging:a,onDragStart:o,onDragOver:r,onDragEnd:c,onDragEnter:d,onDragLeave:p}){const{conditionalStyle:u,classNames:h}=P(s,t.conditionalCellStyles,["rdt_TableCell"]);return l.createElement(D,{id:e,"data-column-id":t.id,role:"cell",className:h,"data-tag":n,$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:o,onDragOver:r,onDragEnd:c,onDragEnter:d,onDragLeave:p},!t.cell&&l.createElement("div",{"data-tag":n},function(e,t,s,i){return t?s&&"function"==typeof s?s(e,i):t(e,i):null}(s,t.selector,t.format,i)),t.cell&&t.cell(s,i,t,e))},function(e,t){return e.row===t.row&&e.column===t.column&&e.isDragging===t.isDragging&&e.rowIndex===t.rowIndex&&e.dataTag===t.dataTag&&e.id===t.id});const B="input";var O=l.memo(function({name:e,component:t=B,componentOptions:s={style:{}},indeterminate:i=!1,checked:n=!1,disabled:a=!1,onClick:o=k}){const r=t,c=r!==B?s.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(a),d=l.useMemo(()=>function(e,...t){let s;return Object.keys(e).map(t=>e[t]).forEach((i,n)=>{const a=e;"function"==typeof i&&(s=Object.assign(Object.assign({},a),{[Object.keys(e)[n]]:i(...t)}))}),s||e}(s,i),[s,i]);return l.createElement(r,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=i)},style:c,onClick:a?k:o,name:e,"aria-label":e,checked:n,disabled:a},d,{onChange:k}))});const I=r.default(y)`
	flex: 0 0 48px;
	min-width: 48px;
	justify-content: center;
	align-items: center;
	user-select: none;
	white-space: nowrap;
`;function A({name:e,keyField:t,row:s,rowCount:i,selected:n,selectableRowsComponent:a,selectableRowsComponentProps:o,selectableRowsSingle:r,selectableRowDisabled:c,onSelectedRow:d}){const p=!(!c||!c(s));return l.createElement(I,{onClick:e=>e.stopPropagation(),className:"rdt_TableCell",$noPadding:!0},l.createElement(O,{name:e,component:a,componentOptions:o,checked:n,"aria-checked":n,onClick:()=>{d({type:"SELECT_SINGLE_ROW",row:s,isSelected:n,keyField:t,rowCount:i,singleSelect:r})},disabled:p}))}const H=r.default.button`
	display: inline-flex;
	align-items: center;
	user-select: none;
	white-space: nowrap;
	border: none;
	background-color: transparent;
	${({theme:e})=>{var t;return null===(t=e.expanderButton)||void 0===t?void 0:t.style}};
`;function M({disabled:e=!1,expanded:t=!1,expandableIcon:s,id:i,row:n,onToggled:a}){const o=t?s.expanded:s.collapsed;return l.createElement(H,{"aria-disabled":e,onClick:()=>a&&a(n),"data-testid":`expander-button-${i}`,disabled:e,"aria-label":t?"Collapse Row":"Expand Row",role:"button",type:"button"},o)}const $=r.default(y)`
	white-space: nowrap;
	font-weight: 400;
	min-width: 48px;
	${({theme:e})=>{var t;return null===(t=e.expanderCell)||void 0===t?void 0:t.style}};
`;function z({row:e,expanded:t=!1,expandableIcon:s,id:i,onToggled:n,disabled:a=!1}){return l.createElement($,{onClick:e=>e.stopPropagation(),$noPadding:!0},l.createElement(M,{id:i,row:e,expanded:t,expandableIcon:s,disabled:a,onToggled:n}))}const L=r.default.div`
	width: 100%;
	box-sizing: border-box;
	${({theme:e})=>{var t;return null===(t=e.expanderRow)||void 0===t?void 0:t.style}};
	${({$extendedRowStyle:e})=>e};
`;var U=l.memo(function({data:e,ExpanderComponent:t,expanderComponentProps:s,extendedRowStyle:i,extendedClassNames:n}){const a=["rdt_ExpanderRow",...n.split(" ").filter(e=>"rdt_TableRow"!==e)].join(" ");return l.createElement(L,{className:a,$extendedRowStyle:i},l.createElement(t,Object.assign({data:e},s)))});const W="allowRowEvents";var G,q,J;t.OP=void 0,(G=t.OP||(t.OP={})).LTR="ltr",G.RTL="rtl",G.AUTO="auto",t.C1=void 0,(q=t.C1||(t.C1={})).LEFT="left",q.RIGHT="right",q.CENTER="center",t.$U=void 0,(J=t.$U||(t.$U={})).SM="sm",J.MD="md",J.LG="lg";const Y=n.css`
	&:hover {
		${({$highlightOnHover:e,theme:t})=>{var s;return e&&(null===(s=t.rows)||void 0===s?void 0:s.highlightOnHoverStyle)}};
	}
`,V=n.css`
	&:hover {
		cursor: pointer;
	}
`,K=r.default.div.attrs(e=>({style:e.style}))`
	display: flex;
	align-items: stretch;
	align-content: stretch;
	width: 100%;
	box-sizing: border-box;
	${({theme:e})=>{var t;return null===(t=e.rows)||void 0===t?void 0:t.style}};
	${({$dense:e,theme:t})=>{var s;return e&&(null===(s=t.rows)||void 0===s?void 0:s.denseStyle)}};
	${({$striped:e,theme:t})=>{var s;return e&&(null===(s=t.rows)||void 0===s?void 0:s.stripedStyle)}};
	${({$highlightOnHover:e})=>e&&Y};
	${({$pointerOnHover:e})=>e&&V};
	${({$selected:e,theme:t})=>{var s;return e&&(null===(s=t.rows)||void 0===s?void 0:s.selectedHighlightStyle)}};
	${({$conditionalStyle:e})=>e};
`;var Q=l.memo(function({columns:e=[],conditionalRowStyles:t=[],defaultExpanded:s=!1,defaultExpanderDisabled:i=!1,dense:n=!1,expandableIcon:a,expandableRows:o=!1,expandableRowsComponent:r,expandableRowsComponentProps:c,expandableRowsHideExpander:d,expandOnRowClicked:p=!1,expandOnRowDoubleClicked:u=!1,highlightOnHover:h=!1,id:m,expandableInheritConditionalStyles:g,keyField:x,onRowClicked:y=k,onRowDoubleClicked:f=k,onRowMouseEnter:b=k,onRowMouseLeave:j=k,onRowExpandToggled:v=k,onSelectedRow:w=k,pointerOnHover:S=!1,row:C,rowCount:N,rowIndex:R,selectableRowDisabled:T=null,selectableRows:D=!1,selectableRowsComponent:B,selectableRowsComponentProps:O,selectableRowsHighlight:I=!1,selectableRowsSingle:H=!1,selected:M,striped:$=!1,draggingColumnId:L,onDragStart:G,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:V}){const[Q,Z]=l.useState(s);l.useEffect(()=>{Z(s)},[s]);const X=l.useCallback(()=>{Z(!Q),v(!Q,C)},[Q,v,C]),ee=S||o&&(p||u),te=l.useCallback(e=>{e.target.getAttribute("data-tag")===W&&(y(C,e),!i&&o&&p&&X())},[i,p,o,X,y,C]),se=l.useCallback(e=>{e.target.getAttribute("data-tag")===W&&(f(C,e),!i&&o&&u&&X())},[i,u,o,X,f,C]),ie=l.useCallback(e=>{b(C,e)},[b,C]),ne=l.useCallback(e=>{j(C,e)},[j,C]),ae=_(C,x),{conditionalStyle:le,classNames:oe}=P(C,t,["rdt_TableRow"]),re=I&&M,ce=g?le:{},de=$&&R%2==0;return l.createElement(l.Fragment,null,l.createElement(K,{id:`row-${m}`,role:"row",$striped:de,$highlightOnHover:h,$pointerOnHover:!i&&ee,$dense:n,onClick:te,onDoubleClick:se,onMouseEnter:ie,onMouseLeave:ne,className:oe,$selected:re,$conditionalStyle:le},D&&l.createElement(A,{name:`select-row-${ae}`,keyField:x,row:C,rowCount:N,selected:M,selectableRowsComponent:B,selectableRowsComponentProps:O,selectableRowDisabled:T,selectableRowsSingle:H,onSelectedRow:w}),o&&!d&&l.createElement(z,{id:ae,expandableIcon:a,expanded:Q,row:C,onToggled:X,disabled:i}),e.map(e=>e.omit?null:l.createElement(F,{id:`cell-${e.id}-${ae}`,key:`cell-${e.id}-${ae}`,dataTag:e.ignoreRowClick||e.button?null:W,column:e,row:C,rowIndex:R,isDragging:E(L,e.id),onDragStart:G,onDragOver:q,onDragEnd:J,onDragEnter:Y,onDragLeave:V}))),o&&Q&&l.createElement(U,{key:`expander-${ae}`,data:C,extendedRowStyle:ce,extendedClassNames:oe,ExpanderComponent:r,expanderComponentProps:c}))},function(e,t){return e.row===t.row&&e.selected===t.selected&&e.columns===t.columns&&e.defaultExpanded===t.defaultExpanded&&e.defaultExpanderDisabled===t.defaultExpanderDisabled&&e.draggingColumnId===t.draggingColumnId&&e.striped===t.striped&&e.rowIndex===t.rowIndex&&e.rowCount===t.rowCount&&e.conditionalRowStyles===t.conditionalRowStyles&&e.onRowClicked!==k==(t.onRowClicked!==k)});const Z=r.default.span`
	padding: 2px;
	color: inherit;
	flex-grow: 0;
	flex-shrink: 0;
	${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"};
	${({$sortDirection:e})=>"desc"===e&&"transform: rotate(180deg)"};
`,X=({sortActive:e,sortDirection:t})=>o.default.createElement(Z,{$sortActive:e,$sortDirection:t},"▲"),ee=r.default(f)`
	${({button:e})=>e&&"text-align: center"};
	${({theme:e,$isDragging:t})=>{var s;return t&&(null===(s=e.headCells)||void 0===s?void 0:s.draggingStyle)}};
`,te=n.css`
	cursor: pointer;
	span.__rdt_custom_sort_icon__ {
		i,
		svg {
			transform: 'translate3d(0, 0, 0)';
			${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"};
			color: inherit;
			font-size: 18px;
			height: 18px;
			width: 18px;
			backface-visibility: hidden;
			transform-style: preserve-3d;
			transition-duration: 95ms;
			transition-property: transform;
		}

		&.asc i,
		&.asc svg {
			transform: rotate(180deg);
		}
	}

	${({$sortActive:e})=>!e&&n.css`
			&:hover,
			&:focus {
				opacity: 0.7;

				span,
				span.__rdt_custom_sort_icon__ * {
					opacity: 0.7;
				}
			}
		`};
`,se=r.default.div`
	display: inline-flex;
	align-items: center;
	justify-content: inherit;
	height: 100%;
	width: 100%;
	outline: none;
	user-select: none;
	overflow: hidden;
	${({disabled:e})=>!e&&te};
`,ie=r.default.div`
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
`;var ne=l.memo(function({column:e,disabled:t,draggingColumnId:s,selectedColumn:i={},sortDirection:n,sortIcon:a,sortServer:o,pagination:r,paginationServer:c,persistSelectedOnSort:d,selectableRowsVisibleOnly:p,onSort:u,onDragStart:h,onDragOver:m,onDragEnd:g,onDragEnter:x,onDragLeave:y}){l.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[f,_]=l.useState(!1),j=l.useRef(null);if(l.useEffect(()=>{j.current&&_(j.current.scrollWidth>j.current.clientWidth)},[f]),e.omit)return null;const v=()=>{if(!e.sortable&&!e.selector)return;let t=n;E(i.id,e.id)&&(t=n===b.ASC?b.DESC:b.ASC),u({type:"SORT_CHANGE",sortDirection:t,selectedColumn:e,clearSelectedOnSort:r&&c&&!d||o||p})},w=e=>l.createElement(X,{sortActive:e,sortDirection:n}),S=()=>l.createElement("span",{className:[n,"__rdt_custom_sort_icon__"].join(" ")},a),C=!(!e.sortable||!E(i.id,e.id)),k=!e.sortable||t,P=k?-1:0,N=e.sortable&&!a&&!e.right,R=e.sortable&&!a&&e.right,T=e.sortable&&a&&!e.right,D=e.sortable&&a&&e.right;return l.createElement(ee,{"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(e.id,s),onDragStart:h,onDragOver:m,onDragEnd:g,onDragEnter:x,onDragLeave:y},e.name&&l.createElement(se,{"data-column-id":e.id,"data-sort-id":e.id,role:"columnheader",tabIndex:P,className:"rdt_TableCol_Sortable",onClick:k?void 0:v,onKeyPress:k?void 0:e=>{"Enter"===e.key&&v()},$sortActive:!k&&C,disabled:k},!k&&D&&S(),!k&&R&&w(C),"string"==typeof e.name?l.createElement(ie,{title:f?e.name:void 0,ref:j,"data-column-id":e.id},e.name):e.name,!k&&T&&S(),!k&&N&&w(C)))},function(e,t){if(e.column!==t.column)return!1;const s=E(e.selectedColumn.id,e.column.id),i=E(t.selectedColumn.id,t.column.id);return!(s!==i||s&&i&&e.sortDirection!==t.sortDirection||e.draggingColumnId!==t.draggingColumnId&&E(e.column.id,e.draggingColumnId)!==E(t.column.id,t.draggingColumnId)||e.disabled!==t.disabled||e.sortIcon!==t.sortIcon)});const ae=r.default(y)`
	flex: 0 0 48px;
	justify-content: center;
	align-items: center;
	user-select: none;
	white-space: nowrap;
	font-size: unset;
`;function le({headCell:e=!0,rowData:t,keyField:s,allSelected:i,mergeSelections:n,selectedRows:a,selectableRowsComponent:o,selectableRowsComponentProps:r,selectableRowDisabled:c,onSelectAllRows:d}){const p=a.length>0&&!i,u=c?t.filter(e=>!c(e)):t,h=0===u.length,m=Math.min(t.length,u.length);return l.createElement(ae,{className:"rdt_TableCol",$headCell:e,$noPadding:!0},l.createElement(O,{name:"select-all-rows",component:o,componentOptions:r,onClick:()=>{d({type:"SELECT_ALL_ROWS",rows:u,rowCount:m,mergeSelections:n,keyField:s})},checked:i,indeterminate:p,disabled:h}))}function oe(e=t.OP.AUTO){const s="object"==typeof window,[i,n]=l.useState(!1);return l.useEffect(()=>{if(s){if("auto"===e){const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],s=document.getElementsByTagName("HTML")[0],i="rtl"===t.dir||"rtl"===s.dir;return void n(e&&i)}n("rtl"===e)}},[e,s]),i}const re=r.default.div`
	display: flex;
	align-items: center;
	flex: 1 0 auto;
	height: 100%;
	color: ${({theme:e})=>{var t;return null===(t=e.contextMenu)||void 0===t?void 0:t.fontColor}};
	font-size: ${({theme:e})=>{var t;return null===(t=e.contextMenu)||void 0===t?void 0:t.fontSize}};
	font-weight: 400;
`,ce=r.default.div`
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
`,de=r.default.div`
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: inherit;
	z-index: 1;
	align-items: center;
	justify-content: space-between;
	display: flex;
	${({$rtl:e})=>e&&"direction: rtl"};
	${({theme:e})=>{var t;return null===(t=e.contextMenu)||void 0===t?void 0:t.style}};
	${({theme:e,$visible:t})=>{var s;return t&&(null===(s=e.contextMenu)||void 0===s?void 0:s.activeStyle)}};
`;function pe({contextMessage:e,contextActions:t,contextComponent:s,selectedCount:i,direction:n}){const a=oe(n),o=i>0;return s?l.createElement(de,{$visible:o},l.cloneElement(s,{selectedCount:i})):l.createElement(de,{$visible:o,$rtl:a},l.createElement(re,null,((e,t,s)=>{if(0===t)return null;const i=1===t?e.singular:e.plural;return s?`${t} ${e.message||""} ${i}`:`${t} ${i} ${e.message||""}`})(e,i,a)),l.createElement(ce,null,t))}const ue=r.default.div`
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	flex-wrap: wrap;
	${({theme:e})=>{var t;return null===(t=e.header)||void 0===t?void 0:t.style}}
`,he=r.default.div`
	flex: 1 0 auto;
	color: ${({theme:e})=>{var t;return null===(t=e.header)||void 0===t?void 0:t.fontColor}};
	font-size: ${({theme:e})=>{var t;return null===(t=e.header)||void 0===t?void 0:t.fontSize}};
	font-weight: 400;
`,me=r.default.div`
	flex: 1 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;

	> * {
		margin-left: 5px;
	}
`,ge=({title:e,actions:t=null,contextMessage:s,contextActions:i,contextComponent:n,selectedCount:a,direction:o,showMenu:r=!0})=>l.createElement(ue,{className:"rdt_TableHeader",role:"heading","aria-level":1},l.createElement(he,null,e),t&&l.createElement(me,null,t),r&&l.createElement(pe,{contextMessage:s,contextActions:i,contextComponent:n,direction:o,selectedCount:a}));function xe(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(s[i[n]]=e[i[n]])}return s}"function"==typeof SuppressedError&&SuppressedError;const ye={left:"flex-start",right:"flex-end",center:"center"},fe=r.default.header`
	position: relative;
	display: flex;
	flex: 1 1 auto;
	box-sizing: border-box;
	align-items: center;
	padding: 4px 16px 4px 24px;
	width: 100%;
	justify-content: ${({align:e})=>ye[e]};
	flex-wrap: ${({$wrapContent:e})=>e?"wrap":"nowrap"};
	${({theme:e})=>{var t;return null===(t=e.subHeader)||void 0===t?void 0:t.style}}
`,be=e=>{var{align:t="right",wrapContent:s=!0}=e,i=xe(e,["align","wrapContent"]);return l.createElement(fe,Object.assign({align:t,$wrapContent:s},i))},_e=r.default.div`
	display: flex;
	flex-direction: column;
`,je=r.default.div`
	position: relative;
	width: 100%;
	border-radius: inherit;
	${({$responsive:e,$fixedHeader:t})=>e&&n.css`
			overflow-x: auto;

			// hidden prevents vertical scrolling in firefox when fixedHeader is disabled
			overflow-y: ${t?"auto":"hidden"};
			min-height: 0;
		`};

	${({$fixedHeader:e=!1,$fixedHeaderScrollHeight:t="100vh"})=>e&&n.css`
			max-height: ${t};
			-webkit-overflow-scrolling: touch;
		`};

	${({theme:e})=>{var t;return null===(t=e.responsiveWrapper)||void 0===t?void 0:t.style}};
`,ve=r.default.div`
	position: relative;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	${e=>{var t;return null===(t=e.theme.progress)||void 0===t?void 0:t.style}};
`,we=r.default.div`
	position: relative;
	width: 100%;
	${({theme:e})=>{var t;return null===(t=e.tableWrapper)||void 0===t?void 0:t.style}};
`,Se=r.default(y)`
	white-space: nowrap;
	${({theme:e})=>{var t;return null===(t=e.expanderCell)||void 0===t?void 0:t.style}};
`,Ce=r.default.div`
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	${({theme:e})=>{var t;return null===(t=e.noData)||void 0===t?void 0:t.style}};
`,ke=()=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},o.default.createElement("path",{d:"M7 10l5 5 5-5z"}),o.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),Pe=r.default.select`
	cursor: pointer;
	height: 24px;
	max-width: 100%;
	user-select: none;
	padding-left: 8px;
	padding-right: 24px;
	box-sizing: content-box;
	font-size: inherit;
	color: inherit;
	border: none;
	background-color: transparent;
	appearance: none;
	direction: ltr;
	flex-shrink: 0;

	&::-ms-expand {
		display: none;
	}

	&:disabled::-ms-expand {
		background: #f60;
	}

	option {
		color: initial;
	}
`,Ne=r.default.div`
	position: relative;
	flex-shrink: 0;
	font-size: inherit;
	color: inherit;
	margin-top: 1px;

	svg {
		top: 0;
		right: 0;
		color: inherit;
		position: absolute;
		fill: currentColor;
		width: 24px;
		height: 24px;
		display: inline-block;
		user-select: none;
		pointer-events: none;
	}
`,Re=e=>{var{defaultValue:t,onChange:s}=e,i=xe(e,["defaultValue","onChange"]);return l.createElement(Ne,null,l.createElement(Pe,Object.assign({onChange:s,defaultValue:t},i)),l.createElement(ke,null))},Ee={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 o.default.createElement("div",null,"To add an expander pass in a component instance via ",o.default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:o.default.createElement(()=>o.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),o.default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"})),null),expanded:o.default.createElement(()=>o.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),o.default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"})),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:o.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:o.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:o.default.createElement(()=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},o.default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),o.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"})),null),paginationIconLastPage:o.default.createElement(()=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},o.default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"})),null),paginationIconNext:o.default.createElement(()=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},o.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),o.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),null),paginationIconPrevious:o.default.createElement(()=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},o.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),o.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:t.OP.AUTO,onChangePage:k,onChangeRowsPerPage:k,onRowClicked:k,onRowDoubleClicked:k,onRowMouseEnter:k,onRowMouseLeave:k,onRowExpandToggled:k,onSelectedRowsChange:k,onSort:k,onColumnOrderChange:k},Te={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},De=r.default.nav`
	display: flex;
	flex: 1 1 auto;
	justify-content: flex-end;
	align-items: center;
	box-sizing: border-box;
	padding-right: 8px;
	padding-left: 8px;
	width: 100%;
	${({theme:e})=>{var t;return null===(t=e.pagination)||void 0===t?void 0:t.style}};
`,Fe=r.default.button`
	position: relative;
	display: block;
	user-select: none;
	border: none;
	${({theme:e})=>{var t;return null===(t=e.pagination)||void 0===t?void 0:t.pageButtonsStyle}};
	${({$isRTL:e})=>e&&"transform: scale(-1, -1)"};
`,Be=r.default.div`
	display: flex;
	align-items: center;
	border-radius: 4px;
	white-space: nowrap;
	${m`
    width: 100%;
    justify-content: space-around;
  `};
`,Oe=r.default.span`
	flex-shrink: 1;
	user-select: none;
`,Ie=r.default(Oe)`
	margin: 0 24px;
`,Ae=r.default(Oe)`
	margin: 0 4px;
`;var He=l.memo(function({rowsPerPage:e,rowCount:t,currentPage:s,direction:i=Ee.direction,paginationRowsPerPageOptions:n=Ee.paginationRowsPerPageOptions,paginationIconLastPage:a=Ee.paginationIconLastPage,paginationIconFirstPage:o=Ee.paginationIconFirstPage,paginationIconNext:r=Ee.paginationIconNext,paginationIconPrevious:c=Ee.paginationIconPrevious,paginationComponentOptions:d=Ee.paginationComponentOptions,onChangeRowsPerPage:p=Ee.onChangeRowsPerPage,onChangePage:u=Ee.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,i]=l.useState(t);return l.useEffect(()=>{if(!e)return()=>null;function s(){i(t())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),s})(),m=oe(i),g=h.width&&h.width>599,x=S(t,e),y=s*e,f=y-e+1,b=1===s,_=s===x,j=Object.assign(Object.assign({},Te),d),v=s===x?`${f}-${t} ${j.rangeSeparatorText} ${t}`:`${f}-${y} ${j.rangeSeparatorText} ${t}`,w=l.useCallback(()=>u(s-1),[s,u]),C=l.useCallback(()=>u(s+1),[s,u]),k=l.useCallback(()=>u(1),[u]),P=l.useCallback(()=>u(S(t,e)),[u,t,e]),N=l.useCallback(e=>p(Number(e.target.value),s),[s,p]),R=n.map(e=>l.createElement("option",{key:e,value:e},e));j.selectAllRowsItem&&R.push(l.createElement("option",{key:-1,value:t},j.selectAllRowsItemText));const E=l.createElement(Re,{onChange:N,defaultValue:e,"aria-label":j.rowsPerPageText},R);return l.createElement(De,{className:"rdt_Pagination"},!j.noRowsPerPage&&g&&l.createElement(l.Fragment,null,l.createElement(Ae,null,j.rowsPerPageText),E),g&&l.createElement(Ie,null,v),l.createElement(Be,null,l.createElement(Fe,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":b,onClick:k,disabled:b,$isRTL:m},o),l.createElement(Fe,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":b,onClick:w,disabled:b,$isRTL:m},c),!j.noRowsPerPage&&!g&&E,l.createElement(Fe,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":_,onClick:C,disabled:_,$isRTL:m},r),l.createElement(Fe,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":_,onClick:P,disabled:_,$isRTL:m},a)))}),Me=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===$e}(e)}(e)},$e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ze(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ge((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function Le(e,t,s){return e.concat(t).map(function(e){return ze(e,s)})}function Ue(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 We(e,t){try{return t in e}catch(e){return!1}}function Ge(e,t,s){(s=s||{}).arrayMerge=s.arrayMerge||Le,s.isMergeableObject=s.isMergeableObject||Me,s.cloneUnlessOtherwiseSpecified=ze;var i=Array.isArray(t);return i===Array.isArray(e)?i?s.arrayMerge(e,t,s):function(e,t,s){var i={};return s.isMergeableObject(e)&&Ue(e).forEach(function(t){i[t]=ze(e[t],s)}),Ue(t).forEach(function(n){(function(e,t){return We(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,n)||(We(e,n)&&s.isMergeableObject(t[n])?i[n]=function(e,t){if(!t.customMerge)return Ge;var s=t.customMerge(e);return"function"==typeof s?s:Ge}(n,s)(e[n],t[n],s):i[n]=ze(t[n],s))}),i}(e,t,s):ze(t,s)}Ge.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,s){return Ge(e,s,t)},{})};var qe=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Ge);const Je={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)"}},Ye={default:Je,light:Je,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"}}},Ve=(e,t)=>{const s=l.useRef(!0);l.useEffect(()=>{s.current?s.current=!1:e()},t)};function Ke(e,t,s,i){const[n,a]=l.useState(()=>w(e)),[o,r]=l.useState(""),c=l.useRef("");Ve(()=>{a(w(e))},[e]);const d=l.useCallback(e=>{var t,s,i;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(c.current=(null===(i=null===(s=n[R(n,l)])||void 0===s?void 0:s.id)||void 0===i?void 0:i.toString())||"",r(c.current))},[n]),p=l.useCallback(e=>{var s;const{attributes:i}=e.target,l=null===(s=i.getNamedItem("data-column-id"))||void 0===s?void 0:s.value;if(l&&c.current&&l!==c.current){const e=R(n,c.current),s=R(n,l),i=[...n];i[e]=n[s],i[s]=n[e],a(i),t(i)}},[t,n]),u=l.useCallback(e=>{e.preventDefault()},[]),h=l.useCallback(e=>{e.preventDefault()},[]),m=l.useCallback(e=>{e.preventDefault(),c.current="",r("")},[]),g=function(e=!1){return e?b.ASC:b.DESC}(i),x=l.useMemo(()=>n[R(n,null==s?void 0:s.toString())]||{},[s,n]);return{tableColumns:n,draggingColumnId:o,handleDragStart:d,handleDragEnter:p,handleDragOver:u,handleDragLeave:h,handleDragEnd:m,defaultSortDirection:g,defaultSortColumn:x}}function Qe(e,t){const s=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:s,rows:i,rowCount:n,mergeSelections:a}=t,l=!e.allSelected,o=!e.toggleOnSelectedRowsChange;if(a){const t=l?[...e.selectedRows,...i.filter(t=>!N(t,e.selectedRows,s))]:e.selectedRows.filter(e=>!N(e,i,s));return Object.assign(Object.assign({},e),{allSelected:l,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:o})}return Object.assign(Object.assign({},e),{allSelected:l,selectedCount:l?n:0,selectedRows:l?i:[],toggleOnSelectedRowsChange:o})}case"SELECT_SINGLE_ROW":{const{keyField:i,row:n,isSelected:a,rowCount:l,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:[n],toggleOnSelectedRowsChange:s}):a?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:v(e.selectedRows,n,i),toggleOnSelectedRowsChange:s}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===l,selectedRows:j(e.selectedRows,n),toggleOnSelectedRowsChange:s})}case"SELECT_MULTIPLE_ROWS":{const{keyField:i,selectedRows:n,totalRows:a,mergeSelections:l}=t;if(l){const t=[...e.selectedRows,...n.filter(t=>!N(t,e.selectedRows,i))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:s})}return Object.assign(Object.assign({},e),{selectedCount:n.length,allSelected:n.length===a,selectedRows:n,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:i,selectedColumn:n,clearSelectedOnSort:a}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:n,sortDirection:i,currentPage:1}),a&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_PAGE":{const{page:i,paginationServer:n,visibleOnly:a,persistSelectedOnPageChange:l}=t,o=n&&l,r=n&&!l||a;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:i}),o&&{allSelected:!1}),r&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:s})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:s,page:i}=t;return Object.assign(Object.assign({},e),{currentPage:i,rowsPerPage:s})}}}var Ze=l.memo(function(e){const{data:t=Ee.data,columns:s=Ee.columns,title:i=Ee.title,actions:a=Ee.actions,keyField:o=Ee.keyField,striped:r=Ee.striped,highlightOnHover:c=Ee.highlightOnHover,pointerOnHover:p=Ee.pointerOnHover,dense:m=Ee.dense,selectableRows:g=Ee.selectableRows,selectableRowsSingle:x=Ee.selectableRowsSingle,selectableRowsHighlight:f=Ee.selectableRowsHighlight,selectableRowsNoSelectAll:j=Ee.selectableRowsNoSelectAll,selectableRowsVisibleOnly:v=Ee.selectableRowsVisibleOnly,selectableRowSelected:w=Ee.selectableRowSelected,selectableRowDisabled:k=Ee.selectableRowDisabled,selectableRowsComponent:P=Ee.selectableRowsComponent,selectableRowsComponentProps:R=Ee.selectableRowsComponentProps,onRowExpandToggled:E=Ee.onRowExpandToggled,onSelectedRowsChange:T=Ee.onSelectedRowsChange,expandableIcon:D=Ee.expandableIcon,onChangeRowsPerPage:F=Ee.onChangeRowsPerPage,onChangePage:B=Ee.onChangePage,paginationServer:O=Ee.paginationServer,paginationServerOptions:I=Ee.paginationServerOptions,paginationTotalRows:A=Ee.paginationTotalRows,paginationDefaultPage:H=Ee.paginationDefaultPage,paginationResetDefaultPage:M=Ee.paginationResetDefaultPage,paginationPerPage:$=Ee.paginationPerPage,paginationRowsPerPageOptions:z=Ee.paginationRowsPerPageOptions,paginationIconLastPage:L=Ee.paginationIconLastPage,paginationIconFirstPage:U=Ee.paginationIconFirstPage,paginationIconNext:W=Ee.paginationIconNext,paginationIconPrevious:G=Ee.paginationIconPrevious,paginationComponent:q=Ee.paginationComponent,paginationComponentOptions:J=Ee.paginationComponentOptions,responsive:Y=Ee.responsive,progressPending:V=Ee.progressPending,progressComponent:K=Ee.progressComponent,persistTableHead:Z=Ee.persistTableHead,noDataComponent:X=Ee.noDataComponent,disabled:ee=Ee.disabled,noTableHead:te=Ee.noTableHead,noHeader:se=Ee.noHeader,fixedHeader:ie=Ee.fixedHeader,fixedHeaderScrollHeight:ae=Ee.fixedHeaderScrollHeight,pagination:oe=Ee.pagination,subHeader:re=Ee.subHeader,subHeaderAlign:ce=Ee.subHeaderAlign,subHeaderWrap:de=Ee.subHeaderWrap,subHeaderComponent:pe=Ee.subHeaderComponent,noContextMenu:ue=Ee.noContextMenu,contextMessage:he=Ee.contextMessage,contextActions:me=Ee.contextActions,contextComponent:xe=Ee.contextComponent,expandableRows:ye=Ee.expandableRows,onRowClicked:fe=Ee.onRowClicked,onRowDoubleClicked:ke=Ee.onRowDoubleClicked,onRowMouseEnter:Pe=Ee.onRowMouseEnter,onRowMouseLeave:Ne=Ee.onRowMouseLeave,sortIcon:Re=Ee.sortIcon,onSort:Te=Ee.onSort,sortFunction:De=Ee.sortFunction,sortServer:Fe=Ee.sortServer,expandableRowsComponent:Be=Ee.expandableRowsComponent,expandableRowsComponentProps:Oe=Ee.expandableRowsComponentProps,expandableRowDisabled:Ie=Ee.expandableRowDisabled,expandableRowsHideExpander:Ae=Ee.expandableRowsHideExpander,expandOnRowClicked:Me=Ee.expandOnRowClicked,expandOnRowDoubleClicked:$e=Ee.expandOnRowDoubleClicked,expandableRowExpanded:ze=Ee.expandableRowExpanded,expandableInheritConditionalStyles:Le=Ee.expandableInheritConditionalStyles,defaultSortFieldId:Ue=Ee.defaultSortFieldId,defaultSortAsc:We=Ee.defaultSortAsc,clearSelectedRows:Ge=Ee.clearSelectedRows,conditionalRowStyles:Je=Ee.conditionalRowStyles,theme:Ze=Ee.theme,customStyles:Xe=Ee.customStyles,direction:et=Ee.direction,onColumnOrderChange:tt=Ee.onColumnOrderChange,className:st,ariaLabel:it}=e,{tableColumns:nt,draggingColumnId:at,handleDragStart:lt,handleDragEnter:ot,handleDragOver:rt,handleDragLeave:ct,handleDragEnd:dt,defaultSortDirection:pt,defaultSortColumn:ut}=Ke(s,tt,Ue,We),{tableState:ht,handleSort:mt,handleSelectAllRows:gt,handleSelectedRow:xt,handleChangePage:yt,handleChangeRowsPerPage:ft}=function(e){const{data:t,keyField:s,defaultSortColumn:i,defaultSortDirection:n,paginationDefaultPage:a,paginationPerPage:o,paginationServer:r,paginationServerOptions:c,paginationTotalRows:d,pagination:p,selectableRowsSingle:u,selectableRowsVisibleOnly:h,selectableRowSelected:m,clearSelectedRows:g,paginationResetDefaultPage:x,onSelectedRowsChange:y,onSort:f,onChangePage:b,onChangeRowsPerPage:_}=e,{persistSelectedOnSort:j=!1,persistSelectedOnPageChange:v=!1}=c,w=r&&(v||j),[k,P]=l.useReducer(Qe,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:i,toggleOnSelectedRowsChange:!1,sortDirection:n,currentPage:a,rowsPerPage:o,selectedRowsFlag:!1,contextMessage:{singular:"item",plural:"items",message:""}}),N=l.useCallback(e=>{P(e)},[]),R=l.useCallback(e=>{P(e)},[]),E=l.useCallback(e=>{P(e)},[]),T=l.useCallback(e=>{P({type:"CHANGE_PAGE",page:e,paginationServer:r,visibleOnly:h,persistSelectedOnPageChange:v})},[r,v,h]),D=l.useCallback((e,t)=>{const s=S(d||t,e),i=C(k.currentPage,s);r||T(i),P({type:"CHANGE_ROWS_PER_PAGE",page:i,rowsPerPage:e})},[k.currentPage,r,d,T]);return Ve(()=>{y({allSelected:k.allSelected,selectedCount:k.selectedCount,selectedRows:k.selectedRows.slice(0)})},[k.toggleOnSelectedRowsChange]),l.useRef(f).current=f,Ve(()=>{b(k.currentPage,d||t.length)},[k.currentPage]),Ve(()=>{_(k.rowsPerPage,k.currentPage)},[k.rowsPerPage]),Ve(()=>{T(a)},[a,x]),Ve(()=>{if(p&&r&&d>0){const e=S(d,k.rowsPerPage),t=C(k.currentPage,e);k.currentPage!==t&&T(t)}},[d]),l.useEffect(()=>{P({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:g})},[u,g]),l.useEffect(()=>{if(!m)return;const e=t.filter(e=>m(e)),i=u?e.slice(0,1):e;P({type:"SELECT_MULTIPLE_ROWS",keyField:s,selectedRows:i,totalRows:t.length,mergeSelections:w})},[t,m]),{tableState:k,handleSort:N,handleSelectAllRows:R,handleSelectedRow:E,handleChangePage:T,handleChangeRowsPerPage:D}}({data:t,keyField:o,defaultSortColumn:ut,defaultSortDirection:pt,paginationDefaultPage:H,paginationPerPage:$,paginationServer:O,paginationServerOptions:I,paginationTotalRows:A,pagination:oe,selectableRowsSingle:x,selectableRowsVisibleOnly:v,selectableRowSelected:w,clearSelectedRows:Ge,paginationResetDefaultPage:M,onSelectedRowsChange:T,onSort:Te,onChangePage:B,onChangeRowsPerPage:F}),{rowsPerPage:bt,currentPage:_t,selectedRows:jt,allSelected:vt,selectedCount:wt,selectedColumn:St,sortDirection:Ct}=ht,{sortedData:kt,tableRows:Pt}=function(e){const{data:t,selectedColumn:s,sortDirection:i,currentPage:n,rowsPerPage:a,pagination:o,paginationServer:r,sortServer:c,sortFunction:d,onSort:p}=e,u=l.useMemo(()=>{if(c)return t;if((null==s?void 0:s.sortFunction)&&"function"==typeof s.sortFunction){const e=s.sortFunction,n=i===b.ASC?e:(t,s)=>-1*e(t,s);return[...t].sort(n)}return e=t,n=null==s?void 0:s.selector,a=i,l=d,n?l&&"function"==typeof l?l(e.slice(0),n,a):e.slice(0).sort((e,t)=>{const s=n(e),i=n(t);if("asc"===a){if(s<i)return-1;if(s>i)return 1}if("desc"===a){if(s>i)return-1;if(s<i)return 1}return 0}):e;var e,n,a,l},[c,s,i,t,d]),h=l.useMemo(()=>{if(o&&!r){const e=n*a,t=e-a;return u.slice(t,e)}return u},[n,o,r,a,u]),m=l.useRef(p),g=l.useRef({selectedColumn:s,sortDirection:i});return l.useEffect(()=>{m.current=p},[p]),l.useEffect(()=>{g.current.selectedColumn===s&&g.current.sortDirection===i||(g.current={selectedColumn:s,sortDirection:i},m.current(s,i,u.slice(0)))},[s,i,u]),{sortedData:u,tableRows:h}}({data:t,columns:s,selectedColumn:St,sortDirection:Ct,currentPage:_t,rowsPerPage:bt,pagination:oe,paginationServer:O,sortServer:Fe,sortFunction:De,onSort:Te}),{persistSelectedOnSort:Nt=!1,persistSelectedOnPageChange:Rt=!1}=I,Et=!(!O||!Rt&&!Nt),Tt=oe&&!V&&t.length>0,Dt=q||He,Ft=l.useMemo(()=>((e={},t="default",s="default")=>{return qe({table:{style:{color:(i=Ye[Ye[t]?t:s]).text.primary,backgroundColor:i.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:i.text.primary,backgroundColor:i.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:i.background.default,minHeight:"52px"}},head:{style:{color:i.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:i.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:i.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:i.context.background,fontSize:"18px",fontWeight:400,color:i.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:i.text.primary,backgroundColor:i.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:i.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:i.selected.text,backgroundColor:i.selected.default,borderBottomColor:i.background.default}},highlightOnHoverStyle:{color:i.highlightOnHover.text,backgroundColor:i.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:i.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:i.background.default},stripedStyle:{color:i.striped.text,backgroundColor:i.striped.default}},expanderRow:{style:{color:i.text.primary,backgroundColor:i.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:i.button.default,fill:i.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:i.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:i.button.hover},"&:focus":{outline:"none",backgroundColor:i.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:i.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:i.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:i.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:i.button.default,fill:i.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:i.button.disabled,fill:i.button.disabled},"&:hover:not(:disabled)":{backgroundColor:i.button.hover},"&:focus":{outline:"none",backgroundColor:i.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:i.text.primary,backgroundColor:i.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:i.text.primary,backgroundColor:i.background.default}}},e);var i})(Xe,Ze),[Xe,Ze]),Bt=l.useMemo(()=>Object.assign({},"auto"!==et&&{dir:et}),[et]),Ot=l.useCallback((e,t)=>fe(e,t),[fe]),It=l.useCallback((e,t)=>ke(e,t),[ke]),At=l.useCallback((e,t)=>Pe(e,t),[Pe]),Ht=l.useCallback((e,t)=>Ne(e,t),[Ne]),Mt=l.useCallback(e=>yt(e),[yt]),$t=l.useCallback(e=>ft(e,Pt.length),[ft,Pt.length]);oe&&!O&&kt.length>0&&0===Pt.length&&Mt(C(_t,S(kt.length,bt)));const zt=v?Pt:kt,Lt=Rt||x||j;return l.createElement(n.ThemeProvider,{theme:Ft},!se&&(!!i||!!a)&&l.createElement(ge,{title:i,actions:a,showMenu:!ue,selectedCount:wt,direction:et,contextActions:me,contextComponent:xe,contextMessage:he}),re&&l.createElement(be,{align:ce,wrapContent:de},pe),l.createElement(je,Object.assign({$responsive:Y,$fixedHeader:ie,$fixedHeaderScrollHeight:ae,className:st},Bt),l.createElement(we,null,V&&!Z&&l.createElement(ve,null,K),l.createElement(d,Object.assign({disabled:ee,className:"rdt_Table",role:"table"},it&&{"aria-label":it}),!te&&(!!Z||kt.length>0&&!V)&&l.createElement(u,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:ie},l.createElement(h,{className:"rdt_TableHeadRow",role:"row",$dense:m},g&&(Lt?l.createElement(y,{style:{flex:"0 0 48px"}}):l.createElement(le,{allSelected:vt,selectedRows:jt,selectableRowsComponent:P,selectableRowsComponentProps:R,selectableRowDisabled:k,rowData:zt,keyField:o,mergeSelections:Et,onSelectAllRows:gt})),ye&&!Ae&&l.createElement(Se,null),nt.map(e=>l.createElement(ne,{key:e.id,column:e,selectedColumn:St,disabled:V||0===kt.length,pagination:oe,paginationServer:O,persistSelectedOnSort:Nt,selectableRowsVisibleOnly:v,sortDirection:Ct,sortIcon:Re,sortServer:Fe,onSort:mt,onDragStart:lt,onDragOver:rt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct,draggingColumnId:at})))),!kt.length&&!V&&l.createElement(Ce,null,X),V&&Z&&l.createElement(ve,null,K),!V&&kt.length>0&&l.createElement(_e,{className:"rdt_TableBody",role:"rowgroup"},Pt.map((e,t)=>{const s=_(e,o),i=function(e=""){return"number"!=typeof e&&(!e||0===e.length)}(s)?t:s,n=N(e,jt,o),a=!!(ye&&ze&&ze(e)),d=!!(ye&&Ie&&Ie(e));return l.createElement(Q,{id:i,key:i,keyField:o,"data-row-id":i,columns:nt,row:e,rowCount:kt.length,rowIndex:t,selectableRows:g,expandableRows:ye,expandableIcon:D,highlightOnHover:c,pointerOnHover:p,dense:m,expandOnRowClicked:Me,expandOnRowDoubleClicked:$e,expandableRowsComponent:Be,expandableRowsComponentProps:Oe,expandableRowsHideExpander:Ae,defaultExpanderDisabled:d,defaultExpanded:a,expandableInheritConditionalStyles:Le,conditionalRowStyles:Je,selected:n,selectableRowsHighlight:f,selectableRowsComponent:P,selectableRowsComponentProps:R,selectableRowDisabled:k,selectableRowsSingle:x,striped:r,onRowExpandToggled:E,onRowClicked:Ot,onRowDoubleClicked:It,onRowMouseEnter:At,onRowMouseLeave:Ht,onSelectedRow:xt,draggingColumnId:at,onDragStart:lt,onDragOver:rt,onDragEnd:dt,onDragEnter:ot,onDragLeave:ct})}))))),Tt&&l.createElement("div",null,l.createElement(Dt,{onChangePage:Mt,onChangeRowsPerPage:$t,rowCount:A||kt.length,currentPage:_t,rowsPerPage:bt,direction:et,paginationRowsPerPageOptions:z,paginationIconLastPage:L,paginationIconFirstPage:U,paginationIconNext:W,paginationIconPrevious:G,paginationComponentOptions:J})))});t.Ay=Ze},882(e,t,s){s.r(t),s.d(t,{ServerStyleSheet:()=>gs,StyleSheetConsumer:()=>Lt,StyleSheetContext:()=>zt,StyleSheetManager:()=>Wt,ThemeConsumer:()=>qt,ThemeContext:()=>Gt,ThemeProvider:()=>Yt,__PRIVATE__:()=>xs,createGlobalStyle:()=>os,createTheme:()=>ds,css:()=>ss,default:()=>as,isStyledComponent:()=>Ze,keyframes:()=>hs,styled:()=>as,stylisPluginRSC:()=>vs,useTheme:()=>Jt,version:()=>le,withTheme:()=>ms});var i=s(609),n=s.n(i),a="-ms-",l="-moz-",o="-webkit-",r="comm",c="rule",d="decl",p="@keyframes",u=Math.abs,h=String.fromCharCode,m=Object.assign;function g(e){return e.trim()}function x(e,t){return(e=t.exec(e))?e[0]:e}function y(e,t,s){return e.replace(t,s)}function f(e,t,s){return e.indexOf(t,s)}function b(e,t){return 0|e.charCodeAt(t)}function _(e,t,s){return e.slice(t,s)}function j(e){return e.length}function v(e){return e.length}function w(e,t){return t.push(e),e}function S(e,t){return e.filter(function(e){return!x(e,t)})}var C,k,P=1,N=1,R=0,E=0,T=0,D="";function F(e,t,s,i,n,a,l,o){return{value:e,root:t,parent:s,type:i,props:n,children:a,line:P,column:N,length:l,return:"",siblings:o}}function B(e,t){return m(F("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function O(e){for(;e.root;)e=B(e.root,{children:[e]});w(e,e.siblings)}function I(){return T=E>0?b(D,--E):0,N--,10===T&&(N=1,P--),T}function A(){return T=E<R?b(D,E++):0,N++,10===T&&(N=1,P++),T}function H(){return b(D,E)}function M(){return E}function $(e,t){return _(D,e,t)}function z(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 L(e){return g($(E-1,G(91===e?e+2:40===e?e+1:e)))}function U(e){for(;(T=H())&&T<33;)A();return z(e)>2||z(T)>3?"":" "}function W(e,t){for(;--t&&A()&&!(T<48||T>102||T>57&&T<65||T>70&&T<97););return $(e,M()+(t<6&&32==H()&&32==A()))}function G(e){for(;A();)switch(T){case e:return E;case 34:case 39:34!==e&&39!==e&&G(T);break;case 40:41===e&&G(e);break;case 92:A()}return E}function q(e,t){for(;A()&&e+T!==57&&(e+T!==84||47!==H()););return"/*"+$(t,E-1)+"*"+h(47===e?e:A())}function J(e){for(;!z(H());)A();return $(e,E)}function Y(e,t){for(var s="",i=0;i<e.length;i++)s+=t(e[i],i,e,t)||"";return s}function V(e,t,s,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case d:return e.return=e.return||e.value;case r:return"";case p:return e.return=e.value+"{"+Y(e.children,i)+"}";case c:if(!j(e.value=e.props.join(",")))return""}return j(s=Y(e.children,i))?e.return=e.value+"{"+s+"}":""}function K(e,t,s){switch(function(e,t){return 45^b(e,0)?(((t<<2^b(e,0))<<2^b(e,1))<<2^b(e,2))<<2^b(e,3):0}(e,t)){case 5103:return o+"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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return o+e+e;case 4855:return o+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return l+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return o+e+l+e+a+e+e;case 5936:switch(b(e,t+11)){case 114:return o+e+a+y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o+e+a+y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o+e+a+y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return o+e+a+e+e;case 6165:return o+e+a+"flex-"+e+e;case 5187:return o+e+y(e,/(\w+).+(:[^]+)/,o+"box-$1$2"+a+"flex-$1$2")+e;case 5443:return o+e+a+"flex-item-"+y(e,/flex-|-self/g,"")+(x(e,/flex-|baseline/)?"":a+"grid-row-"+y(e,/flex-|-self/g,""))+e;case 4675:return o+e+a+"flex-line-pack"+y(e,/align-content|flex-|-self/g,"")+e;case 5548:return o+e+a+y(e,"shrink","negative")+e;case 5292:return o+e+a+y(e,"basis","preferred-size")+e;case 6060:return o+"box-"+y(e,"-grow","")+o+e+a+y(e,"grow","positive")+e;case 4554:return o+y(e,/([^-])(transform)/g,"$1"+o+"$2")+e;case 6187:return y(y(y(e,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),e,"")+e;case 5495:case 3959:return y(e,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return y(y(e,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+a+"flex-pack:$3"),/space-between/,"justify")+o+e+e;case 4200:if(!x(e,/flex-|baseline/))return a+"grid-column-align"+_(e,t)+e;break;case 2592:case 3360:return a+y(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(e,s){return t=s,x(e.props,/grid-\w+-end/)})?~f(e+(s=s[t].value),"span",0)?e:a+y(e,"-start","")+e+a+"grid-row-span:"+(~f(s,"span",0)?x(s,/\d+/):+x(s,/\d+/)-+x(e,/\d+/))+";":a+y(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(e){return x(e.props,/grid-\w+-start/)})?e:a+y(y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return y(e,/(.+)-inline(.+)/,o+"$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(j(e)-1-t>6)switch(b(e,t+1)){case 109:if(45!==b(e,t+4))break;case 102:return y(e,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+l+(108==b(e,t+3)?"$3":"$2-$3"))+e;case 115:return~f(e,"stretch",0)?K(y(e,"stretch","fill-available"),t,s)+e:e}break;case 5152:case 5920:return y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,s,i,n,l,o,r){return a+s+":"+i+r+(n?a+s+"-span:"+(l?o:+o-+i)+r:"")+e});case 4949:if(121===b(e,t+6))return y(e,":",":"+o)+e;break;case 6444:switch(b(e,45===b(e,14)?18:11)){case 120:return y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+o+(45===b(e,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+a+"$2box$3")+e;case 100:return y(e,":",":"+a)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return y(e,"scroll-","scroll-snap-")+e}return e}function Q(e,t,s,i){if(e.length>-1&&!e.return)switch(e.type){case d:return void(e.return=K(e.value,e.length,s));case p:return Y([B(e,{value:y(e.value,"@","@"+o)})],i);case c:if(e.length)return function(e,t){return e.map(t).join("")}(s=e.props,function(t){switch(x(t,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":O(B(e,{props:[y(t,/:(read-\w+)/,":-moz-$1")]})),O(B(e,{props:[t]})),m(e,{props:S(s,i)});break;case"::placeholder":O(B(e,{props:[y(t,/:(plac\w+)/,":"+o+"input-$1")]})),O(B(e,{props:[y(t,/:(plac\w+)/,":-moz-$1")]})),O(B(e,{props:[y(t,/:(plac\w+)/,a+"input-$1")]})),O(B(e,{props:[t]})),m(e,{props:S(s,i)})}return""})}}function Z(e){return function(e){return D="",e}(X("",null,null,null,[""],e=function(e){return P=N=1,R=j(D=e),E=0,[]}(e),0,[0],e))}function X(e,t,s,i,n,a,l,o,r){for(var c=0,d=0,p=l,m=0,g=0,x=0,v=1,S=1,C=1,k=0,P="",N=n,R=a,E=i,T=P;S;)switch(x=k,k=A()){case 40:if(108!=x&&58==b(T,p-1)){-1!=f(T+=y(L(k),"&","&\f"),"&\f",u(c?o[c-1]:0))&&(C=-1);break}case 34:case 39:case 91:T+=L(k);break;case 9:case 10:case 13:case 32:T+=U(x);break;case 92:T+=W(M()-1,7);continue;case 47:switch(H()){case 42:case 47:w(te(q(A(),M()),t,s,r),r),5!=z(x||1)&&5!=z(H()||1)||!j(T)||" "===_(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*v:o[c++]=j(T)*C;case 125*v:case 59:case 0:switch(k){case 0:case 125:S=0;case 59+d:-1==C&&(T=y(T,/\f/g,"")),g>0&&(j(T)-p||0===v&&47===x)&&w(g>32?se(T+";",i,s,p-1,r):se(y(T," ","")+";",i,s,p-2,r),r);break;case 59:T+=";";default:if(w(E=ee(T,t,s,c,d,n,o,P,N=[],R=[],p,a),a),123===k)if(0===d)X(T,t,E,E,N,a,p,o,R);else{switch(m){case 99:if(110===b(T,3))break;case 108:if(97===b(T,2))break;default:d=0;case 100:case 109:case 115:}d?X(e,E,E,i&&w(ee(e,E,E,0,0,n,o,P,n,N=[],p,R),R),n,R,p,o,i?N:R):X(T,E,E,E,[""],R,0,o,R)}}c=d=g=0,v=C=1,P=T="",p=l;break;case 58:p=1+j(T),g=x;default:if(v<1)if(123==k)--v;else if(125==k&&0==v++&&125==I())continue;switch(T+=h(k),k*v){case 38:C=d>0?1:(T+="\f",-1);break;case 44:o[c++]=(j(T)-1)*C,C=1;break;case 64:45===H()&&(T+=L(A())),m=H(),d=p=j(P=T+=J(M())),k++;break;case 45:45===x&&2==j(T)&&(v=0)}}return a}function ee(e,t,s,i,n,a,l,o,r,d,p,h){for(var m=n-1,x=0===n?a:[""],f=v(x),b=0,j=0,w=0;b<i;++b)for(var S=0,C=_(e,m+1,m=u(j=l[b])),k=e;S<f;++S)(k=g(j>0?x[S]+" "+C:y(C,/&\f/g,x[S])))&&(r[w++]=k);return F(e,t,s,0===n?c:o,r,d,p,h)}function te(e,t,s,i){return F(e,t,s,r,h(T),_(e,2,-2),0,i)}function se(e,t,s,i,n){return F(e,t,s,d,_(e,0,i),_(e,i+1,-1),i,n)}const ie="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ne="active",ae="data-styled-version",le="6.4.2",oe="/*!sc*/\n",re="undefined"!=typeof window&&"undefined"!=typeof document;function ce(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const de=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(k=null!==(C=ce("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==C?C:ce("SC_DISABLE_SPEEDY"))&&void 0!==k?k:"undefined"!=typeof process&&void 0!==process.env&&!1),pe="sc-keyframes-",ue={};function he(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let me=new Map,ge=new Map,xe=1;const ye=e=>{if(me.has(e))return me.get(e);for(;ge.has(xe);)xe++;const t=xe++;return me.set(e,t),ge.set(t,e),t},fe=e=>ge.get(e),be=(e,t)=>{xe=t+1,me.set(e,t),ge.set(t,e)},_e=(new Set,Object.freeze([])),je=Object.freeze({});function ve(e,t,s=je){return e.theme!==s.theme&&e.theme||t||s.theme}const we=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Se=/(^-|-$)/g;function Ce(e){return e.replace(we,"-").replace(Se,"")}const ke=/(a)(d)/gi,Pe=e=>String.fromCharCode(e+(e>25?39:97));function Ne(e){let t,s="";for(t=Math.abs(e);t>52;t=t/52|0)s=Pe(t%52)+s;return(Pe(t%52)+s).replace(ke,"$1-$2")}const Re=5381,Ee=(e,t)=>{let s=t.length;for(;s;)e=33*e^t.charCodeAt(--s);return e},Te=e=>Ee(Re,e);function De(e){return Ne(Te(e)>>>0)}function Fe(e){return e.displayName||e.name||"Component"}function Be(e){return"string"==typeof e&&!0}function Oe(e){return Be(e)?`styled.${e}`:`Styled(${Fe(e)})`}const Ie=Symbol.for("react.memo"),Ae=Symbol.for("react.forward_ref"),He={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Me={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},$e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ze={[Ae]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Ie]:$e};function Le(e){return("type"in(t=e)&&t.type.$$typeof)===Ie?$e:"$$typeof"in e?ze[e.$$typeof]:He;var t}const Ue=Object.defineProperty,We=Object.getOwnPropertyNames,Ge=Object.getOwnPropertySymbols,qe=Object.getOwnPropertyDescriptor,Je=Object.getPrototypeOf,Ye=Object.prototype;function Ve(e,t,s){if("string"!=typeof t){const i=Je(t);i&&i!==Ye&&Ve(e,i,s);const n=We(t).concat(Ge(t)),a=Le(e),l=Le(t);for(let i=0;i<n.length;++i){const o=n[i];if(!(o in Me||s&&s[o]||l&&o in l||a&&o in a)){const s=qe(t,o);try{Ue(e,o,s)}catch(e){}}}}return e}function Ke(e){return"function"==typeof e}const Qe=Symbol.for("react.forward_ref");function Ze(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===Qe&&"styledComponentId"in e}function Xe(e,t){return e&&t?e+" "+t:e||t||""}function et(e,t){return e.join(t||"")}function tt(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function st(e,t,s=!1){if(!s&&!tt(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let s=0;s<t.length;s++)e[s]=st(e[s],t[s]);else if(tt(t))for(const s in t)e[s]=st(e[s],t[s]);return e}function it(e,t){Object.defineProperty(e,"toString",{value:t})}const nt=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let s=this._cGroup;s<e;s++)t+=this.groupSizes[s];else for(let s=this._cGroup-1;s>=e;s--)t-=this.groupSizes[s];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,s=t.length;let i=s;for(;e>=i;)if(i<<=1,i<0)throw he(16,`${e}`);this.groupSizes=new Uint32Array(i),this.groupSizes.set(t),this.length=i;for(let e=s;e<i;e++)this.groupSizes[e]=0}let s=this.indexOfGroup(e+1),i=0;for(let n=0,a=t.length;n<a;n++)this.tag.insertRule(s,t[n])&&(this.groupSizes[e]++,s++,i++);i>0&&this._cGroup>e&&(this._cIndex+=i)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],s=this.indexOfGroup(e),i=s+t;this.groupSizes[e]=0;for(let e=s;e<i;e++)this.tag.deleteRule(s);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const s=this.groupSizes[e],i=this.indexOfGroup(e),n=i+s;for(let e=i;e<n;e++)t+=this.tag.getRule(e)+oe;return t}},at=`style[${ie}][${ae}="${le}"]`,lt=new RegExp(`^${ie}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ot=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,rt=e=>{if(!e)return document;if(ot(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(ot(t))return t}return document},ct=(e,t,s)=>{const i=s.split(",");let n;for(let s=0,a=i.length;s<a;s++)(n=i[s])&&e.registerName(t,n)},dt=(e,t)=>{var s;const i=(null!==(s=t.textContent)&&void 0!==s?s:"").split(oe),n=[];for(let t=0,s=i.length;t<s;t++){const s=i[t].trim();if(!s)continue;const a=s.match(lt);if(a){const t=0|parseInt(a[1],10),s=a[2];0!==t&&(be(s,t),ct(e,s,a[3]),e.getTag().insertRules(t,n)),n.length=0}else n.push(s)}},pt=e=>{const t=rt(e.options.target).querySelectorAll(at);for(let s=0,i=t.length;s<i;s++){const i=t[s];i&&i.getAttribute(ie)!==ne&&(dt(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let ut=!1;function ht(){if(!1!==ut)return ut;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return ut=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return ut=t.getAttribute("content")||void 0}return ut=s.nc}const mt=(e,t)=>{const s=document.head,i=e||s,n=document.createElement("style"),a=(e=>{const t=Array.from(e.querySelectorAll(`style[${ie}]`));return t[t.length-1]})(i),l=void 0!==a?a.nextSibling:null;n.setAttribute(ie,ne),n.setAttribute(ae,le);const o=t||ht();return o&&n.setAttribute("nonce",o),i.insertBefore(n,l),n},gt=class{constructor(e,t){this.element=mt(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const s=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i.ownerNode===e)return i}throw he(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},xt=class{constructor(e,t){this.element=mt(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const s=document.createTextNode(t);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let yt=re;const ft={isServer:!re,useCSSOMInjection:!de};class bt{static registerId(e){return ye(e)}constructor(e=je,t={},s){this.options=Object.assign(Object.assign({},ft),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(s),this.server=!!e.isServer,!this.server&&re&&yt&&(yt=!1,pt(this)),it(this,()=>(e=>{const t=e.getTag(),{length:s}=t;let i="";for(let n=0;n<s;n++){const s=fe(n);if(void 0===s)continue;const a=e.names.get(s);if(void 0===a||!a.size)continue;const l=t.getGroup(n);if(0===l.length)continue;const o=ie+".g"+n+'[id="'+s+'"]';let r="";for(const e of a)e.length>0&&(r+=e+",");i+=l+o+'{content:"'+r+'"}'+oe}return i})(this))}rehydrate(){!this.server&&re&&pt(this)}reconstructWithOptions(e,t=!0){const s=new bt(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return s.keyframeIds=new Set(this.keyframeIds),!this.server&&re&&e.target!==this.options.target&&rt(this.options.target)!==rt(e.target)&&pt(s),s}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:s})=>e?new gt(t,s):new xt(t,s))(this.options),new nt(e)));var e}hasNameForId(e,t){var s,i;return null!==(i=null===(s=this.names.get(e))||void 0===s?void 0:s.has(t))&&void 0!==i&&i}registerName(e,t){ye(e),e.startsWith(pe)&&this.keyframeIds.add(e);const s=this.names.get(e);s?s.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,s){this.registerName(e,t),this.getTag().insertRules(ye(e),s)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ye(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const _t=new WeakSet,jt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale: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};function vt(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in jt||e.startsWith("--")?String(t).trim():t+"px"}const wt=47;function St(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t+=i>=65&&i<=90?"-"+String.fromCharCode(i+32):e[s]}return t.startsWith("ms-")?"-"+t:t}const Ct=Symbol.for("sc-keyframes");function kt(e){return Ke(e)&&!(e.prototype&&e.prototype.isReactComponent)}const Pt=e=>null==e||!1===e||""===e,Nt=Symbol.for("react.client.reference");function Rt(e){return e.$$typeof===Nt}function Et(e,t){for(const s in e){const i=e[s];e.hasOwnProperty(s)&&!Pt(i)&&(Array.isArray(i)&&_t.has(i)||Ke(i)?t.push(St(s)+":",i,";"):tt(i)?(t.push(s+" {"),Et(i,t),t.push("}")):t.push(St(s)+": "+vt(s,i)+";"))}}function Tt(e,t,s,i,n=[]){if(Pt(e))return n;const a=typeof e;if("string"===a)return n.push(e),n;if("function"===a)return Rt(e)?n:kt(e)&&t?Tt(e(t),t,s,i,n):(n.push(e),n);if(Array.isArray(e)){for(let a=0;a<e.length;a++)Tt(e[a],t,s,i,n);return n}return Ze(e)?(n.push(`.${e.styledComponentId}`),n):function(e){return"object"==typeof e&&null!==e&&Ct in e}(e)?(s?(e.inject(s,i),n.push(e.getName(i))):n.push(e),n):Rt(e)?n:tt(e)?e.toString!==Object.prototype.toString?(n.push(e.toString()),n):(Et(e,n),n):(n.push(e.toString()),n)}const Dt=Te(le);class Ft{constructor(e,t,s){this.rules=e,this.componentId=t,this.baseHash=Ee(Dt,t),this.baseStyle=s,bt.registerId(t)}generateAndInjectStyles(e,t,s){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,s):"";{let n="";for(let i=0;i<this.rules.length;i++){const a=this.rules[i];if("string"==typeof a)n+=a;else if(a)if(kt(a)){const i=a(e);"string"==typeof i?n+=i:null!=i&&!1!==i&&(n+=et(Tt(i,e,t,s)))}else n+=et(Tt(a,e,t,s))}if(n){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=s.hash?s.hash+n:n;let a=this.dynamicNameCache.get(e);if(!a){if(a=Ne(Ee(Ee(this.baseHash,s.hash),n)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,a)}if(!t.hasNameForId(this.componentId,a)){const e=s(n,"."+a,void 0,this.componentId);t.insertRules(this.componentId,a,e)}i=Xe(i,a)}}return i}}const Bt=/&/g;function Ot(e,t){let s=0;for(;--t>=0&&92===e.charCodeAt(t);)s++;return!(1&~s)}function It(e){const t=e.length;let s="",i=0,n=0,a=0,l=!1,o=!1;for(let r=0;r<t;r++){const c=e.charCodeAt(r);if(0!==a||l||c!==wt||42!==e.charCodeAt(r+1))if(l)42===c&&e.charCodeAt(r+1)===wt&&(l=!1,r++);else if(34!==c&&39!==c||Ot(e,r)){if(0===a)if(123===c)n++;else if(125===c){if(n--,n<0){o=!0;let s=r+1;for(;s<t;){const t=e.charCodeAt(s);if(59===t||10===t)break;s++}s<t&&59===e.charCodeAt(s)&&s++,n=0,r=s-1,i=s;continue}0===n&&(s+=e.substring(i,r+1),i=r+1)}else 59===c&&0===n&&(s+=e.substring(i,r+1),i=r+1)}else 0===a?a=c:a===c&&(a=0);else l=!0,r++}return o||0!==n||0!==a?(i<t&&0===n&&0===a&&(s+=e.substring(i)),s):e}function At(e,t){const s=t+" ",i=","+s;for(let n=0;n<e.length;n++){const a=e[n];if("rule"===a.type){a.value=(s+a.value).replaceAll(",",i);const e=a.props,t=[];for(let i=0;i<e.length;i++)t[i]=s+e[i];a.props=t}Array.isArray(a.children)&&"@keyframes"!==a.type&&At(a.children,t)}return e}function Ht({options:e=je,plugins:t=_e}=je){let s,i,n;const a=(e,t,n)=>n.startsWith(i)&&n.endsWith(i)&&n.replaceAll(i,"").length>0?`.${s}`:e,l=t.slice();l.push(e=>{e.type===c&&e.value.includes("&")&&(n||(n=new RegExp(`\\${i}\\b`,"g")),e.props[0]=e.props[0].replace(Bt,i).replace(n,a))}),e.prefix&&l.push(Q),l.push(V);let o=[];const r=(u=l.concat((m=e=>o.push(e),function(e){e.root||(e=e.return)&&m(e)})),h=v(u),function(e,t,s,i){for(var n="",a=0;a<h;a++)n+=u[a](e,t,s,i)||"";return n}),d=(t,a="",l="",c="&")=>{s=c,i=a,n=void 0;const d=function(e){const t=-1!==e.indexOf("//"),s=-1!==e.indexOf("}");if(!t&&!s)return e;if(!t)return It(e);const i=e.length;let n="",a=0,l=0,o=0,r=0,c=0,d=!1;for(;l<i;){const t=e.charCodeAt(l);if(34!==t&&39!==t||Ot(e,l))if(0===o)if(t===wt&&l+1<i&&42===e.charCodeAt(l+1)){for(l+=2;l+1<i&&(42!==e.charCodeAt(l)||e.charCodeAt(l+1)!==wt);)l++;l+=2}else if(40!==t)if(41!==t)if(r>0)l++;else if(42===t&&l+1<i&&e.charCodeAt(l+1)===wt)n+=e.substring(a,l),l+=2,a=l,d=!0;else if(t===wt&&l+1<i&&e.charCodeAt(l+1)===wt){for(n+=e.substring(a,l);l<i&&10!==e.charCodeAt(l);)l++;a=l,d=!0}else 123===t?c++:125===t&&c--,l++;else r>0&&r--,l++;else r++,l++;else l++;else 0===o?o=t:o===t&&(o=0),l++}return d?(a<i&&(n+=e.substring(a)),0===c?n:It(n)):0===c?e:It(e)}(t);let p=Z(l||a?l+" "+a+" { "+d+" }":d);return e.namespace&&(p=At(p,e.namespace)),o=[],Y(p,r),o},p=e;var u,h,m;let g=Re;for(let e=0;e<t.length;e++)t[e].name||he(15),g=Ee(g,t[e].name);return(null==p?void 0:p.namespace)&&(g=Ee(g,p.namespace)),(null==p?void 0:p.prefix)&&(g=Ee(g,"p")),d.hash=g!==Re?g.toString():"",d}const Mt=new bt,$t=Ht(),zt=n().createContext({shouldForwardProp:void 0,styleSheet:Mt,stylis:$t,stylisPlugins:void 0}),Lt=zt.Consumer;function Ut(){return n().useContext(zt)}function Wt(e){var t;const s=Ut(),{styleSheet:i}=s,a=n().useMemo(()=>{let t=i;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions(void 0!==e.nonce?{target:e.target,nonce:e.nonce}:{target:e.target},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,i]),l=n().useMemo(()=>{var t;return void 0===e.stylisPlugins&&void 0===e.namespace&&void 0===e.enableVendorPrefixes?s.stylis:Ht({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(t=e.stylisPlugins)&&void 0!==t?t:s.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins,s.stylis,s.stylisPlugins]),o="shouldForwardProp"in e?e.shouldForwardProp:s.shouldForwardProp,r=null!==(t=e.stylisPlugins)&&void 0!==t?t:s.stylisPlugins,c=n().useMemo(()=>({shouldForwardProp:o,styleSheet:a,stylis:l,stylisPlugins:r}),[o,a,l,r]);return n().createElement(zt.Provider,{value:c},e.children)}const Gt=n().createContext(void 0),qt=Gt.Consumer;function Jt(){const e=n().useContext(Gt);if(!e)throw he(18);return e}function Yt(e){const t=n().useContext(Gt),s=n().useMemo(()=>function(e,t){if(!e)throw he(14);if(Ke(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw he(8);return t?Object.assign(Object.assign({},t),e):e}(e.theme,t),[e.theme,t]);return e.children?n().createElement(Gt.Provider,{value:s},e.children):null}const Vt=Object.prototype.hasOwnProperty,Kt={};function Qt(e,t){const s="string"!=typeof e?"sc":Ce(e);Kt[s]=(Kt[s]||0)+1;const i=s+"-"+De(le+s+Kt[s]);return t?t+"-"+i:i}function Zt(e,t,s){const a=Ze(e),l=e,o=!Be(e),{attrs:r=_e,componentId:c=Qt(t.displayName,t.parentComponentId),displayName:d=Oe(e)}=t,p=t.displayName&&t.componentId?Ce(t.displayName)+"-"+t.componentId:t.componentId||c,u=a&&l.attrs?l.attrs.concat(r).filter(Boolean):r;let{shouldForwardProp:h}=t;if(a&&l.shouldForwardProp){const e=l.shouldForwardProp;if(t.shouldForwardProp){const s=t.shouldForwardProp;h=(t,i)=>e(t,i)&&s(t,i)}else h=e}const m=new Ft(s,p,a?l.componentStyle:void 0);function g(e,t){return function(e,t,s){const{attrs:a,componentStyle:l,defaultProps:o,foldedComponentIds:r,styledComponentId:c,target:d}=e,p=n().useContext(Gt),u=Ut(),h=e.shouldForwardProp||u.shouldForwardProp,m=ve(t,p,o)||je;let g,x;{const e=n().useRef(null),s=e.current;if(null!==s&&s[1]===m&&s[2]===u.styleSheet&&s[3]===u.stylis&&s[7]===l&&function(e,t,s){const i=e,n=t;let a=0;for(const e in n)if(Vt.call(n,e)&&(a++,i[e]!==n[e]))return!1;return a===s}(s[0],t,s[4]))g=s[5],x=s[6];else{g=function(e,t,s){const i=Object.assign(Object.assign({},t),{className:void 0,theme:s}),n=e.length>1;for(let s=0;s<e.length;s++){const a=e[s],l=Ke(a)?a(n?Object.assign({},i):i):a;for(const e in l)"className"===e?i.className=Xe(i.className,l[e]):"style"===e?i.style=Object.assign(Object.assign({},i.style),l[e]):e in t&&void 0===t[e]||(i[e]=l[e])}return"className"in t&&"string"==typeof t.className&&(i.className=Xe(i.className,t.className)),i}(a,t,m),x=function(e,t,s,i){return e.generateAndInjectStyles(t,s,i)}(l,g,u.styleSheet,u.stylis);let s=0;for(const e in t)Vt.call(t,e)&&s++;e.current=[t,m,u.styleSheet,u.stylis,s,g,x,l]}}const y=g.as||d,f=function(e,t,s,i){const n={};for(const a in e)void 0===e[a]||"$"===a[0]||"as"===a||"theme"===a&&e.theme===s||("forwardedAs"===a?n.as=e.forwardedAs:i&&!i(a,t)||(n[a]=e[a]));return n}(g,y,m,h);let b=Xe(r,c);return x&&(b+=" "+x),g.className&&(b+=" "+g.className),f[Be(y)&&y.includes("-")?"class":"className"]=b,s&&(f.ref=s),(0,i.createElement)(y,f)}(x,e,t)}g.displayName=d;let x=n().forwardRef(g);return x.attrs=u,x.componentStyle=m,x.displayName=d,x.shouldForwardProp=h,x.foldedComponentIds=a?Xe(l.foldedComponentIds,l.styledComponentId):"",x.styledComponentId=p,x.target=a?l.target:e,Object.defineProperty(x,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=a?function(e,...t){for(const s of t)st(e,s,!0);return e}({},l.defaultProps,e):e}}),it(x,()=>`.${x.styledComponentId}`),o&&Ve(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}var Xt=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function es(e,t){const s=[e[0]];for(let i=0,n=t.length;i<n;i+=1)s.push(t[i],e[i+1]);return s}const ts=e=>(_t.add(e),e);function ss(e,...t){if(Ke(e)||tt(e))return ts(Tt(es(_e,[e,...t])));const s=e;return 0===t.length&&1===s.length&&"string"==typeof s[0]?Tt(s):ts(Tt(es(s,t)))}function is(e,t,s=je){if(!t)throw he(1,t);const i=(i,...n)=>e(t,s,ss(i,...n));return i.attrs=i=>is(e,t,Object.assign(Object.assign({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)})),i.withConfig=i=>is(e,t,Object.assign(Object.assign({},s),i)),i}const ns=e=>is(Zt,e),as=ns;Xt.forEach(e=>{as[e]=ns(e)});class ls{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const s=e[t];if(Ke(s)&&!Ze(s))return!1}return!0}(e),bt.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,s,i){const n=this.componentId;if(this.isStatic){if(s.hasNameForId(n,n+e))this.instanceRules.has(e)||this.computeRules(e,t,s,i);else{const a=this.computeRules(e,t,s,i);s.insertRules(n,a.name,a.rules)}return}const a=this.instanceRules.get(e);if(this.computeRules(e,t,s,i),!s.server&&a){const t=a.rules,s=this.instanceRules.get(e).rules;if(t.length===s.length){let e=!0;for(let i=0;i<t.length;i++)if(t[i]!==s[i]){e=!1;break}if(e)return}}this.rebuildGroup(s)}computeRules(e,t,s,i){const n=et(Tt(this.rules,t,s,i)),a={name:this.componentId+e,rules:i(n,"")};return this.instanceRules.set(e,a),a}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const s of this.instanceRules.values())e.insertRules(t,s.name,s.rules)}}function os(e,...t){const s=ss(e,...t),i=`sc-global-${De(JSON.stringify(s))}`,a=new ls(s,i),l=e=>{const t=Ut(),s=n().useContext(Gt);let l;{const e=n().useRef(null);null===e.current&&(e.current=t.styleSheet.allocateGSInstance(i)),l=e.current}t.styleSheet.server&&o(l,e,t.styleSheet,s,t.stylis);{const r=a.isStatic?[l,t.styleSheet,a]:[l,e,t.styleSheet,s,t.stylis,a],c=n().useRef(a);n().useLayoutEffect(()=>{t.styleSheet.server||(c.current!==a&&(t.styleSheet.clearRules(i),c.current=a),o(l,e,t.styleSheet,s,t.stylis))},r),n().useLayoutEffect(()=>()=>{t.styleSheet.server||a.removeStyles(l,t.styleSheet)},[l,t.styleSheet,a])}return t.styleSheet.server&&a.instanceRules.delete(l),null};function o(e,t,s,i,n){if(a.isStatic)a.renderStyles(e,ue,s,n);else{const o=Object.assign(Object.assign({},t),{theme:ve(t,i,l.defaultProps)});a.renderStyles(e,o,s,n)}}return n().memo(l)}function rs(e,t,s,i,n){for(const a in e){const l=e[a],o=n?n+"-"+a:a;if("object"==typeof l&&null!==l){const e={};rs(l,t,e,i,o),s[a]=e}else s[a]=i(o,l,a)}}function cs(e,t,s,i){let n="";for(const a in e){const l=e[a],o=t[a],r=i?i+"-"+a:a;"object"==typeof l&&null!==l?"object"==typeof o&&null!==o&&(n+=cs(l,o,s,r)):void 0!==o&&"function"!=typeof o&&(n+="--"+s+r+":"+o+";")}return n}function ds(e,t){var s,i;const n=(null!==(s=null==t?void 0:t.prefix)&&void 0!==s?s:"sc")+"-",a=null!==(i=null==t?void 0:t.selector)&&void 0!==i?i:":root",l=function(e,t){const s={};return rs(e,t,s,e=>"--"+t+e),s}(e,n),o=function(e,t){const s={};return rs(e,t,s,(e,s)=>"var(--"+t+e+", "+s+")"),s}(e,n),r=os`
    ${a} {
      ${t=>cs(e,t.theme,n)}
    }
  `;return Object.assign(o,{GlobalStyle:r,raw:e,vars:l,resolve(t){if(!re)throw new Error("createTheme.resolve() is client-only");const s=null!=t?t:document.documentElement;return function(e,t,s){const i={};return rs(e,t,i,(e,i)=>s.getPropertyValue("--"+t+e).trim()||i),i}(e,n,getComputedStyle(s))}})}var ps;class us{constructor(e,t){this[ps]=!0,this.inject=(e,t=$t)=>{const s=this.getName(t);if(!e.hasNameForId(this.id,s)){const i=t(this.rules,s,"@keyframes");e.insertRules(this.id,s,i)}},this.name=e,this.id=pe+e,this.rules=t,ye(this.id),it(this,()=>{throw he(12,String(this.name))})}getName(e=$t){return e.hash?this.name+Ne(+e.hash>>>0):this.name}}function hs(e,...t){const s=et(ss(e,...t)),i=De(s);return new us(i,s)}function ms(e){const t=n().forwardRef((t,s)=>{const i=ve(t,n().useContext(Gt),e.defaultProps);return n().createElement(e,Object.assign(Object.assign({},t),{theme:i,ref:s}))});return t.displayName=`WithTheme(${Fe(e)})`,Ve(t,e)}ps=Ct;class gs{constructor({nonce:e}={}){this._emitSheetCSS=()=>{const e=this.instance.toString();if(!e)return"";const t=this.instance.options.nonce||ht();return`<style ${et([t&&`nonce="${t}"`,`${ie}="true"`,`${ae}="${le}"`].filter(Boolean)," ")}>${e}</style>`},this.getStyleTags=()=>{if(this.sealed)throw he(2);return this._emitSheetCSS()},this.getStyleElement=()=>{if(this.sealed)throw he(2);const e=this.instance.toString();if(!e)return[];const t={[ie]:"",[ae]:le,dangerouslySetInnerHTML:{__html:e}},s=this.instance.options.nonce||ht();return s&&(t.nonce=s),[n().createElement("style",Object.assign({},t,{key:"sc-0-0"}))]},this.seal=()=>{this.sealed=!0},this.instance=new bt({isServer:!0,nonce:e}),this.sealed=!1}collectStyles(e){if(this.sealed)throw he(2);return n().createElement(Wt,{sheet:this.instance},e)}interleaveWithNodeStream(e){throw he(3)}}const xs={StyleSheet:bt,mainSheet:Mt},ys=/:(?:(first)-child|(last)-child|(only)-child|(nth-child)\(([^()]+)\)|(nth-last-child)\(([^()]+)\))/g,fs=`:not(style[${ie}])`,bs=`style[${ie}]`;function _s(e){return-1===e.indexOf("-child")?e:(ys.lastIndex=0,e.replace(ys,(e,t,s,i,n,a,l,o)=>t?`:nth-child(1 of ${fs})`:s?`:nth-last-child(1 of ${fs})`:i?`:nth-child(1 of ${fs}):nth-last-child(1 of ${fs})`:n?-1!==a.indexOf(" of ")?e:`:nth-child(${a} of ${fs})`:-1!==o.indexOf(" of ")?e:`:nth-last-child(${o} of ${fs})`))}function js(e,t){if(-1===e.indexOf("+"))return;let s=0,i=0;for(let n=0;n<e.length;n++){const a=e.charCodeAt(n);if(40===a)s++;else if(41===a)s--;else if(91===a)i++;else if(93===a)i--;else if(43===a&&0===s&&0===i&&!Ot(e,n)){const s=e.substring(0,n),i=e.substring(n+1);t.push(s+"+"+bs+"+"+i),t.push(s+"+"+bs+"+"+bs+"+"+i)}}}function vs(e){if(e.type===c){const t=e.props,s=[];for(let e=0;e<t.length;e++){const i=_s(t[e]);s.push(i),js(i,s)}e.props=s}}},609(e){e.exports=window.React}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={exports:{}};return s[e](a,a.exports,n),a.exports}n.m=s,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,s)=>(n.f[s](e,t),t),[])),n.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:"631f87fdcd915a80b4a4",85:"afdcea4ea442a064abd6",173:"e1e1cd5c4fc508a552df",262:"b990bbdde2f928b1f9d7",303:"6e2475faa4bb58cc8626",340:"afd607c1e169bfddaf63",353:"258f82ea6002cf7cf4a6",395:"7cec447ec9ee4d75ff7a",446:"6d5baa847f979e45fe12",723:"5edc5e64339318738227",771:"f7f79ec5dad82f455dc8",945:"d40098f61fb05c09ab01",985:"072b93c4f4ba67a9f68b"}[e]),n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="simplystatic-settings:",n.l=(s,i,a,l)=>{if(e[s])e[s].push(i);else{var o,r;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||(r=!0,(o=document.createElement("script")).charset="utf-8",n.nc&&o.setAttribute("nonce",n.nc),o.setAttribute("data-webpack",t+a),o.src=s),e[s]=[i];var u=(t,i)=>{o.onerror=o.onload=null,clearTimeout(h);var n=e[s];if(delete e[s],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(e=>e(i)),t)return t(i)},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),r&&document.head.appendChild(o)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.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 i=s.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=s[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={57:0};n.f.j=(t,s)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)s.push(i[2]);else{var a=new Promise((s,n)=>i=e[t]=[s,n]);s.push(i[2]=a);var l=n.p+n.u(t),o=new Error;n.l(l,s=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=s&&("load"===s.type?"missing":s.type),l=s&&s.target&&s.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+l+")",o.name="ChunkLoadError",o.type=a,o.request=l,i[1](o)}},"chunk-"+t,t)}};var t=(t,s)=>{var i,a,[l,o,r]=s,c=0;if(l.some(t=>0!==e[t])){for(i in o)n.o(o,i)&&(n.m[i]=o[i]);r&&r(n)}for(t&&t(s);c<l.length;c++)a=l[c],n.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))})(),n.nc=void 0;const a=window.wp.element,l=window.wp.apiFetch;var o=n.n(l),r=n(609),c=n.n(r);function d(e,t){const s=(0,r.useRef)();(0,r.useEffect)(()=>{s.current=e},[e]),(0,r.useEffect)(()=>{if(null!==t){let e=setInterval(function(){s.current()},t);return()=>clearInterval(e)}},[t])}const p=window.ReactJSXRuntime,{__}=wp.i18n,u=(0,a.createContext)(),h=function(e){const[t,s]=(0,a.useState)(!1),[i,n]=(0,a.useState)(0),[l,r]=(0,a.useState)(!1),[c,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(!1),[x,y]=(0,a.useState)({}),[f,b]=(0,a.useState)({}),[_,j]=(0,a.useState)("yes"),[v,w]=(0,a.useState)(1),[S,C]=(0,a.useState)([]),[k,P]=(0,a.useState)(!1),N=()=>{o()({path:"/simplystatic/v1/settings"}).then(e=>{y(e)})},R=()=>{o()({path:"/simplystatic/v1/is-running",method:"GET"}).then(e=>{var t=JSON.parse(e);s(t.running),r(t.paused),t.delayed&&n(t.delayed_until)})};function E(e){try{const t=options&&options.integrations;if(!t)return null;if(Array.isArray(t)){for(let s=0;s<t.length;s++){const i=t[s];if(i&&i.id===e)return i}return null}return t[e]||null}catch(e){return null}}const T=e=>{const t=E(e);return!(!t||!t.requires_ui_reload)},D=e=>S.indexOf(e)>=0,F=e=>{let t=x.integrations;return!(!1===t||!t||!Array.isArray(t))&&t.indexOf(e)>=0};return d(()=>{n(i-1)},i>0?1e3:null),d(()=>{R()},t||i?5e3:null),(0,a.useEffect)(()=>{options.current_settings?y(options.current_settings):N(),o()({path:"/simplystatic/v1/system-status"}).then(e=>{b(e),o()({path:"/simplystatic/v1/system-status/passed"}).then(e=>{let t=JSON.parse(e);j(t.passed)})}),R(),w(options.blog_id)},[]),(0,p.jsx)(u.Provider,{value:{settings:x,configs:f,passedChecks:_,settingsSaved:m,setSettingsSaved:g,updateSetting:(e,t)=>{y(s=>({...s,[e]:t}))},setSettings:y,saveSettings:()=>{const e=S&&S.length>0;return o()({path:"/simplystatic/v1/settings",method:"POST",data:x}).then(t=>(C([]),{resp:t,shouldReload:e}))},resetSettings:()=>{o()({path:"/simplystatic/v1/settings/reset",method:"POST"}).then(e=>{const t=JSON.parse(e);200===t.status&&t.data&&y(t.data)})},resetDatabase:()=>{o()({path:"/simplystatic/v1/settings/reset-database",method:"POST"})},resetBackgroundQueue:()=>{o()({path:"/simplystatic/v1/settings/reset-background-queue",method:"POST"})},getSettings:N,updateFromNetwork:e=>{o()({path:"/simplystatic/v1/update-from-network",method:"POST",data:{blog_id:e}})},importSettings:e=>{y(e),o()({path:"/simplystatic/v1/settings",method:"POST",data:e})},migrateSettings:()=>{o()({path:"/simplystatic/v1/migrate",method:"POST",migrate:!0})},resetDiagnostics:()=>{o()({path:"/simplystatic/v1/reset-diagnostics",method:"POST"})},isRunning:t,setIsRunning:s,isPaused:l,setIsPaused:r,setIsResumed:h,isResumed:c,blogId:v,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:E,showMobileNav:k,setShowMobileNav:P,isDelayed:i},children:e.children})},m=window.wp.components,g=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,x=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,y=/\.(m3u8)($|\?)/i,f=/\.(mpd)($|\?)/i,b=/stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/,_=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,j=/vimeo\.com\/(?!progressive_redirect).+/,v=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,w=/open\.spotify\.com\/(\w+)\/(\w+)/i,S=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/,C=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,k=(e,t)=>{if(Array.isArray(e)){for(const s of e){if("string"==typeof s&&k(s,t))return!0;if(k(s.src,t))return!0}return!1}return t(e)},P={html:e=>k(e,e=>g.test(e)||x.test(e)),hls:e=>k(e,e=>y.test(e)),dash:e=>k(e,e=>f.test(e)),mux:e=>b.test(e),youtube:e=>_.test(e),vimeo:e=>j.test(e)&&!x.test(e)&&!y.test(e),wistia:e=>v.test(e),spotify:e=>w.test(e),twitch:e=>S.test(e),tiktok:e=>C.test(e)};var N=r.forwardRef((e,t)=>{const s=g.test(`${e.src}`)?"audio":"video";return r.createElement(s,{...e,ref:t},e.children)}),R=[{key:"hls",name:"hls.js",canPlay:P.hls,canEnablePIP:()=>!0,player:(0,r.lazy)(()=>Promise.all([n.e(985),n.e(945),n.e(262)]).then(n.bind(n,805)))},{key:"dash",name:"dash.js",canPlay:P.dash,canEnablePIP:()=>!0,player:(0,r.lazy)(()=>Promise.all([n.e(985),n.e(395)]).then(n.bind(n,517)))},{key:"mux",name:"Mux",canPlay:P.mux,canEnablePIP:()=>!0,player:(0,r.lazy)(()=>Promise.all([n.e(985),n.e(945),n.e(723)]).then(n.bind(n,813)))},{key:"youtube",name:"YouTube",canPlay:P.youtube,player:(0,r.lazy)(()=>n.e(446).then(n.bind(n,808)))},{key:"vimeo",name:"Vimeo",canPlay:P.vimeo,player:(0,r.lazy)(()=>n.e(173).then(n.bind(n,183)))},{key:"wistia",name:"Wistia",canPlay:P.wistia,canEnablePIP:()=>!0,player:(0,r.lazy)(()=>n.e(340).then(n.bind(n,868)))},{key:"spotify",name:"Spotify",canPlay:P.spotify,canEnablePIP:()=>!1,player:(0,r.lazy)(()=>n.e(771).then(n.bind(n,653)))},{key:"twitch",name:"Twitch",canPlay:P.twitch,canEnablePIP:()=>!1,player:(0,r.lazy)(()=>n.e(42).then(n.bind(n,682)))},{key:"tiktok",name:"TikTok",canPlay:P.tiktok,canEnablePIP:()=>!1,player:(0,r.lazy)(()=>n.e(85).then(n.bind(n,188)))},{key:"html",name:"html",canPlay:P.html,canEnablePIP:()=>!0,player:N}];const E={width:"320px",height:"180px",volume:1,playbackRate:1,previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}"},T=r.forwardRef((e,t)=>{const{playing:s,pip:i}=e,n=e.activePlayer,a=(0,r.useRef)(null),l=(0,r.useRef)(!0);if((0,r.useEffect)(()=>{var t,i;a.current&&(a.current.paused&&!0===s&&a.current.play(),a.current.paused||!1!==s||a.current.pause(),a.current.playbackRate=null!=(t=e.playbackRate)?t:1,a.current.volume=null!=(i=e.volume)?i:1)}),(0,r.useEffect)(()=>{var e,t,s,n,l;if(a.current&&globalThis.document){if(i&&!document.pictureInPictureElement)try{null==(t=(e=a.current).requestPictureInPicture)||t.call(e)}catch(e){}if(!i&&document.pictureInPictureElement)try{null==(n=(s=a.current).exitPictureInPicture)||n.call(s),null==(l=document.exitPictureInPicture)||l.call(document)}catch(e){}}},[i]),!n)return null;const o={},c=["onReady","onStart"];for(const t in e)t.startsWith("on")&&!c.includes(t)&&(o[t]=e[t]);return r.createElement(n,{...o,style:e.style,className:e.className,slot:e.slot,ref:(0,r.useCallback)(e=>{a.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,disableRemotePlayback:e.disableRemotePlayback,config:e.config,onLoadStart:t=>{var s,i;l.current=!0,null==(s=e.onReady)||s.call(e),null==(i=e.onLoadStart)||i.call(e,t)},onPlay:t=>{var s,i;l.current&&(l.current=!1,null==(s=e.onStart)||s.call(e,t)),null==(i=e.onPlay)||i.call(e,t)}},e.children)});T.displayName="Player";var D=T;const F=(0,r.lazy)(()=>n.e(353).then(n.bind(n,924))),B=[],O=({children:e})=>e;var I=((e,t)=>{const s=r.forwardRef((s,i)=>{const n={...E,...s},{src:a,slot:l,className:o,style:c,width:d,height:p,fallback:u,wrapper:h}=n,[m,g]=(0,r.useState)(!!n.light);(0,r.useEffect)(()=>{n.light?g(!0):g(!1)},[n.light]);const x=e=>{var t;g(!1),null==(t=n.onClickPreview)||t.call(n,e)},y=h??O,f=!1===u?O:r.Suspense;return r.createElement(y,{slot:l,className:o,style:{width:d,height:p,...c}},r.createElement(f,{fallback:u},m?(e=>{if(!e)return null;const{light:t,playIcon:s,previewTabIndex:i,oEmbedUrl:a,previewAriaLabel:l}=n;return r.createElement(F,{src:e,light:t,playIcon:s,previewTabIndex:i,previewAriaLabel:l,oEmbedUrl:a,onClickPreview:x})})(a):(s=>{var a,c;const d=(s=>{for(const t of[...B,...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}=n,g=null==(a=n.config)?void 0:a[d.key];return r.createElement(D,{...n,ref:i,activePlayer:null!=(c=d.player)?c:d,slot:m?void 0:l,className:m?void 0:o,style:m?{display:"block",width:"100%",height:"100%"}:{display:"block",width:u,height:h,...p},config:g})})(a)))});return s.displayName="ReactPlayer",s.addCustomPlayer=e=>{B.push(e)},s.removeCustomPlayers=()=>{B.length=0},s.canPlay=t=>{if(t)for(const s of[...B,...e])if(s.canPlay(t))return!0;return!1},s.canEnablePIP=t=>{var s;if(t)for(const i of[...B,...e])if(i.canPlay(t)&&(null==(s=i.canEnablePIP)?void 0:s.call(i)))return!0;return!1},s})(R,R[R.length-1]);const{__:A}=wp.i18n,H=function({title:e,videoUrl:t}){const[s,i]=(0,a.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[s&&(0,p.jsx)("div",{className:"simply-static-video-modal-background",children:(0,p.jsx)(m.Modal,{title:e,className:"simply-static-video-modal",onRequestClose:()=>i(!1),children:(0,p.jsx)(I,{src:t,controls:!0,width:"920px",height:"560px",playsInline:!0})})}),(0,p.jsx)(m.Button,{variant:"link",className:"simply-static-video-button",onClick:()=>i(!0),children:(0,p.jsx)(m.Dashicon,{icon:"format-video"})})]})},{__:M}=wp.i18n,$=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l,isRunning:r,setIsRunning:c,isStudio:d}=(0,a.useContext)(u),[h,g]=(0,a.useState)("relative"),[x,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)("https://"),[_,j]=(0,a.useState)(""),[v,w]=(0,a.useState)("/"),[S,C]=(0,a.useState)(!1),[k,P]=(0,a.useState)(!1),[N,R]=(0,a.useState)(!1),[E,T]=(0,a.useState)(!1),[D,F]=(0,a.useState)(!1),[B,O]=(0,a.useState)(!1),[I,A]=(0,a.useState)([]),[$,z]=(0,a.useState)([]),[L,U]=(0,a.useState)(null),[W,G]=(0,a.useState)([]),[q,J]=(0,a.useState)([]),[Y,V]=(0,a.useState)(null),[K,Q]=(0,a.useState)([]),[Z,X]=(0,a.useState)([]),[ee,te]=(0,a.useState)(null),[se,ie]=(0,a.useState)([]),[ne,ae]=(0,a.useState)([]),[le,oe]=(0,a.useState)(null),[re,ce]=(0,a.useState)([]);return(0,a.useEffect)(()=>{U(null),o()({path:"/simplystatic/v1/crawlers",parse:!0}).then(s=>{if("string"==typeof s)try{s=JSON.parse(s)}catch(e){return void U("Error parsing API response: "+e.message)}if(s&&s.data&&s.data.length>0){const i=s.data.filter(e=>e.can_run);if(A(i),e.crawlers&&Array.isArray(e.crawlers)&&0!==e.crawlers.length){if(Array.isArray(e.crawlers)){const s=e.crawlers.filter(e=>i.some(t=>t.id===e));if(0===s.length){const e=i.map(e=>e.id);z(e),t("crawlers",e)}else z(s)}}else{const e=i.filter(e=>e.active).map(e=>e.id);z(e),t("crawlers",e)}}else U("Invalid API response structure or empty crawlers array")}).catch(e=>{U("Error fetching crawlers: "+(e.message||"Unknown error"))}),V(null),o()({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)}e&&e.data&&e.data.length>0?G(e.data):V("Invalid API response structure or empty post types array")}).catch(e=>{V("Error fetching post types: "+(e.message||"Unknown error"))}),te(null),o()({path:"/simplystatic/v1/active-plugins",parse:!0}).then(s=>{"string"==typeof s&&(s=JSON.parse(s));const i=Array.isArray(s?.data)?s.data:[];Q(i);const n=Array.isArray(e.plugins_to_include)?e.plugins_to_include:[],a=i.map(e=>e.slug),l=n.filter(e=>a.includes(e));let o=l.length>0?l:a;i.filter(e=>e.required).map(e=>e.slug).forEach(e=>{o.includes(e)||(o=[...o,e])}),X(o),t("plugins_to_include",o)}).catch(e=>te(e?.message||"Unknown error")),oe(null),o()({path:"/simplystatic/v1/active-themes",parse:!0}).then(s=>{"string"==typeof s&&(s=JSON.parse(s));const i=Array.isArray(s?.data)?s.data:[];ie(i);const n=Array.isArray(e.themes_to_include)?e.themes_to_include:[],a=i.map(e=>e.slug),l=n.filter(e=>a.includes(e)),o=l.length>0?l:a;ae(o),t("themes_to_include",o)}).catch(e=>oe(e?.message||"Unknown error")),o()({path:"/simplystatic/v1/pages"}).then(e=>{let t=e||[];t.unshift({label:M("No page selected","simply-static"),value:0}),ce(t)}).catch(()=>{ce([])})},[]),(0,a.useEffect)(()=>{e.destination_url_type&&g(e.destination_url_type),e.destination_scheme&&b(e.destination_scheme),e.destination_host&&j(e.destination_host),e.relative_path&&w(e.relative_path),(e.use_forms||e.use_comments)&&y(!0),e.force_replace_url&&C(e.force_replace_url),e.generate_404&&R(e.generate_404),e.add_feeds&&F(e.add_feeds),e.add_rest_api&&O(e.add_rest_api),e.smart_crawl&&T(e.smart_crawl),e.crawlers&&z(e.crawlers)},[e]),(0,a.useEffect)(()=>{if(!W.length)return;const s=Array.isArray(e.post_types)?e.post_types:[],i=s.filter(e=>W.some(t=>t.name===e));J(i),Array.isArray(e.post_types)&&s.length!==i.length&&t("post_types",i)},[W,e.post_types]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[M("Replacing URLs","simply-static"),(0,p.jsx)(H,{title:M("How to replace URLs","simply-static"),videoUrl:"https://youtu.be/cb8jAMJlfGI"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:M("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,p.jsx)(m.SelectControl,{label:M("Replacing URLs","simply-static"),value:h,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:d(),options:[{label:M("Absolute URLs","simply-static"),value:"absolute"},{label:M("Relative Path","simply-static"),value:"relative"},{label:M("Offline Usage","simply-static"),value:"offline"}],onChange:e=>{g(e),t("destination_url_type",e)}}),"absolute"===h&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{style:{minWidth:"15%",marginTop:"15px"},children:(0,p.jsx)(m.SelectControl,{label:M("Scheme","simply-static"),value:f,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:d(),options:[{label:"https://",value:"https://"},{label:"http://",value:"http://"},{label:"//",value:"//"}],onChange:e=>{b(e),t("destination_scheme",e)}})}),(0,p.jsx)(m.FlexItem,{style:{minWidth:"85%"},children:(0,p.jsx)(m.TextControl,{label:M("Host","simply-static"),type:"text",placeholder:"example.com",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:_,onChange:e=>{j(e),t("destination_host",e)}})})]}),(0,p.jsx)("p",{children:M("Convert all URLs for your WordPress site to absolute URLs at the domain specified above.","simply-static")})]}),"relative"===h&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextControl,{label:M("Path","simply-static"),type:"text",placeholder:"/",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:v,onChange:e=>{w(e),t("relative_path",e)}}),(0,p.jsxs)("p",{children:[M("Convert all URLs for your WordPress site to relative URLs that will work at any domain.","simply-static"),(0,p.jsx)("br",{}),M("Optionally specify a path above if you intend to place the files in a subdirectory.","simply-static")]}),(0,p.jsxs)(m.Notice,{status:"warning",isDismissible:!1,children:[(0,p.jsxs)("b",{children:[M("Example","simply-static"),": "]}),M("enter /path above if you wanted to serve your files at www.example.com/path/","simply-static")]})]}),"offline"===h&&(0,p.jsx)("p",{children:M("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,p.jsx)(m.ToggleControl,{label:M("Force URL replacements","simply-static"),__nextHasNoMarginBottom:!0,help:M(S?"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:S,onChange:e=>{C(e),t("force_replace_url",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[M("Enhanced Crawl","simply-static"),(0,p.jsx)(H,{title:M("How Enhanced Crawl improves your static exports","simply-static"),videoUrl:"https://youtu.be/QfKxeQ1w7tU"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:M("Enhanced Crawl uses native WordPress functions to find all pages and files when running a static export.","simply-static")}),(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.jsx)(p.Fragment,{children:M("Enable Enhanced Crawl","simply-static")}),help:M(E?"Find pages and files via Enhanced Crawl.":"Don't find pages and files via Enhanced Crawl.","simply-static"),checked:E,onChange:e=>{T(e),t("smart_crawl",e)}}),E&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:2}),L&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Notice,{status:"error",isDismissible:!1,children:[M("Error loading crawlers: ","simply-static")," ",L]}),(0,p.jsx)(m.__experimentalSpacer,{margin:2})]}),I.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.FormTokenField,{label:M("Active Crawlers","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:$.map(e=>{const t=I.find(t=>t.id===e);return t?t.name:e}),suggestions:I.map(e=>e.name),onChange:e=>{const s=e.map(e=>{let t=I.find(t=>t.name===e);return t||(t=I.find(t=>t.name.toLowerCase()===(e||"").toLowerCase())),t||(t=I.find(t=>t.id===e)),t?t.id:null}).filter(e=>!!e&&I.some(t=>t.id===e));z(s),t("crawlers",s)},help:M("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,p.jsx)(m.__experimentalSpacer,{margin:2}),$.includes("post_type")&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:2}),Y&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Notice,{status:"error",isDismissible:!1,children:[M("Error loading post types: ","simply-static")," ",Y]}),(0,p.jsx)(m.__experimentalSpacer,{margin:2})]}),W.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.FormTokenField,{label:M("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 s=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:null}).filter(Boolean);J(s),t("post_types",s)},help:M("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,p.jsx)(m.__experimentalSpacer,{margin:2})]}):(0,p.jsx)("p",{children:M("Loading post types...","simply-static")})]}),$.includes("plugin_assets")&&(0,p.jsxs)(p.Fragment,{children:[ee&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Notice,{status:"error",isDismissible:!1,children:[M("Error loading plugins: ","simply-static")," ",ee]}),(0,p.jsx)(m.__experimentalSpacer,{margin:2})]}),K.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.FormTokenField,{label:M("Plugins to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!l(),value:Array.isArray(Z)?Z.map(e=>{const t=K.find(t=>t.slug===e);return t?t.label:e}):[],suggestions:K.map(e=>e.label),onChange:e=>{let s=e.map(e=>{let t=K.find(t=>t.label===e)||K.find(t=>t.label.toLowerCase()===String(e).toLowerCase())||K.find(t=>t.slug===e);return t?t.slug:e});K.filter(e=>e.required).map(e=>e.slug).forEach(e=>{s.includes(e)||(s=[...s,e])}),X(s),t("plugins_to_include",s)},help:M("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"}),!l()&&(0,p.jsxs)(m.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",M("Requires Simply Static Pro","simply-static")]})]}):(0,p.jsx)("p",{children:M("Loading plugins...","simply-static")})]}),$.includes("theme_assets")&&(0,p.jsxs)(p.Fragment,{children:[le&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Notice,{status:"error",isDismissible:!1,children:[M("Error loading themes: ","simply-static")," ",le]}),(0,p.jsx)(m.__experimentalSpacer,{margin:2})]}),se.length>0?(0,p.jsxs)(p.Fragment,{children:[l()&&(0,p.jsx)(m.__experimentalSpacer,{margin:"5px"}),(0,p.jsx)(m.FormTokenField,{label:M("Themes to Include","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!l(),value:Array.isArray(ne)?ne.map(e=>{const t=se.find(t=>t.slug===e);return t?t.label:e}):[],suggestions:se.map(e=>e.label),onChange:e=>{const s=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(s),t("themes_to_include",s)},help:M("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"}),!l()&&(0,p.jsxs)(m.ExternalLink,{style:{marginTop:"5px"},href:"https://simplystatic.com",children:[" ",M("Requires Simply Static Pro","simply-static")]}),(0,p.jsx)(m.__experimentalSpacer,{margin:2})]}):(0,p.jsx)("p",{children:M("Loading themes...","simply-static")})]}),(0,p.jsx)("div",{className:"crawler-descriptions",children:I.map(e=>(0,p.jsx)("div",{className:"crawler-description",children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{className:"crawler-name",children:(0,p.jsxs)("strong",{children:[e.name,":"]})}),(0,p.jsx)(m.FlexItem,{children:e.description})]})},e.id))})]}):(0,p.jsx)("p",{children:M("Loading crawlers...","simply-static")})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[M("404","simply-static"),(0,p.jsx)(H,{title:M("How to manage 404 pages?","simply-static"),videoUrl:"https://youtu.be/dnRtuQrXG-k"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.jsx)(p.Fragment,{children:M("Generate 404 Page?","simply-static")}),help:M(N?"Generate a 404 page based on your theme template.":"Don't generate a 404 page.","simply-static"),checked:N,onChange:e=>{R(e),t("generate_404",e)}}),N&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.SelectControl,{label:(0,p.jsx)(p.Fragment,{children:l&&"function"==typeof l&&l()?(0,p.jsx)(p.Fragment,{children:M("Custom 404 page (optional)","simply-static")}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{style:{position:"relative",bottom:"-15px"},children:M("Custom 404 page (optional)","simply-static")}),(0,p.jsx)(m.ExternalLink,{href:"https://simplystatic.com",children:M("Requires Simply Static Pro","simply-static")})]})}),value:e.custom_404_page??0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:re,disabled:!(l&&"function"==typeof l&&l()),onChange:e=>{t("custom_404_page",e)},help:M("If selected, Simply Static will use the content of this page for the 404 page instead of the theme default.","simply-static")}),!(!l||"function"!=typeof l)&&l()&&(0,p.jsx)(m.Button,{variant:"secondary",disabled:r,isBusy:r,onClick:()=>{r||(c(!0),o()({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(()=>{c(!1),alert(M("Failed to start 404 push.","simply-static"))}))},children:M("Push 404 Page","simply-static")})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[M("Include","simply-static"),(0,p.jsx)(H,{title:M("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextareaControl,{label:M("Additional URLs","simply-static"),placeholder:options.home+"/hidden-page/\n/\\/blog\\/.*$/i ",__nextHasNoMarginBottom:!0,help:M("You can enter full URLs or regex (wrap with / /). Examples: https://example.com/private/ or /\\/blog\\/.*$/i (one per line).","simply-static"),value:e.additional_urls,onChange:e=>{t("additional_urls",e)}}),(0,p.jsx)(m.TextareaControl,{label:M("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:M("Enter absolute paths or regex (wrap with / /). Examples: /\\.pdf$/i or /wp-content\\/uploads\\/reports\\/.*/ (one per line).","simply-static"),value:e.additional_files,onChange:e=>{t("additional_files",e)}}),(0,p.jsx)(m.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:M(k?"Copied home path":"Copy home path","simply-static")}),(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.jsx)(p.Fragment,{children:M("Include RSS Feeds?","simply-static")}),help:M(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),t("add_feeds",e)}}),(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,p.jsx)(p.Fragment,{children:M("Include Rest API?","simply-static")}),help:M(B?"Include all Rest API endpoints as JSON files.":"Don't include Rest API endpoints as JSON files.","simply-static"),checked:B,onChange:e=>{O(e),t("add_rest_api",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[M("Exclude","simply-static"),(0,p.jsx)(H,{title:M("Include & Exclude files and pages","simply-static"),videoUrl:"https://youtu.be/voAHfwVMLi8"})]})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.TextareaControl,{label:M("Urls to exclude","simply-static"),placeholder:"/some-directory/\n.jpg\n/\\.(pdf|zip)$/i\n/\\/private\\/.*/",__nextHasNoMarginBottom:!0,help:M("You can enter substrings or regex (wrap with / /). Examples: .jpg or /\\.(pdf|zip)$/i or //private/.*/ (one per line).","simply-static"),value:e.urls_to_exclude,onChange:e=>{t("urls_to_exclude",e)}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:M("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:M("Save Settings","simply-static")})})]})},{__:z}=wp.i18n,L=function(){const{configs:e,resetDiagnostics:t}=(0,a.useContext)(u),[s,i]=(0,a.useState)(!1);return(0,p.jsx)("div",{className:"inner-settings",children:(0,p.jsxs)("div",{children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[z("Diagnostics","simply-static"),(0,p.jsx)(H,{title:z("How to use diagnostics","simply-static"),videoUrl:"https://youtu.be/X59YMlz6F2s"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:z("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,p.jsx)("p",{children:(0,p.jsx)(m.Button,{onClick:()=>{t(),i(!0),setTimeout(function(){window.location.reload()},2e3)},variant:"secondary",children:z("Reset Diagnostics","simply-static")})}),s?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:z("Diagnostics resetted successfully.","simply-static")})})}):""]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),Object.keys(e).map(t=>{const s=e[t];return(0,p.jsxs)("div",{children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:t})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)("div",{children:(0,p.jsx)("table",{style:{width:"100%",tableLayout:"fixed"},children:(0,p.jsx)("tbody",{className:"table-data",children:Object.entries(s).map(e=>(0,p.jsxs)("tr",{className:"table-row",children:[(0,p.jsxs)("td",{className:"diagnostics-icon",children:[" ",e[1].test?(0,p.jsx)(m.Dashicon,{className:"icon-yes",icon:"yes"}):(0,p.jsx)(m.Dashicon,{className:"icon-no",icon:"no"})]}),(0,p.jsx)("td",{className:"diagnostics-test",children:(0,p.jsx)("b",{children:e[0]})}),(0,p.jsx)("td",{children:e[1].test}),(0,p.jsxs)("td",{className:"diagnostics-result",children:[" ",e[1].test?(0,p.jsx)("p",{children:e[1].description}):(0,p.jsx)("p",{children:e[1].error})]})]},e[0]))})})})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]},t)})]})})},{__:U}=wp.i18n,W=function(){const{settings:e,importSettings:t,saveSettings:s,resetSettings:i,migrateSettings:n,resetDatabase:l,resetBackgroundQueue:o}=(0,a.useContext)(u),[r,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[b,_]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!1),[w,S]=(0,a.useState)(!1),[C,k]=(0,a.useState)(""),[P,N]=(0,a.useState)(!1),[R,E]=(0,a.useState)(""),[T,D]=(0,a.useState)(!1);return(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[U("Export","simply-static"),(0,p.jsx)(H,{title:U("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,p.jsx)(m.CardBody,{children:r?(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(p.Fragment,{children:[P&&(0,p.jsx)("p",{children:U("Preparing export...","simply-static")}),R&&(0,p.jsx)(m.Notice,{status:"error",isDismissible:!0,children:(0,p.jsx)("p",{children:R})}),!P&&!R&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{marginBottom:"12px"},children:(0,p.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,p.jsx)("p",{children:(0,p.jsx)(m.ClipboardButton,{variant:"secondary",text:C,onCopy:()=>v(!0),onFinishCopy:()=>v(!1),children:U(j?"Copied!":"Copy export data","simply-static")})})]})]})}):(0,p.jsx)("p",{children:(0,p.jsx)(m.Button,{onClick:()=>{c(!0),N(!0),E(""),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){E(U("Failed to prepare export JSON.","simply-static")),k("")}}).catch(()=>{E(U("Failed to fetch export data.","simply-static")),k("")}).finally(()=>N(!1))},variant:"primary",children:U("Export Settings","simply-static")})})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[U("Import","simply-static"),(0,p.jsx)(H,{title:U("Export & Import settings","simply-static"),videoUrl:"https://youtu.be/fmM123Y-gwg"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:U("Paste in the JSON string you got from your export to import all settings for the plugin.","simply-static")}),(0,p.jsx)("textarea",{rows:"8",name:"import-data",onChange:e=>{S(JSON.parse(e.target.value))}}),(0,p.jsx)("p",{children:(0,p.jsx)(m.Button,{onClick:()=>{t(w),h(!0),setTimeout(function(){h(!1)},2e3)},variant:"primary",children:U("Import Settings","simply-static")})}),d?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:U("Settings imported successfully.","simply-static")})})}):""]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:U("Reset","simply-static")})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:U('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,p.jsx)("p",{children:U('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,p.jsx)("p",{children:U('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,p.jsxs)("p",{children:[(0,p.jsx)(m.Button,{onClick:()=>{i(),x(!0),setTimeout(function(){x(!1)},2e3)},variant:"primary",children:U("Reset Plugin Settings","simply-static")}),(0,p.jsx)(m.Button,{onClick:()=>{l(),f(!0),setTimeout(function(){f(!1)},2e3)},className:"reset-db-btn",variant:"primary",children:U("Reset Database Table","simply-static")}),(0,p.jsx)(m.Button,{onClick:()=>{o(),D(!0),setTimeout(()=>D(!1),2e3)},className:"reset-bg-btn",variant:"primary",children:U("Reset Background Queue","simply-static")})]}),g?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:U("Settings resetted successfully.","simply-static")})})}):"",y?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:U("Database table resetted successfully.","simply-static")})})}):"",T?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:U("Background queue reset successfully.","simply-static")})})}):""]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:U("Migrate Settings","simply-static")})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:U("Migrate all of your settings to Simply Static 3.0","simply-static")}),(0,p.jsx)("p",{children:(0,p.jsx)(m.Button,{onClick:()=>{n(),s(),_(!0),setTimeout(function(){_(!1),location.reload()},2e3)},variant:"primary",children:U("Migrate settings","simply-static")})}),b?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:U("Settings migration successfully.","simply-static")})})}):""]})]})]})},{__:G}=wp.i18n,q=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isRunning:l,isPro:r,isStudio:c}=(0,a.useContext)(u),[d,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(""),[y,f]=(0,a.useState)("zip"),[b,_]=(0,a.useState)(!1),[j,v]=(0,a.useState)("personal"),[w,S]=(0,a.useState)("private"),[C,k]=(0,a.useState)(!1),[P,N]=(0,a.useState)(!1),[R,E]=(0,a.useState)(!1),[T,D]=(0,a.useState)("us-east-2"),[F,B]=(0,a.useState)("aws-iam-key"),[O,I]=(0,a.useState)(!1),[A,M]=(0,a.useState)(!1),[$,z]=(0,a.useState)(!1),[L,U]=(0,a.useState)(!1),[W]=(0,a.useState)([{label:G("ZIP Archive","simply-static"),value:"zip"},{label:G("Local Directory","simply-static"),value:"local"},{label:G("Static Studio","simply-static"),value:"simply-static-studio"},{label:G("SFTP","simply-static"),value:"sftp"},{label:G("GitHub","simply-static"),value:"github"},{label:G("AWS S3","simply-static"),value:"aws-s3"},{label:G("Bunny CDN","simply-static"),value:"cdn"},{label:G("Tiiny.host","simply-static"),value:"tiiny"}]),q=()=>{s(),n(!0),z(!1),setTimeout(function(){n(!1)},2e3)};(0,a.useEffect)(()=>{e.delivery_method&&f(e.delivery_method),e.clear_directory_before_export&&_(e.clear_directory_before_export),e.github_account_type&&v(e.github_account_type),e.github_repository_visibility&&S(e.github_repository_visibility),e.github_repository_visibility&&S(e.github_repository_visibility),e.github_throttle_requests&&E(e.github_throttle_requests),e.aws_empty&&k(e.aws_empty),e.aws_disable_acl&&N(e.aws_disable_acl),e.aws_auth_method&&B(e.aws_auth_method),e.aws_region&&D(e.aws_region),o()({path:"/simplystatic/v1/pages"}).then(e=>{let t=e;t.unshift({label:G("No page selected","simply-static"),value:0}),M(t)})},[e]);const J=()=>{options.studio_migrate_active?window.location.href=options.studio_migrate_url:(h(!0),x(""),o()({path:"/simplystatic/v1/install-studio-migrate",method:"POST"}).then(e=>{e&&e.success&&e.redirect?window.location.href=e.redirect:(x(e?.message||G("Something went wrong.","simply-static")),h(!1))}).catch(e=>{x(e?.message||G("Something went wrong.","simply-static")),h(!1)}))};return(0,p.jsxs)("div",{className:"inner-settings",children:[!c()&&!r()&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Card,{children:(0,p.jsx)(m.CardBody,{children:(0,p.jsxs)(m.Flex,{direction:"column",gap:2,children:[(0,p.jsxs)("p",{style:{margin:0},children:[(0,p.jsx)("strong",{children:G("⚡ Migrate to Static Studio","simply-static")})," — ",G("The all-in-one Static WordPress cloud-hosting platform. Enjoy secure WordPress, the fastest exports, and the best-performing static site hosting in one package.","simply-static")]}),g&&!d&&(0,p.jsx)(m.Notice,{status:"error",isDismissible:!1,children:(0,p.jsx)("p",{children:g})}),(0,p.jsx)("div",{children:(0,p.jsx)(m.Button,{variant:"primary",isBusy:d,disabled:d,onClick:J,children:d?G("Installing…","simply-static"):options.studio_migrate_active?G("Open Migration Settings","simply-static"):G("Install & Activate Migration Plugin","simply-static")})})]})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:G("Deployment Settings","simply-static")})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:G("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,p.jsx)(m.SelectControl,{label:G("Deployment method","simply-static"),value:y,options:W,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{f(e),t("delivery_method",e),z(!0)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"simply-static-studio"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:G("Static Studio","simply-static")})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{style:{marginTop:0,marginBottom:"4px"},children:G("The all-in-one Static WordPress cloud-hosting platform.","simply-static")}),(0,p.jsx)("p",{style:{marginTop:0,marginBottom:"4px"},children:G("Enjoy secure WordPress, the fastest exports, and the best-performing static site hosting in one package.","simply-static")}),(0,p.jsx)("p",{style:{marginTop:0,marginBottom:"12px"},children:G("Migrate your existing WordPress site to Static Studio with one click.","simply-static")}),g&&!d&&(0,p.jsx)(m.Notice,{status:"error",isDismissible:!1,children:(0,p.jsx)("p",{children:g})}),(0,p.jsxs)(m.Flex,{direction:"row",gap:3,children:[(0,p.jsx)(m.Button,{variant:"primary",isBusy:d,disabled:d,onClick:J,children:d?G("Installing…","simply-static"):options.studio_migrate_active?G("Open Migration Settings","simply-static"):G("Install & Activate Migration Plugin","simply-static")}),(0,p.jsx)("a",{className:"button",href:"https://simplystatic.com/simply-static-studio/",target:"_blank",children:G("Learn more about Static Studio","simply-static")})]})]})]}),"zip"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[G("ZIP","simply-static"),(0,p.jsx)(H,{title:G("How to export a ZIP file","simply-static"),videoUrl:"https://youtu.be/WHaFjDte6zI"})]})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)("p",{children:G("Get a download link in the activity log once the static export has finished.","simply-static")})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"local"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[G("Local Directory","simply-static"),(0,p.jsx)(H,{title:G("How to deploy to a local directory","simply-static"),videoUrl:"https://youtu.be/ZRdXQB5slnY"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:G("Path","simply-static"),type:"text",help:G("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:e.local_dir,onChange:e=>{t("local_dir",e)}}),(0,p.jsx)(m.Button,{variant:"secondary",onClick:()=>{try{navigator.clipboard.writeText(options.home_path),I(!0),setTimeout(()=>I(!1),1500)}catch(e){console.error("Clipboard copy failed",e)}},children:G(O?"Copied home path":"Copy home path","simply-static")}),(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:G("Clear Local Directory","simply-static"),help:G(b?"Clear local directory before running an export.":"Don't clear local directory before running an export.","simply-static"),checked:b,onChange:e=>{_(e),t("clear_directory_before_export",e)}})]})]}),(0,p.jsxs)(p.Fragment,{children:["github"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[G("GitHub","simply-static")," ",(0,p.jsx)(H,{title:G("How to deploy to a GitHub (2/2)","simply-static"),videoUrl:"https://youtu.be/HqyTKwZuUAM"})]})}),("free"===options.plan||!r())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:G("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,p.jsx)(m.SelectControl,{label:G("Account Type","simply-static"),value:j,help:G("Depending on the account type the settings fields will change.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:G("Personal","simply-static"),value:"personal"},{label:G("Organization","simply-static"),value:"organization"}],onChange:e=>{v(e),t("github_account_type",e)}}),"organization"===j?(0,p.jsx)(m.TextControl,{label:G("Organization","simply-static"),type:"text",help:G("Enter the name of your organization.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_user,onChange:e=>{t("github_user",e)}}):(0,p.jsx)(m.TextControl,{label:G("Username","simply-static"),type:"text",help:G("Enter your GitHub username.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_user,onChange:e=>{t("github_user",e)}}),(0,p.jsx)(m.TextControl,{label:G("E-Mail","simply-static"),type:"email",help:G("Enter your GitHub email address. This will be used to commit files to your repository.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_email,onChange:e=>{t("github_email",e)}}),(0,p.jsx)(m.TextControl,{label:(0,p.jsxs)(p.Fragment,{children:[G("Personal Access Token","simply-static"),(0,p.jsx)(H,{title:G("How to prepare your GitHub account","simply-static"),videoUrl:"https://youtu.be/fjsJJmPeKuc"})]}),type:"password",help:(0,p.jsxs)(p.Fragment,{children:[G("You need a personal access token from GitHub. Learn how to get one ","simply-static"),(0,p.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:G("here","simply-static")})]}),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_personal_access_token,onChange:e=>{t("github_personal_access_token",e)}}),(0,p.jsx)(m.TextControl,{label:G("Repository","simply-static"),type:"text",help:G("Enter a name for your repository (lowercase without spaces or special characters).","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_repository,onChange:e=>{t("github_repository",e)}}),(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:(0,p.jsxs)("p",{children:[G("Ensure to create the repository and add a readme file to it before running an export as shown in the docs ","simply-static"),(0,p.jsx)("a",{href:"https://docs.simplystatic.com/article/33-set-up-the-github-integration/",target:"_blank",children:G("here","simply-static")})]})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsx)(m.TextControl,{label:G("Folder","simply-static"),type:"text",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_folder_path,onChange:e=>{t("github_folder_path",e)}}),"organization"===j&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:(0,p.jsx)("p",{children:G("You need to create the repository manually within your organization before connecting it.","simply-static")})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)(m.SelectControl,{label:G("Visiblity","simply-static"),value:w,help:G("Decide if you want to make your repository public or private.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:G("Public","simply-static"),value:"public"},{label:G("Private","simply-static"),value:"private"}],onChange:e=>{S(e),t("github_repository_visibility",e)}}),(0,p.jsx)(m.TextControl,{label:G("Branch","simply-static"),type:e.github_branch,placeholder:"main",help:G('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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_branch,onChange:e=>{t("github_branch",e)}}),(0,p.jsx)(m.TextControl,{label:G("Webhook URL","simply-static"),type:"url",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_webhook_url,onChange:e=>{t("github_webhook_url",e)}}),(0,p.jsx)(m.ToggleControl,{label:G("Throttle Requests","simply-static"),help:G("Enable this option if you are experiencing issues with the GitHub API rate limit.","simply-static"),disabled:"free"===options.plan||!r(),__nextHasNoMarginBottom:!0,checked:R,onChange:e=>{E(e),t("github_throttle_requests",e)}}),(0,p.jsx)(m.TextControl,{label:G("Batch size","simply-static"),type:"number",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.github_batch_size??100,onChange:e=>{t("github_batch_size",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"tiiny"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[G("Tiiny.host","simply-static")," ",(0,p.jsx)(H,{title:G("How to deploy to Tiiny.host","simply-static"),videoUrl:"https://youtu.be/Y9EDaQkGl1Y"})]})}),("free"===options.plan||!r())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:G("Deploying to Tiiny.host is the easiest and fastest deployment option available in Simply Static Pro.","simply-static")}),(0,p.jsx)(m.TextControl,{disabled:!0,label:G("E-Mail","simply-static"),type:"text",help:(0,p.jsxs)(p.Fragment,{children:[G("This field is auto-filled with the e-mail address used for activating Simply Static Pro.","simply-static"),(0,p.jsx)("br",{}),(0,p.jsx)("b",{children:G("An account will be created automatically on your first deployment.","simply-static")})]}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:options.admin_email}),(0,p.jsx)(m.TextControl,{label:G("Subdomain","simply-static"),type:"text",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.tiiny_subdomain,onChange:e=>{t("tiiny_subdomain",e)}}),(0,p.jsx)(m.TextControl,{label:G("Domain Suffix","simply-static"),type:"text",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.tiiny_domain_suffix,onChange:e=>{t("tiiny_domain_suffix",e)}}),(0,p.jsx)(m.TextControl,{label:G("Password Protection","simply-static"),type:"password",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.tiiny_password,onChange:e=>{t("tiiny_password",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"cdn"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[G("Bunny CDN","simply-static"),(0,p.jsx)(H,{title:G("How to deploy to Bunny CDN","simply-static"),videoUrl:"https://youtu.be/FBRg1BI41VY"})]})}),("free"===options.plan||!r())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:G("Bunny CDN is a fast and reliable CDN provider that you can run your static website on.","simply-static")}),(0,p.jsx)(m.TextControl,{label:G("Bunny CDN API Key","simply-static"),type:"password",help:(0,p.jsxs)(p.Fragment,{children:[G("Enter your API Key from Bunny CDN. You can find your API-Key as described ","simply-static"),(0,p.jsx)("a",{href:"https://support.bunny.net/hc/en-us/articles/360012168840-Where-do-I-find-my-API-key",target:"_blank",children:G("here","simply-static")})]}),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_api_key,onChange:e=>{t("cdn_api_key",e)}}),(0,p.jsx)(m.TextControl,{label:G("Storage Host","simply-static"),type:"text",help:(0,p.jsxs)(p.Fragment,{children:[G("Depending on your location, you have a different storage host. You find out which URL to use ","simply-static"),(0,p.jsx)("a",{href:"https://docs.bunny.net/reference/storage-api#storage-endpoints",target:"_blank",children:G("here","simply-static")})]}),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_storage_host,onChange:e=>{t("cdn_storage_host",e)}}),(0,p.jsx)(m.TextControl,{label:G("Bunny CDN Access Key","simply-static"),type:"password",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_access_key,onChange:e=>{t("cdn_access_key",e)}}),(0,p.jsx)(m.TextControl,{label:G("Pull Zone","simply-static"),type:"text",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_pull_zone,onChange:e=>{t("cdn_pull_zone",e)}}),(0,p.jsx)(m.TextControl,{label:G("Storage Zone","simply-static"),type:"text",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_storage_zone,onChange:e=>{t("cdn_storage_zone",e)}}),(0,p.jsx)(m.TextControl,{label:G("Subdirectory","simply-static"),type:"text",placeholder:"/subdirectory/",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.cdn_directory,onChange:e=>{t("cdn_directory",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"aws-s3"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[G("Amazon AWS S3","simply-static"),(0,p.jsx)(H,{title:G("How to deploy to Amazon AWS S3","simply-static"),videoUrl:"https://youtu.be/rtn21J86Upc"})]})}),("free"===options.plan||!r())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.SelectControl,{label:G("Authentication Method","simply-static"),value:F,options:[{label:G("AWS IAM Access Key","simply-static"),value:"aws-iam-key"},{label:G("AWS EC2","simply-static"),value:"aws-ec2"}],disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{B(e),t("aws_auth_method",e)}}),"aws-iam-key"===F&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextControl,{label:G("Access Key ID","simply-static"),type:"text",help:(0,p.jsxs)(p.Fragment,{children:[G("Enter your Access Key from AWS. Learn how to get one ","simply-static"),(0,p.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:G("here","simply-static")})]}),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_access_key,onChange:e=>{t("aws_access_key",e)}}),(0,p.jsx)(m.TextControl,{label:G("Secret Access Key","simply-static"),type:"password",help:(0,p.jsxs)(p.Fragment,{children:[G("Enter your Secret Key from AWS. Learn how to get one ","simply-static"),(0,p.jsx)("a",{href:"https://docs.aws.amazon.com/en_en/IAM/latest/UserGuide/id_credentials_access-keys.html",target:"_blank",children:G("here","simply-static")})]}),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_access_secret,onChange:e=>{t("aws_access_secret",e)}})]}),(0,p.jsx)(m.SelectControl,{label:G("Region","simply-static"),value:T,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,options:[{label:G("US East (Ohio)","simply-static"),value:"us-east-2"},{label:G("US East (N. Virginia)","simply-static"),value:"us-east-1"},{label:G("US West (N. California)","simply-static"),value:"us-west-1"},{label:G("US West (Oregon)","simply-static"),value:"us-west-2"},{label:G("Africa (Cape Town)","simply-static"),value:"af-south-1"},{label:G("Asia Pacific (Hong Kong)","simply-static"),value:"ap-east-1"},{label:G("Asia Pacific (Hyderabad)","simply-static"),value:"ap-south-2"},{label:G("Asia Pacific (Jakarta)","simply-static"),value:"ap-southeast-3"},{label:G("Asia Pacific (Melbourne)","simply-static"),value:"ap-southeast-4"},{label:G("Asia Pacific (Mumbai)","simply-static"),value:"ap-south-1"},{label:G("Asia Pacific (Osaka)","simply-static"),value:"ap-northeast-3"},{label:G("Asia Pacific (Seoul)","simply-static"),value:"ap-northeast-2"},{label:G("Asia Pacific (Singapore)","simply-static"),value:"ap-southeast-1"},{label:G("Asia Pacific (Sydney)","simply-static"),value:"ap-southeast-2"},{label:G("Asia Pacific (Tokyo)","simply-static"),value:"ap-northeast-1"},{label:G("Canada (Central)","simply-static"),value:"ca-central-1"},{label:G("Europe (Frankfurt)","simply-static"),value:"eu-central-1"},{label:G("Europe (Ireland)","simply-static"),value:"eu-west-1"},{label:G("Europe (London)","simply-static"),value:"eu-west-2"},{label:G("Europe (Milan)","simply-static"),value:"eu-south-1"},{label:G("Europe (Paris)","simply-static"),value:"eu-west-3"},{label:G("Europe (Spain)","simply-static"),value:"eu-south-2"},{label:G("Europe (Stockholm)","simply-static"),value:"eu-north-1"},{label:G("Europe (Zurich)","simply-static"),value:"eu-central-2"},{label:G("Middle East (Bahrain)","simply-static"),value:"me-south-1"},{label:G("Middle East (UAE)","simply-static"),value:"me-central-1"},{label:G("South America (São Paulo)","simply-static"),value:"sa-east-1"},{label:G("AWS GovCloud (US-East)","simply-static"),value:"us-gov-east-1"},{label:G("AWS GovCloud (US-West)","simply-static"),value:"us-gov-west-1"}],disabled:"free"===options.plan||!r(),onChange:e=>{D(e),t("aws_region",e)}}),(0,p.jsx)(m.TextControl,{label:G("Bucket","simply-static"),type:"text",help:G("Add the name of your bucket here.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_bucket,onChange:e=>{t("aws_bucket",e)}}),(0,p.jsx)(m.TextControl,{label:G("Subdirectory","simply-static"),type:"text",help:G("Add an optional subdirectory for your bucket","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_subdirectory,onChange:e=>{t("aws_subdirectory",e)}}),(0,p.jsx)(m.TextControl,{label:G("Cloudfront Distribution ID","simply-static"),type:"text",help:G("We automatically invalidate the cache after each export.","simply-static"),disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_distribution_id,onChange:e=>{t("aws_distribution_id",e)}}),(0,p.jsx)(m.TextControl,{label:G("Webhook URL","simply-static"),type:"url",help:G("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||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.aws_webhook_url,onChange:e=>{t("aws_webhook_url",e)}}),(0,p.jsx)(m.ToggleControl,{label:G("Disable ACL on uploads?","simply-static"),help:G(P?'ACL header will not be sent. Required for buckets with "Bucket owner enforced" (ACLs disabled).':"ACL header will be sent with uploads. Disable this if your bucket has ACLs disabled.","simply-static"),disabled:"free"===options.plan||!r(),__nextHasNoMarginBottom:!0,checked:P,onChange:e=>{N(e),t("aws_disable_acl",e)}}),(0,p.jsx)(m.ToggleControl,{label:G("Empty bucket before new export?","simply-static"),help:G(C?"Clear bucket before new export.":"Don't clear bucket before new export.","simply-static"),disabled:"free"===options.plan||!r(),__nextHasNoMarginBottom:!0,checked:C,onChange:e=>{k(e),t("aws_empty",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),"sftp"===y&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[G("SFTP","simply-static")," ",(0,p.jsx)(H,{title:G("How to deploy via SFTP","simply-static"),videoUrl:"https://youtu.be/6-QR9wZA3VQ"})]})}),("free"===options.plan||!r())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",G("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:G("Host","simply-static"),type:"text",help:G("Enter your SFTP host.","simply-static"),value:e.sftp_host,disabled:"free"===options.plan||!r(),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t("sftp_host",e)}}),(0,p.jsx)(m.TextControl,{label:G("Port","simply-static"),type:"number",disabled:"free"===options.plan||!r(),help:G("Enter your SFTP port.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.sftp_port,onChange:e=>{t("sftp_port",e)}}),(0,p.jsx)(m.TextControl,{label:G("SFTP username","simply-static"),help:G("Enter your SFTP username.","simply-static"),type:"text",disabled:"free"===options.plan||!r(),placeholder:"username",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.sftp_user,onChange:e=>{t("sftp_user",e)}}),(0,p.jsx)(m.TextControl,{label:G("SFTP password","simply-static"),type:"password",disabled:"free"===options.plan||!r(),help:G("Enter your SFTP password.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.sftp_pass,onChange:e=>{t("sftp_pass",e)}}),(0,p.jsx)(m.TextareaControl,{label:G("SFTP private key","simply-static"),disabled:"free"===options.plan||!r(),__nextHasNoMarginBottom:!0,placeholder:G("OPTIONAL: This is only required if you need to authenticate via a private key to access your SFTP server.","simply-static"),help:G("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:e.sftp_private_key,onChange:e=>{t("sftp_private_key",e)}}),(0,p.jsx)(m.TextControl,{label:G("SFTP folder","simply-static"),help:G('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||!r(),placeholder:"",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.sftp_folder,onChange:e=>{t("sftp_folder",e)}}),(0,p.jsx)(m.ToggleControl,{label:G("Bulk upload via zip archive","simply-static"),help:G("Instead of uploading files one by one, this creates a zip archive locally, uploads it as a single file, and extracts it on the remote server. This can significantly speed up deployments with many files. Requires unzip or python3 on the remote server.","simply-static"),disabled:"free"===options.plan||!r(),checked:e.sftp_bulk_upload,onChange:e=>{t("sftp_bulk_upload",e)}})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:G("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsxs)("div",{className:"save-settings",children:["free"===options.plan?(0,p.jsxs)(p.Fragment,{children:["zip"===y&&(0,p.jsx)(m.Button,{onClick:q,variant:"primary",children:G("Save Settings","simply-static")}),"local"===y&&(0,p.jsx)(m.Button,{onClick:q,variant:"primary",children:G("Save Settings","simply-static")})]}):(0,p.jsx)(m.Button,{onClick:q,variant:"primary",children:G("Save Settings","simply-static")}),"pro"===options.plan&&r()&&(0,p.jsxs)(m.Button,{disabled:l||$||L,variant:"secondary",isBusy:l||L,onClick:()=>{U(!0),o()({path:"/simplystatic/v1/apply-single",method:"POST"}).then(e=>{404===parseInt(e.status)?alert(e.message):window.location.reload()})},children:[$&&G("Save settings to test","simply-static"),!$&&G("Test Deployment","simply-static")]})]})]})},{__:J}=wp.i18n,Y=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l}=(0,a.useContext)(u),[r,c]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!0),[b,_]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!1),[w,S]=(0,a.useState)(null),[C,k]=(0,a.useState)(null);return(0,a.useEffect)(()=>{o()({path:"/simplystatic/v1/pages-slugs"}).then(e=>{let t=e;t.unshift({label:J("No page selected","simply-static"),value:""}),_(t)}),e.use_forms&&c(e.use_forms),e.use_comments&&x(e.use_comments),void 0!==e.save_form_entries?f(!!e.save_form_entries):f(!0),void 0!==e.use_form_conditional_loading&&h(!!e.use_form_conditional_loading)},[e]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:J("Forms","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",J("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:J("Use forms?","simply-static"),__nextHasNoMarginBottom:!0,help:J(r?"Use Forms on your static website.":"Don't use forms on your static website.","simply-static"),disabled:"free"===options.plan||!l(),checked:r,onChange:e=>{c(e),t("use_forms",e)}}),r&&(0,p.jsx)(m.ToggleControl,{label:J("Store form entries","simply-static"),__nextHasNoMarginBottom:!0,help:J(y?"Store form entries inside WordPress (requires Simply Static Webhook).":"Do not store form entries in WordPress.","simply-static"),disabled:"free"===options.plan||!l(),checked:!!y,onChange:e=>{f(e),t("save_form_entries",e)}}),r&&(0,p.jsx)(m.ToggleControl,{label:J("Enable conditional loading","simply-static"),__nextHasNoMarginBottom:!0,help:J(d?"Form scripts are only loaded on pages that contain a connected form.":"Form scripts are loaded on all pages for maximum compatibility.","simply-static"),disabled:"free"===options.plan||!l(),checked:d,onChange:e=>{h(e),t("use_form_conditional_loading",e)}}),r&&options.form_connection_url&&"free"!==options.plan&&(0,p.jsx)(m.Button,{href:options.form_connection_url,variant:"secondary",children:J("Create a form connection","simply-static")})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:J("Comments","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",J("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:J("Use comments?","simply-static"),__nextHasNoMarginBottom:!0,help:J(g?"Use comments on your static website.":"Don't use comments on your static website.","simply-static"),disabled:"free"===options.plan||!l(),checked:g,onChange:e=>{x(e),t("use_comments",e)}}),g&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.SelectControl,{label:J("Select a redirect page","content-protector"),options:b,help:J("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||!l(),value:e.comment_redirect,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t("comment_redirect",e)}})})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(r||g)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:J("Captcha","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",J("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:J("We will automatically protect your forms and comments with a captcha on your static site.","simply-static")}),(0,p.jsx)(m.SelectControl,{label:J("Captcha Service","simply-static"),help:J("Choose which captcha service to use.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.captcha_service||"",options:[{label:J("Choose Service","simply-static"),value:""},{label:J("Cloudflare Turnstile","simply-static"),value:"turnstile"},{label:J("Google reCAPTCHA v3","simply-static"),value:"recaptcha_v3"}],onChange:e=>t("captcha_service",e)}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),C&&(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Notice,{status:C.type,isDismissible:!0,onRemove:()=>k(null),children:C.message}),(0,p.jsx)(m.__experimentalSpacer,{margin:3})]})}),(0,p.jsx)(m.Button,{variant:"secondary",disabled:"free"===options.plan||!l()||j,isBusy:j,onClick:()=>{v(!0),k(null),o()({path:"/simplystatic/v1/captcha/detect-credentials"}).then(s=>{if(v(!1),!s.success)return void k({type:"error",message:J("Failed to detect credentials.","simply-static")});const i=s.credentials,n=e.captcha_service||"";let a=null,l="";if("turnstile"===n&&i.turnstile&&i.turnstile.length>0)a=i.turnstile[0],l=a.source,t("cloudflare_turnstile_site_key",a.site_key),t("cloudflare_turnstile_secret_key",a.secret_key),k({type:"success",message:J("Turnstile credentials copied from ","simply-static")+l+"!"});else if("recaptcha_v3"===n&&i.recaptcha&&i.recaptcha.length>0)a=i.recaptcha[0],l=a.source,t("recaptcha_site_key",a.site_key),t("recaptcha_secret_key",a.secret_key),k({type:"success",message:J("ReCaptcha credentials copied from ","simply-static")+l+"!"});else{let e="";"turnstile"===n&&i.recaptcha&&i.recaptcha.length>0?e=J(" ReCaptcha credentials were found - switch to ReCaptcha v3 to use them.","simply-static"):"recaptcha_v3"===n&&i.turnstile&&i.turnstile.length>0&&(e=J(" Turnstile credentials were found - switch to Turnstile to use them.","simply-static")),k({type:"warning",message:J("No credentials found for the selected captcha service.","simply-static")+e})}S(i)}).catch(e=>{v(!1),k({type:"error",message:J("Error detecting credentials: ","simply-static")+(e.message||J("Unknown error","simply-static"))})})},children:J(j?"Detecting...":"Copy existing Credentials","simply-static")}),(0,p.jsx)("p",{className:"components-base-control__help",children:J("Automatically detect and copy captcha credentials from form plugins like Contact Form 7, WPForms, or Fluent Forms.","simply-static")}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),"turnstile"===e.captcha_service&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextControl,{label:J("Site Key","simply-static"),help:J("Your public key will be used on the static site.","simply-static"),placeholder:J("Enter your Turnstile site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.cloudflare_turnstile_site_key||"",onChange:e=>t("cloudflare_turnstile_site_key",e)}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.TextControl,{label:J("Secret Key","simply-static"),help:J("Your secret key will be stored in WordPress.","simply-static"),placeholder:J("Enter your Turnstile secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.cloudflare_turnstile_secret_key||"",onChange:e=>t("cloudflare_turnstile_secret_key",e)}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.SelectControl,{label:J("Theme","simply-static"),help:J("Choose how the widget should look on your site.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.cloudflare_turnstile_theme||"auto",options:[{label:J("Auto","simply-static"),value:"auto"},{label:J("Light","simply-static"),value:"light"},{label:J("Dark","simply-static"),value:"dark"}],onChange:e=>t("cloudflare_turnstile_theme",e)}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.SelectControl,{label:J("Size","simply-static"),help:J("Choose the widget size.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.cloudflare_turnstile_size||"normal",options:[{label:J("Normal","simply-static"),value:"normal"},{label:J("Flexible","simply-static"),value:"flexible"},{label:J("Compact","simply-static"),value:"compact"}],onChange:e=>t("cloudflare_turnstile_size",e)})]}),"recaptcha_v3"===e.captcha_service&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextControl,{label:J("Site Key","simply-static"),help:J("Your public key will be used on the static site.","simply-static"),placeholder:J("Enter your reCAPTCHA v3 site key","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.recaptcha_site_key||"",onChange:e=>t("recaptcha_site_key",e)}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.TextControl,{label:J("Secret Key","simply-static"),help:J("Your secret key will be stored in WordPress.","simply-static"),placeholder:J("Enter your reCAPTCHA v3 secret key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.recaptcha_secret_key||"",onChange:e=>t("recaptcha_secret_key",e)})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:J("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&l()&&(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1),r&&(localStorage.setItem("ss-initial-page","/forms"),window.location.reload())},2e3)},variant:"primary",children:J("Save Settings","simply-static")})})]})},{__:V}=wp.i18n,K=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l}=(0,a.useContext)(u),[o,r]=(0,a.useState)(!1),[c,d]=(0,a.useState)("fuse"),[h,g]=(0,a.useState)(!1),x=()=>g(!0);(0,a.useEffect)(()=>{e.use_search&&r(e.use_search),e.search_type&&d(e.search_type)},[e]);const y=e.search_show_submit??e.search_fuse_show_submit??!1;return(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:V("Search","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",V("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:V("Use search?","simply-static"),__nextHasNoMarginBottom:!0,help:V(o?"Use search on your static website.":"Don't use search on your static website.","simply-static"),disabled:"free"===options.plan||!l(),checked:o,onChange:e=>{r(e),t("use_search",e)}}),(0,p.jsx)(m.SelectControl,{label:V("Search Type","simply-static"),value:c,help:V("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=>{d(e),t("search_type",e)}}),o&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.ToggleControl,{label:V("Use Search Results Page","simply-static"),__nextHasNoMarginBottom:!0,help:V("Simply Static will create a static search results page and the export will include a special __qs directory.","simply-static"),disabled:"free"===options.plan||!l(),checked:e.use_search_results_page??!0,onChange:e=>{t("use_search_results_page",e)}}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsx)(m.ToggleControl,{label:V("Use Submit Button","simply-static"),__nextHasNoMarginBottom:!0,help:V("Show or hide the submit button in the search UI.","simply-static"),disabled:"free"===options.plan||!l(),checked:e.search_show_submit??e.search_fuse_show_submit??!1,onChange:e=>{t("search_show_submit",e)}}),y&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextControl,{label:V("Submit button text","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:V("Search","simply-static"),help:V("Customize the submit button text or HTML (e.g., add an icon).","simply-static"),disabled:"free"===options.plan||!l(),value:e.search_submit_text??e.search_fuse_submit_text,onChange:e=>{t("search_submit_text",e)}})}),(0,p.jsx)(m.ToggleControl,{label:V("Show excerpt in suggestions/results","simply-static"),__nextHasNoMarginBottom:!0,help:V("Enable to display the excerpt below each search suggestion and result item.","simply-static"),disabled:"free"===options.plan||!l(),checked:e.search_show_excerpt??!1,onChange:e=>{t("search_show_excerpt",e)}}),(0,p.jsx)(m.TextControl,{label:V("Input placeholder","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,placeholder:V("Search..","simply-static"),help:V("Customize the placeholder text for the search input.","simply-static"),disabled:"free"===options.plan||!l(),value:e.search_placeholder??e.search_fuse_placeholder,onChange:e=>{t("search_placeholder",e)}})]})]})]}),(0,p.jsxs)(p.Fragment,{children:[h&&(0,p.jsxs)(m.Modal,{title:V("How to select data with meta tags","simply-static"),onRequestClose:()=>g(!1),children:[(0,p.jsx)("p",{children:V("Targeting for excerpt in the meta description tag.","simply-static")}),(0,p.jsx)("pre",{children:'<meta name="description" content="This content is what we want as excerpt" />'}),(0,p.jsx)("p",{children:V("Adding such meta in the excerpt field would be:","simply-static")}),(0,p.jsx)("pre",{children:"description|content"}),(0,p.jsx)("p",{children:V("Targeting for title in the property meta tag.","simply-static")}),(0,p.jsx)("pre",{children:'<meta property="og:title" content="This content is what we want as excerpt" />'}),(0,p.jsx)("p",{children:V("Adding such meta in the excerpt field would be:","simply-static")}),(0,p.jsx)("pre",{children:"property|og:title"}),(0,p.jsx)("p",{children:V('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,p.jsx)("p",{children:(0,p.jsx)("strong",{children:V("Caution: Use meta tags that exist everywhere for title.","simply-static")})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:V("Indexing","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",V("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:V("CSS-Selector for Title","simply-static"),type:"text",placeholder:"title",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,p.jsxs)(p.Fragment,{children:[V("Add the CSS selector which contains the title of the page/post","simply-static")," ",(0,p.jsx)(m.Button,{variant:"link",onClick:x,children:V("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!l(),value:e.search_index_title,onChange:e=>{t("search_index_title",e)}}),(0,p.jsx)(m.TextControl,{label:V("CSS-Selector for Content","simply-static"),type:"text",placeholder:"body",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,p.jsxs)(p.Fragment,{children:[V("Add the CSS selector which contains the content of the page/post.","simply-static")," ",(0,p.jsx)(m.Button,{variant:"link",onClick:x,children:V("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!l(),value:e.search_index_content,onChange:e=>{t("search_index_content",e)}}),(0,p.jsx)(m.TextControl,{label:V("CSS-Selector for Excerpt","simply-static"),type:"text",placeholder:".entry-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,p.jsxs)(p.Fragment,{children:[V("Add the CSS selector which contains the excerpt of the page/post.","simply-static")," ",(0,p.jsx)(m.Button,{variant:"link",onClick:x,children:V("Or meta tags. Click for more information.","simply-static")})]}),disabled:"free"===options.plan||!l(),value:e.search_index_excerpt,onChange:e=>{t("search_index_excerpt",e)}}),(0,p.jsx)(m.TextareaControl,{label:V("Exclude URLs","simply-static"),placeholder:"author\narchive\ncategory",__nextHasNoMarginBottom:!0,help:V("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||!l(),value:e.search_excludable,onChange:e=>{t("search_excludable",e)}})]})]})]}),"fuse"===c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[V("Fuse.js","simply-static"),(0,p.jsx)(H,{title:V("How to add search with FuseJS","simply-static"),videoUrl:"https://youtu.be/K34l1DXjCHk"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",V("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:V("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!l(),value:e.fuse_selector,onChange:e=>{t("fuse_selector",e)}}),(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:V("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,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsx)(m.__experimentalNumberControl,{label:V("Threshold","simply-static"),isShiftStepEnabled:!0,step:.1,min:.1,max:1,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V(" A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything.","simply-static"),disabled:"free"===options.plan||!l(),value:e.fuse_threshold,placeholder:.1,onChange:e=>{t("fuse_threshold",e)}}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsx)(m.ToggleControl,{label:V("Use Extended Search","simply-static"),__nextHasNoMarginBottom:!0,help:V("Enable Fuse.js extended search operators such as exact match, prefix, suffix, and inverse match.","simply-static"),disabled:"free"===options.plan||!l(),checked:e.fuse_use_extended_search,onChange:e=>{t("fuse_use_extended_search",e)}}),(0,p.jsx)(m.ToggleControl,{label:V("Ignore Location","simply-static"),__nextHasNoMarginBottom:!0,help:V("When enabled, the search will look for a match anywhere in the string, regardless of position. By default, Fuse.js favors matches near the beginning of a string.","simply-static"),disabled:"free"===options.plan||!l(),checked:e.fuse_ignore_location,onChange:e=>{t("fuse_ignore_location",e)}}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsx)("h4",{children:V("Weight","simply-static")}),(0,p.jsx)("p",{children:V("Weighted search allows you to prioritize certain fields in your search results. A higher weight means results matching that field will appear higher in the results list. Default weight is 1.","simply-static")}),(0,p.jsx)(m.__experimentalSpacer,{margin:3}),(0,p.jsxs)(m.Flex,{gap:4,align:"flex-start",wrap:!0,children:[(0,p.jsx)(m.FlexItem,{style:{flex:1,minWidth:"120px"},children:(0,p.jsx)(m.__experimentalNumberControl,{label:V("Title Weight","simply-static"),isShiftStepEnabled:!0,step:1,min:1,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.fuse_weight_title??1,placeholder:1,onChange:e=>{t("fuse_weight_title",e)}})}),(0,p.jsx)(m.FlexItem,{style:{flex:1,minWidth:"120px"},children:(0,p.jsx)(m.__experimentalNumberControl,{label:V("Content Weight","simply-static"),isShiftStepEnabled:!0,step:1,min:1,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.fuse_weight_content??1,placeholder:1,onChange:e=>{t("fuse_weight_content",e)}})}),(0,p.jsx)(m.FlexItem,{style:{flex:1,minWidth:"120px"},children:(0,p.jsx)(m.__experimentalNumberControl,{label:V("Excerpt Weight","simply-static"),isShiftStepEnabled:!0,step:1,min:1,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:"free"===options.plan||!l(),value:e.fuse_weight_excerpt??1,placeholder:1,onChange:e=>{t("fuse_weight_excerpt",e)}})})]})]})]})]}),"algolia"===c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[V("Algolia API","simply-static"),(0,p.jsx)(H,{title:V("How to add search with the Algolia API","simply-static"),videoUrl:"https://youtu.be/H9PNZSl0KnU"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",V("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:V("Application ID","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("Add your Algolia App ID.","simply-static"),disabled:"free"===options.plan||!l(),value:e.algolia_app_id,onChange:e=>{t("algolia_app_id",e)}}),(0,p.jsx)(m.TextControl,{label:V("Admin API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("Add your Algolia Admin API Key.","simply-static"),disabled:"free"===options.plan||!l(),value:e.algolia_admin_api_key,onChange:e=>{t("algolia_admin_api_key",e)}}),(0,p.jsx)(m.TextControl,{label:V("Search-Only API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("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||!l(),value:e.algolia_search_api_key,onChange:e=>{t("algolia_search_api_key",e)}}),(0,p.jsx)(m.TextControl,{label:V("Name for your index","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("Add your Algolia index name here.","simply-static"),disabled:"free"===options.plan||!l(),value:e.algolia_index,onChange:e=>{t("algolia_index",e)}}),(0,p.jsx)(m.TextControl,{label:V("CSS-Selector","simply-static"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:V("Add the CSS selector for the <form> element that contains your search input field.","simply-static"),disabled:"free"===options.plan||!l(),value:e.algolia_selector,onChange:e=>{t("algolia_selector",e)}}),(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:V("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,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:V("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&l()&&(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:V("Save Settings","simply-static")})})]})},{__:Q}=wp.i18n,Z=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l,isStudio:r}=(0,a.useContext)(u),[c,d]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),[x,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)(null);return(0,a.useEffect)(()=>{e.debugging_mode&&d(e.debugging_mode),e.server_cron&&g(e.server_cron)},[e]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)("b",{children:[Q("Basic Auth","simply-static"),(0,p.jsx)(H,{title:Q("How to set up basic auth","simply-static"),videoUrl:"https://youtu.be/6udSR3_zSOU"})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:Q("If you've secured WordPress with HTTP Basic Auth you need to specify the username and password to use below.","simply-static")}),(0,p.jsx)(m.TextControl,{label:Q("Basic Auth Username","simply-static"),autoComplete:"off",type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.http_basic_auth_username,onChange:e=>{t("http_basic_auth_username",e)}}),(0,p.jsx)(m.TextControl,{label:Q("Basic Auth Password","simply-static"),type:"password",autoComplete:"off",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.http_basic_auth_password,onChange:e=>{t("http_basic_auth_password",e)}}),(0,p.jsx)(m.ToggleControl,{label:Q("Enable Basic Auth","simply-static"),__nextHasNoMarginBottom:!0,help:(0,p.jsx)(p.Fragment,{children:"free"===options.plan?(0,p.jsx)(p.Fragment,{children:Q("Automatically setting up Basic Auth requires Simply Static Pro.","simply-static")}):(0,p.jsx)(p.Fragment,{children:Q("Once enabled we will put your entire website behind password protection.","simply-static")})}),disabled:"free"===options.plan||!l(),checked:!!e.http_basic_auth_on,onChange:e=>{t("http_basic_auth_on",e)}}),e.http_basic_auth_on&&(!e.http_basic_auth_username||!e.http_basic_auth_password)&&(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:Q("Requires Username & Password to work","simply-static")})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),!r()&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Q("Temporary Files","simply-static")})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:Q("Temporary Files Directory","simply-static"),type:"text",placeholder:options.temp_files_dir,help:Q("Optionally specify the directory to save your temporary files. This directory must exist and be writeable.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.temp_files_dir,onChange:e=>{t("temp_files_dir",e)}}),f&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Notice,{status:f.type,isDismissible:!0,onRemove:()=>b(null),children:f.message}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)(m.Button,{isSecondary:!0,onClick:async()=>{y(!0),b(null);try{const e=await o()({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:Q("Temporary files cleared.","simply-static")});else{const e=t&&t.message?t.message:Q("Could not clear temporary files.","simply-static");b({type:"error",message:e})}}catch(e){b({type:"error",message:Q("Request failed. Please try again.","simply-static")})}finally{y(!1)}},disabled:x,isBusy:x,children:Q(x?"Clearing…":"Clear Temporary Files","simply-static")})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Q("Whitelist Plugins","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.TextareaControl,{label:Q("Whitelist plugins in diagnostics","simply-static"),placeholder:"autoptimize\nwp-search-with-algolia\nwp-rocket",help:Q("If you want to exclude certain plugins from the diagnostics check add the plugin slugs here (one per line).","simply-static"),__nextHasNoMarginBottom:!0,value:e.whitelist_plugins,onChange:e=>{t("whitelist_plugins",e)}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),!r()&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Q("Proxy Setup","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.TextControl,{label:Q("Origin URL","simply-static"),type:"url",help:Q("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:e.origin_url,onChange:e=>{t("origin_url",e)}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Q("Debug Log","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.ToggleControl,{label:Q("Activate Debug Log","simply-static"),help:Q("Enable it to download the debug log from Simply Static -> Generate.","simply-static"),__nextHasNoMarginBottom:!0,checked:c,onChange:e=>{d(e),t("debugging_mode",e)}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),!r()&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Q("Cron","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.ToggleControl,{label:Q("Use server-side cron job","simply-static"),help:Q("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),t("server_cron",e)}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:Q("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:Q("Save Settings","simply-static")})})]})},{__:X}=wp.i18n,ee=function({integration:e,settings:t,toggleIntegration:s}){let i=e.active;const n=e.pro,a=e.can_run,l=e.always_active;void 0!==t.integrations&&!1!==t.integrations&&(i=t.integrations.indexOf(e.id)>=0);let o="pro"===options.plan||!n;const r="ss-adminbar"===e.id;let c=!1;r&&void 0!==t.integrations&&!1!==t.integrations&&(c=t.integrations.indexOf("ss-command-center")>=0);const d=r&&c;return(0,p.jsx)(m.Card,{children:(0,p.jsx)(m.CardHeader,{className:"ss-integration",children:(0,p.jsxs)(m.Flex,{align:"flex-start",justify:"space-between",children:[(0,p.jsxs)(m.FlexBlock,{style:{flex:"0 0 70%",maxWidth:"70%"},children:[(0,p.jsxs)("strong",{children:[e.name||e.id,"redirection"===e.id&&(0,p.jsx)(H,{title:X("Automated Redirects with Redirection","simply-static"),videoUrl:"https://youtu.be/sS4BQcZ4dN8"}),"complianz"===e.id&&(0,p.jsx)(H,{title:X("Cookie Consent with Complianz","simply-static"),videoUrl:"https://youtu.be/GPKYtt8A5QE"})]}),""!==e.description&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("br",{}),e.description]})]}),(0,p.jsxs)(m.FlexBlock,{style:{flex:"0 0 30%",maxWidth:"30%"},className:"ss-align-right ss-no-shrink",children:[!a&&(0,p.jsxs)("span",{children:[(0,p.jsx)("em",{children:"Missing Plugin"}),!o&&(0,p.jsx)("div",{children:(0,p.jsx)(m.Button,{variant:"link",href:"https://simplystatic.com/pricing/",children:X("Requires Simply Static Pro","simply-static")})})]}),a&&o&&!l&&(0,p.jsxs)(m.Flex,{justify:"flex-end",direction:"column",style:{alignItems:"flex-end"},children:[(0,p.jsx)(m.ToggleControl,{className:"integration-toggle",__nextHasNoMarginBottom:!0,checked:!d&&i,disabled:d,onChange:t=>{s(e.id,t)}}),d&&(0,p.jsx)("em",{style:{fontSize:"12px",color:"#757575"},children:X("Disabled by Command Center","simply-static")})]}),a&&o&&l&&(0,p.jsx)("em",{children:"Always Active"}),a&&!o&&(0,p.jsx)(m.Button,{variant:"primary",href:"https://simplystatic.com/pricing/",children:X("Get the Pro version","simply-static")})]})]})})})},{__:te}=wp.i18n,se=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,maybeQueueIntegration:l}=(0,a.useContext)(u),o=(s,i)=>{i?(s=>{let i=e.integrations;!1===i&&(i=[]),i.indexOf(s)>=0||(i.push(s),t("integrations",i),l(s))})(s):(s=>{let i=e.integrations;!1===i&&(i=[]);const n=i.indexOf(s);n<0||(i.splice(n,1),t("integrations",i),l(s))})(s)},r=Object.keys(options.integrations).filter(e=>options.integrations[e].can_run&&!options.integrations[e].always_active),c=Object.keys(options.integrations).filter(e=>!options.integrations[e].can_run&&!options.integrations[e].always_active);return(0,p.jsxs)("div",{className:"inner-settings",children:[r.map(t=>{const s=options.integrations[t];return(0,p.jsx)(ee,{integration:s,settings:e,toggleIntegration:o},s.id||t)}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),c.map(t=>{const s=options.integrations[t];return(0,p.jsx)(ee,{integration:s,settings:e,toggleIntegration:o},s.id||t)}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:te("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:(0,p.jsx)(m.Button,{onClick:async()=>{try{const{shouldReload:e}=await s();if(n(!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(){n(!1)},2e3)},variant:"primary",children:te("Save Settings","simply-static")})})]})},{__:ie}=wp.i18n,ne=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n}=(0,a.useContext)(u),[l,o]=(0,a.useState)({}),r="undefined"!=typeof options&&options.current_settings&&options.current_settings.ss_uam_access?options.current_settings.ss_uam_access:{},c=(0,a.useMemo)(()=>[{label:ie("Administrator","simply-static"),value:"administrator"},{label:ie("Editor","simply-static"),value:"editor"},{label:ie("Author","simply-static"),value:"author"},{label:ie("Contributor","simply-static"),value:"contributor"},{label:ie("Subscriber","simply-static"),value:"subscriber"}],[]),d=(0,a.useMemo)(()=>[{key:"activity",label:ie("Activity Log","simply-static"),route:"/"},{key:"diagnostics",label:ie("Diagnostics","simply-static"),route:"/diagnostics"}],[]),h=(0,a.useMemo)(()=>[{key:"general",label:ie("General","simply-static"),route:"/general"},{key:"deployment",label:ie("Deploy","simply-static"),route:"/deployment"},{key:"forms",label:ie("Forms","simply-static"),route:"/forms"},{key:"search",label:ie("Search","simply-static"),route:"/search"},{key:"optimize",label:ie("Optimize","simply-static"),route:"/optimize"},{key:"hide-wp",label:ie("Hide WP","simply-static"),route:"/hide-wp"},{key:"workflow",label:ie("Workflow","simply-static"),route:"/workflow"}],[]),g=(0,a.useMemo)(()=>[{key:"integrations",label:ie("Integrations","simply-static"),route:"/integrations"},{key:"utilities",label:ie("Utilities","simply-static"),route:"/utilities"},{key:"debug",label:ie("Debug","simply-static"),route:"/debug"},{key:"uam",label:ie("UAM","simply-static"),route:"/uam"}],[]),x=(0,a.useMemo)(()=>{const t=[{key:"menu_generate",label:ie("Generate","simply-static")},{key:"menu_settings",label:ie("Settings","simply-static")},{key:"menu_diagnostics",label:ie("Diagnostics","simply-static")},{key:"menu_form_connections",label:ie("Form Connections","simply-static")}];return e?.ss_use_builds&&t.push({key:"menu_builds",label:ie("Builds","simply-static")}),t},[e?.ss_use_builds]);(0,a.useEffect)(()=>{o({...e?.ss_uam_access||{}})},[e]);const y=(e,s)=>{const i={...l,[e]:s};o(i),t("ss_uam_access",i)},f=({id:e,label:t,value:s,onChange:i})=>(0,p.jsxs)(m.Flex,{align:"center",gap:3,children:[(0,p.jsx)(m.FlexItem,{style:{minWidth:260},children:(0,p.jsx)("b",{id:`${e}-label`,children:t})}),(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.SelectControl,{"aria-label":t,value:s,options:c,onChange:i})})]}),b=(e,t)=>l&&Object.prototype.hasOwnProperty.call(l,e)&&l[e]?l[e]:r&&Object.prototype.hasOwnProperty.call(r,e)&&r[e]?r[e]:t;return(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("UAM (User Access Management)","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)("p",{children:ie("Control who can access Simply Static pages, menu entries, and selected features by assigning a minimum WordPress role.","simply-static")})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("Tools","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.Flex,{direction:"column",gap:3,children:d.map(e=>{const t="activity"===e.key?"editor":"administrator";return(0,p.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)})})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("Settings","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.Flex,{direction:"column",gap:3,children:h.map(e=>(0,p.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key))})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("Advanced","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.Flex,{direction:"column",gap:3,children:g.map(e=>(0,p.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,"administrator"),onChange:t=>y(e.key,t)},e.key))})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("Menu","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.Flex,{direction:"column",gap:3,children:x.map(e=>{const t="menu_generate"===e.key?"editor":"administrator";return(0,p.jsx)(f,{id:`uam-${e.key}`,label:e.label,value:b(e.key,t),onChange:t=>y(e.key,t)},e.key)})})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:ie("Features","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsxs)(m.Flex,{direction:"column",gap:3,children:[(0,p.jsx)(f,{id:"uam-adminbar",label:ie("Admin Bar","simply-static"),value:b("adminbar","editor"),onChange:e=>y("adminbar",e)}),(0,p.jsx)(f,{id:"uam-single-export",label:ie("Single Export (Button)","simply-static"),value:b("single_export_button","editor"),onChange:e=>y("single_export_button",e)})]})})]}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:ie("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:ie("Save Settings","simply-static")})})]})};function ae(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var i,n,a=s.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)l.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}return l}"function"==typeof SuppressedError&&SuppressedError;var le=function(e){var t=e.children;return c().createElement("div",{className:"react-terminal-line"},t)};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===s&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("/**\n * Modfied version of [termynal.js](https://github.com/ines/termynal/blob/master/termynal.css).\n *\n * @author Ines Montani <ines@ines.io>\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 oe,re,ce=function(e){var t=e.redBtnCallback,s=e.yellowBtnCallback,i=e.greenBtnCallback;return c().createElement("div",{className:"react-terminal-window-buttons"},c().createElement("button",{className:"".concat(s?"clickable":""," red-btn"),disabled:!t,onClick:t}),c().createElement("button",{className:"".concat(s?"clickable":""," yellow-btn"),disabled:!s,onClick:s}),c().createElement("button",{className:"".concat(i?"clickable":""," green-btn"),disabled:!i,onClick:i}))};(re=oe||(oe={}))[re.Light=0]="Light",re[re.Dark=1]="Dark";var de=function(e){var t=e.name,s=e.prompt,i=e.height,n=void 0===i?"600px":i,a=e.colorMode,l=e.onInput,o=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?ce:g,y=ae((0,r.useState)(""),2),f=y[0],b=y[1],_=ae((0,r.useState)(0),2),j=_[0],v=_[1],w=(0,r.useRef)(null);(0,r.useEffect)(function(){b(p.trim())},[p]),(0,r.useEffect)(function(){var e,t;if(null!=l){var s=[],i=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 n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,s=t&&e[t],i=0;if(s)return s.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(document.getElementsByClassName("react-terminal-wrapper")),a=n.next();!a.done;a=n.next())i(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return function(){s.forEach(function(e){e.terminalEl.removeEventListener("click",e.listener)})}}},[l]);var S=["react-terminal-wrapper"];return a===oe.Light&&S.push("react-terminal-light"),c().createElement("div",{className:S.join(" "),"data-terminal-name":t},c().createElement(x,{redBtnCallback:u,yellowBtnCallback:h,greenBtnCallback:m}),c().createElement("div",{className:"react-terminal",style:{height:n}},o,"function"==typeof l&&c().createElement("div",{className:"react-terminal-line react-terminal-input react-terminal-active-input","data-terminal-prompt":s||"$",key:"terminal-line-prompt"},f,c().createElement("span",{className:"cursor",style:{left:"".concat(j+1,"px")}})),c().createElement("div",{ref:w})),c().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),v(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 i=e.currentTarget,n="",a=f.length-(i.selectionStart||0);a=(t=a)>(s=f.length)?s:t<0?0:t,"ArrowLeft"===e.key?(a>f.length-1&&a--,n=f.slice(f.length-1-a)):"ArrowRight"===e.key||"Delete"===e.key?n=f.slice(f.length-a+1):"ArrowUp"===e.key&&(n=f.slice(0));var o=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 i=s.getBoundingClientRect().width;return document.body.removeChild(s),-i}(i,n);v(o)}}}))};const{__:pe}=wp.i18n,ue=function(){const{isRunning:e,isResumed:t,isPaused:s,blogId:i}=(0,a.useContext)(u),[n,l]=(0,a.useState)([(0,p.jsx)(le,{children:"Waiting for new push.."},"waiting")]);function r(){o()({path:"/simplystatic/v1/activity-log?blog_id="+i+"&is_network_admin="+options.is_network,method:"GET"}).then(e=>{var t=JSON.parse(e),s=[];for(var i in t.data){var n=t.data[i].datetime,a=t.data[i].message,o=i.includes("pause")||i.includes("cancel"),r=i.includes("resume");s.push((0,p.jsxs)(le,{children:["[",n,"] ",(0,p.jsx)("span",{className:`${o?"is-error":""} ${r?"is-success":""}`,dangerouslySetInnerHTML:{__html:a}})]},i))}l(s)})}return d(()=>{r()},e?2500:null),(0,a.useEffect)(()=>{e&&!t&&l([(0,p.jsx)(le,{children:"Waiting for new push.."},"waiting")]),e&&t&&l([(0,p.jsx)(le,{children:"Resuming the push.."},"resuming")]),r()},[e]),(0,p.jsx)(de,{name:pe("Activity Log","simply-static"),height:"250px",colorMode:oe.Dark,children:n})};var he=n(757);const me=function(){const{isRunning:e,blogId:t,isPro:s,settings:i}=(0,a.useContext)(u),[n,l]=(0,a.useState)([]),[r,c]=(0,a.useState)(!1),[h,g]=(0,a.useState)(25),[x,y]=(0,a.useState)(0),[f,b]=(0,a.useState)(""),[_,j]=(0,a.useState)("export"),[v,w]=(0,a.useState)(null);(0,a.useEffect)(()=>{o()({path:"/simplystatic/v1/export-type",method:"GET"}).then(e=>{const t=JSON.parse(e);200===t.status&&t.data&&(j(t.data.export_type),w(t.data.export_type_id))}).catch(e=>{console.error("Error fetching export type:",e),options.last_export_end?j("Update"):j("export")})},[i]);const S=[{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,p.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,p.jsx)("a",{target:"_blank",href:t,children:s})},sortable:!0,sortFunction:(e,t)=>e.url.localeCompare(t.url),width:s()?"40%":"60%",wrap:!0}],C={name:"Export-Type",selector:e=>"Build"===_||"Single"===_?`${_} (ID: ${v})`:_,sortable:!0,width:"20%"},k={name:"Notes",wrap:!0,selector:e=>(0,p.jsx)("span",{dangerouslySetInnerHTML:{__html:e.notes}}),sortable:!0,sortFunction:(e,t)=>{const s=e.notes.replace(/<[^>]*>/g,""),i=t.notes.replace(/<[^>]*>/g,"");return s.localeCompare(i)},width:"28%"},P=s()?[...S,C,k]:[...S,k];function N(e,s=!1,i=f){((e=e??1)!==x||s)&&c(!0),o()({path:`/simplystatic/v1/export-log?page=${e}&per_page=${h}&blog_id=${t}&is_network_admin=${options.is_network}&search=${encodeURIComponent(i)}`,method:"GET"}).then(t=>{var i=JSON.parse(t);e!==x||s?(l(i.data),c(!1)):(n.total_static_pages=i.data.total_static_pages,l(n)),y(e)})}return d(()=>{N()},e?5e3:null),(0,a.useEffect)(()=>{N(1,!0),e&&o()({path:"/simplystatic/v1/export-type",method:"GET"}).then(e=>{const t=JSON.parse(e);200===t.status&&t.data&&(j(t.data.export_type),w(t.data.export_type_id))}).catch(e=>{console.error("Error fetching export type:",e)})},[e]),(0,p.jsxs)("div",{className:"log-table-container",children:[(0,p.jsx)(m.Flex,{children:(0,p.jsx)(m.FlexItem,{children:(0,p.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),N(1,!0,t)}})})}),(0,p.jsx)(he.Ay,{columns:P,data:n.static_pages||[],pagination:!0,paginationServer:!0,paginationTotalRows:n.total_static_pages,paginationPerPage:25,paginationRowsPerPageOptions:[25,50,100,200],progressPending:r,progressComponent:(0,p.jsxs)("div",{style:{padding:"24px",textAlign:"center"},children:[(0,p.jsx)(m.Spinner,{}),(0,p.jsx)("div",{style:{marginTop:"8px"},children:"Loading..."})]}),onChangeRowsPerPage:(e,t)=>{g(e),N(t,!0)},onChangePage:e=>{N(e)}})]})},{__:ge}=wp.i18n,xe=function(){const[e,t]=(0,a.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Button,{variant:"primary",href:options.log_file,download:!0,style:{marginRight:"10px"},children:ge("Download Log","simply-static")}),(0,p.jsx)(m.Button,{variant:"secondary",onClick:()=>{o()({path:"/simplystatic/v1/delete-log",method:"POST"}),t(!0),setTimeout(function(){t(!1)},2e3)},children:ge("Clear Log","simply-static")}),e&&(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:ge("Log file cleared.","simply-static")})})})]})},{__:ye}=wp.i18n,fe=function(e){const{children:t,canGenerate:s,isPaused:i,isDelayed:n,startExport:a,cancelExport:l,pauseExport:o,resumeExport:r,buttonLabel:c}=e,d="function"==typeof o,u="function"==typeof l,h="function"==typeof r,g="function"==typeof a;return(0,p.jsxs)("div",{className:"generate-buttons-container",children:[s&&g&&(0,p.jsxs)(m.Button,{onClick:()=>{a()},disabled:!s||n,className:"generate",children:[s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Dashicon,{icon:"update"}),c||ye("Push","simply-static")]}),s&&n>0&&(0,p.jsxs)(p.Fragment,{children:[" ",n,"s"]}),!s&&(0,p.jsx)(m.Dashicon,{icon:"update spin"})]}),!s&&(0,p.jsxs)(p.Fragment,{children:[!i&&d&&(0,p.jsx)(m.Button,{label:ye("Pause","simply-static"),className:"ss-generate-media-button","aria-label":ye("Pause","simply-static"),onClick:()=>o(),children:(0,p.jsx)(m.Dashicon,{icon:"controls-pause"})}),i&&h&&(0,p.jsx)(m.Button,{label:ye("Resume","simply-static"),className:"ss-generate-media-button","aria-label":ye("Resume","simply-static"),onClick:()=>r(),children:(0,p.jsx)(m.Dashicon,{icon:"controls-play"})}),u&&(0,p.jsx)(m.Button,{onClick:()=>l(),label:ye("Cancel","simply-static"),className:"ss-generate-cancel-button","aria-label":ye("Cancel","simply-static"),children:(0,p.jsx)(m.Dashicon,{icon:"no"})})]}),t]})},{__:be}=wp.i18n,_e=function(e){const{site:t,setAnyRunning:s}=e,i=t.id,[n,l]=(0,a.useState)(!t.running&&!t.paused),[c,d]=(0,a.useState)(t.running),[u,h]=(0,a.useState)(t.paused);(0,r.useEffect)(()=>{c&&s(!0)},[c]),(0,r.useEffect)(()=>{h(t.paused),d(t.running),l(!t.running&&!t.paused)},[t]);const g=()=>"pro"===options.plan;return(0,p.jsxs)("tr",{children:[(0,p.jsxs)("td",{children:[t.name,(0,p.jsx)("br",{}),(0,p.jsx)("a",{href:t.url,children:t.url})]}),(0,p.jsx)("td",{children:t.status}),(0,p.jsx)("td",{className:"generate-container network-generate-container",children:(0,p.jsxs)(fe,{site:t,canGenerate:n,startExport:g()?()=>{l(!1),h(!1),o()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:i,type:"export",is_network_admin:options.is_network}}).then(e=>{500!==JSON.parse(e).status?d(!0):l(!0)})}:null,isPaused:u,isRunning:c,cancelExport:g()?()=>{o()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:i,is_network_admin:options.is_network}}).then(e=>{h(!1),d(!1),l(!0)})}:null,pauseExport:g()?()=>{o()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:i,is_network_admin:options.is_network}}).then(e=>{d(!1),h(!0)})}:null,resumeExport:g()?()=>{o()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:i,is_network_admin:options.is_network}}).then(e=>{h(!1),d(!0)})}:null,children:[!g()&&(0,p.jsxs)(m.Button,{label:"Generate","aria-label":be("Generate","simply-static"),className:"generate",disabled:!0,children:[(0,p.jsx)(m.Dashicon,{icon:"update"}),be("Generate","simply-static")]}),(0,p.jsx)(m.Button,{className:"sub-site-settings",onClick:()=>window.location=t.settings_url,children:(0,p.jsx)(m.Dashicon,{icon:"admin-generic"})}),!g()&&(0,p.jsx)(m.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:be("Upgrade to manage from network.","simply-static")})]})})]})},{__:je}=wp.i18n,ve=function(e){const[t,s]=(0,a.useState)([]),[i,n]=(0,a.useState)(!1),[l,c]=(0,a.useState)(0);function u(){o()({path:"/simplystatic/v1/sites",method:"GET"}).then(e=>{let t=[],i=!1;e.data.forEach(function(e){t.push(e),e.running&&(i=!0)}),s(t),n(i)})}return d(()=>{u()},i?2500:3e5),d(()=>{var e;!l&&t.length>0&&c(t[0].id),l&&(e=l,o()({path:"/simplystatic/v1/trigger-cron",method:"POST",data:{blog_id:e}}).then(s=>{var i=JSON.parse(s);200===i.status?console.log("CRON triggered successfully for site "+e):console.error("Failed to trigger CRON:",i.message);let n=function(e){let s=function(){let e=[];return t.forEach(function(t){e.push(t.id)}),e}();if(0===s.length)return 0;let i=s.indexOf(e);return-1===i?s[0]:(i++,s[i]||s[0])}(e);c(n)}).catch(e=>{console.error("Error triggering CRON:",e)}))},i?15e4:null),(0,r.useEffect)(()=>{u()},[]),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("table",{className:"wp-list-table widefat fixed striped posts simple-static-sites",children:[(0,p.jsx)("thead",{children:(0,p.jsxs)("tr",{children:[(0,p.jsx)("th",{children:je("Name","simply-static")}),(0,p.jsx)("th",{children:je("Status","simply-static")}),(0,p.jsx)("th",{children:je("Actions","simply-static")})]})}),(0,p.jsx)("tbody",{children:t.map(e=>(0,p.jsx)(_e,{setAnyRunning:n,site:e},e.id))})]})})},{__:we}=wp.i18n;function Se(){const[e,t]=(0,a.useState)(!1);(0,a.useEffect)(()=>{try{if(options.is_network||"pro"===options.plan)return void t(!1);const e=new Date,s=e.getFullYear(),i=new Date(s,10,28,0,0,0),n=new Date(s,11,5,23,59,59),a=`ss_bf_banner_dismissed_${s}`,l=!("undefined"==typeof window||!window.localStorage)&&"1"===window.localStorage.getItem(a);t(!l&&e>=i&&e<=n)}catch(e){t(!1)}},[]);const s=()=>{try{const e=`ss_bf_banner_dismissed_${(new Date).getFullYear()}`;"undefined"!=typeof window&&window.localStorage&&window.localStorage.setItem(e,"1")}catch(e){}t(!1)};return e?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"notice",isDismissible:!0,onRemove:s,className:"bf-banner",children:(0,p.jsxs)("p",{children:[(0,p.jsx)("strong",{children:"BLACK FRIDAY"}),": Upgrade to ",(0,p.jsx)("b",{children:"Simply Static Pro"})," and save ",(0,p.jsx)("b",{children:"25%"})," by using the code ",(0,p.jsx)("b",{children:"SSBF25"})," ",(0,p.jsx)(m.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:we("Buy now","simply-static")})]})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}):null}const{__:Ce}=wp.i18n,ke=function(){const{settings:e,blogId:t,setBlogId:s}=(0,a.useContext)(u);return(0,p.jsxs)("div",{className:"inner-settings",children:[!options.is_network&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Se,{}),(0,p.jsx)(ue,{}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsxs)(m.Flex,{align:"top",children:[options.is_network&&(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsx)(m.Card,{children:(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(ve,{})})})}),e.debugging_mode&&options.log_file&&!options.is_network&&(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Ce("Debugging","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(xe,{})})]})})]}),!options.is_network&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsx)("b",{children:Ce("Export Log","simply-static")})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(me,{})})]})]})]})},{__:Pe}=wp.i18n,Ne=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l,isStudio:r}=(0,a.useContext)(u),[c,d]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),[x,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),[_,j]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[S,C]=(0,a.useState)(!1),[k,P]=(0,a.useState)(!1),[N,R]=(0,a.useState)(!1),[E,T]=(0,a.useState)(!1),[D,F]=(0,a.useState)(!1),[B,O]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[M,$]=(0,a.useState)(!1),[z,L]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{e.use_minify&&d(e.use_minify),e.minify_css&&g(e.minify_css),e.minify_js&&y(e.minify_js),e.use_css_optimize&&b(e.use_css_optimize),e.css_optimize_defer_css&&j(e.css_optimize_defer_css),e.css_optimize_defer_js&&w(e.css_optimize_defer_js),e.css_optimize_google_fonts&&C(e.css_optimize_google_fonts),e.css_optimize_delay_js&&P(e.css_optimize_delay_js),e.css_js_aggregate_css&&R(e.css_js_aggregate_css),e.css_js_aggregate_js&&T(e.css_js_aggregate_js),e.css_js_aggregate_protect_jquery&&F(e.css_js_aggregate_protect_jquery),e.use_critical_css&&O(e.use_critical_css),e.version_css&&A(e.version_css),e.version_js&&$(e.version_js)},[e]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[Pe("Minify & Aggregation","simply-static"),(0,p.jsx)(H,{title:Pe("How to minify HTML, CSS and JavaScript?","simply-static"),videoUrl:"https://youtu.be/52IKv5ai-i4"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Pe("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:Pe("Minify and aggregate CSS, JavaScript, and HTML files to reduce file sizes and HTTP requests for faster page loads.","simply-static")}),(0,p.jsx)(m.ToggleControl,{label:Pe("Enable Minify & Aggregation?","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(c?"Minify and aggregate files on your static website.":"Don't minify or aggregate files on your static website.","simply-static"),disabled:"free"===options.plan||!l(),checked:c,onChange:e=>{d(e),t("use_minify",e)}}),c&&(0,p.jsxs)(p.Fragment,{children:[!r()&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h4",{style:{marginTop:"16px",marginBottom:"8px"},children:Pe("Minify","simply-static")}),(0,p.jsx)(m.ToggleControl,{label:Pe("Minify CSS","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(h?"Minify CSS files.":"Don't minify CSS files.","simply-static"),disabled:"free"===options.plan||!l(),checked:h,onChange:e=>{g(e),t("minify_css",e)}}),h&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextareaControl,{label:Pe("Exclude Stylesheet URLs","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!l(),value:e.minify_css_exclude,onChange:e=>{t("minify_css_exclude",e)}})}),(0,p.jsx)(m.ToggleControl,{label:Pe("Minify JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(x?"Minify JavaScript files.":"Don't minify JavaScript files.","simply-static"),disabled:"free"===options.plan||!l(),checked:x,onChange:e=>{y(e),t("minify_js",e)}}),x&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextareaControl,{label:Pe("Exclude JavaScript URLs","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Exclude URLs from minification (one per line).","simply-static"),disabled:"free"===options.plan||!l(),value:e.minify_js_exclude,onChange:e=>{t("minify_js_exclude",e)}})}),(0,p.jsx)(m.ToggleControl,{label:Pe("Protect jQuery Globals","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Prevent mangling of jQuery, $, and wp global variables during JS minification.","simply-static"),disabled:"free"===options.plan||!l(),checked:D,onChange:e=>{F(e),t("css_js_aggregate_protect_jquery",e)}})]}),(0,p.jsx)("h4",{style:{marginTop:"16px",marginBottom:"8px"},children:Pe("Aggregate","simply-static")}),(0,p.jsx)(m.ToggleControl,{label:Pe("Aggregate CSS","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Combine multiple CSS files into fewer bundles grouped by media attribute and deferral status.","simply-static"),disabled:"free"===options.plan||!l(),checked:N,onChange:e=>{R(e),t("css_js_aggregate_css",e)}}),(0,p.jsx)(m.ToggleControl,{label:Pe("Aggregate JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Combine multiple JS files into fewer bundles grouped by loading attributes (defer, async, delayed) and position (head/body).","simply-static"),disabled:"free"===options.plan||!l(),checked:E,onChange:e=>{T(e),t("css_js_aggregate_js",e)}}),(0,p.jsx)(m.TextareaControl,{label:Pe("Exclude Patterns","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Glob patterns for files to exclude from aggregation (one per line). Use this for scripts that break when concatenated, such as Google Maps init scripts, payment gateway SDKs, or scripts using document.write().","simply-static"),disabled:"free"===options.plan||!l(),value:e.css_js_aggregate_exclude_patterns,placeholder:"*maps*\n*stripe*\n*paypal*",onChange:e=>{t("css_js_aggregate_exclude_patterns",e)}})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:Pe("Defer & Delay","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Pe("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:Pe("Eliminate render-blocking CSS and JavaScript resources to improve Lighthouse scores and page load speed.","simply-static")}),(0,p.jsx)(m.ToggleControl,{label:Pe("Enable Defer & Delay?","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(f?"Optimize render-blocking resources during static export.":"Don't optimize render-blocking resources.","simply-static"),disabled:"free"===options.plan||!l(),checked:f,onChange:e=>{b(e),t("use_css_optimize",e)}}),f&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.ToggleControl,{label:Pe("Defer Non-Critical CSS","simply-static"),__nextHasNoMarginBottom:!0,help:Pe('Convert non-critical stylesheets to load asynchronously using the media="print" pattern.',"simply-static"),disabled:"free"===options.plan||!l(),checked:_,onChange:e=>{j(e),t("css_optimize_defer_css",e)}}),_&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextareaControl,{label:Pe("Critical CSS Patterns","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Glob patterns for stylesheets that must remain render-blocking (one per line). Default: */style.css, */styles.css, */global.css, */theme*.css, */wp-block-*.css","simply-static"),disabled:"free"===options.plan||!l(),value:e.css_optimize_critical_patterns,placeholder:"*/style.css\n*/styles.css\n*/global.css\n*/theme*.css\n*/wp-block-*.css",onChange:e=>{t("css_optimize_critical_patterns",e)}})}),(0,p.jsx)(m.ToggleControl,{label:Pe("Defer Synchronous Scripts","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Add the defer attribute to render-blocking scripts. Preserves execution order (safe for jQuery dependencies).","simply-static"),disabled:"free"===options.plan||!l(),checked:v,onChange:e=>{w(e),t("css_optimize_defer_js",e)}}),v&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextareaControl,{label:Pe("Defer Exclude Patterns","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Additional glob patterns for scripts to exclude from deferral (one per line). Built-in patterns already exclude WordPress core scripts: jQuery, wp-i18n, wp-hooks, wp-url, wp-api-fetch, and wp-api.","simply-static"),disabled:"free"===options.plan||!l(),value:e.css_optimize_defer_js_excludes,placeholder:"*my-critical-script.js*\n*another-script*",onChange:e=>{t("css_optimize_defer_js_excludes",e)}})}),(0,p.jsx)(m.ToggleControl,{label:Pe("Optimize Google Fonts","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Preload Google Fonts stylesheets, inject preconnect hints, and add display=swap for faster font loading.","simply-static"),disabled:"free"===options.plan||!l(),checked:S,onChange:e=>{C(e),t("css_optimize_google_fonts",e)}}),(0,p.jsx)(m.ToggleControl,{label:Pe("Delay Non-Critical JavaScript","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Delay third-party scripts (analytics, tag managers, tracking pixels) until user interaction to reduce Total Blocking Time. Scripts load on first click, scroll, or keypress.","simply-static"),disabled:"free"===options.plan||!l(),checked:k,onChange:e=>{P(e),t("css_optimize_delay_js",e)}}),k&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(m.TextareaControl,{label:Pe("Additional Delay Patterns","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Additional glob patterns for scripts to delay (one per line). Built-in patterns already cover Google (Tag Manager, Analytics, Ads, ReCaptcha), HubSpot, Facebook/Meta Pixel, Hotjar, Clarity, Bing UET, Cloudflare (Insights, Turnstile), CleanTalk, Matomo/Piwik, Plausible, Twitter/X, LinkedIn, Pinterest, Tawk.to, Crisp, LiveChat, Intercom, Drift, Tidio, Segment, Amplitude, Mixpanel, Optimizely, Mouseflow, Lucky Orange, Crazy Egg, FullStory, LogRocket, and Sentry.","simply-static"),disabled:"free"===options.plan||!l(),value:e.css_optimize_delay_js_patterns,placeholder:"*example-tracking.com*\n*custom-analytics*",onChange:e=>{t("css_optimize_delay_js_patterns",e)}})})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),!r()&&(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[Pe("Image Optimization","simply-static"),(0,p.jsx)(H,{title:Pe("How to optimize images with ShortPixel?","simply-static"),videoUrl:"https://youtu.be/OIfKcXz3cxY"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Pe("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:Pe("Optimize Images with ShortPixel?","simply-static"),__nextHasNoMarginBottom:!0,help:e.shortpixel_enabled?Pe("Optimize images with the ShortPixel API.","simply-static"):Pe("Don't optimize images with the ShortPixel API.","simply-static"),disabled:"free"===options.plan||!l(),checked:!!e.shortpixel_enabled,onChange:e=>{t("shortpixel_enabled",e)}}),e.shortpixel_enabled&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextControl,{label:Pe("ShortPixel API Key","simply-static"),type:"password",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e.shortpixel_api_key,disabled:"free"===options.plan||!l(),onChange:e=>{t("shortpixel_api_key",e)}}),(0,p.jsx)(m.ToggleControl,{label:Pe("Convert to webP","simply-static"),__nextHasNoMarginBottom:!0,help:e.shortpixel_webp_enabled?Pe("Convert images to webp format.","simply-static"):Pe("Don't convert images to webp format","simply-static"),checked:!!e.shortpixel_webp_enabled,disabled:"free"===options.plan||!l(),onChange:e=>{t("shortpixel_webp_enabled",e)}}),(0,p.jsx)(m.ToggleControl,{label:Pe("Backup the original images?","simply-static"),__nextHasNoMarginBottom:!0,help:e.shortpixel_backup_enabled?Pe("Back original images.","simply-static"):Pe("Don't backup original images.","simply-static"),checked:!!e.shortpixel_backup_enabled,disabled:"free"===options.plan||!l(),onChange:e=>{t("shortpixel_backup_enabled",e)}}),e.shortpixel_backup_enabled&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Notice,{status:"warning",isDismissible:!1,children:Pe("It will preserve every image which might increase your disk space usage.","simply-static")}),(0,p.jsx)(m.__experimentalSpacer,{padding:1}),(0,p.jsxs)(m.Button,{disabled:z,onClick:()=>{L(!0),o()({path:"/simplystatic/v1/shortpixel-restore",method:"POST"}).then(e=>{const t=JSON.parse(e);L(!1),alert(t.message)}).catch(e=>{L(!1),alert(e.message)})},variant:"secondary",children:[!z&&Pe("Restore Original Images","simply-static"),z&&[(0,p.jsx)(m.Dashicon,{icon:"update spin"}),Pe("Restoring...","simply-static")]]})]})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:Pe("Critical CSS","simply-static")})}),!r()&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com/simply-static-studio/",children:[" ",Pe("Requires Simply Static Studio","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("p",{children:Pe("Generate critical above-the-fold CSS to eliminate render-blocking stylesheets and improve page load speed. Critical CSS is generated for the homepage and injected into every page.","simply-static")}),(0,p.jsx)(m.ToggleControl,{label:Pe("Enable Critical CSS Generation?","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(B?"Critical CSS will be generated during static export.":"Don't generate critical CSS.","simply-static"),disabled:!r(),checked:B,onChange:e=>{O(e),t("use_critical_css",e)}}),B&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.TextareaControl,{label:Pe("Additional URLs","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("By default, critical CSS is generated from the homepage only. Add additional page URLs here (one per line) if those pages have significantly different styles.","simply-static"),disabled:!r(),value:e.critical_css_additional_urls,placeholder:"https://example.com/about\nhttps://example.com/contact",onChange:e=>{t("critical_css_additional_urls",e)}}),(0,p.jsx)(m.TextareaControl,{label:Pe("Custom CSS","simply-static"),__nextHasNoMarginBottom:!0,help:Pe("Add custom CSS that will be appended to the generated critical CSS. Use this to fix minor visual glitches.","simply-static"),disabled:!r(),value:e.critical_css_custom,placeholder:".header { position: sticky; top: 0; }",onChange:e=>{t("critical_css_custom",e)}})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("b",{children:Pe("Versioning","simply-static")})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Pe("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:Pe("Version CSS?","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(I?"Appends a version query string to CSS files.":"Don't append a version query string to CSS files.","simply-static"),disabled:"free"===options.plan||!l(),checked:I,onChange:e=>{A(e),t("version_css",e)}}),(0,p.jsx)(m.ToggleControl,{label:Pe("Version JavaScript?","simply-static"),__nextHasNoMarginBottom:!0,help:Pe(M?"Appends a version query string to JavaScript files.":"Don't append a version query string to JavaScript files.","simply-static"),disabled:"free"===options.plan||!l(),checked:M,onChange:e=>{$(e),t("version_js",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:Pe("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&l()&&(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:Pe("Save Settings","simply-static")})})]})},{__:Re}=wp.i18n,Ee=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l}=(0,a.useContext)(u),[o,r]=(0,a.useState)("wp-content"),[c,d]=(0,a.useState)("wp-includes"),[h,g]=(0,a.useState)("uploads"),[x,y]=(0,a.useState)("plugins"),[f,b]=(0,a.useState)("themes"),[_,j]=(0,a.useState)("style"),[v,w]=(0,a.useState)("author"),[S,C]=(0,a.useState)(!1),[k,P]=(0,a.useState)(!1),[N,R]=(0,a.useState)(!1),[E,T]=(0,a.useState)(!1),[D,F]=(0,a.useState)(!1),[B,O]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[M,$]=(0,a.useState)(!1),[z,L]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{e.wp_content_directory&&r(e.wp_content_directory),e.wp_includes_directory&&d(e.wp_includes_directory),e.wp_uploads_directory&&g(e.wp_uploads_directory),e.wp_plugins_directory&&y(e.wp_plugins_directory),e.wp_themes_directory&&b(e.wp_themes_directory),e.theme_style_name&&j(e.theme_style_name),e.author_url&&w(e.author_url),e.hide_version&&C(e.hide_version),e.hide_generator&&R(e.hide_generator),e.hide_prefetch&&P(e.hide_prefetch),e.hide_rsd&&T(e.hide_rsd),e.hide_emotes&&F(e.hide_emotes),e.disable_xmlrpc&&O(e.disable_xmlrpc),e.disable_embed&&A(e.disable_embed),e.disable_db_debug&&$(e.disable_db_debug),e.disable_wlw_manifest&&L(e.disable_wlw_manifest)},[e]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[Re("Replace","simply-static"),(0,p.jsx)(H,{title:Re("How to replace WP default paths","simply-static"),videoUrl:"https://youtu.be/GedyNJJMGaY"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Re("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:Re("wp-content directory","simply-static"),help:Re('Replace the "wp-content" directory.',"simply-static"),disabled:"free"===options.plan||!l(),type:"text",placeholder:"wp-content",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o,onChange:e=>{t("wp_content_directory",e)}}),(0,p.jsx)(m.TextControl,{label:Re("wp-includes directory","simply-static"),help:Re('Replace the "wp-includes" directory.',"simply-static"),disabled:"free"===options.plan||!l(),type:"text",placeholder:"wp-includes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,onChange:e=>{t("wp_includes_directory",e)}}),(0,p.jsxs)("div",{className:"ss-directory-input-group",children:[(0,p.jsx)("label",{className:"components-base-control__label",children:Re("Uploads directory","simply-static")}),(0,p.jsxs)(m.Flex,{align:"flex-start",gap:0,children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o+"/",className:"ss-directory-prefix"})}),(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsx)(m.TextControl,{disabled:"free"===options.plan||!l(),type:"text",placeholder:"uploads",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,onChange:e=>{g(e),t("wp_uploads_directory",e)}})})]}),(0,p.jsx)("p",{className:"components-base-control__help",children:Re('Replace the "wp-content/uploads" directory.',"simply-static")})]}),(0,p.jsxs)("div",{className:"ss-directory-input-group",children:[(0,p.jsx)("label",{className:"components-base-control__label",children:Re("Plugins directory","simply-static")}),(0,p.jsxs)(m.Flex,{align:"flex-start",gap:0,children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o+"/",className:"ss-directory-prefix"})}),(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsx)(m.TextControl,{disabled:"free"===options.plan||!l(),type:"text",placeholder:"plugins",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,onChange:e=>{y(e),t("wp_plugins_directory",e)}})})]}),(0,p.jsx)("p",{className:"components-base-control__help",children:Re('Replace the "wp-content/plugins" directory.',"simply-static")})]}),(0,p.jsxs)("div",{className:"ss-directory-input-group",children:[(0,p.jsx)("label",{className:"components-base-control__label",children:Re("Themes directory","simply-static")}),(0,p.jsxs)(m.Flex,{align:"flex-start",gap:0,children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.TextControl,{disabled:!0,type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:o+"/",className:"ss-directory-prefix"})}),(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsx)(m.TextControl,{disabled:"free"===options.plan||!l(),type:"text",placeholder:"themes",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:f,onChange:e=>{b(e),t("wp_themes_directory",e)}})})]}),(0,p.jsx)("p",{className:"components-base-control__help",children:Re('Replace the "wp-content/themes" directory.',"simply-static")})]}),(0,p.jsx)(m.__experimentalInputControl,{label:Re("Theme style name","simply-static"),help:Re("Replace the style.css filename.","simply-static"),disabled:"free"===options.plan||!l(),type:"text",className:"ss-theme-style-name",suffix:".css",placeholder:"style",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:_,onChange:e=>{j(e),t("theme_style_name",e)}}),(0,p.jsx)(m.TextControl,{label:Re("Author URL","simply-static"),help:Re("Replace the author url.","simply-static"),disabled:"free"===options.plan||!l(),type:"text",placeholder:"author",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:v,onChange:e=>{w(e),t("author_url",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[Re("Hide","simply-static"),(0,p.jsx)(H,{title:Re("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Re("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:Re("Hide WordPress Version","simply-static"),__nextHasNoMarginBottom:!0,checked:S,disabled:"free"===options.plan||!l(),onChange:e=>{C(e),t("hide_version",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Hide WordPress Generator Meta","simply-static"),__nextHasNoMarginBottom:!0,checked:N,disabled:"free"===options.plan||!l(),onChange:e=>{R(e),t("hide_generator",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Hide DNS Prefetch WordPress link","simply-static"),__nextHasNoMarginBottom:!0,checked:k,disabled:"free"===options.plan||!l(),onChange:e=>{P(e),t("hide_prefetch",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Hide RSD Header","simply-static"),__nextHasNoMarginBottom:!0,checked:E,disabled:"free"===options.plan||!l(),onChange:e=>{T(e),t("hide_rsd",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)("b",{children:[Re("Disable","simply-static"),(0,p.jsx)(H,{title:Re("How to hide and disable WP core features","simply-static"),videoUrl:"https://youtu.be/GijIsrfFB8o"})]})}),("free"===options.plan||!l())&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsxs)(m.ExternalLink,{href:"https://simplystatic.com",children:[" ",Re("Requires Simply Static Pro","simply-static")]})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:Re("Disable XML-RPC","simply-static"),__nextHasNoMarginBottom:!0,checked:B,disabled:"free"===options.plan||!l(),onChange:e=>{O(e),t("disable_xmlrpc",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Disable Embed Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:I,disabled:"free"===options.plan||!l(),onChange:e=>{A(e),t("disable_embed",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Disable DB Debug in Frontend","simply-static"),__nextHasNoMarginBottom:!0,checked:M,disabled:"free"===options.plan||!l(),onChange:e=>{$(e),t("disable_db_debug",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Disable WLW Manifest Scripts","simply-static"),__nextHasNoMarginBottom:!0,checked:z,disabled:"free"===options.plan||!l(),onChange:e=>{L(e),t("disable_wlw_manifest",e)}}),(0,p.jsx)(m.ToggleControl,{label:Re("Disable Emojis","simply-static"),__nextHasNoMarginBottom:!0,checked:D,disabled:"free"===options.plan||!l(),onChange:e=>{F(e),t("hide_emotes",e)}})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:Re("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),(0,p.jsx)("div",{className:"save-settings",children:"pro"===options.plan&&l()&&(0,p.jsx)(m.Button,{onClick:()=>{s(),n(!0),setTimeout(function(){n(!1)},2e3)},variant:"primary",children:Re("Save Settings","simply-static")})})]})},{__:Te}=wp.i18n,De=function(){const{settings:e,updateSetting:t,saveSettings:s,settingsSaved:i,setSettingsSaved:n,isPro:l}=(0,a.useContext)(u),r="function"!=typeof l||!!l(),[c,d]=(0,a.useState)([]),[h,g]=(0,a.useState)({}),[x,y]=(0,a.useState)([]),[f,b]=(0,a.useState)([]),[_,j]=(0,a.useState)({}),[v,w]=(0,a.useState)([]),[S,C]=(0,a.useState)(!0),[k,P]=(0,a.useState)(!1),[N,R]=(0,a.useState)(!1),[E,T]=(0,a.useState)(3),[D,F]=(0,a.useState)(""),[B,O]=(0,a.useState)(["export","update","build","single"]),[I,A]=(0,a.useState)(!0),[H,M]=(0,a.useState)(!0),[$,z]=(0,a.useState)(!1),[L,U]=(0,a.useState)(!1),[W,G]=(0,a.useState)([]),[q,J]=(0,a.useState)([]),[Y,V]=(0,a.useState)({}),[K,Q]=(0,a.useState)([]);return(0,a.useEffect)(()=>{if(C(!1!==e.ss_use_single_exports),P(!!e.ss_single_export_add_xml_sitemap),o()({path:"/simplystatic/v1/pages"}).then(t=>{const s=t.map(e=>e.label),i={};t.forEach(e=>i[e.label]=e.value),d(s),g(i);const n=Array.isArray(e.ss_single_pages)?e.ss_single_pages:[];if(n.length>0){const e=n.map(e=>{const s=t.find(t=>String(t.value)===String(e));return s?s.label:String(e)});y(e)}}),o()({path:"/simplystatic/v1/taxonomies"}).then(t=>{const s=t.map(e=>e.label),i={};t.forEach(e=>i[e.label]=e.value),b(s),j(i);const n=Array.isArray(e.ss_single_taxonomy_archives)?e.ss_single_taxonomy_archives:[];if(n.length>0){const e=n.map(e=>{const s=t.find(t=>String(t.value)===String(e));return s?s.label:String(e)});w(e)}}),o()({path:"/simplystatic/v1/post-types",parse:!0}).then(e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void G([])}let t=Array.isArray(e)?e:e&&e.data?e.data:[];G(t)}),A(!!e.ss_single_include_archives||void 0===e.ss_single_include_archives),M(!!e.ss_single_include_pagination||void 0===e.ss_single_include_pagination),z(!!e.ss_use_builds),U(!!e.ss_tools_submenu),R(!!e.ss_single_auto_export),void 0!==e.ss_single_auto_export_delay){const t=parseInt(e.ss_single_auto_export_delay,10);T(Number.isNaN(t)?3:Math.max(0,t))}else T(3);F(e.ss_webhook_url||e.ss_single_export_webhook_url||"");Array.isArray(e.ss_webhook_enabled_types)&&e.ss_webhook_enabled_types.length?O(e.ss_webhook_enabled_types):O(e.ss_single_export_webhook_url&&e.ss_single_export_webhook_url.length?["single"]:["export","update","build","single"])},[e.ss_single_pages,e.ss_single_taxonomy_archives,e.ss_use_builds]),(0,a.useEffect)(()=>{if(!W.length)return J([]),void V({});const s=W.map(e=>e.label),i={};W.forEach(e=>i[e.label]=e.name),J(s),V(i);const n=Array.isArray(e.ss_single_auto_export_types)?e.ss_single_auto_export_types:[],a=n.filter(e=>W.some(t=>String(t.name)===String(e))),l=a.map(e=>W.find(t=>String(t.name)===String(e)).label);Q(l),Array.isArray(e.ss_single_auto_export_types)&&n.length!==a.length&&t("ss_single_auto_export_types",a)},[W,e.ss_single_auto_export_types]),(0,p.jsxs)("div",{className:"inner-settings",children:[(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("strong",{children:Te("Single Push","simply-static")})}),("free"===options.plan||!r)&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.ExternalLink,{href:"https://simplystatic.com",children:Te("Requires Simply Static Pro","simply-static")})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.ToggleControl,{label:Te("Use Single Push?","simply-static"),help:Te(S?"Quickly push updates to your static site while editing pages/posts.":"Do not allow quick updates while editing posts/pages.","simply-static"),checked:!!S,disabled:!r,onChange:e=>{r&&(C(e),t("ss_use_single_exports",e))}}),S&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.ToggleControl,{label:Te("Use Auto Push?","simply-static"),help:Te(N?"Automatically schedule a Single Push when a post/page is updated/published.":"Do not automatically run Single Push when a post/page is updated/published.","simply-static"),checked:!!N,disabled:!r,onChange:e=>{r&&(R(e),t("ss_single_auto_export",e))}}),N&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.FormTokenField,{label:Te("Auto Push Post Types","simply-static"),__next40pxDefaultSize:!0,value:K,suggestions:q,onChange:e=>{if(!r)return;const s=Object.values(Y),i=e.map(e=>Y[e]?Y[e]:s.includes(e)?e:null).filter(Boolean),n=i.map(e=>{const t=Object.entries(Y).find(([,t])=>t===e);return t?t[0]:e});Q(n),t("ss_single_auto_export_types",i)},help:Te("Choose which public post types should trigger automatic single pushes 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:!r}),(0,p.jsx)("p",{className:"description",children:Te("Choose which public post types should trigger automatic single pushes when updated. If none is selected, all public post types are used.","simply-static")})]}),N&&(0,p.jsx)(m.__experimentalInputControl,{label:Te("Auto push delay (seconds)","simply-static"),help:Te("Delay before the automatic Single Push starts after a change is detected.","simply-static"),type:"number",min:0,value:E,disabled:!r,onChange:e=>{if(!r)return;const s=parseInt(e,10),i=Number.isNaN(s)?0:Math.max(0,s);T(i),t("ss_single_auto_export_delay",i)}}),(0,p.jsx)(m.FormTokenField,{label:Te("Pages to update","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,suggestions:c,onChange:e=>{if(!r)return;y(e);const s=e.map(e=>{if(h[e])return h[e];const t=parseInt(e,10);return isNaN(t)?null:t}).filter(e=>null!==e);t("ss_single_pages",s)},help:Te("Select which pages should start a Single Push. If none selected, we use your homepage.","simply-static"),tokenizeOnSpace:!1,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,maxSuggestions:200,className:"horizontal-token-field",disabled:!r}),(0,p.jsx)("p",{className:"description",children:Te("Choose which pages/files should be updated when running a Single Push.","simply-static")}),(0,p.jsx)(m.__experimentalSpacer,{margin:2}),(0,p.jsx)(m.FormTokenField,{label:Te("Taxonomy Archives","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:v,suggestions:f,onChange:e=>{if(!r)return;w(e);const s=e.map(e=>_[e]?_[e]:e).filter(Boolean);t("ss_single_taxonomy_archives",s)},help:Te("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:!r}),(0,p.jsx)("p",{className:"description",children:Te("Choose which taxonomies should be updated when running a Single Push.","simply-static")}),(0,p.jsx)(m.__experimentalSpacer,{margin:2}),(0,p.jsx)(m.ToggleControl,{label:Te("Update archives (author/date/post_type)","simply-static"),help:Te(I?"Update archive URLs when running a Single Push.":"Do not update archive URLs.","simply-static"),checked:!!I,disabled:!r,onChange:e=>{r&&(A(e),t("ss_single_include_archives",e))}}),(0,p.jsx)(m.ToggleControl,{label:Te("Update pagination","simply-static"),help:Te(H?"Update pagination URLs when running a Single Push.":"Do not update pagination URLs.","simply-static"),checked:!!H,disabled:!r,onChange:e=>{r&&(M(e),t("ss_single_include_pagination",e))}}),(0,p.jsx)(m.ToggleControl,{label:Te("Update XML sitemap","simply-static"),help:Te(k?"Update XML sitemaps when running a Single Push.":"Do not update XML sitemaps.","simply-static"),checked:!!k,disabled:!r,onChange:e=>{r&&(P(e),t("ss_single_export_add_xml_sitemap",e))}})]})]})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("strong",{children:Te("Builds","simply-static")})}),("free"===options.plan||!r)&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.ExternalLink,{href:"https://simplystatic.com",children:Te("Requires Simply Static Pro","simply-static")})})]})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.ToggleControl,{label:Te("Enable Builds","simply-static"),help:Te($?"Use builds to quickly update a list of pages and files on your static site.":"Builds are disabled.","simply-static"),checked:!!$,disabled:!r,onChange:e=>{r&&(z(e),t("ss_use_builds",e))}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("strong",{children:Te("Tools Submenu","simply-static")})}),("free"===options.plan||!r)&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.ExternalLink,{href:"https://simplystatic.com",children:Te("Requires Simply Static Pro","simply-static")})})]})}),(0,p.jsx)(m.CardBody,{children:(0,p.jsx)(m.ToggleControl,{label:Te("Move menu to Tools submenu","simply-static"),help:Te(L?"The Simply Static menu is placed under the Tools menu in the admin sidebar.":"The Simply Static menu is shown as a top-level item in the admin sidebar.","simply-static"),checked:!!L,disabled:!r,onChange:e=>{r&&(U(e),t("ss_tools_submenu",e))}})})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Card,{children:[(0,p.jsx)(m.CardHeader,{children:(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)("strong",{children:Te("Webhook","simply-static")})}),("free"===options.plan||!r)&&(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.ExternalLink,{href:"https://simplystatic.com",children:Te("Requires Simply Static Pro","simply-static")})})]})}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)(m.TextControl,{label:Te("Webhook URL","simply-static"),placeholder:"https://example.com/webhook-endpoint",value:D,disabled:!r,onChange:e=>{r&&(F(e),t("ss_webhook_url",e))},help:Te("Simply Static will POST a JSON payload to this URL after pushes finish.","simply-static")}),(0,p.jsx)("p",{className:"description",children:Te("Fire for these push types:","simply-static")}),(0,p.jsx)("div",{className:"ss-webhook-types",children:["export","update","build","single"].map(e=>(0,p.jsx)(m.ToggleControl,{label:Te("export"===e?"Full Site":"update"===e?"Update":"build"===e?"Build":"Single","simply-static"),checked:B.includes(e),disabled:!r,onChange:s=>{if(!r)return;const i=new Set(B);s?i.add(e):i.delete(e);const n=Array.from(i);O(n),t("ss_webhook_enabled_types",n)}},e))}),(0,p.jsx)("p",{className:"description",children:Te("Payload includes event, site_url, export_type, identifiers (when available), timestamp, and success.","simply-static")})]})]}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,children:(0,p.jsx)("p",{children:Te("Settings saved successfully.","simply-static")})})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5})]}),r&&(0,p.jsx)("div",{className:"save-settings",children:(0,p.jsx)(m.Button,{onClick:()=>{r&&(s(),n(!0),setTimeout(()=>n(!1),2e3))},variant:"primary",children:Te("Save Settings","simply-static")})})]})},{__:Fe}=wp.i18n,Be=function(){const{isPro:e,isStudio:t}=(0,a.useContext)(u);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h4",{className:"settings-headline",children:Fe("Version","simply-static")}),"pro"===options.plan&&e()?(0,p.jsx)(p.Fragment,{children:t()?(0,p.jsxs)("p",{className:"version-number",children:["Free: ",(0,p.jsx)("b",{children:options.version}),(0,p.jsx)("br",{}),"Pro: ",(0,p.jsx)("b",{children:options.version_pro}),(0,p.jsx)("br",{}),"Studio: ",(0,p.jsx)("b",{children:options.version_studio})]}):(0,p.jsxs)("p",{className:"version-number",children:["Free: ",(0,p.jsx)("b",{children:options.version}),(0,p.jsx)("br",{}),"Pro: ",(0,p.jsx)("b",{children:options.version_pro})]})}):(0,p.jsxs)("p",{className:"version-number",children:["Version: ",(0,p.jsx)("b",{children:options.version})]})]})},{__:Oe}=wp.i18n,Ie=function(e=null){const{isPro:t}=(0,a.useContext)(u);return(0,p.jsxs)(m.Card,{className:"plugin-nav",children:[(0,p.jsx)("div",{className:"plugin-logo",children:(0,p.jsx)("img",{alt:"Logo",src:options.logo})}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsx)(m.__experimentalSpacer,{margin:5}),(0,p.jsxs)(m.Button,{href:"https://simplystatic.com/changelogs/",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"editor-ul"})," ",Oe("Changelog","simply-static")]}),(0,p.jsxs)(m.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-links"})," ",Oe("Documentation","simply-static")]}),"free"===options.plan&&(0,p.jsxs)(m.Button,{href:"https://simplystatic.com",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-site-alt3"}),"Simply Static Pro"]}),(0,p.jsx)(Be,{})]})},{__:Ae}=wp.i18n;function He({onClose:e,setSelectableEnvironments:t,setSelectedEnvironment:s}){const[i,n]=(0,a.useState)(""),[l,r]=(0,a.useState)(!1);return(0,p.jsxs)("div",{className:"ss-environment-form",children:[(0,p.jsx)(m.TextControl,{label:"Name",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>n(e),value:i}),(0,p.jsx)("p",{children:Ae("A new environment will be created with the current configuration.","simply-static")}),(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexBlock,{children:(0,p.jsx)(m.Button,{variant:"primary",onClick:()=>{r(!0),o()({path:"/simplystatic/v1/environment",method:"POST",data:{title:i}}).then(i=>{let n=Object.keys(i.environments).map(function(e){return{label:i.environments[e],value:e}});t(n),s(i.current_environment),e()}).catch(e=>{alert(e.message)}).finally(()=>r(!1))},isBusy:l,children:Ae(l?"Creating...":"Create","simply-static")})}),(0,p.jsx)(m.FlexBlock,{children:(0,p.jsx)(m.Button,{variant:"secondary",onClick:e,children:Ae("Cancel","simply-static")})})]})]})}const{__:Me}=wp.i18n;function $e({onChange:e,current:t,environments:s,disabled:i,onDelete:n}){return(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{style:{minWidth:"80%"},children:(0,p.jsx)(m.SelectControl,{disabled:i,value:t,options:s,help:Me("Choose an environment or create a new one to configure settings.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e})}),(0,p.jsx)(m.FlexItem,{children:(0,p.jsx)(m.Button,{className:"environment-delete-button",variant:"tertiary",label:Me("Delete selected environment","simply-static"),size:"small",icon:"trash",disabled:i,onClick:n})})]})}const{__:ze}=wp.i18n;function Le({getSettings:e,isRunning:t}){const{getIntegrationById:s}=(0,a.useContext)(u),i=()=>{try{if("undefined"==typeof options)return!1;if("pro"!==options.plan)return!1;const e=s?s("environments"):null;return!(!e||!e.active&&!e.can_run)}catch(e){return!1}},[n,l]=(0,a.useState)(""),[r,c]=(0,a.useState)([]),[d,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{i()&&o()({path:"/simplystatic/v1/environment",method:"GET"}).then(e=>{let t=Object.keys(e.environments).map(function(t){return{label:e.environments[t],value:t}});c(t),l(e.current_environment)}).catch(e=>{})},[]),(0,p.jsxs)("div",{className:"environment-container",children:[(0,p.jsxs)("h4",{className:"settings-headline",children:[" ",ze("Environment","simply-static")]}),!d&&n&&(0,p.jsxs)("p",{children:["Current: ",(0,p.jsx)("strong",{children:g?ze("Changing ...","simply-static"):r.filter(e=>e.value===n).pop().label})]}),!d&&r.length>0&&(0,p.jsx)($e,{onChange:t=>{x(!0),i()?o()({path:"/simplystatic/v1/environment",method:"PUT",data:{version:t}}).then(()=>{e(),l(t)}).catch(e=>alert(e.message)).finally(()=>{x(!1)}):x(!1)},environments:r,onDelete:()=>{x(!0),i()?o()({path:"/simplystatic/v1/environment",method:"DELETE",data:{version:n}}).then(t=>{e();let s=Object.keys(t.environments).map(function(e){return{label:t.environments[e],value:e}});c(s),l(t.current_environment)}).catch(e=>alert(e.message)).finally(()=>{x(!1)}):x(!1)},current:n,disabled:t||g}),!d&&(0,p.jsx)(m.Button,{disabled:t||g,variant:"primary",size:"large",onClick:()=>h(!0),children:"Create an Environment"}),d&&(0,p.jsx)(He,{onClose:()=>h(!1),setSelectedEnvironment:l,setSelectableEnvironments:c})]})}const{__:Ue,sprintf:We}=wp.i18n,Ge=function(e=null){const{isRunning:t,setIsRunning:s,isResumed:i,setIsResumed:n,isPaused:l,setIsPaused:r,blogId:c,settings:h,updateFromNetwork:g,getSettings:x,isPro:y,canRunIntegration:f,showMobileNav:b,setShowMobileNav:_,isDelayed:j}=(0,a.useContext)(u),{activeItem:v,setActiveItem:w}=e,[S,C]=(0,a.useState)(!1),[k,P]=(0,a.useState)("current"),[N,R]=(0,a.useState)([]),[E,T]=(0,a.useState)(!1),[D,F]=(0,a.useState)("export"),[B,O]=(0,a.useState)(!0),[I,A]=(0,a.useState)(!1),[H,M]=(0,a.useState)(0);if(options.is_multisite){const e=()=>{o()({path:"/simplystatic/v1/check-can-run",method:"GET"}).then(e=>{JSON.parse(e).can_run?O(!0):O(!1)})};d(()=>{e()},t?null:1e5),(0,a.useEffect)(()=>{e()},[])}(0,a.useEffect)(()=>{if(C(t||l),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:Ue("Use current settings","simply-static"),value:"current"}),R(e)}},[options,t,l]),(0,a.useEffect)(()=>{o()({path:"/simplystatic/v1/unpushed-changes",method:"GET"}).then(e=>{const t=JSON.parse(e),s=t.data?t.data.total:0;M(s),s>0&&"pro"===options.plan&&y()?F("update"):F("export")}).catch(()=>{M(0),F("export")})},[h,t]);let $="";if(Object.keys(options.builds).length){const e=Object.keys(options.builds).map(e=>(0,p.jsx)("option",{value:e,children:options.builds[e]},e));e.sort((e,t)=>e.props.children.localeCompare(t.props.children)),$=(0,p.jsx)("optgroup",{label:"Builds",children:e})}const z=options.integrations&&options.integrations.multilingual?options.integrations.multilingual:{},L=(void 0===options.can_export_languages||options.can_export_languages)&&"pro"===options.plan&&y()&&f("multilingual")&&z.can_run,U=L?(()=>{const e=options.languages||options.multilingual_languages||options.available_languages||[];let t=[];return t=Array.isArray(e)?e.map(e=>"string"==typeof e?{label:e,value:e}:{label:e.label||e.name||e.native_name||e.code||e.slug,value:e.value||e.code||e.slug||e.locale}):Object.keys(e).map(t=>{const s=e[t];return{label:"string"==typeof s?s:s.label||s.name||s.native_name||t,value:"string"==typeof s?t:s.value||s.code||s.slug||s.locale||t}}),t=t.filter(e=>e.label&&e.value),t})():[];let W="";U.length&&(W=(0,p.jsx)("optgroup",{label:Ue("Languages","simply-static"),children:U.map(e=>(0,p.jsx)("option",{value:`language:${e.value}`,children:e.label},e.value))})),(0,a.useEffect)(()=>{L||0!==D.indexOf("language:")||F("export")},[L,D]);const G=e=>{try{return!options.allowed_pages||options.allowed_pages.includes(e)}catch(e){return!0}},q=["/","/diagnostics"].some(G),J=["/general","/deployment","/forms","/search","/optimize","/hide-wp","/workflow"].some(G),Y=["/integrations","/utilities","/debug","/uam"].some(G);return(0,p.jsxs)(m.Card,{className:"plugin-nav",children:[(0,p.jsx)("div",{className:"plugin-logo",children:(0,p.jsx)("img",{alt:"Logo",src:options.logo})}),(0,p.jsxs)("div",{className:"generate-container "+(S?"generating":""),children:[(0,p.jsxs)(m.SelectControl,{className:"generate-type",value:D,disabled:S,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{F(e)},children:[(0,p.jsx)("option",{value:"export",children:Ue("Full Site","simply-static")}),"pro"===options.plan&&y()?(0,p.jsx)("option",{value:"update",children:Ue("Changes Only","simply-static")}):(0,p.jsx)("option",{disabled:!0,value:"update",children:Ue("Changes Only (Requires Simply Static Pro)","simply-static")}),$,W]}),B&&(0,p.jsx)(fe,{canGenerate:!S,startExport:()=>{C(!0),n(!1),r(!1);const e="language:",t=0===D.indexOf(e);o()({path:"/simplystatic/v1/start-export",method:"POST",data:{blog_id:c,type:t?"export":D,language:t?D.replace(e,""):""}}).then(e=>{var t=JSON.parse(e);if(500===t.status)return alert(t.message),void C(!1);s(!0)})},cancelExport:()=>{o()({path:"/simplystatic/v1/cancel-export",method:"POST",data:{blog_id:c}}).then(e=>{n(!1),r(!1),s(!1),C(!1)})},pauseExport:()=>{o()({path:"/simplystatic/v1/pause-export",method:"POST",data:{blog_id:c}}).then(e=>{s(!1),n(!1),r(!0)})},resumeExport:()=>{o()({path:"/simplystatic/v1/resume-export",method:"POST",data:{blog_id:c}}).then(e=>{n(!0),r(!1),s(!0)})},isRunning:t,isPaused:l,isResumed:i,isDelayed:j,buttonLabel:Ue("Push","simply-static")}),H>0&&!t&&!l&&"pro"===options.plan&&y()&&(0,p.jsx)(m.Notice,{status:"info",isDismissible:!1,className:"unpushed-changes-notice",children:(0,p.jsx)("p",{children:We(Ue("You have %d unpushed changes.","simply-static"),H)})}),H>0&&!t&&!l&&!("pro"===options.plan&&y())&&(0,p.jsx)(m.Tooltip,{text:Ue("Upgrade to Simply Static Pro to push only changes.","simply-static"),children:(0,p.jsx)(m.Notice,{status:"info",isDismissible:!1,className:"unpushed-changes-notice",children:(0,p.jsx)("p",{children:We(Ue("You have %d unpushed changes.","simply-static"),H)})})}),!B&&options.is_multisite&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Button,{disabled:!0,className:"generate",children:[(0,p.jsx)(m.Dashicon,{icon:"update"}),Ue("Push","simply-static")]}),(0,p.jsx)(m.Button,{target:"_blank",variant:"link",href:"https://simplystatic.com/pricing/",children:Ue("A push from another site is running. Upgrade to queue them.","simply-static")}),(0,p.jsx)(m.Button,{variant:"link",isBusy:I,disabled:I,onClick:()=>{A(!0),o()({path:"/simplystatic/v1/reset-export-lock",method:"POST"}).then(()=>{A(!1),O(!0)})},children:Ue("Reset push lock","simply-static")})]})]}),(0,p.jsxs)(m.CardBody,{children:["pro"===options.plan&&y()&&(0,p.jsx)(p.Fragment,{children:!options.is_network&&f("environments")&&(0,p.jsx)(Le,{isRunning:t,getSettings:x})}),!options.is_network&&options.is_multisite&&(0,p.jsxs)("div",{className:"import-container",children:[(0,p.jsxs)("h4",{className:"settings-headline",children:[" ",Ue("Import","simply-static")]}),(0,p.jsx)(m.SelectControl,{value:k,options:N,help:Ue("Choose a subsite to import settings from.","simply-static"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{P(e)}}),"current"!==k&&(0,p.jsx)(m.Button,{isPrimary:!0,onClick:()=>{(e=>{g(e),T(!0),setTimeout(function(){T(!1),window.location.reload()},3500)})(k)},children:Ue("Import Settings","simply-static")}),E?(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsx)(m.Notice,{status:"success",isDismissible:!1,className:"upgrade-network-notice",children:(0,p.jsx)("p",{children:Ue("Settings successfully imported.","simply-static")})})}):""]}),q&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("h4",{className:"settings-headline",children:[" ",Ue("Tools","simply-static")]}),G("/")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/"),_(!b)},className:"/"===v?"is-active-item generate":"generate",path:"/",children:[(0,p.jsx)(m.Dashicon,{icon:"update"})," ",Ue("Activity Log","simply-static")]}),G("/diagnostics")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/diagnostics"),_(!b)},className:"/diagnostics"===v?"is-active-item":"",path:"/diagnostics",children:[(0,p.jsx)(m.Dashicon,{icon:"bell"})," ",Ue("Diagnostics","simply-static")]})]})]}),J&&(0,p.jsxs)(m.CardBody,{children:[(0,p.jsxs)("h4",{className:"settings-headline",children:[" ",Ue("Settings","simply-static")]}),G("/general")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/general"),_(!b)},className:"/general"===v?"is-active-item":"",path:"/general",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-generic"})," ",Ue("General","simply-static")]}),!options.is_network&&!options.hidden_settings.includes("deployment")&&G("/deployment")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/deployment"),_(!b)},className:"/deployment"===v?"is-active-item":"",path:"/deployment",children:[(0,p.jsx)(m.Dashicon,{icon:"migrate"})," ",Ue("Deploy","simply-static")]}),!options.is_network&&(0,p.jsxs)(p.Fragment,{children:[G("/forms")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/forms"),_(!b)},className:"/forms"===v?"is-active-item":"",path:"/forms",children:[(0,p.jsx)(m.Dashicon,{icon:"align-center"})," ",Ue("Forms","simply-static")]}),G("/search")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/search"),_(!b)},className:"/search"===v?"is-active-item":"",path:"/search",children:[(0,p.jsx)(m.Dashicon,{icon:"search"})," ",Ue("Search","simply-static")]}),G("/optimize")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/optimize"),_(!b)},className:"/optimize"===v?"is-active-item":"",path:"/optimize",children:[(0,p.jsx)(m.Dashicon,{icon:"dashboard"})," ",Ue("Optimize","simply-static")]}),G("/hide-wp")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/hide-wp"),_(!b)},className:"/hide-wp"===v?"is-active-item":"",path:"/hide-wp",children:[(0,p.jsx)(m.Dashicon,{icon:"hidden"})," ",Ue("Hide WP","simply-static")]})]})]}),Y&&(0,p.jsxs)(m.CardBody,{children:[(0,p.jsxs)("h4",{className:"settings-headline",children:[" ",Ue("Advanced","simply-static")]}),G("/integrations")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/integrations"),_(!b)},className:"/integrations"===v?"is-active-item":"",path:"/integrations",children:[(0,p.jsx)(m.Dashicon,{icon:"block-default"})," ",Ue("Integrations","simply-static")]}),G("/workflow")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/workflow"),_(!b)},className:"/workflow"===v?"is-active-item":"",path:"/workflow",children:[(0,p.jsx)(m.Dashicon,{icon:"randomize"})," ",Ue("Workflow","simply-static")]}),G("/utilities")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/utilities"),_(!b)},className:"/utilities"===v?"is-active-item":"",path:"/utilities",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-tools"})," ",Ue("Utilities","simply-static")]}),G("/debug")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/debug"),_(!b)},className:"/debug"===v?"is-active-item":"",path:"/debug",children:[(0,p.jsx)(m.Dashicon,{icon:"editor-help"})," ",Ue("Debug","simply-static")]}),options.uam_enabled&&G("/uam")&&(0,p.jsxs)(m.__experimentalNavigatorButton,{onClick:()=>{w("/uam"),_(!b)},className:"/uam"===v?"is-active-item":"",path:"/uam",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-users"})," ",Ue("UAM","simply-static")]})]}),(0,p.jsxs)(m.CardBody,{children:[(0,p.jsx)("h4",{className:"settings-headline",children:"Learn"}),(0,p.jsxs)(m.Button,{href:"https://docs.simplystatic.com",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"admin-links"})," ",Ue("Documentation","simply-static")]}),(0,p.jsxs)(m.Button,{href:"https://www.youtube.com/playlist?list=PLcpe8_rNg8U5g1gCOa0Ge6T17f50nSvmg",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"format-video"})," ",Ue("Video Course","simply-static")]}),(0,p.jsxs)(m.Button,{href:"https://simplystatic.com/tutorials/",target:"_blank",children:[(0,p.jsx)(m.Dashicon,{icon:"edit"})," ",Ue("Tutorials","simply-static")]})]}),(0,p.jsx)(Be,{})]})},{__:qe}=wp.i18n;function Je(){return(0,p.jsxs)("div",{className:"promo-sidebar",children:[(0,p.jsx)("div",{className:"promo-card promo-card-pro",children:(0,p.jsxs)("div",{className:"promo-card-inner",children:[(0,p.jsx)("span",{className:"promo-badge",children:qe("Pro","simply-static")}),(0,p.jsx)("h3",{className:"promo-headline",children:qe("Simply Static Pro","simply-static")}),(0,p.jsx)("p",{className:"promo-description",children:qe("Unlock single push, change detection, environments, search, forms, and much more.","simply-static")}),(0,p.jsxs)("ul",{className:"promo-features",children:[(0,p.jsx)("li",{children:qe("Push only changes","simply-static")}),(0,p.jsx)("li",{children:qe("Search integration","simply-static")}),(0,p.jsx)("li",{children:qe("Form handling","simply-static")}),(0,p.jsx)("li",{children:qe("Multilingual support","simply-static")}),(0,p.jsx)("li",{children:qe("Minification and image optimization","simply-static")})]}),(0,p.jsx)(m.Button,{isPrimary:!0,href:"https://simplystatic.com/simply-static-pro/?utm_source=plugin&utm_medium=promo-sidebar&utm_campaign=pro",target:"_blank",rel:"noopener noreferrer",className:"promo-button",children:qe("Get Simply Static Pro →","simply-static")})]})}),(0,p.jsx)("div",{className:"promo-card promo-card-studio",children:(0,p.jsxs)("div",{className:"promo-card-inner",children:[(0,p.jsx)("span",{className:"promo-badge promo-badge-studio",children:qe("Studio","simply-static")}),(0,p.jsx)("h3",{className:"promo-headline",children:qe("Simply Static Studio","simply-static")}),(0,p.jsx)("p",{className:"promo-description",children:qe("The all-in-one hosting platform for Static WordPress — including WordPress hosting, static site hosting via CDN, zero configuration, and all Pro features.","simply-static")}),(0,p.jsxs)("ul",{className:"promo-features",children:[(0,p.jsx)("li",{children:qe("WordPress hosting included","simply-static")}),(0,p.jsx)("li",{children:qe("Static hosting via global CDN","simply-static")}),(0,p.jsx)("li",{children:qe("Zero configuration","simply-static")}),(0,p.jsx)("li",{children:qe("All Pro features included","simply-static")})]}),(0,p.jsx)(m.Button,{isPrimary:!0,href:"https://simplystatic.com/simply-static-studio/?utm_source=plugin&utm_medium=promo-sidebar&utm_campaign=studio",target:"_blank",rel:"noopener noreferrer",className:"promo-button promo-button-studio",children:qe("Start 7-Day Free Trial →","simply-static")})]})})]})}const{__:Ye}=wp.i18n,Ve=["/","/diagnostics","/general","/deployment","/forms","/search","/optimize","/hide-wp","/workflow","/utilities","/debug","/uam","/integrations"],Ke={"activity-log":"/",generate:"/",deploy:"/deployment"},Qe=()=>{if("undefined"==typeof window||!window.location.hash)return null;let e=window.location.hash.replace(/^#\/?/,"").split("?")[0];try{e=decodeURIComponent(e).trim()}catch(e){return null}if(!e)return null;if(Ke[e])return Ke[e];const t=`/${e}`;return Ve.includes(t)?t:null},Ze=function(){const{isRunning:e,isPaused:t,passedChecks:s,isPro:i,showMobileNav:n,setShowMobileNav:l,settings:o}=(0,a.useContext)(u),r=e=>(e=>{try{return!(!Ve.includes(e)||options.allowed_pages&&!options.allowed_pages.includes(e)||"/deployment"===e&&options.hidden_settings&&options.hidden_settings.includes("deployment")||"/uam"===e&&!options.uam_enabled)}catch(e){return!0}})(e)?e:options.initial,c=()=>{const e=Qe();return r(e||(localStorage.getItem("ss-initial-page")?localStorage.getItem("ss-initial-page"):options.initial))},[d,h]=(0,a.useState)(c),[g,x]=(0,a.useState)(c),[y,f]=(0,a.useState)(!1),b=e=>{"undefined"!=typeof window&&window.history&&window.history.replaceState&&window.history.replaceState({...window.history.state,ssRoute:e},"",window.location.href)};(0,a.useEffect)(()=>{let e=localStorage.getItem("ss-initial-page");const t=Qe();if(!y){f(!0);let s=options.initial;t?s=t:e&&(s=e,localStorage.removeItem("ss-initial-page"));const i=r(s);h(i),x(i),b(i)}},[options,e,t]),(0,a.useEffect)(()=>{const e=()=>{const e=r(Qe()||(()=>{if("undefined"==typeof window||!window.history||!window.history.state)return null;const e=window.history.state.ssRoute;return Ve.includes(e)?e:null})()||options.initial);h(e),x(e)};return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),()=>{window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e)}},[]);const _=e=>{if(h(e),"undefined"==typeof window||!window.history)return;const t=(e=>"/"===e?"":e.replace(/^\//,""))(e);t?window.location.hash!==`#${t}`?window.history.pushState({...window.history.state,ssRoute:e},"",`#${t}`):b(e):window.location.hash?window.history.pushState({...window.history.state,ssRoute:e},"",`${window.location.pathname}${window.location.search}`):b(e)};return(0,p.jsx)("div",{className:"plugin-settings-container",children:(0,p.jsxs)(m.__experimentalNavigatorProvider,{initialPath:g,style:{minHeight:window.innerHeight-(wpadminbar?wpadminbar.clientHeight:0)-1+"px"},children:[(0,p.jsxs)("a",{onClick:()=>{l(!0)},className:"show-nav",children:[(0,p.jsx)(m.Dashicon,{icon:"align-center"})," ",Ye("Toggle menu","simply-static")]}),n&&(0,p.jsxs)("div",{className:"mobile-nav-overlay",children:[(0,p.jsxs)("div",{className:"mobile-nav-header",children:[(0,p.jsx)("span",{children:Ye("Menu","simply-static")}),(0,p.jsx)(m.Button,{isSmall:!0,variant:"tertiary",onClick:()=>l(!1),children:(0,p.jsx)(m.Dashicon,{icon:"no-alt"})})]}),(0,p.jsx)("div",{className:"mobile-nav-content",children:options.is_network?(0,p.jsx)(Ie,{}):(0,p.jsx)(Ge,{setActiveItem:_,activeItem:d})})]}),(0,p.jsxs)(m.Flex,{children:[(0,p.jsx)(m.FlexItem,{className:"sidebar",children:options.is_network?(0,p.jsx)(Ie,{}):(0,p.jsx)(Ge,{setActiveItem:_,activeItem:d})}),(0,p.jsx)(m.FlexItem,{isBlock:!0,children:(0,p.jsxs)("div",{className:"plugin-settings",children:["no"!==s||options.is_network?"":(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsxs)(m.Notice,{status:"notice",isDismissible:!1,className:"/"==d?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,p.jsxs)("p",{children:[Ye("There are errors in diagnostics that may negatively affect your static push.","simply-static"),(0,p.jsx)("br",{}),Ye("Please review them and get them fixed to avoid problems.","simply-static")]}),(0,p.jsxs)(m.__experimentalNavigatorButton,{isSecondary:!0,onClick:()=>{_("/diagnostics"),l(!n)},className:"/diagnostics"===d?"is-active-item":"",path:"/diagnostics",children:[(0,p.jsx)(m.Dashicon,{icon:"editor-help"})," ",Ye("Visit Diagnostics","simply-static")]})]})}),"pro"!==options.plan||i()?"":(0,p.jsx)(m.Animate,{type:"slide-in",options:{origin:"top"},children:()=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Notice,{status:"error",isDismissible:!1,className:"/"==d?"diagnostics-notice diagnostics-notice-generate":"diagnostics-notice",children:[(0,p.jsxs)("p",{children:[Ye("You are using the pro version without a valid license.","simply-static"),(0,p.jsx)("br",{}),Ye("We have temporarily disabled all the pro features now. Please contact our support to have the problem solved.","simply-static")]}),(0,p.jsx)(m.Button,{isPrimary:!0,href:"https://simplystatic.com/support/",target:"_blank",children:"Contact Support"})]}),(0,p.jsx)(m.__experimentalSpacer,{margin:"5px"})]})}),"/"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/",children:(0,p.jsx)(ke,{})}),"/diagnostics"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/diagnostics",children:(0,p.jsx)(L,{})}),"/general"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/general",children:(0,p.jsx)($,{})}),"/deployment"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/deployment",children:(0,p.jsx)(q,{})}),"/forms"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/forms",children:(0,p.jsx)(Y,{})}),"/search"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/search",children:(0,p.jsx)(K,{})}),"/optimize"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/optimize",children:(0,p.jsx)(Ne,{})}),"/hide-wp"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/hide-wp",children:(0,p.jsx)(Ee,{})}),"/workflow"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/workflow",children:(0,p.jsx)(De,{})}),"/utilities"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/utilities",children:(0,p.jsx)(W,{})}),"/debug"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/debug",children:(0,p.jsx)(Z,{})}),"/uam"===d&&options.uam_enabled&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/uam",children:(0,p.jsx)(ne,{})}),"/integrations"===d&&(0,p.jsx)(m.__experimentalNavigatorScreen,{path:"/integrations",children:(0,p.jsx)(se,{})})]})}),"pro"!==options.plan&&(0,p.jsx)(m.FlexItem,{className:"promo-sidebar-container",children:(0,p.jsx)(Je,{})})]})]})})},Xe=function(){return(0,p.jsx)(h,{children:(0,p.jsx)("div",{children:(0,p.jsx)(Ze,{})})})};"simplystatic-settings"===options.screen&&(0,a.createRoot)(document.getElementById("simplystatic-settings")).render((0,p.jsx)(Xe,{}))})();